-
Notifications
You must be signed in to change notification settings - Fork 8
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
Check package versions using git tags #116
Comments
In either way, I propose to standardize on the following structure for the names of the tags: |
Proposal for test and for standardized tags accepted. I've created tags for MORFEO / MICADO / METIS on a963211 , which is on |
Some more weekend-thoughts on IRDB versioning and workflow. Disclaimer: The following is meant to be read as a formalized train of thought from A to B, hence the "draft", "conflict", "solution", "updated draft". Hope that makes sense... Notation
Versioning requirements
Versioning draftIRDB uses Calender Versioning to mark different versions for instrument packages, making it easy to keep track of changes across time. The scheme for the version number is Example workflow for a single IRDB packageSquare boxes indicate a commit that sets the version number in the gitGraph
commit type: HIGHLIGHT tag: "2023-04-20"
branch feature_1
checkout feature_1
commit
commit type: HIGHLIGHT tag: "2023-07-05.dev"
commit
commit type: HIGHLIGHT tag: "2023-07-10.dev"
checkout main
merge feature_1
commit type: HIGHLIGHT tag: "2023-07-11"
branch feature_2
checkout feature_2
commit
checkout main
merge feature_2
commit type: HIGHLIGHT tag: "2023-07-18"
branch feature_3
checkout feature_3
commit
commit type: HIGHLIGHT tag: "2023-07-25.dev"
ConflictAn issue occurs when e.g. the following all happens on a single day: gitGraph
commit type: HIGHLIGHT tag: "2023-04-20"
branch feature_1
checkout feature_1
commit
commit type: HIGHLIGHT tag: "2023-07-11.dev"
commit
commit type: HIGHLIGHT tag: "2023-07-11.dev??"
checkout main
merge feature_1
commit type: HIGHLIGHT tag: "2023-07-11"
branch feature_2
checkout feature_2
commit
checkout main
merge feature_2
commit type: HIGHLIGHT tag: "2023-07-11.dev??"
branch feature_3
checkout feature_3
commit
commit type: HIGHLIGHT tag: "2023-07-11.dev??"
How should the version numbers be assigned, such that the requirements outlined above are met at any point in this process? Possible solutionA possibility could be to append an alphabetic gitGraph
commit type: HIGHLIGHT tag: "2023-04-20"
branch feature_1
checkout feature_1
commit
commit type: HIGHLIGHT tag: "2023-07-11.dev"
commit
commit type: HIGHLIGHT tag: "2023-07-11_a.dev"
checkout main
merge feature_1
commit type: HIGHLIGHT tag: "2023-07-11_b"
branch feature_2
checkout feature_2
commit
checkout main
merge feature_2
commit type: HIGHLIGHT tag: "2023-07-11_c"
branch feature_3
checkout feature_3
commit
commit type: HIGHLIGHT tag: "2023-07-11_d.dev"
Updated versioning draftIRDB uses Calender Versioning to mark different versions for instrument packages, making it easy to keep track of changes across time. The scheme for the version number is In other words, the version number must match the regex ChangeoverThis is still compatible with my previous comment, so would not break what we did in the last few days. |
Seems like a great plan! And, wow, these mermaid graphs look cool. 1 question with some suggestions and three minor comments. Three comments first:
Now for the question: What does the There are several ways to 'fix' that outdated-version problem:
Options 2 and 3 above both have exactly one commit in the repository with a specific version in Below are two commit graph, mainly so I could exercise using mermaid. The commit graph of your first figure, adapted for suggestion 2. This looks horrible in mermaid, but all the 'release branches' are supposed to be dead ends, so multiple of them could be on the same height to make the figure easier to read. I also tried to put the release branches for stable versions above the line for the main branch, but that doesn't seem to be possible. gitGraph
commit
branch "2023-04-20"
commit type: HIGHLIGHT tag: "2023-04-20"
checkout main
branch feature_1
checkout feature_1
commit
branch "2023-07-05.dev"
commit type: HIGHLIGHT tag: "2023-07-05.dev"
checkout feature_1
commit
branch "2023-07-10.dev"
commit type: HIGHLIGHT tag: "2023-07-10.dev"
checkout main
merge feature_1
branch "2023-07-11"
commit type: HIGHLIGHT tag: "2023-07-11"
checkout main
branch feature_2
checkout feature_2
commit
checkout main
merge feature_2
branch "2023-07-18"
commit type: HIGHLIGHT tag: "2023-07-18"
checkout main
branch feature_3
checkout feature_3
commit
branch "2023-07-25.dev"
commit type: HIGHLIGHT tag: "2023-07-25.dev"
Commit graph for option 3. Here I used the gitGraph
commit type: HIGHLIGHT tag: "2023-04-20"
commit type:REVERSE
branch feature_1
checkout feature_1
commit
commit type: HIGHLIGHT tag: "2023-07-05.dev"
commit type:REVERSE
commit
commit type: HIGHLIGHT tag: "2023-07-10.dev"
commit type:REVERSE
checkout main
merge feature_1
commit type: HIGHLIGHT tag: "2023-07-11"
commit type:REVERSE
branch feature_2
checkout feature_2
commit
checkout main
merge feature_2
commit type: HIGHLIGHT tag: "2023-07-18"
commit type:REVERSE
branch feature_3
checkout feature_3
commit
commit type: HIGHLIGHT tag: "2023-07-25.dev"
commit type:REVERSE
|
After bit more thought, I'm now in favor of option 1, never include a version in About complexity and automationWhatever scheme we do, I'm assuming it will be primarily automated. As in, all three options I give are complex enough to become error-prone when done manually. But I think complexity should only matter w.r.t. whether people can understand our flow. I'd rate the clarity of my three options from easy to hard as Option 1, Option 3, Option 2, simply by looking at the figures. So that would be a plus for option 1. About versions in the documentationI realized there will always be other places with the version number than My main reluctance to advocate for option 1 was that this will tie us to git: e.g. if you'd do a What do others do?Other projects seem to go for option 1 as well. https://github.com/astropy/astropy/blob/main/astropy/version.py |
Comments on your comments etc.:
That was my idea as well. I don't want to get into the whole
Indeed. As mentioned (I think I mentioned it, but who knows) I've been working on a revised implementation of the package upload in the background, which doesn't use that file anymore. That's basically done except for tests. But I guess there might be a few modifications needed as a result of this discussion (which is good). Although I'm reluctant to deleting
Invalid dates might produce an error in
I was working under the assumption that the enduser will only use packages installed from a
When I started reading this, my first "gut feeling" made me gravitate towards option 1. Reading your next comment reassured me in that. Option 3 would be next-best for me. I'm reluctant towards option 2, mostly because we would pollute our repo with an ever-growing number of branches. Even though those are dead-ends, if I understand correctly they would not be deleted, right? Maybe that's just personal preference, but I like keeping the number of branches low. For tags, it's a different story though.
Most notably, the version number also appears in the name of the But I'm confident we'll find a robust solution for e.g. version numbers in docs. That seems to be the smaller issue.
Sounds ..... good?
That is possible, I've done it recently while pondering about the workflow for ScopeSim (also with the release branch^^). Although it ends up looking weird sometime, mostly in how the lines split and merge. I think that while it's possible, it's not really meant to be done I guess. |
There used to be a test checking the version information in each package against the information in the
packages.yaml
file (at least for all packages present in that file). Since we deprecated the use of this file, more or less, these tests now fail when a package version is changed. In #115, I disables the test temporarily, but some form of it should probably still exist.My idea would be to use git tags for this. There will now be a separate tag for each package released in this "Summer 2023" release, and there should be new tags for any new release. The test could then:
a. read all the existing tags for each package, pick the newest, and check if the version set in that package's
version.yaml
file matches; orb. read the version info in each package's
version.yaml
file, and check if there's a matching git tag.Additionally, the test could verify if the tag points to a commit that actually changed the
version.yaml
file, to make sure we're pointing to the right thing.@hugobuddel, thoughts?
The text was updated successfully, but these errors were encountered: