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 #79

Closed

Conversation

albertomontesg
Copy link

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.

@wmalgadey wmalgadey added enhancement conflicts please solve the merge conflicts labels May 5, 2024
@wmalgadey wmalgadey changed the base branch from master to improve_code_quality May 5, 2024 11:10
@wmalgadey wmalgadey changed the base branch from improve_code_quality to master May 5, 2024 11:24
@wmalgadey
Copy link
Owner

merged in a temporary branch to add workflows and fix conflicts. see #83

@wmalgadey wmalgadey closed this May 5, 2024
@wmalgadey wmalgadey reopened this May 6, 2024
@wmalgadey
Copy link
Owner

I did some mess while fixing this PR, so I reopened it, until I can push the fixes again (Sorry for the troubles!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conflicts please solve the merge conflicts enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants