-
Notifications
You must be signed in to change notification settings - Fork 1
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
Move generic stuff into a new submodule #109
Conversation
* Draft a test class parent * Only create and remove once, and apply to generic jobs * Save name and path separately, and no magic strings * Apply new class in DataContainer tests * HDF removal should be redundant with project removal * Hail Codacy, we who are about to die salute you * More Codacy nits * Because of course there's more * Check for Codacy P=~P demand * Srsly * How I like it because Codacy can go to hell
* Use test class filepath instead of parent class filepath * Test that the location of the actual test suites is caught * Windows filepath separators
This module inherits from `unittest.TestCase` and is customized to automatically perform some additional generic checks (for now testing docstrings provided the module to test is specified)
Co-authored-by: Liam Huber <liam.huber@gmail.com>
Co-authored-by: Liam Huber <liam.huber@gmail.com>
Co-authored-by: Liam Huber <liam.huber@gmail.com>
Fix downstream test suite
Abstract class with a project with jobs and sub-projects
Abstract class with a project with jobs and sub-projects
# Conflicts: # pyiron_base/_tests.py
Co-authored-by: Liam Huber <liam.huber@gmail.com>
Co-authored-by: Liam Huber <liam.huber@gmail.com>
Co-authored-by: Liam Huber <liam.huber@gmail.com>
Co-authored-by: Liam Huber <liam.huber@gmail.com>
Co-authored-by: Liam Huber <liam.huber@gmail.com>
* Always reset the configuration to how you found it * Add super calls Children of `PyironTestCase` that define `setUpClass` without the super call now run into trouble at teardown because the attribute doesn't exist. This will almost certainly be an issue in downstream repos too, in other places where super is never called * Remove unnecessary state update * Clean up empty directory * Manually remove HDF content not caught in project cleanup * Clean up the orphaned job HDF * Clean up project import/export tests
Add numpy equality check for unit tests
* Black line length * Add tests for loading and inspecting * Introduce and test helper classes for loading and inspecting * Don't deprecate the conversion argument It gets used in iter methods in a reasonable way * Use just inspect or load if conversion is not a variable * Format black * Update pyiron_base/project/generic.py Co-authored-by: Marvin Poul <poul@mpie.de> * Break test into subtests * Directly check getattr, as suggested by @pmrv * Move loader classes to their own module, per @jan-janssen's suggestion * Use full import path * Move tests to their own test module * Break sub tests into separate tests * PEP8 * Also work without a database, per @jan-janssen's concern * Make sure loader values are always synced with project values The project knows how to stay up-to-date with the state; instead of re-inventing this security, let's just directly use the project attributes. * Store and restore all the settings Let's see if this recovers the `project_path` configuration setting that the projectpath tests seem to be relying on * Format black * Add logging to try and debug remote ci * Remove sibling tests * Add path to debug print * More logging * More logging * Log more about the loader project * Add filters progressively in logging * Log the filetable path * Log the actual folder contents * Narrow the search * Just look at length and look before turning off the database too * Log the actual recursion check results * Revert changes, the problem is upstream in FileTable still I don't see trouble on my local machine because I don't specify TOP_LEVEL_DIRS in my config but the CI does. * Resolve some codacy nits * Update class descriptions * Test sub-project loading * Update tests to account for extra job in TestWithFilledProject Making some effort to avoid magic numbers --------- Co-authored-by: pyiron-runner <pyiron@mpie.de> Co-authored-by: Marvin Poul <poul@mpie.de>
Pull Request Test Coverage Report for Build 7107728928
💛 - Coveralls |
This is also most of the weight for #46, since we already booted |
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferences |
This doesn't get all the way to releasing a new
pyiron_snippets
package, but it's a first step.I moved my
pyiron_base
imports (including their git history) into a local submodule, along with the base test case class that helps with docs testing. Then I moved everything inpyiron_workflow.utils
in there too. The code and tests for these generic things (which depend only on the standard library) are thus encapsulated in two directories and ready to be shipped off to their own repo. In the meantime, this also lets me remove my dependency onpyiron_base
.