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

Improve code quality #76

Closed

Conversation

JonathanPlasse
Copy link
Contributor

@JonathanPlasse JonathanPlasse commented Oct 28, 2022

Improve Code Quality

Improve typing

pre-commit

Badges

Add some badges,

  • black
  • mypy
  • coverage

Contributing

  • Create a CONTRIBUTING.md file to standardise how to set up pymap3d to contribute
    • Setting up an environment
    • Testing
    • Committing with pre-commit

CI

@JonathanPlasse JonathanPlasse force-pushed the improve-code-quality branch 3 times, most recently from bd16465 to 1c0bd84 Compare October 29, 2022 15:34
@JonathanPlasse JonathanPlasse changed the title WIP: Improve code quality Improve code quality Oct 29, 2022
@JonathanPlasse
Copy link
Contributor Author

@scivision, the pull request is ready.
Is it possible to activate for this repository pre-commit ci and Codecov and then approve the workflows to check if it works?

@scivision
Copy link
Member

I cherry-picked individual commits into main until the tests started failing. I then switched back to your branch and rebased on main--still failing tests, but at least consistent with main.
https://github.com/geospace-code/pymap3d/tree/JonathanPlasse-improve-code-quality

@codecov-commenter
Copy link

codecov-commenter commented Nov 15, 2022

Codecov Report

Merging #76 (6c33a23) into main (0114898) will increase coverage by 0.52%.
The diff coverage is 92.37%.

@@            Coverage Diff             @@
##             main      #76      +/-   ##
==========================================
+ Coverage   90.21%   90.74%   +0.52%     
==========================================
  Files          40       41       +1     
  Lines        2003     2236     +233     
  Branches      178      189      +11     
==========================================
+ Hits         1807     2029     +222     
- Misses        144      157      +13     
+ Partials       52       50       -2     
Impacted Files Coverage Δ
src/pymap3d/spherical.py 77.04% <41.17%> (-13.86%) ⬇️
src/pymap3d/tests/test_pyproj.py 47.61% <66.66%> (ø)
src/pymap3d/timeconv.py 79.48% <72.22%> (+8.89%) ⬆️
src/pymap3d/tests/test_look_spheroid.py 69.56% <75.00%> (ø)
src/pymap3d/tests/test_time.py 67.85% <75.00%> (-5.12%) ⬇️
src/pymap3d/sidereal.py 85.36% <77.77%> (+0.75%) ⬆️
src/pymap3d/lox.py 86.53% <85.18%> (+1.43%) ⬆️
src/pymap3d/vincenty.py 84.51% <85.71%> (+0.74%) ⬆️
src/pymap3d/haversine.py 82.35% <86.66%> (+23.09%) ⬆️
src/pymap3d/rsphere.py 64.38% <88.23%> (+2.06%) ⬆️
... and 45 more

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

@JonathanPlasse
Copy link
Contributor Author

JonathanPlasse commented Nov 15, 2022

@scivision,
I rebased the branch, all CI is passing.
Can activate pre-commit ci?
pre-commit run --all-files pass locally on my machine.
It replaces flake8 and mypy in the CI and adds much more.
Also, why did you deactivate the coverage with full dependencies?
It reduces the test coverage.

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.

3 participants