Skip to content

Conversation

@andrew-s28
Copy link
Contributor

This adds dependencies to the pyproject.toml files (except for the c compiler dependency, which cannot be installed from pip) and includes a basic test in the pypi-release workflow that uses conda to install a c compiler then pip installs the Parcels release from PyPi and runs the example_peninsula.py file. This is meant to mimic the workflow in the conda recipe and should hopefully simplify efforts to keep pyproject.toml up to date.

The updated workflow was tested on my personal test.pypi.org release.

Closes #1550

@erikvansebille
Copy link
Member

Thanks for adding this workflow, @andrew-s28! However, it doesn't seem to be triggered by Actions. Not sure why, I already renamed it from pypi-release.yaml to pypi.release.yml. Do you know what I should do to automatically have it checked by Actions?

@VascoSch92
Copy link
Contributor

Thanks for adding this workflow, @andrew-s28! However, it doesn't seem to be triggered by Actions. Not sure why, I already renamed it from pypi-release.yaml to pypi.release.yml. Do you know what I should do to automatically have it checked by Actions?

How you tried?
because the workflow is triggered just if the job upload-to-pypi is executed. This last job is executed just when there is a release. i.e., you need to release a version to check this job.

Just to check if it works
@erikvansebille
Copy link
Member

Thanks @VascoSch92, I didn't realise that the Action will only be triggered upon release. Before merging, I would want to check if it indeed passes all tests, as intended, though. So I now (temporarily?) added a check for every pull-request. But the test-pypi_release was skipped so not tested; do you know why?

@VascoSch92
Copy link
Contributor

Thanks @VascoSch92, I didn't realise that the Action will only be triggered upon release. Before merging, I would want to check if it indeed passes all tests, as intended, though. So I now (temporarily?) added a check for every pull-request. But the test-pypi_release was skipped so not tested; do you know why?

Thanks @VascoSch92, I didn't realise that the Action will only be triggered upon release. Before merging, I would want to check if it indeed passes all tests, as intended, though. So I now (temporarily?) added a check for every pull-request. But the test-pypi_release was skipped so not tested; do you know why?

Because the job upload-to-pypi is trigger just when if: github.event_name == 'release'. and the test-pypi_release need this job.

I think the beast way to test it is to delete needs: upload-to-pypi
In this way you can see if the job work and before merging you can re-add it to the workflow

@VascoSch92
Copy link
Contributor

Nice :-)

@erikvansebille erikvansebille merged commit c2bf42c into Parcels-code:master May 27, 2024
@andrew-s28 andrew-s28 deleted the pypi_release_updates branch May 28, 2024 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing dependencies in pyproject.toml

3 participants