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

Reduce the size of the test suite's file creation script #281

Closed
davidhassell opened this issue Nov 21, 2023 · 0 comments · Fixed by #282
Closed

Reduce the size of the test suite's file creation script #281

davidhassell opened this issue Nov 21, 2023 · 0 comments · Fixed by #282
Labels
code tidy/refactor enhancement New feature or request
Milestone

Comments

@davidhassell
Copy link
Contributor

See @sadielbartholomew's description of the problem here: NCAS-CMS/cf-python#698 (comment)

Why is this new file so large by line count, I wondered, and then saw that (black/PEP8) makes it sparse like this and it all made sense 😁 I guess these create_test_file*.py pair files being 10K+ lines is just about manageable, but we could consider moving the hard-coded large written-out data arrays into a separate file or files to read-in, perhaps using the numpy.savetxt and numpy.loadtxt functions, else maybe csv format or pickle? It would probably be quite useful to be able to see the logical code in such modules without having to wade through raw numbers...

Will be solved by using numpy .npz files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code tidy/refactor enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant