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

154 pietro integrates some best practices within cobra #166

Open
wants to merge 11 commits into
base: develop
Choose a base branch
from

Conversation

pietrodantuono
Copy link

Integration of git-changelog package and invoke command for easier development

Pietro integrates some best practices within Cobra #154

Additions made

Added some automated development tasks through the invoke command. To test it:

  • install the dev and notebook dependencies in your virtual environment
  • run one of these invoke tasks (works on Linux, macOS, Windows):
  • inv test, inv qa, inv nb.

Added git-changelog package dependency to simplify change log generation (https://pawamoy.github.io/git-changelog/).

How does the solution address the problem

This PR will:

  • simplify testing development by offering automated coverage
  • simplify quality assessment by offering customisable linting, type-hinting, and possibly formatting (black).
  • simplify cobra development via inv nb that automatically creates a jupyter environment in developer mode, i.e. every change in the cobra source code will be reflected immediately in the jupyter kernel.
  • simplify the change log generation via the git-changelog command which will be in the near future added as an invoke command.

Linked issues

Resolves #154

pietrodantuono and others added 11 commits April 12, 2023 10:58
The invoke package has been added to the dev requirements. The "inv" command has been configured, and the test task has been implemented. Call inv test and take a look.
… of github.com:PythonPredictions/cobra into 154-pietro-integrates-some-best-practices-within-cobra
Run `inv qa` to test this functionality. CAVEAT: at the moment, qa runs flake8, pylint and mypy sequentially. Black is not run because it would modify the source code.
Run `inv nb` to test this functionality. CAVEAT: at the moment, nb runs on Linux and macOS, while still gives an error on Windows 11. It will be fixed soon.
@pietrodantuono pietrodantuono added the enhancement New feature or request label Apr 21, 2023
@pietrodantuono pietrodantuono added this to the 2023-04 milestone Apr 21, 2023
@pietrodantuono pietrodantuono self-assigned this Apr 21, 2023
@ZlaTanskY
Copy link
Contributor

This is not working on WSL, since the invoke executable is not being installed automatically when installing through pip like it is on Windows. I suppose this is similar on Linux and Mac.
It could be good to edit the Makefile so that with one make dev/install-requirements, invoke is also installed for the Unix-based operating systems.

@sandervh14 sandervh14 modified the milestones: 2023-04, 2023-05 May 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pietro integrates some best practices within Cobra
3 participants