diff --git a/templates/python/partial/README.md b/templates/python/partial/README.md index 7533c1904a18ad006cb4226e6a841f8ac3e4bcbd..2c52b491db0308664c45a9d3cee18a8988f8475a 100644 --- a/templates/python/partial/README.md +++ b/templates/python/partial/README.md @@ -13,11 +13,12 @@ consistent configuration across CI jobs that rely on a python environment. ## Variables -| Name | Description | Default | -|----------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------| -| `PROJECT_PATH` | The path to the project root directory. | `"."` | -| `IMAGE_TAG` | The default tag for the docker image. See [Python Docker Official Image](https://hub.docker.com/_/python) for supported tags and respective Dockerfile links | `"latest"` | -| `PYTHON_SETUP` | Bash commands to setup your python environment. Default rely on `requirements.txt` to install all dependencies. | `"pip install -r ${PROJECT_PATH}/requirements.txt"` | +| Name | Description | Default | +|---------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------| +| `PROJECT_PATH` | The path to the project root directory. | `"."` | +| `REQUIREMENTS_FILE` | the path to the requirements file. | `"${PROJECT_PATH}/requirements.txt"` | +| `IMAGE_TAG` | The default tag for the docker image. See [Python Docker Official Image](https://hub.docker.com/_/python) for supported tags and respective Dockerfile links | `"latest"` | +| `PYTHON_SETUP` | Bash commands to setup your python environment. Default rely on `requirements.txt` to install all dependencies. | `"pip install -r ${PROJECT_PATH}/requirements.txt"` | ## @@ -37,16 +38,3 @@ flake8: python_install - flake8 ${PROJECT_PATH} -v ``` - -## Add a <a href="https://docs.pytest.org/en/latest/"><img alt="Tested with pytest" src="https://img.shields.io/badge/Tested%20with-pytest-green"></a> Badge to your project README.md - -To display the use of pytest in your project, you can add the following badge to your README.md: - -```markdown -<a href="https://docs.pytest.org/en/latest/"> - <img alt="Tested with pytest" src="https://img.shields.io/badge/Tested%20with-pytest-green"> -</a> -``` - -Please note that the `src` URL in the pytest badge will need to be updated to reflect the actual -testing status of your project in your continuous integration pipeline. diff --git a/templates/python/partial/python_install.yml b/templates/python/partial/python_install.yml index 0df57f51e07c12287adf176d97186d49f8ca4d2f..924e5823b8fe2c0e5f990c8be678077167134650 100644 --- a/templates/python/partial/python_install.yml +++ b/templates/python/partial/python_install.yml @@ -3,8 +3,8 @@ variables: IMAGE_TAG: "latest" PROJECT_PATH: "." - REQUIREMENTS_FILE: "requirements.txt" - PYTHON_SETUP: "pip install -r ${PROJECT_PATH}/${REQUIREMENTS_FILE}" + REQUIREMENTS_FILE_PATH: "${PROJECT_PATH}/requirements.txt" + PYTHON_SETUP: "pip install -r ${REQUIREMENTS_FILE_PATH}" script: - python --version # Debug - python -m venv venv --upgrade-deps || python -m venv venv # upgrade-deps is not supported before 3.9