Skip to content

Refactoring particleset creation method#39

Merged
michaeldenes merged 4 commits intomainfrom
refactoring_particleset
Jun 7, 2024
Merged

Refactoring particleset creation method#39
michaeldenes merged 4 commits intomainfrom
refactoring_particleset

Conversation

@michaeldenes
Copy link
Member

This PR is to change the particleset creation method, splitting it into two parts. One method allows users to create a particle set using one of the predefined initialisation maps, and the other method allows users to pass in their own release locations and plastic amounts.

michaeldenes and others added 2 commits June 7, 2024 10:41
Adding the new unit testing to a branch to refactor the particleset creation function
…ss their own release locations if they'd like
@codecov-commenter
Copy link

codecov-commenter commented Jun 7, 2024

Codecov Report

Attention: Patch coverage is 80.76923% with 5 lines in your changes missing coverage. Please review.

Project coverage is 66.24%. Comparing base (5269406) to head (b195ac3).

Files Patch % Lines
plasticparcels/constructors.py 80.76% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #39      +/-   ##
==========================================
- Coverage   67.60%   66.24%   -1.37%     
==========================================
  Files           8        8              
  Lines         744      705      -39     
==========================================
- Hits          503      467      -36     
+ Misses        241      238       -3     
Flag Coverage Δ
unit-tests 66.24% <80.76%> (-1.37%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@erikvansebille
Copy link
Member

This branch is now set to merge into master, but also includes adding_new_tests. Should it not merge into that second branch? Or should adding_new_tests not first be merged into master?

@michaeldenes
Copy link
Member Author

This branch is now set to merge into master, but also includes adding_new_tests. Should it not merge into that second branch? Or should adding_new_tests not first be merged into master?

I want to PR adding_new_tests first, then this one. I merged adding_new_tests into this branch so I could run the pytests. So we can merge that first, then this one.

@erikvansebille
Copy link
Member

This branch is now set to merge into master, but also includes adding_new_tests. Should it not merge into that second branch? Or should adding_new_tests not first be merged into master?

I want to PR adding_new_tests first, then this one. I merged adding_new_tests into this branch so I could run the pytests. So we can merge that first, then this one.

Yes, that would help me with reviewing, because now I will need to also go through all the changes of the adding_new_tests branch in https://github.com/OceanParcels/plasticparcels/pull/39/files

Merge pull request #37 from OceanParcels/adding_new_tests
… function, when users do not provide a plastic amount per particle.
@michaeldenes michaeldenes merged commit 4dc18c0 into main Jun 7, 2024
@michaeldenes michaeldenes deleted the refactoring_particleset branch June 7, 2024 13:35
fanqi203 pushed a commit to fanqi203/plasticparcels that referenced this pull request Jul 8, 2025
…icleset

Refactoring particleset creation method
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