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

Update package level installation makefile #128

Merged
merged 7 commits into from Aug 25, 2021

Conversation

aaraney
Copy link
Member

@aaraney aaraney commented Aug 24, 2021

Cleanup and add a small amount of functionality to package level makefile. Add new develop and uninstall rules for installing all packages in editable (pip install -e) mode and uninstalling all subpackages from the virtual environment respectfully. A help page to display available rules and a brief description is also added.

help page:

HydroTools makefile commands:
  install : install all subpackages from local source code
  develop : install all subpackages in editable mode (pip -e) from local source code
  tests : run unit tests. exclude tests marked as slow
  all-tests : run all unit tests
  uninstall : uninstall all subpackages
  clean : delete python virtual environment

  this utility requires sed

Additions

  • help rule (default rule). displays available rules and a brief description
  • develop rule. Installs all subpackages using pip install --editable
  • uninstall rule. Uninstalls all subpackages from the virtual environment

Removals

Changes

Testing

Notes

Todos

Checklist

  • PR has an informative and human-readable title
  • PR is well outlined and documented. See #12 for an example
  • Changes are limited to a single goal (no scope creep)
  • Code can be automatically merged (no conflicts)
  • Code follows project standards (see CONTRIBUTING.md)
  • Passes all existing automated tests
  • Any change in functionality is tested
  • New functions are documented (with a description, list of inputs, and expected output) using numpy docstring formatting
  • Placeholder code is flagged / future todos are captured in comments
  • Reviewers requested with the Reviewers tool ➡️

@aaraney
Copy link
Member Author

aaraney commented Aug 24, 2021

At the moment, make develop does not work b.c. pip requires that setup.py be present. I will open a PR that adds setup.py back to the subpackages to fulfill this requirement. The contents of setup.py just need to include:

from setuptools import setup

setup()

@aaraney aaraney mentioned this pull request Aug 24, 2021
10 tasks
@aaraney
Copy link
Member Author

aaraney commented Aug 25, 2021

At the moment, make develop does not work b.c. pip requires that setup.py be present. I will open a PR that adds setup.py back to the subpackages to fulfill this requirement. The contents of setup.py just need to include:

from setuptools import setup

setup()

So, as @jarq6c pointed out and I elaborated in #129, pip 19.3.1 added support for installing packages that only use setup.cfg.

Additionally, as I also mention in #129:

I have had no problems using pip to install these packages in edit mode with only a setup.cfg. I'll check back.

When I updated to pip 21.2.4 my issues went away and I was able to install in editable mode with --use-feature=in-tree-build. I checked the change log and downgraded versions programatically. This issue arrises pip <21.1.

I added some documentation to the makefile help rule that mentions the minimum requirement for pip in 4344e8d.

@jarq6c
Copy link
Collaborator

jarq6c commented Aug 25, 2021

Looks good. I tested the new functionality locally and everything just worked. This is a good update.

@jarq6c jarq6c merged commit 129808c into NOAA-OWP:main Aug 25, 2021
@aaraney aaraney deleted the update_makefile branch May 19, 2023 01:24
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