Skip to content

Commit d208f0e

Browse files
authored
Merge pull request #1024 from AllenNeuralDynamics/release-v0.39.0
Release v0.39.0
2 parents 4b8e1e9 + e738082 commit d208f0e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+40270
-31994
lines changed

.github/workflows/publish_dev.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Publish - dev
2+
on:
3+
push:
4+
branches:
5+
- dev
6+
7+
jobs:
8+
upload_schemas_dev:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
id-token: write
12+
contents: read
13+
env:
14+
AWS_DATA_SCHEMA_ROLE: ${{ secrets.AWS_DATA_SCHEMA_ROLE_DEV }}
15+
AWS_DATA_SCHEMA_BUCKET: ${{ vars.AWS_DATA_SCHEMA_BUCKET_DEV }}
16+
AWS_REGION : ${{ vars.AWS_REGION_DEV }}
17+
TEMP_DIR: 'temp_schemas'
18+
S3_PREFIX: 'schemas'
19+
steps:
20+
- uses: actions/checkout@master
21+
- name: Pull latest changes
22+
run: git pull origin dev
23+
- name: Set up Python 3.8
24+
uses: actions/setup-python@v3
25+
with:
26+
python-version: 3.8
27+
- name: Configure aws credentials
28+
uses: aws-actions/configure-aws-credentials@v2
29+
with:
30+
role-to-assume: ${{ env.AWS_DATA_SCHEMA_ROLE }}
31+
role-session-name: github-schema-upload-session
32+
aws-region: ${{ env.AWS_REGION }}
33+
- name: Create and upload schemas
34+
run: |
35+
python -m pip install -e .
36+
python -m aind_data_schema.utils.json_writer --output $TEMP_DIR --attach-version
37+
python -m pip install awscli
38+
aws s3 sync $TEMP_DIR s3://${AWS_DATA_SCHEMA_BUCKET}/$S3_PREFIX
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
name: CI
1+
name: Run check in dev
22

33
on:
44
pull_request:
55
branches:
6-
- main
6+
- dev
77

88
jobs:
99
linters:
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Run checks in main and release
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- '*release*'
7+
- main
8+
9+
jobs:
10+
linters:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: [ '3.11' ]
15+
steps:
16+
- uses: actions/checkout@v3
17+
- name: Set up Python ${{ matrix.python-version }}
18+
uses: actions/setup-python@v3
19+
with:
20+
python-version: ${{ matrix.python-version }}
21+
- name: Install dependencies
22+
run: |
23+
python -m pip install -e .[linters] --no-cache-dir
24+
- name: Run linters
25+
run: flake8 . && interrogate . && codespell src examples tests
26+
tests:
27+
runs-on: ubuntu-latest
28+
strategy:
29+
matrix:
30+
python-version: [ '3.8', '3.9', '3.10', '3.11' ]
31+
steps:
32+
- uses: actions/checkout@v3
33+
- name: Set up Python ${{ matrix.python-version }}
34+
uses: actions/setup-python@v3
35+
with:
36+
python-version: ${{ matrix.python-version }}
37+
- name: Install dependencies
38+
run: |
39+
sudo apt install graphviz libgraphviz-dev -y
40+
python -m pip install -e .[dev] -e .[docs] --no-cache-dir
41+
- name: Run tests and coverage
42+
run: coverage run -m unittest discover && coverage report
43+
verify_version:
44+
runs-on: ubuntu-latest
45+
steps:
46+
- uses: actions/checkout@v3
47+
- name: Check version incremented
48+
run: |
49+
pkg_name=$(grep -P 'version = \{attr = .*\}' pyproject.toml | grep -oP '\w+.__version__')
50+
init_file="./src/${pkg_name//.__version__}/__init__.py"
51+
pkg_version=$(grep -Po '[0-9]+\.[0-9]+\.[0-9]+' "$init_file")
52+
latest_tag=$(git ls-remote --tags --refs --sort="v:refname" | tail -n1 | sed 's/.*\///')
53+
echo "Checking pkg_version v$pkg_version and latest_tag $latest_tag"
54+
if [ "$latest_tag" == "v$pkg_version" ]
55+
then
56+
exit 1
57+
fi
58+
echo "Versions are different"

.github/workflows/tag_and_publish.yml

Lines changed: 0 additions & 242 deletions
This file was deleted.

0 commit comments

Comments
 (0)