-
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 branch 'main' into cwa/close-195-minimize-soft-model
- Loading branch information
Showing
27 changed files
with
555 additions
and
447 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 @@ | ||
entities-service[cli] @ git+https://github.com/SINTEF/[email protected] |
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,65 @@ | ||
name: CD - Upload Entities | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
|
||
jobs: | ||
update-public-entities: | ||
name: Update public entities | ||
runs-on: ubuntu-latest | ||
if: github.repository_owner == 'SINTEF' | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup Python 3.10 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.10' | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -U setuptools wheel | ||
pip install -r .github/utils/requirements_upload.txt | ||
- name: Check 'entities-service' CLI version | ||
run: entities-service --version | ||
|
||
- name: Gather Entities | ||
id: gather_entities | ||
run: | | ||
if [ "${{ github.event_name }}" == "push" ]; then | ||
SHA_BEFORE="${{ github.event.before }}" | ||
else | ||
SHA_BEFORE="${{ github.event.pull_request.base.sha }}" | ||
fi | ||
git diff --name-only ${SHA_BEFORE} | grep -E '^oteapi_optimade/dlite/entities/.*\.ya?ml$' > entities.txt ||: | ||
if [ -s entities.txt ]; then | ||
echo "relevant_entities=true" >> $GITHUB_OUTPUT | ||
echo "Relevant Entities:" | ||
cat entities.txt | ||
else | ||
echo "relevant_entities=false" >> $GITHUB_OUTPUT | ||
echo "No entities to validate (and upload)." | ||
exit 0 | ||
fi | ||
- name: Validate Entities | ||
if: steps.gather_entities.outputs.relevant_entities == 'true' | ||
run: cat entities.txt | entities-service validate --strict --format=yaml - | ||
|
||
- name: Upload Entities | ||
if: steps.gather_entities.outputs.relevant_entities == 'true' && github.event_name == 'push' && github.ref_name == 'main' | ||
run: cat entities.txt | entities-service upload --auto-confirm --strict --format=yaml - | ||
env: | ||
ENTITIES_SERVICE_ACCESS_TOKEN: ${{ secrets.ENTITIES_SERVICE_ACCESS_TOKEN }} |
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
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,44 @@ | ||
services: | ||
oteapi: | ||
image: ghcr.io/emmc-asbl/oteapi:${DOCKER_OTEAPI_VERSION:-latest} | ||
ports: | ||
- "${OTEAPI_PORT:-8080}:8080" | ||
environment: | ||
OTEAPI_REDIS_TYPE: redis | ||
OTEAPI_REDIS_HOST: redis | ||
OTEAPI_REDIS_PORT: 6379 | ||
OTEAPI_PREFIX: "${OTEAPI_PREFIX:-/api/v1}" | ||
PATH_TO_OTEAPI_CORE: | ||
OTEAPI_PLUGIN_PACKAGES: "-v -e /oteapi-optimade" | ||
depends_on: | ||
- redis | ||
networks: | ||
- otenet | ||
volumes: | ||
- "${PATH_TO_OTEAPI_CORE:-/dev/null}:/oteapi-core" | ||
- "${PWD}:/oteapi-optimade" | ||
entrypoint: | | ||
/bin/bash -c "if [ \"${PATH_TO_OTEAPI_CORE}\" != \"/dev/null\" ] && [ -n \"${PATH_TO_OTEAPI_CORE}\" ]; then \ | ||
pip install -U --force-reinstall -e /oteapi-core; fi && ./entrypoint.sh --reload --debug --log-level debug" | ||
stop_grace_period: 1s | ||
|
||
redis: | ||
image: redis:latest | ||
volumes: | ||
- redis-persist:/data | ||
networks: | ||
- otenet | ||
|
||
optimade: | ||
image: ghcr.io/materials-consortia/optimade:develop | ||
ports: | ||
- "${OPTIMADE_PORT:-5000}:5000" | ||
networks: | ||
- otenet | ||
stop_grace_period: 1s | ||
|
||
volumes: | ||
redis-persist: | ||
|
||
networks: | ||
otenet: |
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
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
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
Oops, something went wrong.