Skip to content
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

Updates to follow pep 440 versioning for pipelines #163

Merged
merged 6 commits into from Nov 3, 2023

Conversation

bryce-turner
Copy link
Member

Updates to follow pep 440 versioning for pipelines, this is close to how we have been versioning the pipelines already, but now we will better support the usage of the dev, alpha, beta, and rc identifiers; additionally, versions with and without v. Along with this, we now can use development as an alias to grabbing the most recent dev version of a pipeline. Legacy pipelines that are using development as their version will still be considered as the most recent dev version, otherwise the sort order is largely the same a before.

This also fixes a bug that pops up with using packaging >= 22.0, as in this version range development is not a valid version. We override this behavior and say that development is the highest version possible and is still considered as a dev version.

For example if given the following versions:

1.0.0
1.1.2
1.1.3.dev

We should now expect the following behavior:

jetstream pipelines somepipeline@1.0.0		## Returns 1.0.0
jetstream pipelines somepipeline@v1.0.0		## Also returns 1.0.0
jetstream pipelines somepipeline@latest		## Returns 1.1.2
jetstream pipelines somepipeline@dev		## Returns 1.1.3.dev

If we still have legacy versions, e.g.:

v0.9.1
 1.0.0
 1.1.2
 1.1.3.dev
development

we expect the following behavior:

jetstream pipelines somepipeline@0.9.1		## Returns v0.9.1
jetstream pipelines somepipeline@v1.0.0		## Returns 1.0.0
jetstream pipelines somepipeline@latest		## Returns 1.1.2
jetstream pipelines somepipeline@dev		## Returns development

Finally, jetstream pipelines will now return a sorted list, previously this was somewhat random as there was not a function for identifying if one version was greater than the other in terms of sort order. This is fixed by adding __eq__ and __lt__.

…imilar labels as an alias to grabbing the most recent pipeline version

This allows us to be able to request "pipeline@1.0.0.dev1" via "pipeline@development".
Additionally if "pipeline@development" does exist in the search path, it is considered as the most recent version.
… and we can say that v1.0.0 is logically equivalent to 1.0.0 when a user requests pipeline@1.0.0
…re SIGPIPE friendly. These changes allow for a cleaner output from `jetstream pipelines -v pipeline@v1.0.0 | head`.
…ld be more SIGPIPE friendly. These changes allow for a cleaner output from `jetstream pipelines -v pipeline@v1.0.0 | head`."

This reverts commit af24a18. Previous commit failed pytest and this isn't in the scope of the features for this branch.
Copy link
Member

@PedalheadPHX PedalheadPHX left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, and I learned wath epochs are

@PedalheadPHX PedalheadPHX merged commit f9c735f into develop Nov 3, 2023
5 checks passed
@PedalheadPHX PedalheadPHX deleted the pep440_versioning_adaptations branch November 3, 2023 00:36
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.

None yet

3 participants