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

Initial Scoping of Python 3 Upgrade #4

Closed
wants to merge 39 commits into from
Closed

Conversation

AmyOctoCat
Copy link

@AmyOctoCat AmyOctoCat commented Jun 25, 2024

Initial work to investigate very roughly how long a migration to python 3 would take.

Note, this is based off of Matt Archer's branch to add integration testing.

Plans for a migration:

  • upgrade integration test to run in python3
  • update dependencies for compatibility with python3, note that it is not currently possible to bump numpy to v2.x.x because statsmodels isn't compatible with versions above and including numpy 2.
  • update the first ~x% of the syntax in source code to python3, this included approx 285 lines of oneflux/partition/nighttime.py which is 966 lines long. This included fixing an encoding issue in library.py which was to do with changes to the way python3 represents byte strings (second answer down in this post: https://stackoverflow.com/questions/21957667/numpy-dtype-issues-in-genfromtxt-reads-string-in-as-bytestring)
  • run python 2to3 tool, this picked up some of the more standard syntax changes but has not found more subtle issues and currently still getting runtime issues.
  • run a code coverage tool, have been trying to run pytest's coverage tool but hitting some snags currently
  • add unit tests, there are 13 modules which look like candidates for unit testing in the oneflux directory, these are very long, with library being 1300 lines.
  • add a README for running the tests (a stub has been added so far)
  • update the remaining syntax in the project - estimate x% remaining

My feeling is that the time needed to add appropriate tests would make this a 6 month project.

@AmyOctoCat
Copy link
Author

Closing as this was accidentally duplicated.

@AmyOctoCat AmyOctoCat closed this Jun 25, 2024
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