Skip to content

Commit 47dd650

Browse files
authored
Merge pull request #348 from AllenNeuralDynamics/release-v1.23.0
Release v1.23.0
2 parents e4fca3c + 6f64176 commit 47dd650

16 files changed

+70
-124
lines changed

.github/workflows/publish_dev.yml

Lines changed: 13 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,30 +5,23 @@ on:
55
- dev
66

77
jobs:
8-
publish:
8+
compute-docker-tag:
99
runs-on: ubuntu-latest
10+
outputs:
11+
docker_tag: ${{ steps.compute-tag.outputs.docker_tag }}
1012
steps:
1113
- uses: actions/checkout@v4
1214
- name: Compute new docker image tag
15+
id: compute-tag
1316
run: |
1417
echo "sha_short=$(git rev-parse --short "$GITHUB_SHA")" >> "$GITHUB_ENV"
1518
echo "branch=$(echo ${GITHUB_REF_NAME})" >> "$GITHUB_ENV"
16-
echo "docker_tag=$(echo ${GITHUB_REF_NAME})-$(git rev-parse --short "$GITHUB_SHA")" >> "$GITHUB_ENV"
17-
- name: Set up Docker Buildx
18-
id: buildx
19-
uses: docker/setup-buildx-action@v2
20-
- name: Login to Github Packages
21-
uses: docker/login-action@v2
22-
with:
23-
registry: ghcr.io
24-
username: ${{ github.actor }}
25-
password: ${{ secrets.GITHUB_TOKEN }}
26-
- name: Build image and push to GitHub Container Registry
27-
uses: docker/build-push-action@v3
28-
with:
29-
# relative path to the place where source code with Dockerfile is located
30-
context: .
31-
push: true
32-
tags: |
33-
ghcr.io/allenneuraldynamics/aind-data-transfer-service:${{ env.docker_tag }}
34-
ghcr.io/allenneuraldynamics/aind-data-transfer-service:dev
19+
echo "docker_tag=$(echo ${GITHUB_REF_NAME})-$(git rev-parse --short "$GITHUB_SHA")" >> "$GITHUB_OUTPUT"
20+
publish-image:
21+
needs: compute-docker-tag
22+
uses: AllenNeuralDynamics/.github/.github/workflows/release-publish-docker-image.yml@main
23+
with:
24+
default-branch: dev
25+
docker-tag: ${{ needs.compute-docker-tag.outputs.docker_tag }}
26+
secrets:
27+
repo-token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/publish_main.yml

Lines changed: 17 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -5,42 +5,24 @@ on:
55
- main
66

77
jobs:
8-
tag_and_publish:
9-
name: Parse version
8+
tag:
9+
name: Tag
10+
uses: AllenNeuralDynamics/.github/.github/workflows/release-tag.yml@main
11+
secrets:
12+
repo-token: ${{ secrets.GITHUB_TOKEN }}
13+
publish-image:
14+
needs: tag
15+
uses: AllenNeuralDynamics/.github/.github/workflows/release-publish-docker-image.yml@main
16+
with:
17+
docker-tag: ${{ needs.tag.outputs.new_version }}
18+
secrets:
19+
repo-token: ${{ secrets.GITHUB_TOKEN }}
20+
publish-pypi:
21+
needs: tag
1022
runs-on: ubuntu-latest
11-
outputs:
12-
pkg_version: ${{ steps.output_version.outputs.pkg_version }}
1323
steps:
14-
- uses: actions/checkout@v4
15-
- name: Get version from file
16-
run: |
17-
pkg_name=$(grep -P 'version = \{attr = .*\}' pyproject.toml | grep -oP '\w+.__version__')
18-
init_file="./src/${pkg_name//.__version__}/__init__.py"
19-
pkg_version=$(grep -Po '[0-9]+\.[0-9]+\.[0-9]+' "$init_file")
20-
echo "docker_tag=$pkg_version" >> "$GITHUB_ENV"
21-
- name: Create git tag
22-
run: |
23-
git tag "v${{ env.docker_tag }}"
24-
- name: Push git tag
25-
run: git push origin "v${{ env.docker_tag }}"
26-
- name: Set up Docker Buildx
27-
id: buildx
28-
uses: docker/setup-buildx-action@v2
29-
- name: Login to Github Packages
30-
uses: docker/login-action@v2
31-
with:
32-
registry: ghcr.io
33-
username: ${{ github.actor }}
34-
password: ${{ secrets.GITHUB_TOKEN }}
35-
- name: Build image and push to GitHub Container Registry
36-
uses: docker/build-push-action@v3
37-
with:
38-
# relative path to the place where source code with Dockerfile is located
39-
context: .
40-
push: true
41-
tags: |
42-
ghcr.io/allenneuraldynamics/aind-data-transfer-service:${{ env.docker_tag }}
43-
ghcr.io/allenneuraldynamics/aind-data-transfer-service:latest
24+
- name: Checkout repository
25+
uses: actions/checkout@v5
4426
- name: Set up Python 3.10
4527
uses: actions/setup-python@v5
4628
with:
@@ -53,4 +35,4 @@ jobs:
5335
- name: Publish on PyPI
5436
uses: pypa/gh-action-pypi-publish@release/v1.12
5537
with:
56-
password: ${{ secrets.AIND_PYPI_TOKEN }}
38+
password: ${{ secrets.AIND_PYPI_TOKEN }}

.github/workflows/run_dev_tests.yml

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,9 @@ on:
77

88
jobs:
99
ci:
10-
runs-on: ubuntu-latest
1110
strategy:
1211
matrix:
1312
python-version: [ '3.10', '3.11', '3.12' ]
14-
steps:
15-
- uses: actions/checkout@v4
16-
- name: Set up Python ${{ matrix.python-version }}
17-
uses: actions/setup-python@v5
18-
with:
19-
python-version: ${{ matrix.python-version }}
20-
- name: Install dependencies
21-
run: |
22-
python -m pip install -e .[dev]
23-
- name: Run linter checks
24-
run: flake8 . && interrogate --verbose .
25-
- name: Run tests and coverage
26-
run: coverage run -m unittest discover && coverage report
13+
uses: AllenNeuralDynamics/.github/.github/workflows/test-ci.yml@main
14+
with:
15+
python-version: ${{ matrix.python-version }}

.github/workflows/run_main_tests.yml

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,27 +8,16 @@ on:
88

99
jobs:
1010
ci:
11-
runs-on: ubuntu-latest
1211
strategy:
1312
matrix:
1413
python-version: [ '3.10', '3.11', '3.12' ]
15-
steps:
16-
- uses: actions/checkout@v4
17-
- name: Set up Python ${{ matrix.python-version }}
18-
uses: actions/setup-python@v5
19-
with:
20-
python-version: ${{ matrix.python-version }}
21-
- name: Install dependencies
22-
run: |
23-
python -m pip install -e .[dev]
24-
- name: Run linter checks
25-
run: flake8 . && interrogate --verbose .
26-
- name: Run tests and coverage
27-
run: coverage run -m unittest discover && coverage report
14+
uses: AllenNeuralDynamics/.github/.github/workflows/test-ci.yml@main
15+
with:
16+
python-version: ${{ matrix.python-version }}
2817
verify_version:
2918
runs-on: ubuntu-latest
3019
steps:
31-
- uses: actions/checkout@v4
20+
- uses: actions/checkout@v5
3221
- name: Check version incremented
3322
run: |
3423
pkg_name=$(grep -P 'version = \{attr = .*\}' pyproject.toml | grep -oP '\w+.__version__')

docs/examples/basic_upload.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,8 @@
88
import requests
99
from aind_data_schema_models.modalities import Modality
1010

11-
# Note, the platform field is optional and will be deprecated. If adding a
12-
# platform please use aind-data-transfer-service <= 1.17.2
13-
from aind_data_schema_models.platforms import Platform
14-
11+
# Note, the platform field is optional and will be deprecated.
12+
from aind_data_transfer_service.configs.platforms_v1 import Platform
1513
from aind_data_transfer_service.models.core import (
1614
SubmitJobRequestV2,
1715
Task,

docs/examples/behavior_videos_compression.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,8 @@
99
import requests
1010
from aind_data_schema_models.modalities import Modality
1111

12-
# Note, the platform field is optional and will be deprecated. If adding a
13-
# platform please use aind-data-transfer-service <= 1.17.2
14-
from aind_data_schema_models.platforms import Platform
15-
12+
# Note, the platform field is optional and will be deprecated.
13+
from aind_data_transfer_service.configs.platforms_v1 import Platform
1614
from aind_data_transfer_service.models.core import (
1715
SubmitJobRequestV2,
1816
Task,

docs/examples/custom_codeocean_pipeline_settings.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,8 @@
99
import requests
1010
from aind_data_schema_models.modalities import Modality
1111

12-
# Note, the platform field is optional and will be deprecated. If adding a
13-
# platform please use aind-data-transfer-service <= 1.17.2
14-
from aind_data_schema_models.platforms import Platform
15-
12+
# Note, the platform field is optional and will be deprecated.
13+
from aind_data_transfer_service.configs.platforms_v1 import Platform
1614
from aind_data_transfer_service.models.core import (
1715
SubmitJobRequestV2,
1816
Task,

docs/examples/custom_metadata_mapper_settings.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@
99

1010
import requests
1111
from aind_data_schema_models.modalities import Modality
12-
13-
# Note, the platform field is optional and will be deprecated. If adding a
14-
# platform please use aind-data-transfer-service <= 1.17.2
15-
from aind_data_schema_models.platforms import Platform
1612
from aind_metadata_mapper.bergamo.models import (
1713
JobSettings as BergamoSessionSettings,
1814
)
@@ -23,6 +19,8 @@
2319
SessionSettings,
2420
)
2521

22+
# Note, the platform field is optional and will be deprecated.
23+
from aind_data_transfer_service.configs.platforms_v1 import Platform
2624
from aind_data_transfer_service.models.core import (
2725
SubmitJobRequestV2,
2826
Task,

docs/examples/hcr_example.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,8 @@
55
import requests
66
from aind_data_schema_models.modalities import Modality
77

8-
# Note, the platform field is optional and will be deprecated. If adding a
9-
# platform please use aind-data-transfer-service <= 1.17.2
10-
from aind_data_schema_models.platforms import Platform
11-
8+
# Note, the platform field is optional and will be deprecated.
9+
from aind_data_transfer_service.configs.platforms_v1 import Platform
1210
from aind_data_transfer_service.models.core import (
1311
SubmitJobRequestV2,
1412
Task,

docs/examples/remove_source_folders.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,8 @@
99
import requests
1010
from aind_data_schema_models.modalities import Modality
1111

12-
# Note, the platform field is optional and will be deprecated. If adding a
13-
# platform please use aind-data-transfer-service <= 1.17.2
14-
from aind_data_schema_models.platforms import Platform
15-
12+
# Note, the platform field is optional and will be deprecated.
13+
from aind_data_transfer_service.configs.platforms_v1 import Platform
1614
from aind_data_transfer_service.models.core import (
1715
SubmitJobRequestV2,
1816
Task,

0 commit comments

Comments
 (0)