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

Add jwt auth #12

Merged
merged 47 commits into from
Jun 13, 2024
Merged
Show file tree
Hide file tree
Changes from 19 commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
53ad916
Add tokens
keiranjprice101 Jun 10, 2024
8eefe30
Add codecov badge
keiranjprice101 Jun 10, 2024
3c5e271
Add routers
keiranjprice101 Jun 10, 2024
fe7c5ad
Add uows connectivity
keiranjprice101 Jun 10, 2024
b984b53
Add unit test action step
keiranjprice101 Jun 10, 2024
58d636a
Add type hints
keiranjprice101 Jun 10, 2024
c553f2d
Add dependency
keiranjprice101 Jun 10, 2024
9cc804e
Add docstrings
keiranjprice101 Jun 10, 2024
1ce3ce0
Add test
keiranjprice101 Jun 11, 2024
11322f0
Add super exception
keiranjprice101 Jun 12, 2024
b8b1e50
Add Exception Handler
keiranjprice101 Jun 12, 2024
8097304
Include exception handler
keiranjprice101 Jun 12, 2024
1e76629
Remove explicit try excepts
keiranjprice101 Jun 12, 2024
cff276b
Fix tests
keiranjprice101 Jun 12, 2024
4185cc5
Add ruff, remove pylint
keiranjprice101 Jun 12, 2024
1dff2a1
Reinclude type import
keiranjprice101 Jun 12, 2024
d0a030f
Fix workflow file
keiranjprice101 Jun 12, 2024
f352a8d
Update install
keiranjprice101 Jun 12, 2024
51c5b00
Update test to include timeout
keiranjprice101 Jun 12, 2024
662d34d
Update src/tokens.py
keiranjprice101 Jun 13, 2024
ab869f6
Update test/e2e/test_experiments.py
keiranjprice101 Jun 13, 2024
e4507c3
Update test/e2e/test_experiments.py
keiranjprice101 Jun 13, 2024
53ef1c0
Update test/e2e/test_experiments.py
keiranjprice101 Jun 13, 2024
3e743dc
Update test/e2e/test_experiments.py
keiranjprice101 Jun 13, 2024
e659275
Update src/auth.py
keiranjprice101 Jun 13, 2024
c0902bc
Update src/auth.py
keiranjprice101 Jun 13, 2024
90056d6
Update src/exception_handlers.py
keiranjprice101 Jun 13, 2024
c63c696
Update src/exception_handlers.py
keiranjprice101 Jun 13, 2024
4d22182
Update README.md
keiranjprice101 Jun 13, 2024
8392a72
Rename workflow
keiranjprice101 Jun 13, 2024
7408e86
Update group name
keiranjprice101 Jun 13, 2024
2dc1062
More explicit warning
keiranjprice101 Jun 13, 2024
b81abf7
Add missing imports
keiranjprice101 Jun 13, 2024
7a167de
Fix tests
keiranjprice101 Jun 13, 2024
e137a6e
Update README.md
keiranjprice101 Jun 13, 2024
e8a492c
test
keiranjprice101 Jun 13, 2024
8336c92
test
keiranjprice101 Jun 13, 2024
f92b069
Formatting and linting commit
invalid-email-address Jun 13, 2024
2c58df9
Update pyproject.toml
keiranjprice101 Jun 13, 2024
c3fc846
Update pyproject.toml
Pasarus Jun 13, 2024
141eabd
Update pyproject.toml
Pasarus Jun 13, 2024
db58018
Use enum
keiranjprice101 Jun 13, 2024
077f7f6
Formatting and linting commit
invalid-email-address Jun 13, 2024
712b113
Update test/test_auth.py
keiranjprice101 Jun 13, 2024
0ba3918
Add missing import
keiranjprice101 Jun 13, 2024
154964b
Update test/test_auth.py
keiranjprice101 Jun 13, 2024
029ed5c
Update test/test_auth.py
keiranjprice101 Jun 13, 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
44 changes: 0 additions & 44 deletions .github/workflows/formatting.yml

This file was deleted.

34 changes: 26 additions & 8 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
---
Pasarus marked this conversation as resolved.
Show resolved Hide resolved
on: push

on:
push:
branches-ignore:
- main
permissions:
contents: read


jobs:
pylint:
formatting_and_linting:
permissions:
contents: write # for Git to git push
runs-on: ubuntu-latest
steps:
- name: Checkout project
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v3.5.0
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Set up python
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v4.5.0
- name: Set up Python
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
with:
python-version: '3.12'

Expand All @@ -28,9 +33,22 @@ jobs:
run: |
python -m pip install --upgrade pip
python -m pip install .[code-inspection]
- name: Run pylint
run: pylint src

- name: Run ruff formatting
run: |
ruff format .

- name: Run ruff linting
run: |
ruff check --fix

- name: Commit changes
run: |
git config user.name github-actions
git config user.email [email protected]
git add .
git commit -m "Formatting and linting commit" || true
git push
mypy:
Pasarus marked this conversation as resolved.
Show resolved Hide resolved
runs-on: ubuntu-latest
steps:
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,42 @@ permissions:

jobs:

unit:
runs-on: ubuntu-latest

steps:
- name: Check out repository
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29

- name: Set up Python
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
with:
python-version: '3.12'

- name: Set up cache for Python dependencies
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/pyproject.toml') }}
restore-keys: |
${{ runner.os }}-pip-

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .[test]

- name: Run tests
env:
DATABASE_URL: postgresql://postgres:password@localhost:5432/test_db
run: |
pytest test --ignore=test/e2e --random-order --random-order-bucket=global --cov --cov-report=xml

- name: Upload coverage
uses: codecov/codecov-action@125fc84a9a348dbcf27191600683ec096ec9021c # v4.4.1
with:
token: ${{ secrets.CODECOV_TOKEN }}

e2e:
runs-on: ubuntu-latest

Expand Down
Loading