-
Notifications
You must be signed in to change notification settings - Fork 879
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
Compress test files #3132
base: master
Are you sure you want to change the base?
Compress test files #3132
Conversation
Per-file size reduction
negative numbers mean file size increased during compression |
@JaGeo @rkingsbury @arosen93 If anybody feels like chipping away at the above-mentioned issues, feel free to checkout the |
Thanks for the initiative @janosh ! I'll try to help out over the next few weeks. I'm honestly amazed at how much potential size reduction we can get this way. |
including fixes for all tests in test_structure.py
* fix test_exp_entries.py * fix test_computed_entries.py * Fix test_mixing_scheme.py * fix test_compatibility.py * lint
* Store site label in `site_properties` Revise implementation to fix test failures * Add test * pre-commit auto-fixes * rename single-letter vars, use snake_case * assert len(struct.site_properties["labels"]) == len(struct) and len(set(struct.site_properties["labels"])) == 4 --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Janosh Riebesell <[email protected]>
…vent running tests on forks
if key in dict: val = dict[key] del dict[key] to val = dict.pop(key, None)
make all ParseError classes inherit from pymatgen.io.core.ParseError which is a SyntaxError subclass. allows for adding line numbers and filenames to errors class SyntaxError(Exception): msg: str lineno: int | None offset: int | None text: str | None filename: str | None if sys.version_info >= (3, 10): end_lineno: int | None end_offset: int | None
* fix test_site_symmetries.py * fix analysis tests * Fix pymatgen/analysis tests
3c23114
to
36e289c
Compare
d725325
to
dca98be
Compare
e3fbc67
to
41e6d99
Compare
Closes #2994.
Here's a 1st swing at compressing all test files. Takes the total size of the
test_files
from ~900 MB to 243 MB (73 % reduction) using simple Gzip compression as implemented in the Python standard library.Migration script
compress_test_files.py
This PR will require a lot of tweaking, I'm sure, since the automated file path migration is naive and will invariably encounter both false positives and negatives. Also, not all tests support loading compressed files. We'll have to refactor those or revert to uncompressed.