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

Huge backend refactor for streamlined styling` #210

Merged
merged 13 commits into from
Nov 17, 2023
Merged

Huge backend refactor for streamlined styling` #210

merged 13 commits into from
Nov 17, 2023

Conversation

jannisborn
Copy link
Owner

Let's use isort, black and ruff everywhere.

  • sorted all files in backend with isort
  • formatted all files in backend with black
  • formatted all files in backend with ruff (slightly stricter, e.g., detecting unused imports)
  • added pre-commit hooks for all three
  • added a CI workflow to check the code after every commit
  • added docstrings for all functions
  • added static type annotations for all functions
  • added exemplary vscode settings that should help formatting the code automatically on save (requires some vscode extensions for black/isort/ruff)
  • recommend to auto-generate docstring with autoDocstring extension, let's use google-notypes as docstring format

@jannisborn jannisborn requested a review from NinaWie November 14, 2023 20:53
@jannisborn jannisborn added the documentation Improvements or additions to documentation label Nov 14, 2023
Copy link
Collaborator

@NinaWie NinaWie left a comment

Choose a reason for hiding this comment

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

Great effort in documentation / refactoring / formatting!! Thanks a lot!
I left some minor comments / questions for clarification.
Did you test it on the server? There are not so many changes that could break the backend, but would be better to double check

backend/pennyme/github_update.py Show resolved Hide resolved
backend/pennyme/pennycollector.py Outdated Show resolved Hide resolved
backend/pennyme/slack.py Show resolved Hide resolved
@NinaWie NinaWie merged commit db92e32 into main Nov 17, 2023
1 check passed
@NinaWie NinaWie deleted the ci branch November 17, 2023 13:16
@jannisborn jannisborn linked an issue Nov 17, 2023 that may be closed by this pull request
@jannisborn jannisborn mentioned this pull request Nov 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Code style
2 participants