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

Improved software engineering quality suggestions #280

Open
3 of 8 tasks
Timmmm opened this issue Sep 1, 2024 · 2 comments
Open
3 of 8 tasks

Improved software engineering quality suggestions #280

Timmmm opened this issue Sep 1, 2024 · 2 comments

Comments

@Timmmm
Copy link
Contributor

Timmmm commented Sep 1, 2024

Hi, I was wondering if you would be open to PRs to improve the general software engineering quality of this repo. This is the sort of thing I'm thinking of in increasing order of invasiveness:

  • Add pre-commit, tell it to format all the Python code using Black or Ruff and enforce in CI.
  • Add Pylint to pre-commit.
  • Restructure the code to turn it into an actual Python package with pyproject.toml etc. Publish it on Pypi.
  • Add static type hints.
  • Add Pyright (static type checker) to pre-commit to enforce them.

There's also some low hanging fruit in the actual code:

  • Use argparse (Typer is a better option but it's beneficial not to add a third party dependency.)
  • Switch from ad-hoc dictionaries to dataclasses.
  • Don't reparse the files 3 times.

I can do all that fairly easily but I thought I'd check if you would actually accept those improvements first. Seems like you might a bit review bottlenecked based on the open PRs (who isn't?).

@aswaterman
Copy link
Member

@neelgala is the author of the bulk of the Python code, so I'll defer to him. But at first blush this seems reasonable.

@IIITM-Jay
Copy link
Member

Commenting here to have just a glimpse of the improvements in software engineering qualities such as Refactorization, Modularization and using as much Optimization techniques as we can for better maintainability and enhancing the readability as well. Tagging a PR also with reference to above.

Refactor and Optimization:: constants.py

/CC @aswaterman and @rpsene

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants