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

Refactor scripts to follow concept of "one level of abstraction per function"? #1119

Open
fhg-isi opened this issue Jun 26, 2024 · 0 comments

Comments

@fhg-isi
Copy link

fhg-isi commented Jun 26, 2024

Instead of the flat structure of the scripts folder and the huge script files I suggest to:

  • group files in subfolders, e.g. "add,", "build", "plot", "prepare" etc. => scripts/build/shapes.py instead of scripts/build_shapes.py
  • extract parts of the huge files to extra files => less scrolling, use IDE navigation features, one level of abstraction per function
  • use function calls instead of block comments => one level of abstraction per function, easier to test, workflow is easier to grasp and not mixed with minor information/lower abstraction levels

Possible drawbacks of nested structure:

  • might break downward compatibility when merging from older forks
  • people not familiar with IDE navigation features might have a harder time to find stuff
  • if files are moved around a lot, they would not come with the context of their original folder structure any more.

What do you think?

@fhg-isi fhg-isi changed the title Refactor scripts to follow concept of "one level of abstraction per function" Refactor scripts to follow concept of "one level of abstraction per function"? Jun 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant