hi-ml/new_project_template
Peter Hessey 6f0cff82d6 ♻️ Style and fix mypy 2023-03-23 15:06:19 +00:00
..
.vscode ENH: Clean-up of linter configurations (#356) 2022-05-19 13:23:06 +01:00
health_newproject ENH: Add template for multimodal package (#333) 2022-05-16 09:47:12 +01:00
test_newproject ENH: Add template for multimodal package (#333) 2022-05-16 09:47:12 +01:00
.flake8 💄 Add black styling and configuration 2023-03-23 14:32:03 +00:00
.mypy.ini ENH: Add template for multimodal package (#333) 2022-05-16 09:47:12 +01:00
.pylintrc ENH: Clean-up of linter configurations (#356) 2022-05-19 13:23:06 +01:00
Makefile ENH: Improve mypy arguments (#448) 2022-06-22 09:47:22 +01:00
README.md 💄 Add black styling and configuration 2023-03-23 14:32:03 +00:00
environment.yml BUG: Fix invalid environment file (#345) 2022-05-17 14:16:15 +01:00
new-project-pr.yml ENH: Upgrade Github runner OS from Ubuntu 18 to Ubuntu 20 (#511) 2022-07-15 17:17:46 +01: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 ENH: Add template for multimodal package (#333) 2022-05-16 09:47:12 +01:00
pytest.ini ENH: Add template for multimodal package (#333) 2022-05-16 09:47:12 +01:00
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 ENH: Add template for multimodal package (#333) 2022-05-16 09:47:12 +01:00
requirements_test.txt MNT: Hotfix for incompatible linting packages (#586) 2022-08-30 20:39:09 +01:00
setup.py ♻️ Style and fix mypy 2023-03-23 15:06:19 +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