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

Clean up Python code and GitHub Actions #4

Merged
merged 11 commits into from
Jul 12, 2024

Conversation

pkalita-lbl
Copy link
Contributor

Fixes #2

These changes are just general tidying up of the initial commit of the repo. They do not represent any significant changes to the gocam Python module or CLI functionality.

Python code

  • Remove unused or empty files and directories; remove unused variables and functions; remove commented out code.
  • Rename a number of variables and functions, mainly in src/gocam/translation/minerva_wrapper.py, to make things more readable and/or accurately reflect their purpose.
  • Add more docstrings to src/gocam/translation/minerva_wrapper.py.
  • De-duplicate code in src/gocam/translation/minerva_wrapper.py.
  • Update typing annotations to accurately reflect actual usage.
  • Fix how the __version__ variable is set and add a CLI option to show the version.

Testing

  • Standardize testing around pytest; previously tests were a mix of unittest and pytest-style tests, while the Makefile was invoking tests via the unittest module.
  • Add additional assertions to MinervaWrapper test; remove unnecessary printing and file writing.
  • Add new test for the gocam.cli module.

Infrastructure

  • Declare directly used dependencies in pyproject.toml; previously it was relying on transitive dependencies brought in by linkml.
  • Update GitHub Actions workflows to use built-in Poetry virtual environment caching via actions/setup-python@v5.
  • Setup PyPI publishing workflow for Trusted Publishing

cc: @cmungall

* Use to PEP8 formatting
* Add docstrings
* Refactor out duplicated code
* Use more descriptive method & variable names
* Fix typing annotations
* Add additional assertions to test
* Remove unnecessary printing and file writing in test
* Use to PEP8 formatting
* Add docstrings
* Remove unused code
* Add test for CLI with new dependency for HTTP request mocking
* Add additional Minerva object sample for testing
@pkalita-lbl pkalita-lbl requested a review from kltm July 11, 2024 19:05
Copy link

PR Preview Action v1.4.7
🚀 Deployed preview to https://geneontology.github.io/gocam-py/pr-preview/pr-4/
on branch gh-pages at 2024-07-11 19:06 UTC

Copy link
Member

@kltm kltm left a comment

Choose a reason for hiding this comment

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

Eyeballing the changes: increasing specificity and detail from the template.

@pkalita-lbl pkalita-lbl merged commit af77c59 into main Jul 12, 2024
3 checks passed
@pkalita-lbl pkalita-lbl deleted the issue-2-cleanup-and-publish branch July 12, 2024 17:41
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.

Clean and package gocam-py
2 participants