wtsi-npg / npg_conda

NPG Conda recipes and tools
1 stars 15 forks source link

Package refactoring #298

Closed kjsanger closed 3 years ago

kjsanger commented 3 years ago

Move Python source files to ./src

Use conda.base.context.Context to locate any active Conda environment.

Add eq, lt, repr, str for Package.

Add PackageError as a general error type for Package operations.

Destructure tuple return values for run_command into stdout, stderr, code.

Move test object creation into Pytest fixtures.

Allow tests to be run from any directory.

Rename TestFailError to FailedTestError to avoid pytest identifying the class as a test.

Add copyright notices.

Make code more Pythonic for clarity

Use defaultdict for dictionaries whose values are sets.

Avoid shadowing dir symbol.