Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
146 commits
Select commit Hold shift + click to select a range
5732aa1
separate test data from test procedure
Dec 3, 2021
e401df2
Merge branch '3-improve-testing' into 'master'
antolinos Dec 6, 2021
2d87882
Improved tests example with db clean
Dec 7, 2021
528413c
implement multi-auth system and keyclock auth
Dec 8, 2021
f9c8f38
update examples
Dec 8, 2021
64fbc99
add python-keycloak to requirements
Dec 8, 2021
763e3fd
new authentication & authorization system
Dec 10, 2021
834ad78
implements authorization by session
Dec 13, 2021
5097d38
fix and split tests - empty_db & full_db
Dec 13, 2021
52c6963
setup authorization
Dec 14, 2021
f9474ab
test authorization
Dec 14, 2021
6fd6d2b
refactors and renames
Dec 15, 2021
a27f64a
remove MasterToken
Dec 15, 2021
6377a93
write ispyb token to db
Jan 12, 2022
6d53fe0
adds sessions_infos route
Jan 12, 2022
5bca560
cleanup
Jan 12, 2022
577e2f6
implements EM endpoints
Jan 20, 2022
3f55e85
proposal parameter is id or name
Jan 21, 2022
9e0a220
authorizations moved to route code
Jan 21, 2022
5761513
updates routes and doc
Jan 21, 2022
a90e851
remove unused imports
Jan 21, 2022
4cbca38
update requirements
Jan 21, 2022
e55ec9e
update LDAP module
Jan 21, 2022
bd4ad9c
docs
Jan 21, 2022
bb72249
fix for compatibility with exi2
Jan 27, 2022
5dd9c7d
fix deprecated syntax
Feb 3, 2022
d2abc32
fix roles
Feb 3, 2022
b533664
update tests
Feb 3, 2022
1f194d3
Setup CI
Feb 3, 2022
7ad470d
clean
Feb 4, 2022
3489608
fix auth
Feb 4, 2022
a2106ff
add backrefs to models
Feb 7, 2022
8030d52
rename auth module to plugin
Feb 7, 2022
78de808
fix and tests
Feb 7, 2022
d93de86
improve doc
Feb 7, 2022
7119349
ldap auth
Feb 8, 2022
5b60ffe
change test script
Feb 8, 2022
6231afe
legacy datacollection route
Feb 8, 2022
4b67495
Merge branch '4-implement-em' into 'master'
Feb 8, 2022
d39d32e
todo CI publish
Feb 8, 2022
d0d76d0
fix authentication doc
Feb 8, 2022
627e674
Resolve "Change role by group name"
Feb 8, 2022
110e2a8
Merge branch '6-change-role-by-group-name' into 'master'
Feb 8, 2022
51970b1
Improve auth plugins configuration
Feb 8, 2022
dfeddf0
Merge branch '7-improve-auth-plugins-configuration' into 'master'
Feb 8, 2022
7d919da
rm flask_restx_patched
Feb 9, 2022
cb5741f
Merge branch '10-flask_restx_patched' into 'master'
Feb 9, 2022
6008f1f
use tox for tests
Feb 8, 2022
c2211be
clean
Feb 8, 2022
dc8f502
setup linter
Feb 8, 2022
f48a469
fix linting errors
Feb 8, 2022
9a4193e
update doc
Feb 9, 2022
2725976
Merge branch '8-setup-linter-in-ci' into 'master'
Feb 9, 2022
655c81f
fix CI
Feb 10, 2022
1c71f57
fix doc
Feb 10, 2022
9b0edba
fastapi
stufisher Mar 23, 2022
dd252f2
put auth in apirouter
stufisher Mar 23, 2022
b886ac3
tidy
stufisher Mar 24, 2022
01df6ce
more tidy
stufisher Mar 24, 2022
469303d
update deps, add starter
stufisher Mar 24, 2022
63070ac
setup db
Apr 4, 2022
e092e7b
session/proposal authorization
Apr 4, 2022
f780121
fix authentication
Apr 7, 2022
f70ed0b
fix legacy
Apr 8, 2022
636b25d
add permission_required dependency
Apr 8, 2022
8f24c6d
fix tests
Apr 8, 2022
50261d5
switch secrets to env variables
Apr 8, 2022
7f9b3a0
switch all conf to .env
Apr 8, 2022
98e07c6
setup env secrets for tests
Apr 8, 2022
c80f054
add getting started
Apr 13, 2022
4ce0e81
setup CI
mgaonach Apr 21, 2022
b64586e
update doc
Apr 25, 2022
e1984c7
fix mistakes in documentation
Apr 25, 2022
25e5efb
Merge pull request #140 from ispyb/125-update-documentation-for-fastapi
Apr 25, 2022
5c2aba8
update repo url in doc
Apr 25, 2022
497d5bb
Merge pull request #141 from ispyb/125-update-documentation-for-fastapi
Apr 25, 2022
80fb2ec
Initial work on setup.cfg and tidy tox (#137)
stufisher Apr 26, 2022
fa603c3
cleanup unnecessary files
Apr 26, 2022
85d7fa4
remove unexpected argument 'Loader'
Apr 26, 2022
1c927d3
fix example auth
Apr 26, 2022
0070d4c
Merge pull request #145 from ispyb/144-problem-with-yaml-load-for-aut…
Apr 26, 2022
2c3a763
Merge branch 'master' into 124-cleanup-unnecessary-files
Apr 26, 2022
a4d0711
Merge pull request #143 from ispyb/124-cleanup-unnecessary-files
Apr 26, 2022
0806a92
Added example of dummy auth
antolinos Apr 26, 2022
298d21d
Added configuration
antolinos Apr 26, 2022
c2e8069
Added configuration
antolinos Apr 26, 2022
99a51cc
Added configuration
antolinos Apr 26, 2022
dc2b376
Added configuration
antolinos Apr 26, 2022
9a9297f
Added configuration
antolinos Apr 26, 2022
ccb419d
Added configuration
antolinos Apr 26, 2022
42e38fc
Added configuration
antolinos Apr 26, 2022
8b180fe
Added configuration
antolinos Apr 26, 2022
1d2eb17
Added configuration
antolinos Apr 26, 2022
ef03c6e
Added configuration
antolinos Apr 26, 2022
e532871
Added configuration
antolinos Apr 26, 2022
377501c
Added configuration
antolinos Apr 26, 2022
c7c6224
Merge pull request #149 from antolinos/148-review-and-complete-auth-md
antolinos Apr 29, 2022
fb4e104
CONTRIBUTING.md (#154)
May 6, 2022
40e7da7
Add basic tests against db using docker container (#139)
stufisher May 6, 2022
87d3811
Removed db token (#169)
May 11, 2022
c415a07
Session / proposal decorators now returning 403 instead of 401 when r…
May 11, 2022
d7a3192
Add multiple reeviwewers to guidelines. (#171)
rhfogh May 12, 2022
d28ac0d
Auto api doc (#138)
stufisher May 17, 2022
89b9b8f
add missing packages (#175)
stufisher May 17, 2022
1a1e40e
Added link to the redoc automatic generated API documentation (#177)
May 17, 2022
f1c309e
Add .prettierrc for yaml and json files (#178)
stufisher May 18, 2022
4345149
Apt update before ci (#179)
stufisher May 19, 2022
61e28e2
Improve testing (#172)
May 19, 2022
d703b60
fix redoc ci (#180)
May 19, 2022
cb2576d
Fix SQLAlchemy model warnings (#174)
May 19, 2022
1a4b456
Update documentation (#182)
May 20, 2022
021aaaf
doc: Improve documentation (#188)
KarlLevik Jun 7, 2022
0d9146c
fix UserGroup.permissions joined load (#190)
Jun 8, 2022
9006347
feat: Import models from ispyb.models (#195)
stufisher Jul 20, 2022
9a7eb6a
docs: point to ispyb-database for sql (#198)
stufisher Jul 20, 2022
c087e76
feat: A basic simulator (#197)
stufisher Jul 22, 2022
a11f701
hotfix: ci tests - pin mysql-connector-python (#206)
stufisher Jul 26, 2022
9bcf6e7
fix: re-enable root logger (#204)
stufisher Jul 26, 2022
2f272d0
refactor: events/get_datacollection_image params (#205)
stufisher Jul 26, 2022
f0f6b85
feat: Add db stored options (#200)
stufisher Jul 26, 2022
6556918
refactor : Refactor and simplify auth classes (#201)
stufisher Aug 17, 2022
64f4b5b
fix: only populate set options (#209)
stufisher Aug 17, 2022
7032a0e
127 implement user office data synchronization (#210)
Sep 7, 2022
535afa8
Add upsync.md to mkdocs.yml (#212)
Sep 12, 2022
4d48f7f
add simple rest client (#215)
stufisher Oct 4, 2022
22d33b5
fix: Pin mysql-connector-python and remove unneccessary packages (#21…
KarlLevik Oct 11, 2022
b4e1f53
doc: Additional details for Fedora in 'Install requirements' section …
KarlLevik Oct 11, 2022
e748192
Beamline Groups & Filtering (#203)
stufisher Nov 3, 2022
b367feb
fix ldap handler (#225)
stufisher Nov 9, 2022
0d19414
Updated keycloak configuration (#229)
antolinos Nov 17, 2022
3ecf77b
Replaced the docs accordingly with the LdapAuthentication class (#232)
antolinos Nov 21, 2022
5b6cca4
fix tests (#234)
Nov 22, 2022
4a92187
fix current user route (#236)
Nov 28, 2022
b78af40
More fundamental resources (#226)
stufisher Nov 28, 2022
48f18cc
Changes on how to run py-ispyb (#230)
antolinos Nov 28, 2022
2768765
fix proposal name regex (#238)
Nov 29, 2022
e1ce7de
Add onetime tokens (#214)
stufisher Nov 29, 2022
967df14
223 containerise (#239)
Dec 9, 2022
2192e85
add some missing fields (#246)
stufisher Jan 25, 2023
728b7ce
fix ldap when missing info (#251)
Jan 25, 2023
2b22587
fix permission_required return code (#252)
Jan 25, 2023
fdf3556
Better permission message (#253)
Jan 26, 2023
91c6284
Add fields to session response (#254)
Jan 26, 2023
a3a2c7a
exp type can be empty (#255)
stufisher Jan 27, 2023
629204d
Groups and permissions management (#202)
stufisher Feb 7, 2023
c45a43a
allow filtering events by blSubSampleId (#257)
stufisher Feb 10, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 0 additions & 1 deletion .coveragerc

This file was deleted.

33 changes: 33 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Publish Docker image

on:
release:
types: [published]

jobs:
push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v3

- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: ispyb/py-ispyb

- name: Build and push Docker image
uses: docker/build-push-action@v3
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
67 changes: 0 additions & 67 deletions .github/workflows/codeql-analysis.yml

This file was deleted.

53 changes: 53 additions & 0 deletions .github/workflows/doc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Deploy documentation
on:
push:
branches:
- master
jobs:
build-and-deploy:
concurrency: ci-${{ github.ref }}
runs-on: ubuntu-latest
services:
mariadb:
image: ispyb/ispyb-pydb:latest
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"

- name: Install dependencies
run: |
pip install mkdocs
pip install mkdocs-material

- name: Build
run: |
mkdocs build --strict --verbose

- name: Create OpenAPI spec
env:
ISPYB_ENVIRONMENT: ci
run: |
sudo apt-get update && sudo apt-get install -y libldap2-dev libsasl2-dev
pip install -r requirements.txt
pip install -e . --no-deps
python scripts/generate_apispec.py
mkdir public/api

- name: Run redoc
uses: seeebiii/redoc-cli-github-action@v10
with:
args: "bundle -o public/api/index.html openapi.json"

- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4.3.0
with:
branch: gh-pages
folder: public
27 changes: 27 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Lint

on: [push]

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
- name: Run flake8
uses: py-actions/flake8@v2
style:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Run black
uses: psf/black@stable
security:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Run bandit
uses: tj-actions/bandit@v5.1
with:
targets: pyispyb
31 changes: 0 additions & 31 deletions .github/workflows/python-publish.yml

This file was deleted.

38 changes: 38 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Test

on: [push]

jobs:
test:
runs-on: ubuntu-latest
services:
mariadb:
image: ispyb/ispyb-pydb:latest
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
strategy:
matrix:
python-version: ["3.10"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
sudo apt-get update && sudo apt-get install -y libldap2-dev libsasl2-dev
pip install -r requirements.txt
pip install -r requirements-dev.txt
pip install -e . --no-deps
- name: Run tests
env:
ISPYB_ENVIRONMENT: ci
run: |
pytest --cov=pyispyb --cov-report xml tests/
- name: Coverage report
uses: codecov/codecov-action@v2
with:
files: ./coverage.xml
fail_ci_if_error: true
12 changes: 8 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,16 @@
__pycache__/
*.py[cod]
*swp
.vscode*

ispyb_core_config.yml
ispyb_ssx_config.yml
ispyb_em_config.yml
/auth.yml

build/
dist/
pyispyb.egg-info/

.tox*
.DS_Store

.coverage
coverage.xml
*.py,cover
16 changes: 16 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"overrides": [
{
"files": ["*.yml", "*.yaml"],
"options": {
"tabWidth": 2
}
},
{
"files": "*.json",
"options": {
"tabWidth": 4
}
}
]
}
Loading