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

fix: version should be set by pyproject.toml #2471

Merged
merged 2 commits into from
Sep 7, 2023

Conversation

dbluhm
Copy link
Member

@dbluhm dbluhm commented Sep 6, 2023

aries_cloudagent.version.__version__ was out of sync with the version listed in the pyproject.toml file. The pyproject.toml file should be the source of truth as it will be used when publishing using poetry. However, __version__ is used in code for some operations. To ensure that the pyproject file and the __version__ can't get out of sync, aries_cloudagent.version will now be read from the package metadata.

Update: I was previously trying to read from pyproject.toml. This was a naive approach that wouldn't have worked after installing ACA-Py as a pip package. The better solution is the one I've switched to, just reading the package metadata.

@swcurran
Copy link
Member

swcurran commented Sep 6, 2023

Dang — I didn’t get the memo about that addition. I’ll update the “Publishing.md” doc to add that. However, in that document, I did say double check that there is not the version somewhere else so I should have caught it…

🦤

Bigger question — does this mean we need to do a 0.10.2 to get this properly published?

@dbluhm
Copy link
Member Author

dbluhm commented Sep 6, 2023

@swcurran No, 0.10.1 is valid since it was published before we merged the poetry PR. So no changes required for the release.

@swcurran
Copy link
Member

swcurran commented Sep 6, 2023

Of course. Phewww…. I didn’t mess up :-)

swcurran
swcurran previously approved these changes Sep 6, 2023
usingtechnology
usingtechnology previously approved these changes Sep 6, 2023
Copy link
Contributor

@usingtechnology usingtechnology left a comment

Choose a reason for hiding this comment

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

great catch and fix.

@dbluhm dbluhm dismissed stale reviews from usingtechnology and swcurran via d1dc71e September 6, 2023 16:05
@dbluhm dbluhm force-pushed the fix/version-read-from-pyproject branch from 996d17a to d1dc71e Compare September 6, 2023 16:05
@dbluhm
Copy link
Member Author

dbluhm commented Sep 6, 2023

@swcurran @usingtechnology Sorry, fixing the conflicts on poetry.lock dismissed your reviews -- this should be ready to merge now though!

usingtechnology
usingtechnology previously approved these changes Sep 6, 2023
@dbluhm
Copy link
Member Author

dbluhm commented Sep 6, 2023

I need to resolve issues in integration tests. My path to the pyproject.toml is bad. This isn't urgent (until we start preparing for another release) so I'll mark this as a draft and we can get some of the other pending PRs merged first.

`aries_cloudagent.version.__version__` was out of sync with the version
listed in the pyproject.toml file. The pyproject.toml file should be the
source of truth as it will be used when publishing using poetry.
However, `__version__` is used in code for some operations. To ensure
that the pyproject file and the `__version__` can't get out of sync,
`aries_cloudagent.version` will now read from the package metadata to
obtain the version.

Signed-off-by: Daniel Bluhm <dbluhm@pm.me>
@dbluhm dbluhm force-pushed the fix/version-read-from-pyproject branch from bc9a7e2 to 492091e Compare September 7, 2023 13:50
@dbluhm dbluhm marked this pull request as ready for review September 7, 2023 13:58
@dbluhm
Copy link
Member Author

dbluhm commented Sep 7, 2023

@usingtechnology @swcurran this is ready for another review.

Signed-off-by: Daniel Bluhm <dbluhm@pm.me>
@sonarcloud
Copy link

sonarcloud bot commented Sep 7, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@dbluhm dbluhm merged commit 56cd983 into hyperledger:main Sep 7, 2023
9 checks passed
@dbluhm dbluhm deleted the fix/version-read-from-pyproject branch January 30, 2024 21:31
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.

3 participants