pymap3d
pymap3d copied to clipboard
Improve code quality
Improve Code Quality
Improve typing
- [x] Use
mypystrict mode - [x] Add
py.typedto enable typing (c.f. #73, PEP 561 compliant)
pre-commit
- pyupgrade
- isort
- black
- flake8
- mypy
- prettier
- markdownlint
- pre-commit-hooks
- check-added-large-files
- check-yaml
- debug-statements
- end-of-file-fixer
- mixed-line-ending
- trailing-whitespace
- pygrep-hooks
- python-check-blanket-type-ignore
- python-no-eval
- [ ] Update
ruffconfiguration for the new release
Badges
Add some badges,
- [x]
- [x]
- [x]
Contributing
- [x] Create a
CONTRIBUTING.mdfile to standardise how to set uppymap3dto contribute- [x] Setting up an environment
- [x] Testing
- [x] Committing with
pre-commit
CI
- [x] Run CI when a pull request is made
- [ ] Activate pre-commit ci
- [x] Activate Codecov
@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?
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 Report
Merging #76 (6c33a23) into main (0114898) will increase coverage by
0.52%. The diff coverage is92.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%) |
:arrow_down: |
| src/pymap3d/tests/test_pyproj.py | 47.61% <66.66%> (ø) |
|
| src/pymap3d/timeconv.py | 79.48% <72.22%> (+8.89%) |
:arrow_up: |
| src/pymap3d/tests/test_look_spheroid.py | 69.56% <75.00%> (ø) |
|
| src/pymap3d/tests/test_time.py | 67.85% <75.00%> (-5.12%) |
:arrow_down: |
| src/pymap3d/sidereal.py | 85.36% <77.77%> (+0.75%) |
:arrow_up: |
| src/pymap3d/lox.py | 86.53% <85.18%> (+1.43%) |
:arrow_up: |
| src/pymap3d/vincenty.py | 84.51% <85.71%> (+0.74%) |
:arrow_up: |
| src/pymap3d/haversine.py | 82.35% <86.66%> (+23.09%) |
:arrow_up: |
| src/pymap3d/rsphere.py | 64.38% <88.23%> (+2.06%) |
:arrow_up: |
| ... and 45 more |
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more
@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.