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

Added utils with common models/settings #7

Merged
merged 21 commits into from
Jul 18, 2024
Merged
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
60 changes: 60 additions & 0 deletions .github/workflows/esgf-api-ingest-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: esgf-api-ingest-check

on:
push:
paths:
- 'esgf-api-ingest/**'
pull_request:
paths:
- 'esgf-api-ingest/**'

jobs:
quality:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Run black
run: |
cd esgf-api-ingest
pip install poetry
poetry install --only black
poetry run black ./ --verbose --check
- name: Run mypy
run: |
cd esgf-api-ingest
pip install poetry
poetry install
poetry run mypy .
- name: Run bandit
run: |
cd esgf-api-ingest
pip install poetry
poetry install --only bandit
poetry run bandit -c pyproject.toml -r .
- name: Run isort
run: |
cd esgf-api-ingest
pip install poetry
poetry install --only isort
poetry run isort . --check
- name: Run ruff
run: |
cd esgf-api-ingest
pip install poetry
poetry install --only ruff
poetry run ruff check
- name: Run audit
run: |
cd esgf-api-ingest
pip install poetry
poetry self add poetry-audit-plugin
poetry audit --ignore-code=CVE-2019-8341
- name: Run xenon
run: |
cd esgf-api-ingest
pip install poetry
poetry install --only xenon
poetry run xenon . -a A -b A -m A
60 changes: 60 additions & 0 deletions .github/workflows/esgf-consumer-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: esgf-consumer-check

on:
push:
paths:
- 'esgf-consumer/**'
pull_request:
paths:
- 'esgf-consumer/**'

jobs:
quality:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Run black
run: |
cd esgf-consumer
pip install poetry
poetry install --only black
poetry run black ./ --verbose --check
- name: Run mypy
run: |
cd esgf-consumer
pip install poetry
poetry install
poetry run mypy .
- name: Run bandit
run: |
cd esgf-consumer
pip install poetry
poetry install --only bandit
poetry run bandit -c pyproject.toml -r .
- name: Run isort
run: |
cd esgf-consumer
pip install poetry
poetry install --only isort
poetry run isort . --check
- name: Run ruff
run: |
cd esgf-consumer
pip install poetry
poetry install --only ruff
poetry run ruff check
- name: Run audit
run: |
cd esgf-consumer
pip install poetry
poetry self add poetry-audit-plugin
poetry audit
- name: Run xenon
run: |
cd esgf-consumer
pip install poetry
poetry install --only xenon
poetry run xenon . -a A -b A -m A
60 changes: 60 additions & 0 deletions .github/workflows/esgf-generator-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: esgf-generator-check

on:
push:
paths:
- 'esgf-generator/**'
pull_request:
paths:
- 'esgf-generator/**'

jobs:
quality:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Run black
run: |
cd esgf-generator
pip install poetry
poetry install --only black
poetry run black ./ --verbose --check
- name: Run mypy
run: |
cd esgf-generator
pip install poetry
poetry install
poetry run mypy .
- name: Run bandit
run: |
cd esgf-generator
pip install poetry
poetry install --only bandit
poetry run bandit -c pyproject.toml -r . -s B311,B501
- name: Run isort
run: |
cd esgf-generator
pip install poetry
poetry install --only isort
poetry run isort . --check
- name: Run ruff
run: |
cd esgf-generator
pip install poetry
poetry install --only ruff
poetry run ruff check
- name: Run audit
run: |
cd esgf-generator
pip install poetry
poetry self add poetry-audit-plugin
poetry audit
- name: Run xenon
run: |
cd esgf-generator
pip install poetry
poetry install --only xenon
poetry run xenon . -a A -b B -m A
60 changes: 60 additions & 0 deletions .github/workflows/esgf-playground-utils-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: esgf-playground-utils-check

on:
push:
paths:
- 'esgf-playground-utils/**'
pull_request:
paths:
- 'esgf-playground-utils/**'

jobs:
quality:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Run black
run: |
cd esgf-playground-utils
pip install poetry
poetry install --only black
poetry run black ./ --verbose --check
- name: Run mypy
run: |
cd esgf-playground-utils
pip install poetry
poetry install
poetry run mypy .
- name: Run bandit
run: |
cd esgf-playground-utils
pip install poetry
poetry install --only bandit
poetry run bandit -c pyproject.toml -r .
- name: Run isort
run: |
cd esgf-playground-utils
pip install poetry
poetry install --only isort
poetry run isort . --check
- name: Run ruff
run: |
cd esgf-playground-utils
pip install poetry
poetry install --only ruff
poetry run ruff check
- name: Run audit
run: |
cd esgf-playground-utils
pip install poetry
poetry self add poetry-audit-plugin
poetry audit
- name: Run xenon
run: |
cd esgf-playground-utils
pip install poetry
poetry install --only xenon
poetry run xenon . -a A -b A -m A
21 changes: 21 additions & 0 deletions .github/workflows/esgf-playground-utils-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: esgf-playground-utils-publish

on:
push:
branches:
- main

jobs:
quality:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Publish
run: |
cd esgf-playground-utils
pip install poetry
poetry build
poetry publish -u __token__ -p ${{ secrets.PYPI_TOKEN }}
2 changes: 1 addition & 1 deletion esgf-api-ingest/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ COPY . /opt/esgf-api-ingest

RUN pip install poetry

RUN poetry install
RUN poetry install --only main

ENTRYPOINT ["poetry", "run", "uvicorn", "esgf_api_ingest.main:app", "--host", "0.0.0.0"]
Empty file added esgf-api-ingest/README.md
Empty file.
14 changes: 0 additions & 14 deletions esgf-api-ingest/esgf_api_ingest/config.py

This file was deleted.

Loading