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

Add python pkg structure + add automated CI testing pipeline + add Coverage report #26

Merged
merged 52 commits into from
Jun 14, 2023

Conversation

navidcy
Copy link
Contributor

@navidcy navidcy commented Jun 2, 2023

This PR converts the repo towards a python package! Also, the PR adds a testing CI pipeline and a Coverage report via Codecov.io. This is the first step towards #12, but it doesn't resolve it since the test include here are just placeholder (e.g., they are trivialities, like test whether 4**2 == 16).

@navidcy
Copy link
Contributor Author

navidcy commented Jun 2, 2023

#12 should be addressed here -- at least the CI pipeline should be created :)

@navidcy
Copy link
Contributor Author

navidcy commented Jun 3, 2023

@navidcy
Copy link
Contributor Author

navidcy commented Jun 7, 2023

@ashjbarnes mentioned that some of the dependencies need to be installed via conda.

Would something like this
https://github.com/mwouts/jupytext/blob/64b84b7402c9c637372eb2ea7c98b6471651c38e/.github/workflows/continuous-integration.yml#L130-L177
be a better CI pipeline?

@navidcy
Copy link
Contributor Author

navidcy commented Jun 7, 2023

https://github.com/COSIMA/mom6-regional/actions/runs/5196044606/jobs/9369359484#step:4:314

are you sure the package is called pangeo-xesmf? is this name from pip installation but xesmf when installing via conda?

@navidcy
Copy link
Contributor Author

navidcy commented Jun 7, 2023

OK, I think I made the CI reach the point where it actually wants to run the tests... but the pytest call fails (probably because of the directory structure of the package?)

@navidcy navidcy marked this pull request as ready for review June 7, 2023 06:26
@navidcy navidcy changed the title Convert to package Add automated CI testing Jun 7, 2023
@navidcy navidcy changed the title Add automated CI testing Add automated CI testing pipeline Jun 7, 2023
@navidcy navidcy added this to the convert to package milestone Jun 7, 2023
@navidcy navidcy requested a review from angus-g June 7, 2023 06:28
@navidcy
Copy link
Contributor Author

navidcy commented Jun 7, 2023

OK, the test pipeline works!

@angus-g did I do it correctly? Any ideas, suggestions are welcome!

@angus-g
Copy link
Collaborator

angus-g commented Jun 12, 2023

are you sure the package is called pangeo-xesmf

It was called that when I made that commit -- it was at a time when they transitioned it into the pangeo organisation, but didn't have control of the xesmf name on PyPI. I guess now they've moved back to just plain old xesmf so that's fine.

@angus-g did I do it correctly? Any ideas, suggestions are welcome!

I'll have a look today.

@angus-g angus-g self-assigned this Jun 12, 2023
@codecov
Copy link

codecov bot commented Jun 13, 2023

Codecov Report

❗ No coverage uploaded for pull request base (master@90edde7). Click here to learn what that means.
The diff coverage is n/a.

@@           Coverage Diff            @@
##             master     #26   +/-   ##
========================================
  Coverage          ?   8.66%           
========================================
  Files             ?       2           
  Lines             ?     450           
  Branches          ?       0           
========================================
  Hits              ?      39           
  Misses            ?     411           
  Partials          ?       0           

@navidcy
Copy link
Contributor Author

navidcy commented Jun 13, 2023

OK, I added code coverage report also!

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@navidcy
Copy link
Contributor Author

navidcy commented Jun 13, 2023

OK, this is ready!
@angus-g, @ashjbarnes?

@@ -18,15 +18,14 @@
"import subprocess\n",
Copy link
Contributor Author

@navidcy navidcy Jun 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line #14.    import mom6_regional as ml

perhaps is better to use as mr or as momr ?


Reply via ReviewNB

@navidcy navidcy changed the title Add automated CI testing pipeline Add python pkg structure + add automated CI testing pipeline + add Coverage report Jun 13, 2023
@navidcy navidcy requested a review from ashjbarnes June 13, 2023 13:46
Copy link
Collaborator

@ashjbarnes ashjbarnes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome thanks Navid and Angus!!

@ashjbarnes ashjbarnes merged commit dee200d into master Jun 14, 2023
angus-g added a commit that referenced this pull request Jun 14, 2023
@angus-g
Copy link
Collaborator

angus-g commented Jun 14, 2023

Eek. I'm going to force-push a reversion, I don't want to merge yet.

@ashjbarnes
Copy link
Collaborator

ashjbarnes commented Jun 14, 2023 via email

@angus-g
Copy link
Collaborator

angus-g commented Jun 14, 2023

No problem, I just haven't looked at any of the new stuff yet!

@navidcy
Copy link
Contributor Author

navidcy commented Jun 14, 2023

@angus-g do that!

also @ashjbarnes it’s good practice to leave the person who open the review to merge.

@ashjbarnes
Copy link
Collaborator

ashjbarnes commented Jun 14, 2023 via email

@navidcy
Copy link
Contributor Author

navidcy commented Jun 14, 2023

Oops sorry!

Don’t worry! No harm!

This was referenced Jun 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants