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

Prepare v2.1.0 release #720

Merged
merged 5 commits into from
Sep 6, 2024
Merged

Conversation

lognaturel
Copy link
Contributor

Prepares for release

Why is this the best possible solution? Were any other approaches considered?

I went back and forth on whether this should be 3.0 or 2.1 because there is a change in required Python versions and a small breaking API change. I went with 2.1 because we're dropping support for Python versions that are very close to end of life and we have a requires-python directive. Other people have gone back and forth on this and come to various conclusions (e.g. here). There is technically a small API change but it's unlikely to have been in use and is easy to respond to.

I included dependency updates here because I think they're low risk and nice to keep on top of. I also ran ruff and made changes accordingly.

There are deprecation warnings about datetime.utcnow() that are annoying when running tests. I tried to quickly address these but got some errors in the validator updater when I did the switch there. I think we should come back to it but I figured I'd leave the easy updates in here.

What are the regression risks?

Feels low-risk. Probably the highest risk is around the Validate update since that's jumping a lot of JR versions. We also haven't run with the new dependency versions for very long so that could be risky.

Does this change require updates to documentation? If so, please file an issue here and include the link below.

getodk/docs#1813
getodk/docs#1795

Before submitting this PR, please make sure you have:

  • included test cases for core behavior and edge cases in tests
  • run python -m unittest and verified all tests pass
  • run ruff format pyxform tests and ruff check pyxform tests to lint code
  • verified that any code or assets from external sources are properly credited in comments

@lognaturel
Copy link
Contributor Author

lognaturel commented Sep 5, 2024

I am stuck trying to figure out why linting is failing! It passes for me locally in Python 3.12 and 3.10. I've verified that I'm using ruff 0.6.4 and that the Github task does a pip install.

@lindsay-stevens I'd be grateful for any ideas you may have! Please push to this branch if you want.

@lindsay-stevens
Copy link
Contributor

The lint problem was that ruff didn't like the space added between the two import lines in test_android_package_name.py.

For future reference, although the latest openpyxl is 3.1.5, this update is to 3.1.3 because since 3.1.4, openpyxl pinned lxml to 5.1.0. Their problem in 5.1.0 (here) is marked as fixed in 5.1.1, but the pin isn't removed until openpyxl 3.2 which is not released yet. Also pyxform is already using 5.2.2 and this update moves to 5.3.0.

@lindsay-stevens lindsay-stevens merged commit 6f85440 into XLSForm:master Sep 6, 2024
10 checks passed
@lindsay-stevens
Copy link
Contributor

lindsay-stevens commented Sep 6, 2024

For anyone wondering why ODK_Validate.jar more than doubled in size (from ~5MB to ~13MB), most of it (~5MB) seems to be because the underlying javarosa library recently added a dependency on bouncycastle. @ln maybe it's possible to make some javarosa dependencies optional, so validate can build without them? Without validate, pyxform is only 210KB!

@lognaturel lognaturel deleted the release-3 branch September 6, 2024 17:46
@lognaturel
Copy link
Contributor Author

The lint problem was that ruff didn't like the space added between the two import lines in test_android_package_name.py.

Wild, when I run ruff locally on master now, it fails and wants to put the space back. I wonder whether I might have some kind of global config interacting with it somehow. I don't use ruff anywhere other than here and for pyodk.

why ODK_Validate.jar more than doubled in size (from ~5MB to ~13MB)

Oh dear, I didn't think to check on size! That is highly unexpected, I will look into it.

maybe it's possible to make some javarosa dependencies optional, so validate can build without them?

Yes, that should be possible.

@lindsay-stevens
Copy link
Contributor

Maybe an alias/history thing - pyodk is ruff==0.3.4 and pyxform is ruff==0.6.4. I've had that happen before - a bunch of unexpected ruff changes but it was because I was running the ruff version from the other project.

@lognaturel
Copy link
Contributor Author

I'll try reinstalling all dependencies if I run into it again and let you know if I need more troubleshooting help.

I have reduced Validate size down to 3.9 MB. I'll put in a PR to update that before we release for real.

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