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

Refactoring and tooling #438

Merged
merged 35 commits into from
May 3, 2022
Merged

Refactoring and tooling #438

merged 35 commits into from
May 3, 2022

Conversation

Archmonger
Copy link
Contributor

@Archmonger Archmonger commented Apr 29, 2022

Quality-of-Life mega-PR that adds in the standard assortment of automated code analysis and refactoring tools.

  • black
  • pylint
  • flake8
  • rope
  • pre-commit-hooks
  • pycln
  • yesqa
  • isort
  • pyupgrade
  • auto-pep8
  • yamllint

Additionally, this PR adds

  • VSCode configuration files.
  • 0.3% leniency to codecov

@codecov
Copy link

codecov bot commented Apr 29, 2022

Codecov Report

Merging #438 (76906f0) into master (62323e4) will decrease coverage by 0.04%.
The diff coverage is 91.04%.

@@            Coverage Diff             @@
##           master     #438      +/-   ##
==========================================
- Coverage   90.94%   90.89%   -0.05%     
==========================================
  Files          19       19              
  Lines         861      857       -4     
  Branches      173      171       -2     
==========================================
- Hits          783      779       -4     
  Misses         42       42              
  Partials       36       36              
Impacted Files Coverage Δ
dbbackup/utils.py 86.89% <76.47%> (ø)
dbbackup/management/commands/mediarestore.py 79.16% <77.77%> (ø)
dbbackup/db/mongodb.py 85.00% <82.14%> (ø)
dbbackup/management/commands/mediabackup.py 92.85% <84.61%> (ø)
dbbackup/__init__.py 77.77% <87.50%> (+2.77%) ⬆️
dbbackup/management/commands/dbbackup.py 86.95% <87.50%> (ø)
dbbackup/db/sqlite.py 89.28% <88.88%> (-0.37%) ⬇️
dbbackup/storage.py 90.90% <88.88%> (ø)
dbbackup/management/commands/_base.py 94.64% <90.00%> (ø)
dbbackup/management/commands/dbrestore.py 96.00% <94.73%> (ø)
... and 8 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 62323e4...76906f0. Read the comment docs.

Archmonger and others added 9 commits April 29, 2022 01:29
add suggested vscode extensions

Revert "misc fixes"

This reverts commit 4b59021.

[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

remove trailing comma

fix flake8 warnings

fix autofield warning

Revert "datestring fix"

This reverts commit 9f6232d.

test datestring thing once more

add black to precommit

[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
@Archmonger Archmonger force-pushed the refactoring-and-tooling branch from d3b0141 to 388cab2 Compare April 29, 2022 09:28
@Archmonger Archmonger force-pushed the refactoring-and-tooling branch from 1e22e2b to 380378a Compare April 29, 2022 09:50
@Archmonger Archmonger marked this pull request as ready for review April 29, 2022 09:50
@Archmonger Archmonger requested a review from johnthagen April 29, 2022 09:51
.flake8 Outdated Show resolved Hide resolved
.isort.cfg Outdated Show resolved Hide resolved
pyproject.toml Outdated Show resolved Hide resolved
.flake8 Outdated Show resolved Hide resolved
@Archmonger
Copy link
Contributor Author

Archmonger commented Apr 30, 2022

@johnthagen any idea why tox might be failing to install django on anything other than python 3.6? Django is specifically listed as a dep in all the environments...

I tried a bunch of things to resolve it but didn't succeed. Let me know if you have a solution. If not I'm just going to upgrade the tests to use nox. I'm not a big fan of tox.

@Archmonger Archmonger force-pushed the refactoring-and-tooling branch from ecf0ff1 to 3194569 Compare April 30, 2022 08:07
@johnthagen
Copy link
Contributor

@Archmonger I'm also very interested in Nox, so I'd support moving to it

@Archmonger Archmonger force-pushed the refactoring-and-tooling branch from c5d7fbb to 40a44f9 Compare May 3, 2022 05:29
@Archmonger
Copy link
Contributor Author

Archmonger commented May 3, 2022

I found a fix that doesn't involve switching to nox. We should be good now.

@Archmonger Archmonger requested a review from johnthagen May 3, 2022 07:44
@Archmonger Archmonger merged commit 809ebd2 into master May 3, 2022
@Archmonger Archmonger deleted the refactoring-and-tooling branch May 3, 2022 19:57
@Archmonger Archmonger changed the title Refactoring and tooling config Refactoring and tooling May 3, 2022
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

Successfully merging this pull request may close these issues.

2 participants