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 pins #192

Merged
merged 15 commits into from
Oct 8, 2024
Merged

Fix version pins #192

merged 15 commits into from
Oct 8, 2024

Conversation

nanglo123
Copy link
Contributor

@nanglo123 nanglo123 commented Sep 13, 2024

This PR fixes a bug where VERSION_PINS is always set to an empty dictionary due to a misaligned indent. We also handle invalid prefixes and version datatypes more gracefully and make the logger more informative.

@cthoyt
Copy link
Member

cthoyt commented Sep 23, 2024

please lets get 100% unit tests on this code (including the last PR that introduced this), since I think it will be very hard to understand in the future

@nanglo123
Copy link
Contributor Author

please lets get 100% unit tests on this code (including the last PR that introduced this), since I think it will be very hard to understand in the future

I added some unit tests. Please let me know if any other tests could be added to increase coverage.

@cthoyt
Copy link
Member

cthoyt commented Sep 26, 2024

@nanglo123 you'll need to mock the environment variables for these tests to be meaningful. I'd suggest encapsulating all of the logic that handles the environment variable in a function so you can test it separately

@nanglo123
Copy link
Contributor Author

@nanglo123 you'll need to mock the environment variables for these tests to be meaningful. I'd suggest encapsulating all of the logic that handles the environment variable in a function so you can test it separately

@cthoyt Are these changes more in line with what you expect? Let me know if anything could be improved.

src/pyobo/api/utils.py Outdated Show resolved Hide resolved
src/pyobo/api/utils.py Outdated Show resolved Hide resolved
src/pyobo/api/utils.py Outdated Show resolved Hide resolved
@nanglo123
Copy link
Contributor Author

nanglo123 commented Oct 3, 2024

@cthoyt Let me know if anything else could be improved.

@cthoyt
Copy link
Member

cthoyt commented Oct 8, 2024

@nanglo123 please get 100% test coverage for your changes

@nanglo123
Copy link
Contributor Author

@cthoyt Sorry I forgot to do that before. Let me know if anything else can be improved.

@cthoyt cthoyt merged commit 9a2c749 into biopragmatics:main Oct 8, 2024
8 checks passed
@cthoyt
Copy link
Member

cthoyt commented Oct 8, 2024

thanks @nanglo123 for the updates!

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.

2 participants