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

Add pre-commit + isort #112

Merged
merged 10 commits into from
Nov 13, 2022
Merged

Add pre-commit + isort #112

merged 10 commits into from
Nov 13, 2022

Conversation

leonlan
Copy link
Collaborator

@leonlan leonlan commented Nov 13, 2022

Closes #90.

  • Add pre-commit to poetry
  • Add pre-commit configuration with current dev dependencies
  • Add isort as new dependency
  • Remove linters/type checkers from poetry dev dependencies

@leonlan leonlan changed the title [WIP] Add pre-commit Add pre-commit + isort Nov 13, 2022
@codecov
Copy link

codecov bot commented Nov 13, 2022

Codecov Report

Merging #112 (f1bc543) into master (b42f503) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##            master      #112   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           28        28           
  Lines          664       664           
=========================================
  Hits           664       664           
Impacted Files Coverage Δ
alns/stop/MaxRuntime.py 100.00% <ø> (ø)
alns/select/RouletteWheel.py 100.00% <100.00%> (ø)
alns/select/SegmentedRouletteWheel.py 100.00% <100.00%> (ø)
alns/stop/NoImprovement.py 100.00% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@leonlan leonlan requested a review from N-Wouda November 13, 2022 09:26
.pre-commit-config.yaml Outdated Show resolved Hide resolved
.pre-commit-config.yaml Show resolved Hide resolved
@N-Wouda
Copy link
Owner

N-Wouda commented Nov 13, 2022

If we move all dev stuff into pre-commit, can we then get rid of the dev dependencies in pyproject.toml? I think so, if we update the CI to install and run the pre-commit thing as well?

@N-Wouda
Copy link
Owner

N-Wouda commented Nov 13, 2022

If we move all dev stuff into pre-commit, can we then get rid of the dev dependencies in pyproject.toml?

Then we can probably also get rid of a lot of the settings in pyproject.toml.

@leonlan
Copy link
Collaborator Author

leonlan commented Nov 13, 2022

If we move all dev stuff into pre-commit, can we then get rid of the dev dependencies in pyproject.toml? I think so, if we update the CI to install and run the pre-commit thing as well?

I read somewhere that testing is not recommended to be part of pre-commit. I guess that's mainly in very large codebases, which have much longer tests than we do have here. I think it's fine if we do add pytest to pre-commit.

So yes, we can put everything in pre-commit.

@N-Wouda
Copy link
Owner

N-Wouda commented Nov 13, 2022

I read somewhere that testing is not recommended to be part of pre-commit. I guess that's mainly in very large codebases, which have much longer tests than we do have here. I think it's fine if we do add pytest to pre-commit.

I meant just the linting and static type checker stuff. The test and coverage stuff can stay, I think.

@N-Wouda
Copy link
Owner

N-Wouda commented Nov 13, 2022

Much better!

@N-Wouda N-Wouda merged commit 6aafaad into master Nov 13, 2022
@N-Wouda N-Wouda deleted the pre-commit branch November 13, 2022 13:22
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.

Adding pre-commit to the library
2 participants