Skip to content

Commit a90c2e2

Browse files
authored
Merge pull request #143 from MiraGeoscience/DEVOPS-867
DEVOPS-867: convert the 3 Python meta packages to individual repositories 🚧
2 parents b1fb3e0 + 3b9c253 commit a90c2e2

20 files changed

Lines changed: 188 additions & 136 deletions

.github/actions/reusable-get_draft_release/action.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,21 @@ name: Get or Draft Release
22
description: Find or create a new draft release for the current tag
33
inputs:
44
GITHUB_TOKEN:
5-
description: "The GitHub token (secret)"
5+
description: The GitHub token (secret)
66
required: true
77
type: string
88
existing-release:
9-
description: "The tag corresponding to the desired release. If empty, will get it from github.ref"
9+
description: The tag corresponding to the desired release. If empty, will get it from github.ref
1010
required: false
1111
type: string
1212

1313
outputs:
1414
release-tag:
15-
description: "The tag for the newly created or existing release (same value as `inputs.existing-release` if provided)"
15+
description: The tag for the newly created or existing release (same value as `inputs.existing-release` if provided)
1616
value: ${{ steps.get-or-draft-release.outputs.release-tag || steps.get-existing-release.outputs.release-tag }}
1717

1818
runs:
19-
using: "composite"
19+
using: composite
2020
steps:
2121
- shell: bash
2222
run: gh --version

.github/actions/reusable-python-publish_to_artifactory/action.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,24 @@ name: Publish to Artifactory
22
description: Publish package to JFrog Artifactory
33
inputs:
44
build-dir-path:
5-
description: 'Path to the build directory'
5+
description: Path to the build directory
66
required: true
77
type: string
88
artifactory-dir-path:
9-
description: 'Path for the package in Artifactory containing the repository name'
9+
description: Path for the package in Artifactory containing the repository name
1010
required: true
1111
type: string
1212
JFROG_ARTIFACTORY_URL:
13-
description: 'JFrog Artifactory URL'
13+
description: JFrog Artifactory URL (secret)
1414
required: true
1515
type: string
1616
JFROG_ARTIFACTORY_TOKEN:
17-
description: 'JFrog Artifactory Token'
17+
description: JFrog Artifactory Token (secret)
1818
required: true
1919
type: string
2020

2121
runs:
22-
using: "composite"
22+
using: composite
2323
steps:
2424
- name: Setup JFrog CLI
2525
uses: jfrog/setup-jfrog-cli@v4.4.1

.github/actions/reusable-python-setup_conda/action.yml

Lines changed: 45 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,33 @@ name: Setup conda env
22
description: Setup conda environment for Python
33
inputs:
44
cache-number:
5-
description: 'Cache number to reset cache if conda lock file has not changed'
5+
description: Cache number to reset cache if conda lock file has not changed
66
required: true
77
type: number
88
python-version:
9-
description: 'Python version to use'
9+
description: Python version to use
1010
required: true
1111
type: string
12+
virtual-repo-names:
13+
description: 'List of repository names to pull from (e.g. ["geology-conda-dev", "geophysics-conda-dev"])'
14+
required: false
15+
type: string
16+
conda-channels:
17+
description: 'List of conda channels to pull from (e.g. ["conda-forge", "pytorch"])'
18+
required: false
19+
type: string
1220
JFROG_ARTIFACTORY_URL:
13-
description: 'JFrog Artifactory URL, needed if packages are on Artifactory'
21+
description: JFrog Artifactory URL, needed if packages are on Artifactory (secret)
1422
required: false
1523
type: string
1624
JFROG_ARTIFACTORY_TOKEN:
17-
description: 'JFrog Artifactory Token, needed if packages are on Artifactory'
25+
description: JFrog Artifactory Token, needed if packages are on Artifactory (secret)
1826
required: false
1927
type: string
2028

2129

2230
runs:
23-
using: "composite"
31+
using: composite
2432
steps:
2533
- uses: actions/checkout@v5
2634
with:
@@ -49,6 +57,34 @@ runs:
4957
INPUTS_JFROG_ARTIFACTORY_TOKEN: ${{ inputs.JFROG_ARTIFACTORY_TOKEN }}
5058
run: |
5159
micromamba auth login ${INPUTS_JFROG_ARTIFACTORY_URL} -u github -p ${INPUTS_JFROG_ARTIFACTORY_TOKEN}
60+
- name: Configure Conda channels
61+
id: config-channels
62+
shell: 'bash -l {0}'
63+
env:
64+
INPUTS_JFROG_ARTIFACTORY_URL: ${{ inputs.JFROG_ARTIFACTORY_URL }}
65+
INPUTS_SOURCE_REPO_NAMES: ${{ inputs.virtual-repo-names }}
66+
INPUTS_CONDA_CHANNELS: ${{ inputs.conda-channels }}
67+
run: |
68+
conda_channels=""
69+
repository_list=$(echo "${INPUTS_SOURCE_REPO_NAMES}" | jq -r '.[]' | xargs)
70+
echo "Using local Conda channels: ${repository_list}"
71+
for repo_name in ${repository_list}; do
72+
url="https://${INPUTS_JFROG_ARTIFACTORY_URL}/artifactory/api/conda/${repo_name}"
73+
conda_channels="${conda_channels}${url},"
74+
done
75+
76+
channel_list=$(echo "${INPUTS_CONDA_CHANNELS}" | jq -r '.[]' | xargs)
77+
# at the minimum use conda-forge
78+
if [[ -z $channel_list ]]; then
79+
channel_list=conda-forge
80+
fi
81+
echo "Using regular Conda channels: $channel_list"
82+
for channel_name in ${channel_list}; do
83+
conda_channels="${conda_channels}${channel_name},"
84+
done
85+
conda_channels="${conda_channels%,}"
86+
87+
echo "channels=$conda_channels" >> $GITHUB_OUTPUT
5288
- name: Create conda env
5389
uses: mamba-org/setup-micromamba@v2
5490
with:
@@ -63,5 +99,7 @@ runs:
6399
PYTHONUTF8: 1
64100
CONDA_CHANNEL_PRIORITY: strict
65101
MAMBA_CHANNEL_PRIORITY: strict
66-
PIP_NO_DEPS: 1 # all dependencies are installed from conda
67-
CONDA_LOCK_ENV_FILE: 'environments/py-${{ inputs.python-version }}-${{ env.os_conda }}-64-dev.conda.lock.yml'
102+
CONDA_CHANNELS: ${{ steps.config-channels.outputs.channels }}
103+
MAMBA_CHANNELS: ${{ steps.config-channels.outputs.channels }}
104+
PIP_NO_DEPS: 1 # all dependencies are explicitly listed in the conda lock file
105+
CONDA_LOCK_ENV_FILE: environments/py-${{ inputs.python-version }}-${{ env.os_conda }}-64-dev.conda.lock.yml

.github/actions/reusable-python-setup_hatch/action.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@ name: Setup hatch env
22
description: Setup hatch environment for Python
33
inputs:
44
cache-number:
5-
description: 'Cache number to reset cache if pyproject.toml has not changed'
5+
description: Cache number to reset cache if pyproject.toml has not changed
66
required: true
77
type: number
88
runner-os:
9-
description: 'Runner OS'
9+
description: Runner OS
1010
required: true
1111
type: string
1212

1313
runs:
14-
using: "composite"
14+
using: composite
1515
steps:
1616
- name: Get full Python version
1717
id: full-python-version

.github/actions/reusable-python-setup_pixi/action.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,24 @@ name: Setup pixi env
22
description: Setup pixi environment for Python
33
inputs:
44
cache-number:
5-
description: 'Cache number to reset cache if pixi.lock has not changed'
5+
description: Cache number to reset cache if pixi.lock has not changed
66
required: true
77
type: number
88
python-version:
9-
description: 'Python version to decide on the pixi environment to install'
9+
description: Python version to decide on the pixi environment to install
1010
required: false
1111
type: string
1212
JFROG_ARTIFACTORY_URL:
13-
description: 'JFrog Artifactory URL'
13+
description: JFrog Artifactory URL (secret)
1414
required: true
1515
type: string
1616
JFROG_ARTIFACTORY_TOKEN:
17-
description: 'JFrog Artifactory Token'
17+
description: JFrog Artifactory Token (secret)
1818
required: false
1919
type: string
2020

2121
runs:
22-
using: "composite"
22+
using: composite
2323
steps:
2424
- id: get-env-name
2525
name: Get pixi environment name

.github/actions/reusable-python-setup_poetry/action.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,28 @@ name: Setup poetry env
22
description: Setup poetry environment for Python
33
inputs:
44
cache-number:
5-
description: 'Cache number to reset cache if poetry.lock has not changed'
5+
description: Cache number to reset cache if poetry.lock has not changed
66
required: true
77
type: number
88
runner-os:
9-
description: 'Runner OS'
9+
description: Runner OS
1010
required: true
1111
type: string
1212
install-extras:
1313
description: 'Extra dependencies to install (eg. ["torch", "cuda"])'
1414
required: false
1515
type: string
1616
virtual-repo-names:
17-
description: 'Matrix of virtual repository names to resolve (eg. ["public-dev-pypi"])'
17+
description: 'Matrix of virtual repository names to resolve on (eg. ["public-pypi-dev"])'
1818
required: false
1919
type: string
2020
JFROG_ARTIFACTORY_TOKEN:
21-
description: 'JFrog Artifactory Token'
21+
description: JFrog Artifactory Token (secret)
2222
required: true
2323
type: string
2424

2525
runs:
26-
using: "composite"
26+
using: composite
2727
steps:
2828
- name: Get full Python version
2929
id: full-python-version

.github/actions/setup-zizmor-config/action.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
name: 'Setup Zizmor Config'
2-
description: 'Creates a default zizmor.yml if one does not exist'
1+
name: Setup Zizmor Config
2+
description: Creates a default zizmor.yml if one does not exist
33
runs:
4-
using: "composite"
4+
using: composite
55
steps:
66
- name: Ensure default zizmor.yml
77
shell: bash

.github/workflows/jira-issue_to_jira.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ jobs:
1515
JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }}
1616
JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }}
1717
with:
18-
project-key: 'DEVOPS'
18+
project-key: DEVOPS

.github/workflows/reusable-jira-issue_to_jira.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,16 @@ on:
77
secrets:
88
JIRA_BASE_URL:
99
required: true
10-
description: 'The base URL of your JIRA instance'
10+
description: The base URL of your JIRA instance
1111
JIRA_API_TOKEN:
1212
required: true
13-
description: 'The API token for your JIRA account'
13+
description: The API token for your JIRA account
1414
JIRA_USER_EMAIL:
1515
required: true
16-
description: 'The email address for your JIRA account'
16+
description: The email address for your JIRA account
1717
inputs:
1818
project-key:
19-
description: 'The JIRA project key'
19+
description: The JIRA project key
2020
required: true
2121
type: string
2222
components:

.github/workflows/reusable-jira-pr_add_jira_summary.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ on:
88
secrets:
99
JIRA_BASE_URL:
1010
required: true
11-
description: 'The base URL of your JIRA instance'
11+
description: The base URL of your JIRA instance
1212
JIRA_USER_EMAIL:
1313
required: true
14-
description: 'The email address for your JIRA account'
14+
description: The email address for your JIRA account
1515
JIRA_API_TOKEN:
1616
required: true
17-
description: 'The API token for your JIRA account'
17+
description: The API token for your JIRA account
1818

1919

2020
jobs:

0 commit comments

Comments
 (0)