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

Applying latest changes on aieng-template #6

Merged
merged 42 commits into from
Feb 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
907dc72
Adding Material Dashboard bootstrap template
lotif Feb 1, 2024
27b5e1d
Adding venv to gitignore
lotif Feb 5, 2024
9423995
Merge
lotif Feb 6, 2024
fd94f33
Bump
lotif Feb 7, 2024
d125fc5
Fixing static code errors
lotif Feb 7, 2024
3a56b53
Making it into a next js app
lotif Feb 7, 2024
166b7bb
Merge branch 'main' into nextjs-template
lotif Feb 7, 2024
6f761e0
Deleting old code
lotif Feb 7, 2024
05d82d3
Removing about link
lotif Feb 7, 2024
6a41d2f
cleanup
lotif Feb 7, 2024
804c513
Adding information about building and running the project into readme…
lotif Feb 8, 2024
5051e17
Moving things around to comply with what poetry expects
lotif Feb 9, 2024
eb1070c
done endpoint
lotif Feb 15, 2024
5bdfc45
Merge branch 'readme-contrib-info' into client-connect
lotif Feb 15, 2024
4bf8f2b
added tests, updated readme
lotif Feb 15, 2024
aef32db
Merge branch 'main' into client-connect
lotif Feb 15, 2024
f8cfdcd
Merge branch 'main' into client-connect
lotif Feb 15, 2024
2a01f55
Adding return type for client connect
lotif Feb 15, 2024
b72cb35
Fixing tests workflow
lotif Feb 15, 2024
71353f2
Testing updated precommit checks
lotif Feb 15, 2024
fc02905
Adding inits
lotif Feb 15, 2024
3eeec77
Adding init, fixing mypy error
lotif Feb 15, 2024
84e52cb
Adding pip audit and fixing its issues
lotif Feb 15, 2024
04fa3e6
Adding docstrings
lotif Feb 16, 2024
a955128
Updating uvicorn as well
lotif Feb 16, 2024
e5ca520
Fixing tests path
lotif Feb 16, 2024
966dde3
Applying latest changes from aieng-template
lotif Feb 21, 2024
a17fa0e
Merge branch 'client-connect' into pip-audit
lotif Feb 22, 2024
5ac3972
Applying latest changes from aieng-template [2], merging client endpo…
lotif Feb 22, 2024
a1c4d32
Fixing static code checks
lotif Feb 22, 2024
de5ee0f
Updating documentation templates
lotif Feb 22, 2024
dfb3910
Merge branch 'main' into pip-audit
lotif Feb 22, 2024
b81b4d9
Removing integration tests workflow, updating unit tests workflow
lotif Feb 22, 2024
87fac16
Fixing documentation
lotif Feb 22, 2024
cfd9945
Fixing doctest, commenting out codecov for now
lotif Feb 22, 2024
c6e407e
Commenting out some more codecov stuff
lotif Feb 22, 2024
f574acf
Changing the tests workflow name to python tests
lotif Feb 22, 2024
ae4ddfd
Merge branch 'main' into pip-audit
lotif Feb 29, 2024
eaccf48
Finishing merge of pyproject.toml
lotif Feb 29, 2024
b814347
Splitting workflows for integration and unit tests, adding metrics to…
lotif Feb 29, 2024
5d598a3
Fixing static code errors, better ruff config
lotif Feb 29, 2024
cdaa72e
Ignoring pillow vulnerabilities in pip-audit
lotif Feb 29, 2024
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
3 changes: 0 additions & 3 deletions .flake8

This file was deleted.

45 changes: 45 additions & 0 deletions .github/workflows/docs_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: docs (build)

on:
pull_request:
branches:
- main
paths:
- .pre-commit-config.yaml
- .github/workflows/docs_build.yml
- '**.py'
- '**.ipynb'
- poetry.lock
- pyproject.toml
- '**.rst'
- '**.md'

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Install dependencies, build docs and coverage report
run: python3 -m pip install --upgrade pip && python3 -m pip install poetry
- uses: actions/[email protected]
with:
python-version: '3.9'
cache: 'poetry'
- run: |
python3 -m pip install --upgrade pip && python3 -m pip install poetry
poetry env use '3.9'
source $(poetry env info --path)/bin/activate
poetry install --with docs,test
cd docs && rm -rf source/reference/api/_autosummary && make html
cd .. && coverage run -m pytest -m "not integration_test" && coverage xml && coverage report -m
# - name: Upload coverage to Codecov
# uses: Wandalen/[email protected]
# with:
# action: codecov/[email protected]
# with: |
# token: ${{ secrets.CODECOV_TOKEN }}
# file: ./coverage.xml
# name: codecov-umbrella
# fail_ci_if_error: true
# attempt_limit: 5
# attempt_delay: 30000
55 changes: 55 additions & 0 deletions .github/workflows/docs_deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: docs

on:
push:
branches:
- main
paths:
- .pre-commit-config.yaml
- .github/workflows/static_code_checks.yml
- .github/workflows/docs_build.yml
- .github/workflows/docs_deploy.yml
- .github/workflows/tests.yml
- '**.py'
- '**.ipynb'
- poetry.lock
- pyproject.toml
- '**.rst'
- '**.md'

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
with:
submodules: 'true'
- name: Install dependencies, build docs and coverage report
run: python3 -m pip install --upgrade pip && python3 -m pip install poetry
- uses: actions/[email protected]
with:
python-version: '3.9'
cache: 'poetry'
- run: |
python3 -m pip install --upgrade pip && python3 -m pip install poetry
poetry env use '3.9'
source $(poetry env info --path)/bin/activate
poetry install --with docs,test
cd docs && rm -rf source/reference/api/_autosummary && make html
cd .. && coverage run -m pytest -m "not integration_test" && coverage xml && coverage report -m
# - name: Upload coverage to Codecov
# uses: Wandalen/[email protected]
# with:
# action: codecov/[email protected]
# with: |
# token: ${{ secrets.CODECOV_TOKEN }}
# file: ./coverage.xml
# name: codecov-umbrella
# fail_ci_if_error: true
# attempt_limit: 5
# attempt_delay: 30000
- name: Deploy to Github pages
uses: JamesIves/[email protected]
with:
branch: github_pages
folder: docs/build/html
61 changes: 61 additions & 0 deletions .github/workflows/integration_tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: tests

on:
push:
branches:
- main
paths:
- .pre-commit-config.yaml
- .github/workflows/static_code_checks.yml
- .github/workflows/docs_build.yml
- .github/workflows/docs_deploy.yml
- .github/workflows/tests.yml
- '**.py'
- '**.ipynb'
- poetry.lock
- pyproject.toml
- '**.rst'
- '**.md'
pull_request:
branches:
- main
paths:
- .pre-commit-config.yaml
- .github/workflows/static_code_checks.yml
- .github/workflows/docs_build.yml
- .github/workflows/docs_deploy.yml
- .github/workflows/tests.yml
- '**.py'
- '**.ipynb'
- poetry.lock
- pyproject.toml
- '**.rst'
- '**.md'

jobs:
python-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Install poetry
run: python3 -m pip install --upgrade pip && python3 -m pip install poetry
- uses: actions/[email protected]
with:
python-version: '3.9'
- name: Install dependencies and check code
run: |
poetry env use '3.9'
source $(poetry env info --path)/bin/activate
poetry install --with docs,test
coverage run -m pytest florist/tests/integration && coverage xml && coverage report -m
# - name: Upload coverage to Codecov
# uses: Wandalen/[email protected]
# with:
# action: codecov/[email protected]
# with: |
# token: ${{ secrets.CODECOV_TOKEN }}
# file: ./coverage.xml
# name: codecov-umbrella
# fail_ci_if_error: true
# attempt_limit: 5
# attempt_delay: 30000
27 changes: 27 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: publish package

on:
release:
types: [published]

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Install apt dependencies
run: |
sudo apt-get update
sudo apt-get install libcurl4-openssl-dev libssl-dev
- uses: actions/[email protected]
- name: Install poetry
run: python3 -m pip install --upgrade pip && python3 -m pip install poetry
- uses: actions/[email protected]
with:
python-version: '3.9'
- name: Build package
run: poetry build
- name: Publish package
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
60 changes: 46 additions & 14 deletions .github/workflows/static_code_checks.yaml
Original file line number Diff line number Diff line change
@@ -1,26 +1,58 @@
# only has to pass for python 3.9
name: Static code checks
name: code checks

on:
push:
branches:
main
- main
paths:
- .pre-commit-config.yaml
- .github/workflows/code_checks.yml
- '**.py'
- poetry.lock
- pyproject.toml
- '**.ipynb'
pull_request:
branches:
main
- main
paths:
- .pre-commit-config.yaml
- .github/workflows/code_checks.yml
- '**.py'
- poetry.lock
- pyproject.toml
- '**.ipynb'

jobs:
run-code-check:
runs-on: ubuntu-latest
steps:

- name: Checkout code
uses: actions/checkout@v3

- name: Set up Python 3.9
uses: actions/setup-python@v3
- uses: actions/[email protected]
- name: Install and configure Poetry
uses: snok/install-poetry@v1
with:
python-version: 3.9

- name: precommit checker
uses: pre-commit/[email protected]
virtualenvs-create: true
virtualenvs-in-project: true
- uses: actions/[email protected]
with:
python-version: '3.9'
cache: 'poetry'
- name: Install dependencies and check code
run: |
poetry env use '3.9'
source .venv/bin/activate
poetry install --with test --all-extras
pre-commit run --all-files
- name: pip-audit (gh-action-pip-audit)
uses: pypa/[email protected]
with:
virtual-environment: .venv/
# Ignoring security vulnerabilities in Pillow because pycyclops cannot update it to the
# version that fixes them (>10.0.1).
# Remove those when the issue below is fixed and pycyclops changes its requirements:
# https://github.com/SeldonIO/alibi/issues/991
ignore-vulns: |
PYSEC-2023-175
PYSEC-2023-227
GHSA-j7hp-h8jx-5ppr
GHSA-56pw-mpj4-fxww
GHSA-3f63-hfp8-52jq
42 changes: 0 additions & 42 deletions .github/workflows/tests.yaml

This file was deleted.

61 changes: 61 additions & 0 deletions .github/workflows/unit_tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: tests

on:
push:
branches:
- main
paths:
- .pre-commit-config.yaml
- .github/workflows/static_code_checks.yml
- .github/workflows/docs_build.yml
- .github/workflows/docs_deploy.yml
- .github/workflows/tests.yml
- '**.py'
- '**.ipynb'
- poetry.lock
- pyproject.toml
- '**.rst'
- '**.md'
pull_request:
branches:
- main
paths:
- .pre-commit-config.yaml
- .github/workflows/static_code_checks.yml
- .github/workflows/docs_build.yml
- .github/workflows/docs_deploy.yml
- .github/workflows/tests.yml
- '**.py'
- '**.ipynb'
- poetry.lock
- pyproject.toml
- '**.rst'
- '**.md'

jobs:
python-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- name: Install poetry
run: python3 -m pip install --upgrade pip && python3 -m pip install poetry
- uses: actions/[email protected]
with:
python-version: '3.9'
- name: Install dependencies and check code
run: |
poetry env use '3.9'
source $(poetry env info --path)/bin/activate
poetry install --with docs,test
coverage run -m pytest florist/tests/unit && coverage xml && coverage report -m
# - name: Upload coverage to Codecov
# uses: Wandalen/[email protected]
# with:
# action: codecov/[email protected]
# with: |
# token: ${{ secrets.CODECOV_TOKEN }}
# file: ./coverage.xml
# name: codecov-umbrella
# fail_ci_if_error: true
# attempt_limit: 5
# attempt_delay: 30000
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -166,3 +166,5 @@ yarn-error.log*
*.tsbuildinfo
next-env.d.ts
/florist/tsconfig.json

/metrics/
Loading