Remove top level lib directory and move tests to top level#1108
Merged
tjtg merged 15 commits intometoppv:masterfrom Jan 14, 2020
Merged
Remove top level lib directory and move tests to top level#1108tjtg merged 15 commits intometoppv:masterfrom
tjtg merged 15 commits intometoppv:masterfrom
Conversation
This avoids improver code importing from tests.
Settings used: isort --recursive --atomic -w 79 -m 4 -y
arh89
reviewed
Jan 13, 2020
arh89
reviewed
Jan 13, 2020
improver/ensemble_copula_coupling/ensemble_copula_coupling_utilities.py
Outdated
Show resolved
Hide resolved
arh89
reviewed
Jan 13, 2020
...ensemble_copula_coupling/ensemble_copula_coupling/test_ensemble_copula_coupling_utilities.py
Outdated
Show resolved
Hide resolved
Rename some duplicated directory/file names to make names shorter
arh89
previously approved these changes
Jan 13, 2020
Contributor
arh89
left a comment
There was a problem hiding this comment.
Thanks for doing this, @tjtg.
I've looked over the changes and they all look fine to me. For testing, I've checked that the unit tests and acceptance tests all run (and pass), and that the same number of tests are being picked up here as in master.
I've also created a suite PR with the necessary changes, and tested that these changes work for 1 cycle of UKV data.
This comment has been minimized.
This comment has been minimized.
arh89
approved these changes
Jan 14, 2020
TomekTrzeciak
approved these changes
Jan 14, 2020
1 task
gavinevans
added a commit
to gavinevans/improver
that referenced
this pull request
Jan 14, 2020
…or_apply_emos * upstream/master: fix no error exit on wrong option (metoppv#1110) Remove top level lib directory and move tests to top level (metoppv#1108)
gavinevans
added a commit
to gavinevans/improver
that referenced
this pull request
Jan 15, 2020
…_emos_documentation * upstream/master: Refactoring of applying EMOS coefficients to support more robust variable naming (metoppv#1082) fix no error exit on wrong option (metoppv#1110) Remove top level lib directory and move tests to top level (metoppv#1108) Port all CLIs to Clize and eliminate ArgParser (metoppv#1101) Refactor cube manipulation (metoppv#1088) Replace usage of nccmp with internal netCDF comparison tool (metoppv#1089) Fix convert to realizations for realizations (metoppv#1097) Remove incorrect grid attributes (metoppv#1093) Removed filenames (metoppv#1086) Updated to remove useless object inheritance (metoppv#1087) IMPRO-1523: Convert optical flow to clize (metoppv#1053) IMPRO-1517: Update Orographic enhancement to use clize. (metoppv#1032)
MoseleyS
added a commit
that referenced
this pull request
Jan 16, 2020
* commit '2dd6195': Remove top level lib directory and move tests to top level (#1108)
MoseleyS
pushed a commit
to MoseleyS/improver
that referenced
this pull request
Aug 22, 2024
) * Move tests to top level * Move improver to top level * Update pytest test discovery path * Bulk rewrite test imports * Move tolerance constants to improver This avoids improver code importing from tests. * Convert test imports to relative * Sort all imports Settings used: isort --recursive --atomic -w 79 -m 4 -y * Update bin scripts to remove lib directory * Remove unused import * Update paths in github actions * Fix long line lengths Rename some duplicated directory/file names to make names shorter * Update docs makefile * Fix import in metadata CLI * Rename tests to improver_tests * Update paths for change from tests to improver_tests
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Move the improver code directory and tests sub directory to the top level of the repository.
This better separates code and tests for installation, so that test code can be easily excluded if desired. Avoiding the top level lib directory also better follows python packaging conventions.
Test imports have been changed to relative imports in order to avoid "import tests" which is a very generic name and at risk of namespace conflicts. Relative imports also help keep the import name shorter, as some imports previously required backslash line continuations rather than being able to use brackets.
All imports have been automatically grouped and sorted into alphabetical order using the isort tool. I suggest that this tool is added to the Travis/Github test suite to keep import order consistent in the future. The isort tool runs on the whole repository within a few seconds.
Testing: