Welcome to AMEE Utils
Installation
This package can be added to any Poetry or uv project by running the following code:
Add the following code to your pyproject.toml file and set explicit = true to ensure that the amee-utils package uses the specified indexes.
pyproject.toml
[tool.uv.sources]
amee-utils = { index = "azure" }
[[tool.uv.index]]
name = "azure"
url = "https://heineken.pkgs.visualstudio.com/82da571c-8e2f-49c5-ac87-6759c20cbaa3/_packaging/amee-analytics/pypi/simple/"
explicit = true
Make sure you have a valid PAT from DevOps, and export it in your terminal:
Replace<TOKEN> with your personal access token for Azure DevOps, and make sure the token has the correct permissions to access the amee-analytics feed.
If you get a 403 error, please reach out to Garett to add you to the artifacts feed.
Execute the command below to install and sync the dependencies for amee-utils.
Confirm that your amee-utils>=0.9.2 added in pyproject.toml file looks as follows:
poetry source add --priority=supplemental amee-analytics https://heineken.pkgs.visualstudio.com/82da571c-8e2f-49c5-ac87-6759c20cbaa3/_packaging/amee-analytics/pypi/simple/
Replace <TOKEN> with your personal access token for the Azure DevOps Workspace:
Confirm that your pyproject.toml file looks as follows:
pyproject.toml
...
[tool.poetry.dependencies]
...
amee-utils = {version = "^0.9.2", source = "amee-analytics"}
[[tool.poetry.source]]
name = "amee-analytics"
url = "https://heineken.pkgs.visualstudio.com/82da571c-8e2f-49c5-ac87-6759c20cbaa3/_packaging/amee-analytics/pypi/simple/"
priority = "supplemental"
CI/CD Authentication
- script: |
uv sync --no-dev
displayName: 'Install dependencies'
env:
UV_INDEX_AZURE_USERNAME: dummy
UV_INDEX_AZURE_PASSWORD: $(artifact-pat)
You would need to add artifact-pat as a pipeline variable.
- task: PipAuthenticate@1
displayName: 'Pip Authentication'
inputs:
artifactFeeds: '82da571c-8e2f-49c5-ac87-6759c20cbaa3/amee-analytics'
onlyAddExtraIndex: True
- script: |
curl -sSL https://install.python-poetry.org | python3 - --version 1.7.1
export PATH=$PATH:$HOME/.poetry/bin
export PAT=$(echo "$PIP_EXTRA_INDEX_URL" | sed -n 's/.*build:\([^@]*\)@.*/\1/p')
poetry config http-basic.amee-analytics $PAT ""
poetry install
displayName: 'Install dependencies'