Skip to content

Commit

Permalink
Develop -> Main (#15)
Browse files Browse the repository at this point in the history
* Renamed 'trivy' and implemented 'codeql'
* Updated README.md multiple times, including service account info
* Modified permissions and fixed configuration issues
* Enhanced testing
* Formatted code with 'black'
* Updated dependencies, including 'pydantic'
* Refactored code, including service info retrieval and version handling
* Updated Dockerfile and .gitignore
* Addressed various issues and improvements
* PR Consolidations:
  - Devops 1367 (#11) encompassed various updates and fixes
  - SW2 Cleanup (#13) and Service wizard cleanup (#17) included code refactoring, testing enhancements, and more

Co-authored-by: Boris <[email protected]>
  • Loading branch information
bio-boris and Boris authored Oct 19, 2023
1 parent 9dbe93a commit a38919a
Show file tree
Hide file tree
Showing 80 changed files with 3,465 additions and 1,848 deletions.
4 changes: 4 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[run]
omit =
src/clients/CatalogClient.py
src/clients/baseclient.py
5 changes: 2 additions & 3 deletions .env
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ SERVICE_WIZARD_ADMIN_ROLE="SERVICE_WIZARD_ADMIN"
CATALOG_ADMIN_TOKEN="REDACTED"

# Kubernetes configs
# Note this also creates a toleration V1Toleration(effect="NoSchedule", key=namespace, operator="Exists")
KUBECONFIG="~/.kube/config"
NAMESPACE="staging-dynamic-services" # Note this also creates a toleration V1Toleration(effect="NoSchedule", key=namespace, operator="Exists")
NAMESPACE="staging-dynamic-services"
USE_INCLUSTER_CONFIG="false"
TAINT_TOLERATION_EXPRESSIONS=""
# APP_AFFINITY_FILE="app-affinity.yaml" # path to files that force apps to run on specific nodes
6 changes: 2 additions & 4 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@


name: "Code Scanning - Action"

on:
push:
branches: [main, develop]
branches: [ main, develop ]
pull_request:
branches: [main, develop]
branches: [ main, develop ]
schedule:
# ┌───────────── minute (0 - 59)
# │ ┌───────────── hour (0 - 23)
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/manual-build.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: Manual Build & Push
on:
workflow_dispatch:
workflow_dispatch:
jobs:
build-push:
uses: kbase/.github/.github/workflows/reusable_build-push.yml@main
Expand Down
10 changes: 4 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ "3.11" ]
python-version: [ "3.12" ]

steps:

Expand All @@ -32,20 +32,18 @@ jobs:
with:
python-version: ${{ matrix.python-version }}


- name: Install dependencies
# tried VaultVulp/action-pipenv but pytest wasn't on the path post action
shell: bash
run: |
pip install pipenv
pipenv sync --system --dev
run: bash scripts/update_dependencies.sh

- name: Run pre-commit Hooks
shell: bash
run: pre-commit run --all-files

- name: Run tests
shell: bash
run: PYTHONPATH=. pytest --cov=src --cov-report=xml test
run: bash scripts/run_tests.sh

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
Expand Down
22 changes: 11 additions & 11 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files

- repo: https://github.com/psf/black
- repo: https://github.com/psf/black
rev: 23.7.0
hooks:
- id: black
language_version: python3.11
- id: black
language_version: python3.12

- repo: https://github.com/pycqa/flake8
- repo: https://github.com/pycqa/flake8
rev: 6.1.0
hooks:
- id: flake8
args: [--config, pyproject.toml]
- id: flake8
args: [ --config, pyproject.toml ]
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.11
FROM python:3.12.0-bookworm

RUN mkdir -p /app
WORKDIR /app
Expand Down
20 changes: 11 additions & 9 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,23 @@ verify_ssl = true
name = "pypi"

[packages]
fastapi = "==0.95.2"
uvicorn = {version = "==0.22.0", extras = ["standard"]}
sentry-sdk = "==1.25.0"
fastapi = "==0.103.2"
uvicorn = "==0.23.2"
sentry-sdk = "==1.31.0"
PySocks = "==1.7.1"
requests = "==2.31.0"
prometheus-fastapi-instrumentator = "==6.0.0"
pydantic = "==1.10.8"
prometheus-fastapi-instrumentator = "==6.1.0"
cacheout = "==0.14.1"
jinja-cli = "==1.2.2"
python-dotenv = "==0.19.1"
httpx = "==0.24.1"
kubernetes = "==26.1.0"
python-dotenv = "==1.0.0"
httpx = "==0.25.0"
kubernetes = "==28.1.0"
flake8-annotations = "==3.0.1"
chardet = "==5.2.0"

[dev-packages]
pytest = "==7.3.1"
python-dotenv = "==1.0.0"
pytest-cov = "==4.0.0"
requests_mock = "==1.9.3"
pre-commit = "==3.3.3"
Expand All @@ -27,4 +29,4 @@ flake8 = "==6.1.0"
pytest_kind = "==22.11.1"

[requires]
python_version = "3.11"
python_version = "3.12"
1,069 changes: 553 additions & 516 deletions Pipfile.lock

Large diffs are not rendered by default.

Loading

0 comments on commit a38919a

Please sign in to comment.