Skip to content

The Big Clean! - #498

Merged
sfarrens merged 31 commits into
CosmoStat:developfrom
sfarrens:general_clean_up
Jan 26, 2022
Merged

sfarrens merged 31 commits into
CosmoStat:developfrom
sfarrens:general_clean_up

Conversation

@sfarrens

@sfarrens sfarrens commented Jan 12, 2022 •

Copy link
Copy Markdown
Member

Summary

  • closes [Management] Global Module Clean Up #495
  • added tests of docstrings to CI
  • cleaned up docstrings to pass all tests (e.g. all module, class, function definitions should end with a .)
  • removed unnecessary # -*- coding: utf-8 -*- from all files
  • enforced consistent naming convention for all modules
    • module package and runner names must match
    • all runners should end with _runner.py
    • all packages should end with _package
    • only package modules for calling executables should end with _script.py
    • all packages with a single module should simply be the module name (e.g. find_exposures.py)
    • module name should only contain lower case characters (e.g. SExtractor_package -> sextractor_package)
  • added automatic sourcing of module runners and packages (see shapepipe/modules/__init__.py)
  • removed unused modules (see [Management] Optional Clean Up #493 for tasks to reintegrate these modules)
  • added template for module documentation to all packages (see [Management] Module Documentation #494)
  • used isort to manage module imports
  • simplified package imports in module runners (i.e. no alias when calling a single class or function)
  • changed catalog -> catalogue where found
  • homogenised docstrings (as much as possible)
  • added missing docstrings (see e.g. MCCD package)
  • fixed formatting missed during second code clean up milestone

@sfarrens sfarrens self-assigned this Jan 12, 2022
@sfarrens sfarrens changed the title The Big Clean! (Work in Progress...) The Big Clean! Jan 13, 2022
@sfarrens

Copy link
Copy Markdown
Member Author

@martinkilbinger this is a big one so it make take some time to go through everything to make sure it is all OK, but this should pretty much finalise any clean up necessary of ShapePipe (not including scripts and config files)

@tobias-liaudat I had to update quite a few things in the MCCD package, please check that no bugs were introduced. Also in some places I have left a ? in the docstrings where I was unsure of what the parameter type or purpose was. If you can add a comment in the PR for what these should be I can add them.

@sfarrens sfarrens mentioned this pull request Jan 13, 2022

@martinkilbinger martinkilbinger left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked many but by far not all files. I'll let the MCCD ones for @tobias-liaudat ;-)

Looks good. I checked the ones where indices i, j were replaced by key, idx,
looks fine.

Comment thread shapepipe/utilities/cfis.py Resolved

@tobias-liaudat tobias-liaudat left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have reviewed the MCCD related files. They are fine, I have completed some docstrings and solved the validation MCCD bug.

I'll add a PR with these modifications.

@tobias-liaudat tobias-liaudat mentioned this pull request Jan 25, 2022
@sfarrens sfarrens mentioned this pull request Jan 26, 2022
@sfarrens
sfarrens merged commit 4bd3633 into CosmoStat:develop Jan 26, 2022
@sfarrens
sfarrens deleted the general_clean_up branch January 26, 2022 10:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Management] Global Module Clean Up

3 participants