-
Notifications
You must be signed in to change notification settings - Fork 39
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 broken navclean
and navsynctypes
scripts
#2875
Conversation
This replaces the `test_binary_runs` test with `test_script_runs` test. The former would just enumerate all the modules present in the `nav.bin` packages, extract their test args and run them directly from that location. However, not all the scripts here are compatible with being invoked from a pip-installed bin-directory shim that calls their main method directly. I.e. this updates the test suite to attempt to call all the defined NAV scripts in the manner they would be run in an installed system, rather than in an artificial manner. This should detect additional problems with the scripts.
This required-but-unused argument to main prevented `navclean` from running properly when invoked from the binary shim installed by pip/setuptools. Fixes Uninett#2874
This required-but-unused argument to main prevented `navsynctypes` from running properly when invoked from the binary shim installed by pip/setuptools. The argparser is only there to provide a nice help screen if the `--help` argument is provided.
Python 3.7, damn you!
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 5.9.x #2875 +/- ##
==========================================
- Coverage 56.70% 56.64% -0.07%
==========================================
Files 603 603
Lines 43983 43984 +1
==========================================
- Hits 24942 24916 -26
- Misses 19041 19068 +27 ☔ View full report in Codecov by Sentry. |
Python gets toml in the stdlib in 3.11: https://docs.python.org/3/library/tomllib.html Since we still can't run on 3.11 we don't need to hedge. Aside, we should copy direct dependencies from requirements.txt to pyproject.toml [project.dependencies], some other time. |
The
navclean
andnavsynctypes
scripts were broken in NAV 5.9.0, after the method of script installation was modernized.This PR changes the test suite to test-run the scripts defined for installation in
pyproject.toml
, rather than running them in-place in thenav.bin
package, to ensure that they are truly compatible with being executed by end-users in an installed system.Fixes #2874