hi-ml/new_project_template
Anton Schwaighofer 1cf19cce04
ENH: Upgrade to Python 3.9 and package update (#910)
- Upgrade to Python 3.9 as a minimum
- Upgrade pillow because of security alerts. This required some API
changes and update of test result images
- The behaviour of the `LogCaptureFixture` changed, requiring changes
from `logging.info` to `logger.info`
- Downgraded `black` from 23 to 22 because of version constraints
- Changes in calls to `WorkflowParams` because of `mypy` issues that
were not detected until now
- `hi-ml-azure` now also has its own minimal Conda dev environment
2023-11-09 13:17:38 +00:00
..
.vscode
health_newproject
test_newproject
.flake8 💄 Add black styling and configuration 2023-03-23 14:32:03 +00:00
.mypy.ini ENH: Upgrade to Python 3.9 and package update (#910) 2023-11-09 13:17:38 +00:00
.pylintrc
Makefile
README.md 💄 Add black styling and configuration 2023-03-23 14:32:03 +00:00
environment.yml ENH: Upgrade to Python 3.9 and package update (#910) 2023-11-09 13:17:38 +00:00
new-project-pr.yml ENH: Upgrade to Python 3.9 and package update (#910) 2023-11-09 13:17:38 +00:00
package_description.md ENH: Clean up readme file in the template for new projects (#702) 2022-12-20 09:39:16 +00:00
pyrightconfig.json
pytest.ini
requirements_build.txt Bump wheel from 0.36.2 to 0.38.1 in /new_project_template (#711) 2023-01-04 17:53:49 +00:00
requirements_run.txt
requirements_test.txt MNT: Hotfix for incompatible linting packages (#586) 2022-08-30 20:39:09 +01:00
setup.py ENH: Upgrade to Python 3.9 and package update (#910) 2023-11-09 13:17:38 +00:00

README.md

Template

This is a folder with a template set of files to create a new project in hi-ml.

To use it:

  • Copy the template folder to the desired project folder
  • In the new location, rename the folders health_newproject and test_newproject to be the desired Python namespaces
  • Search for all occurences of newproject and replace with the desired project name. Don't use a simple query/replace strategy but do check the context!
  • Update the requirements_*.txt files to match your needs.
  • Update the Conda environment environment.yml to match your needs. Ensure that all packages that are in the requirements are also included in the environment.
  • Move the workflow definition new-project-pr.yml to .github/workflows and give it a name that matches the project.
  • If you do not want your code to be published as a PyPi package, remove the steps build-python and publish-pypi-pkg from the workflow.
  • If you want your package to be published, add a PyPi access token as a secret to the Github project. Add the name of the secret in the publish-pypi-pkg step of the pipeline.

Developer setup

Make file commands:

  • make pip_local to install the package in editable mode. This must happen before running tests.
  • make build to build the package
  • make mypy to run mypy
  • make black to run black checks (not reformatting)
  • make check to run flake8, mypy, pyright and black
  • make clean to clean up all temporary files and folders