Skip to content

Python client -- issues with version coupling and automatic releases #1296

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
melange396 opened this issue Oct 2, 2023 · 4 comments · Fixed by #1465
Closed

Python client -- issues with version coupling and automatic releases #1296

melange396 opened this issue Oct 2, 2023 · 4 comments · Fixed by #1465
Assignees
Labels
help wanted python client changes the Python client user experience things that affect users of our software or services

Comments

@melange396
Copy link
Collaborator

The version of the delphi_epidata python client is bound to the version of the repository. This means that a new version of the client is automatically published to PyPI whenever we do a release of delphi-epidata, even if the client code has not actually changed. This can confuse or annoy users, as it might encourage them to do frequent but unnecessary upgrades. There are also concerns regarding what to do if we make changes to the client interface that might break users' existing workflows -- in such a case, Semantic Versioning necessitates incrementing the "major" version number, but this may be undesirable to apply to the entire repository.

We can address this in a number of ways:

This discussion came up in #1288. Additional points are made and details listed in that PR, starting with comment #1288 (comment) .

Similar concerns may exist for the other clients in this repo.

@melange396 melange396 added help wanted python client changes the Python client user experience things that affect users of our software or services labels Oct 2, 2023
@melange396
Copy link
Collaborator Author

We are going to do the second bullet point above, as it integrates well with checking against the most current PyPI release as mentioned in #1281 (comment)

@melange396 melange396 mentioned this issue May 29, 2024
4 tasks
@rzats
Copy link
Contributor

rzats commented May 31, 2024

@melange396 one quick question before I create a PR for this!

Ideally I'd like to automatically release the Python and JS clients if the relevant files have been changed, and there are GitHub Actions that enable this. However:

Changes to the client (other than just version number) would be found in the file https://github.com/cmu-delphi/delphi-epidata/blob/dev/src/client/delphi_epidata.py and anything under the directory https://github.com/cmu-delphi/delphi-epidata/tree/dev/src/client/packaging/pypi

Currently, a couple files in these paths have bumpversion enabled:

[bumpversion:file:src/client/delphi_epidata.py] (recently changed)

[bumpversion:file:src/client/packaging/npm/package.json] (managed by bumpversion before)

[bumpversion:file:src/client/packaging/pypi/setup.py] (managed by bumpversion before)

So they would be changed with every release either way.

I have two potential solutions for this:

  1. Do not automate the client release, instead simply decouple the Python & JS release steps as an extra manual workflow (and modify the release guide to mention this)
  • This decoupled workflow would simply work like create-release.yml - put in a version number to get a Python and/or JS release.
  1. Rethink how we single-source the version again. This would mean excluding delphi_epidata.py, package.json and setup.py from bumpversion, and figuring out another way to update the versions there.
  • As Dmitry has mentioned, there are a couple suggested ways of doing this. The 4th suggestion (a separate VERSION file) might make sense, as it is supported by JavaScript as well.

Which do you think is preferable?

@melange396
Copy link
Collaborator Author

There are other possibilities too:

I like the last one best but i could be convinced to go along with the CHANGELOG-dependent one.

@rzats
Copy link
Contributor

rzats commented Jun 3, 2024

@melange396 I've implemented your last idea in #1465!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted python client changes the Python client user experience things that affect users of our software or services
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants