Skip to content

Conversation

@VeckoTheGecko
Copy link
Contributor

@VeckoTheGecko VeckoTheGecko commented Aug 29, 2024

  • Upgrade to f-strings (wasn't done automatically by pyupgrade)
  • Enable pyupgrade
  • Remove code targeting Python 2
  • Add repr for Grid class (and some tooling for testing reprs)
  • Type annotations and typos

related to #1620 and #1693

Breaking changes

  • Field.from_netcdf() no longer supports full_load as a parameter. This was a legacy parameter from before version 2 of Parcels and hasn't been documented in tutorials and docstrings since. Use deferred_load instead.

@codecov
Copy link

codecov bot commented Aug 29, 2024

Codecov Report

Attention: Patch coverage is 16.66667% with 55 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
parcels/compilation/codegenerator.py 0.00% 16 Missing ⚠️
parcels/kernel.py 0.00% 10 Missing ⚠️
parcels/grid.py 0.00% 6 Missing ⚠️
parcels/tools/converters.py 0.00% 5 Missing ⚠️
parcels/fieldset.py 0.00% 4 Missing ⚠️
parcels/field.py 57.14% 2 Missing and 1 partial ⚠️
parcels/particle.py 25.00% 3 Missing ⚠️
parcels/particlefile.py 0.00% 2 Missing ⚠️
parcels/compilation/codecompiler.py 0.00% 1 Missing ⚠️
parcels/interaction/interactionkernel.py 0.00% 1 Missing ⚠️
... and 4 more

❗ There is a different number of reports uploaded between BASE (3a7494d) and HEAD (0296e1c). Click for more details.

HEAD has 7 uploads less than BASE
Flag BASE (3a7494d) HEAD (0296e1c)
unit-tests 4 0
integration-tests 3 0
Additional details and impacted files
@@             Coverage Diff             @@
##           master    #1680       +/-   ##
===========================================
- Coverage   81.18%   15.82%   -65.36%     
===========================================
  Files          72       43       -29     
  Lines       13256     7872     -5384     
  Branches      127      129        +2     
===========================================
- Hits        10762     1246     -9516     
- Misses       2457     6497     +4040     
- Partials       37      129       +92     
Flag Coverage Δ
integration-tests ?
mypy 15.82% <16.66%> (+0.17%) ⬆️
unit-tests ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
parcels/_typing.py 96.66% <100.00%> (-3.34%) ⬇️
parcels/tools/_helpers.py 55.00% <100.00%> (-40.00%) ⬇️
parcels/tools/exampledata_utils.py 88.50% <100.00%> (-11.50%) ⬇️
parcels/tools/interpolation_utils.py 77.34% <100.00%> (-14.00%) ⬇️
parcels/compilation/codecompiler.py 6.83% <0.00%> (-84.60%) ⬇️
parcels/interaction/interactionkernel.py 21.21% <0.00%> (-55.80%) ⬇️
parcels/particleset.py 6.37% <0.00%> (-60.57%) ⬇️
parcels/rng.py 21.48% <0.00%> (-70.32%) ⬇️
parcels/tools/global_statics.py 31.81% <0.00%> (-51.52%) ⬇️
parcels/tools/timer.py 8.92% <0.00%> (-75.00%) ⬇️
... and 8 more

... and 48 files with indirect coverage changes

@VeckoTheGecko VeckoTheGecko marked this pull request as draft August 29, 2024 15:19
@VeckoTheGecko VeckoTheGecko force-pushed the v/small-changes branch 2 times, most recently from 03dbae8 to 940806a Compare September 2, 2024 11:22
@VeckoTheGecko VeckoTheGecko force-pushed the v/small-changes branch 2 times, most recently from 0d4dde3 to b6c8223 Compare September 10, 2024 16:41
@VeckoTheGecko VeckoTheGecko changed the title [WIP] Refactoring Enable pyupgrade, add Grid repr, and other changes Sep 10, 2024
@VeckoTheGecko VeckoTheGecko marked this pull request as ready for review September 10, 2024 16:50
@VeckoTheGecko VeckoTheGecko merged commit b007dcf into master Sep 12, 2024
@VeckoTheGecko VeckoTheGecko deleted the v/small-changes branch September 12, 2024 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants