зеркало из https://github.com/microsoft/hi-ml.git
1cf19cce04
- 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 |
||
---|---|---|
.. | ||
.vscode | ||
health_newproject | ||
test_newproject | ||
.flake8 | ||
.mypy.ini | ||
.pylintrc | ||
Makefile | ||
README.md | ||
environment.yml | ||
new-project-pr.yml | ||
package_description.md | ||
pyrightconfig.json | ||
pytest.ini | ||
requirements_build.txt | ||
requirements_run.txt | ||
requirements_test.txt | ||
setup.py |
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
andtest_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
andpublish-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 packagemake mypy
to runmypy
make black
to runblack
checks (not reformatting)make check
to runflake8
,mypy
,pyright
andblack
make clean
to clean up all temporary files and folders