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

Code quality improvements and tooling #84

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

wmalgadey
Copy link
Owner

Copied #79 into local branch

  • fixed pipelines
  • fixed merge conflicts

Original description:

Given the request to improve the library to make it more reliable and ready for a 1.0 version, here is my contribution on that regard: #75

Added as standard tools:

  • Black for python formatting
  • Pylint for linting
  • PyType for type checking

In addition, I consolidation all configuration for the Python package and the different toolings into the new pyproject.toml.

As code quality improvements:

  • Updated .gitignore to be more exhaustive for python projects
  • Annotated most of the code with python types
  • Formatted the whole codebase given blacks formatting
  • Remove unnecessary directories (that just holded a single module)
  • Update methods, classes and attributes following best practices. This lead to PyLint rating to go from ~7 to 9.5+
  • Make the Zone class a dataclass as it simplifies the init arguments and properties without that much code repetition
  • Make the tests to use the unittest framework (that comes with Python standard library), so we have access to more readable assert methods.

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

Successfully merging this pull request may close these issues.

2 participants