-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #122 from AllenNeuralDynamics/release-v1.0.0
Release v1.0.0
- Loading branch information
Showing
26 changed files
with
716 additions
and
206 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: Tag and publish main | ||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
tag_and_publish: | ||
name: Parse version | ||
runs-on: ubuntu-latest | ||
outputs: | ||
pkg_version: ${{ steps.output_version.outputs.pkg_version }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Get version from file | ||
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") | ||
echo "docker_tag=$pkg_version" >> "$GITHUB_ENV" | ||
- name: Create git tag | ||
run: | | ||
git tag "v${{ env.docker_tag }}" | ||
- name: Push git tag | ||
run: git push origin "v${{ env.docker_tag }}" | ||
- name: Set up Docker Buildx | ||
id: buildx | ||
uses: docker/setup-buildx-action@v2 | ||
- name: Login to Github Packages | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build image and push to GitHub Container Registry | ||
uses: docker/build-push-action@v3 | ||
with: | ||
# relative path to the place where source code with Dockerfile is located | ||
context: . | ||
push: true | ||
tags: | | ||
ghcr.io/allenneuraldynamics/aind-data-transfer-service:${{ env.docker_tag }} | ||
ghcr.io/allenneuraldynamics/aind-data-transfer-service:latest |
4 changes: 2 additions & 2 deletions
4
.github/workflows/test_and_lint.yml → .github/workflows/run_dev_tests.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
name: Lint and run tests | ||
name: Run checks in dev | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
- dev | ||
|
||
jobs: | ||
ci: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: Run checks in main and release | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- '*release*' | ||
- main | ||
|
||
jobs: | ||
ci: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: [ '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: | | ||
python -m pip install -e .[dev] | ||
- name: Run linter checks | ||
run: flake8 . && interrogate --verbose . | ||
- 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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
version: 2 | ||
|
||
build: | ||
os: ubuntu-22.04 | ||
tools: | ||
python: "3.9" | ||
|
||
python: | ||
install: | ||
- method: pip | ||
path: . | ||
extra_requirements: | ||
- dev | ||
- docs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
@startuml | ||
!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Container.puml | ||
' uncomment the following line and comment the first to use locally | ||
' !include C4_Container.puml | ||
|
||
' LAYOUT_TOP_DOWN() | ||
' LAYOUT_AS_SKETCH() | ||
LAYOUT_WITH_LEGEND() | ||
|
||
title Container diagram for AIND Data Transfer Service | ||
|
||
Person(user, "User", "A scientist or engineer that wants to upload data to the cloud.") | ||
|
||
System_Boundary(c1, "AIND Data Transfer Service") { | ||
Container(app, "API Application", "FastAPI, Docker Container", "Validates and submits request to aind-airflow-service. Runs in K8s cluster managed by Central IT.") | ||
} | ||
|
||
System_Ext(aind_airflow_service, "AIND Airflow Service", "Receives job requests, does additional validation checks, submits and monitors jobs.") | ||
System_Ext(slurm, "Slurm", "High performance computing cluster that runs data transformation and data upload jobs.") | ||
|
||
Rel(user, app, "Uses", "HTTP, REST") | ||
|
||
Rel_Back(user, aind_airflow_service, "Sends e-mails to", "SMTP") | ||
Rel(app, aind_airflow_service, "Uses", "REST API") | ||
Rel(aind_airflow_service, slurm, "Uses", "REST API") | ||
@enduml |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
@startuml | ||
!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Context.puml | ||
' uncomment the following line and comment the first to use locally | ||
' !include C4_Context.puml | ||
|
||
LAYOUT_WITH_LEGEND() | ||
|
||
title System Context diagram for AIND Data Transfer Service | ||
|
||
Person(user, "User", "A scientist or engineer that wants to upload data to the cloud.") | ||
System(transfer_service, "AIND Data Transfer Service", "Allows people to send job requests to compress (or transform) and upload raw data assets.") | ||
System_Ext(aind_airflow_service, "AIND Airflow Service", "Receives job requests, does additional validation checks, submits and monitors jobs.") | ||
System_Ext(slurm, "Slurm", "High performance computing cluster that runs data transformation and data upload jobs.") | ||
|
||
Rel(user, transfer_service, "Uses", "web portal or REST API") | ||
Rel_Back(user, aind_airflow_service, "Sends e-mails to", "SMTP") | ||
Rel(transfer_service, aind_airflow_service, "Uses", "REST API") | ||
Rel(aind_airflow_service, slurm, "Uses", "REST API") | ||
@enduml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
project_name, process_capsule_id, modality0, modality0.source, modality1, modality1.source, s3-bucket, subject-id, platform, acq-datetime | ||
Ephys Platform, , ECEPHYS, dir/data_set_1, ,, some_bucket, 123454, ecephys, 2020-10-10 14:10:10 | ||
Behavior Platform, 1f999652-00a0-4c4b-99b5-64c2985ad070, BEHAVIOR_VIDEOS, dir/data_set_2, MRI, dir/data_set_3, open, 123456, BEHAVIOR, 10/13/2020 1:10:10 PM | ||
Behavior Platform, , BEHAVIOR_VIDEOS, dir/data_set_2, BEHAVIOR_VIDEOS, dir/data_set_3, scratch, 123456, BEHAVIOR, 10/13/2020 1:10:10 PM |
File renamed without changes.
Oops, something went wrong.