Skip to content

Commit

Permalink
reimplement transform framework using schemapack (GSI-529) (#56)
Browse files Browse the repository at this point in the history
- reimplemented functionality is added in a subpackage called "schemapack_" this allows the parallel evolution of
   the already existing code (much of which might be migrated at some point but not as part of this POC) and the 
   refactored code
- replaced terms "metadata" and "metadata_model" with simply "data" and "model"
- implemented a null transformation that return the input model and data unchanged
- used the null transformation for testing
  • Loading branch information
KerstenBreuer authored Dec 11, 2023
1 parent 8f098c6 commit 5d72617
Show file tree
Hide file tree
Showing 33 changed files with 1,524 additions and 225 deletions.
1 change: 1 addition & 0 deletions .deprecated_files
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
.github/workflows/check_mandatory_and_static_files.yaml
.github/workflows/dev_cd.yaml
.github/workflows/unit_and_int_tests.yaml
.github/workflows/cd.yaml

scripts/check_mandatory_and_static_files.py
scripts/update_static_files.py
Expand Down
7 changes: 5 additions & 2 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,16 @@
],
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true,
"editor.codeActionsOnSave": {
"source.organizeImports": true
},
"editor.formatOnSave": true,
"editor.renderWhitespace": "all",
"editor.rulers": [
88
],
"editor.defaultFormatter": "ms-python.black-formatter",
"ruff.organizeImports": true,
"editor.defaultFormatter": "charliermarsh.ruff",
"licenser.license": "Custom",
"licenser.customHeaderFile": "/workspace/.devcontainer/license_header.txt"
},
Expand All @@ -52,7 +56,6 @@
"visualstudioexptteam.vscodeintellicode",
"ymotongpoo.licenser",
"charliermarsh.ruff",
"ms-python.black-formatter",
"ms-python.mypy-type-checker"
]
}
Expand Down
120 changes: 0 additions & 120 deletions .github/workflows/cd.yaml

This file was deleted.

15 changes: 15 additions & 0 deletions .github/workflows/ci_release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: CI on release

on:
release:
types: [published]

jobs:
push_to_docker_hub:
runs-on: ubuntu-latest
steps:
- uses: ghga-de/gh-action-ci@v1
with:
tag: ${{ github.event.release.tag_name }}
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
dockerhub_token: ${{ secrets.DOCKERHUB_TOKEN }}
30 changes: 30 additions & 0 deletions .github/workflows/ci_workflow_dispatch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Build on PR or dispatch

on:
workflow_dispatch:
pull_request:
types:
- opened
- synchronize
- reopened
- labeled

jobs:
fetch-tag:
runs-on: ubuntu-latest
if: ( github.event.action == 'workflow_dispatch' || github.event.action != 'labeled' && contains(github.event.pull_request.labels.*.name, 'build') ) || ( github.event.action == 'labeled' && github.event.label.name == 'build' )
steps:
- id: fetch-tag
uses: ghga-de/gh-action-fetch-tag@v1
outputs:
latest_tag: ${{ steps.fetch-tag.outputs.latest_tag }}

push_to_docker_hub:
needs: fetch-tag
runs-on: ubuntu-latest
steps:
- uses: ghga-de/gh-action-ci@v1
with:
tag: ${{ needs.fetch-tag.outputs.latest_tag }}-${{ github.sha }}
dockerhub_username: ${{ secrets.DOCKERHUB_USERNAME }}
dockerhub_token: ${{ secrets.DOCKERHUB_TOKEN }}
5 changes: 2 additions & 3 deletions .github/workflows/static_code_analysis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@ jobs:
env:
SKIP: no-commit-to-branch
- name: ruff
uses: chartboost/ruff-action@v1
- name: black
run: |
black --check .
ruff check --output-format=github .
ruff format --check .
- name: mypy
run: |
mypy .
Expand Down
7 changes: 4 additions & 3 deletions .static_files
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,13 @@ scripts/list_outdated_dependencies.py
scripts/README.md

.github/workflows/check_config_docs.yaml
.github/workflows/check_openapi_spec.yaml
.github/workflows/check_readme.yaml
.github/workflows/check_template_files.yaml
.github/workflows/ci_release.yaml
.github/workflows/ci_workflow_dispatch.yaml
.github/workflows/static_code_analysis.yaml
.github/workflows/tests.yaml
.github/workflows/check_openapi_spec.yaml
.github/workflows/check_readme.yaml
.github/workflows/cd.yaml

example_data/README.md

Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ dependencies = [
"linkml==1.6.1",
"linkml-runtime==1.6.0",
"linkml-validator==0.4.5",
"schemapack<=1.0.0, <2.0.0"
]

[project.license]
Expand Down
2 changes: 0 additions & 2 deletions requirements-dev-common.in
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ mypy-extensions>=1.0.0

ruff>=0.0.290

black>=23.1.0

click>=8.1.0
typer>=0.7.0

Expand Down
Loading

0 comments on commit 5d72617

Please sign in to comment.