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

refactor: improve CI and local development #157

Merged

Conversation

skarzi
Copy link
Contributor

@skarzi skarzi commented Jul 15, 2022

This PR is quite big and changes several things:

  • fix main deps declaration 52c86c5
  • declare dev and test deps in pyproject.toml using flit extras
  • add dev/test tools configuration to proper config files
  • add linting and testing stages to Makefile
  • removes tox support (flit and Makefile should be used for local development)
  • merges main and lint_python workflows

Things to do (but probably in separate PRs):

  • add better coverage configuration - @skarzi
  • investigate why tests fail and fix them
  • add .editorconfig and clean whitespaces in the codebase - check feat: add .editorconfig #158
  • update .gitignore (e.g. with wily_report and foo)
  • move codecov token to secrets - @tonybaloney
  • set proper black configuration, apply it on the codebase and require it in Makefile
  • set proper isort configuration, apply it on the codebase and require it in Makefile
  • resolve flake8 issues and clean ignore in its config and set its proper configuration
  • set proper codespell configuration, apply it on the codebase and require it in Makefile
  • set proper mypy configuration, resolve its issues and require it in Makefile
  • add some useful pytest plugins, like pytest-timeout or pytest-randomly

@skarzi skarzi force-pushed the refactor/local-development-and-ci branch from e6a849f to 8c852b9 Compare July 15, 2022 20:45
@skarzi skarzi marked this pull request as ready for review July 15, 2022 20:46
@codecov-commenter
Copy link

codecov-commenter commented Jul 16, 2022

Codecov Report

Merging #157 (675eec4) into master (f33cbd7) will decrease coverage by 2.30%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #157      +/-   ##
==========================================
- Coverage   97.36%   95.05%   -2.31%     
==========================================
  Files          23       23              
  Lines        1213     1214       +1     
  Branches        0      290     +290     
==========================================
- Hits         1181     1154      -27     
- Misses         32       34       +2     
- Partials        0       26      +26     
Impacted Files Coverage Δ
src/wily/__main__.py 95.48% <100.00%> (-2.83%) ⬇️
src/wily/commands/list_metrics.py 87.50% <0.00%> (-12.50%) ⬇️
src/wily/commands/build.py 86.81% <0.00%> (-8.80%) ⬇️
src/wily/archivers/git.py 87.50% <0.00%> (-5.00%) ⬇️
src/wily/state.py 95.29% <0.00%> (-3.52%) ⬇️
src/wily/operators/halstead.py 90.00% <0.00%> (-3.34%) ⬇️
src/wily/commands/rank.py 96.22% <0.00%> (-1.89%) ⬇️
src/wily/cache.py 98.18% <0.00%> (-1.82%) ⬇️
src/wily/commands/diff.py 88.75% <0.00%> (-1.25%) ⬇️
... and 2 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@skarzi
Copy link
Contributor Author

skarzi commented Jul 16, 2022

I don't know why tests run on windows are failing, if you have any idea please share!

@tonybaloney
Copy link
Owner

There's a lot going on in this PR making it really hard to review. Could you please cherry-pick these commits into atomic changes i.e. one pull-request = one concern

@skarzi
Copy link
Contributor Author

skarzi commented Jul 20, 2022

Yes, there is a log going on in this PR, but I have made atomic changes on the commit level, so you can review one commit after another. However, if it's still hard to review let me know and I will try to split it into multiple PRs with atomic changes ;)

@tonybaloney
Copy link
Owner

1 test is failing on Windows:

FAILED test/integration/test_complex_commits.py::test_skip_files

@skarzi
Copy link
Contributor Author

skarzi commented Aug 20, 2022

Yes, but unfortunately, I don't know why it's failing at first sight and I don't have access to a windows machine so I can dig into this test more deeply.
It seems like for some reason the src\\test1.py is not included in the final report data.

@skarzi
Copy link
Contributor Author

skarzi commented Aug 20, 2022

But this test is also failing on the main branch, let's check it here

@tonybaloney
Copy link
Owner

Ok. I have a windows machine, will test on that and make sure it's unrelated so we can merge this 👍🏻

@tonybaloney tonybaloney merged commit 1051459 into tonybaloney:master Aug 21, 2022
@skarzi skarzi deleted the refactor/local-development-and-ci branch August 21, 2022 19:14
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.

None yet

3 participants