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

Package and move ngen cal into ngen namespace package #30

Merged
merged 25 commits into from
Nov 10, 2022

Conversation

aaraney
Copy link
Member

@aaraney aaraney commented Nov 1, 2022

Moves ngen_cal under ngen.cal namespace and adds necessary metadata files (e.g. setup.cfg, pyproject.toml) to install ngen.cal using pip. This should make it easier for downstream users to install and get started.

Changes

  • Call module CLI using python -m ngen.cal.
  • Import the package using ngen.cal instead of ngen_cal.
  • Install from github using pip (python3 -m pip install "git+https://github.com/noaa-owp/ngen-cal@master#egg=ngen_cal&subdirectory=python/ngen_cal").
  • Unit tests moved out of source tree and now live in sibling directory.
  • Github action run ngen_cal and ngen_conf tests separately. Note, ngen_cal tests against ngen_conf code pulled by the runner, not what ngen_cal has specified in setup.cfg.

Testing

  1. Verified that all unit tests complete successfully after install installing in develop mode.

Notes

  • For local development, install using pip install -e ".[develop]". This will install the package in "edit" mode along with the packages used for testing (pytest).

Checklist

  • PR has an informative and human-readable title
  • Changes are limited to a single goal (no scope creep)
  • Code can be automatically merged (no conflicts)
  • Code follows project standards (link if applicable)
  • Passes all existing automated tests
  • Any change in functionality is tested
  • New functions are documented (with a description, list of inputs, and expected output)
  • Placeholder code is flagged / future todos are captured in comments
  • Project documentation has been updated (including the "Unreleased" section of the CHANGELOG)
  • Reviewers requested with the Reviewers tool ➡️

Testing checklist

Target Environment support

  • Linux
  • MacOS

@aaraney
Copy link
Member Author

aaraney commented Nov 1, 2022

@hellkite500, I can't add you as a reviewer, so pinging you instead.

Copy link
Member

@hellkite500 hellkite500 left a comment

Choose a reason for hiding this comment

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

Looks alright to me in general, but we should fix the failing package test in this action.

note, ngen_cal depends on ngen_conf. ngen_cal tests against ngen_conf
code pulled by the runner, NOT what ngen_cal has specified in setup.cfg.
@aaraney
Copy link
Member Author

aaraney commented Nov 2, 2022

It looks like after updating the github actions in cbf7ef0, the updated action is passing. However, the old action is still failing (as expected).

deactivate
rm -rf venv

- name: Install ngen_cal and run unit tests
Copy link
Member

Choose a reason for hiding this comment

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

Wouldn't this be more suited to a name indicating the tests are actually being run?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, I think that is fair. I broke apart the workflow into more stages and changed the stage naming convention to use present tense as suggested.

@aaraney
Copy link
Member Author

aaraney commented Nov 7, 2022

Unless there are other changes that you would like me to make, @hellkite500, I think this should be ready to merge.

@aaraney
Copy link
Member Author

aaraney commented Nov 10, 2022

The original CI tests are failing because of the changes to the package structure. However, the updated CI workflows are passing.

@hellkite500 hellkite500 merged commit f925a58 into NOAA-OWP:master Nov 10, 2022
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.

None yet

2 participants