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

Refactor for Python 3 #4

Open
wants to merge 16 commits into
base: master
Choose a base branch
from

Conversation

ross-spencer
Copy link
Member

@ross-spencer ross-spencer commented May 12, 2024

This is ready to merge. I'll follow up by email.

Change overview

  • Code is Py3 compatible.
  • Code tooling is idiomatic python.
  • Numerous changes throughout the code to improve readability and reliability.
  • Continuous integration added to the repository.
  • Fixes to code as a result of linting.
  • Unit tests added that can be built upon as we improve the code in future.

Some next steps.

Merging

When merging, I recommend this process:

git checkout
git fetch --all
git rebase origin/main
git checkout main
git merge
git push
git branch delete
git push origin --delete

Branch naming

Once merged, I recommend changing branch name from master to main.

Giving the code a whirl

Obviously with a lot of moving pieces in this work, it probably does need
testing more thoroughly at Archives. If you find issues I will be available to
fix them.

With testing now a feature of the code, we can add new tests as we discover
new issues. It just needs to be possible to anonymize results but if so, then
the tests can make the code more and more reliable and performant.

Pre-commit checks for the consistency of formatting across files,
e.g. removing whitesppace characters at the end of lines or making
YAML/JSON more conformant.
Code is moved into more idiomatic source directories. Functionality
will need to be reenabled.
These allow us to test on multiple Python versions at once. They
may need further calibration as we continue this refactor.
Imports are fixed to enabled the code to run. Linting re-formats
the code as a result.
To make the utility easier to configure provenance can be controlled
from the args file. Logging is slowly being implemented to provide
more idiomatic feedback to the user.
@ross-spencer ross-spencer force-pushed the dev/py3 branch 2 times, most recently from 1ca977f to 11d97bc Compare May 26, 2024 17:39
original tests have been moved into the correct location. Code
updates have been made as a result of basic test output. I have
worked through linting issues and fixed the most pressing. There's
still some refactoring to consider as the code is not particularly
idiomatic. We may also have to come back to some basic
functionality that is hard to understand without closer integration
to the Rosetta system.
@ross-spencer ross-spencer changed the title WIP: Refactor for Python 3 Refactor for Python 3 Jun 16, 2024
@ross-spencer ross-spencer marked this pull request as ready for review June 30, 2024 19:13
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.

1 participant