Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v0.39.0 #1023

Closed
wants to merge 9 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .github/workflows/publish_dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Publish - dev
on:
push:
branches:
- dev

jobs:
upload_schemas_dev:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
env:
AWS_DATA_SCHEMA_ROLE: ${{ secrets.AWS_DATA_SCHEMA_ROLE_DEV }}
AWS_DATA_SCHEMA_BUCKET: ${{ vars.AWS_DATA_SCHEMA_BUCKET_DEV }}
AWS_REGION : ${{ vars.AWS_REGION_DEV }}
TEMP_DIR: 'temp_schemas'
S3_PREFIX: 'schemas'
steps:
- uses: actions/checkout@master
- name: Pull latest changes
run: git pull origin dev
- name: Set up Python 3.8
uses: actions/setup-python@v3
with:
python-version: 3.8
- name: Configure aws credentials
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: ${{ env.AWS_DATA_SCHEMA_ROLE }}
role-session-name: github-schema-upload-session
aws-region: ${{ env.AWS_REGION }}
- name: Create and upload schemas
run: |
python -m pip install -e .
python -m aind_data_schema.utils.json_writer --output $TEMP_DIR --attach-version
python -m pip install awscli
aws s3 sync $TEMP_DIR s3://${AWS_DATA_SCHEMA_BUCKET}/$S3_PREFIX
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: CI
name: Run check in dev

on:
pull_request:
branches:
- main
- dev

jobs:
linters:
Expand Down
58 changes: 58 additions & 0 deletions .github/workflows/run_main_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Run checks in main and release

on:
pull_request:
branches:
- '*release*'
- main

jobs:
linters:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ '3.11' ]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install -e .[linters] --no-cache-dir
- name: Run linters
run: flake8 . && interrogate . && codespell src examples tests
tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ '3.8', '3.9', '3.10', '3.11' ]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
sudo apt install graphviz libgraphviz-dev -y
python -m pip install -e .[dev] -e .[docs] --no-cache-dir
- name: Run tests and coverage
run: coverage run -m unittest discover && coverage report
verify_version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Check version incremented
run: |
pkg_name=$(grep -P 'version = \{attr = .*\}' pyproject.toml | grep -oP '\w+.__version__')
init_file="./src/${pkg_name//.__version__}/__init__.py"
pkg_version=$(grep -Po '[0-9]+\.[0-9]+\.[0-9]+' "$init_file")
latest_tag=$(git ls-remote --tags --refs --sort="v:refname" | tail -n1 | sed 's/.*\///')
echo "Checking pkg_version v$pkg_version and latest_tag $latest_tag"
if [ "$latest_tag" == "v$pkg_version" ]
then
exit 1
fi
echo "Versions are different"
242 changes: 0 additions & 242 deletions .github/workflows/tag_and_publish.yml

This file was deleted.

Loading
Loading