Browse Source

update Readme.md

clovis 1 week ago
parent
commit
acd696069f
2 changed files with 31 additions and 26 deletions
  1. 31 18
      Readme.md
  2. 0 8
      app/api/deps.py

+ 31 - 18
Readme.md

@@ -1,42 +1,55 @@
 # bdlg-2023-server
 
-This repository host an API that can parse gsheet planning for brass dans la garonne event and manage creating automatic SMS notification for volunteer.
+This repository host an API that can parse gsheet planning for brass dans la garonne event and manage creating automatic
+SMS notification for volunteer.
 
 ## Getting started
 
 For running the application
 
-> git clone ...
-> cd ...
-
-> python -m venv venv
-> venv/scripts/activate
-> poetry install
+```bash 
+git clone ...
+cd ...
+python -m venv venv
+venv/scripts/activate
+poetry install
+```
 
 Note, be sure to use python3.11 with this application
 
-> Copy .env.example to .env and edit it to configure your setup
-> init.sh
-> uvicorn app.main:app --reload
+* Copy .env.example to .env and edit it to configure your setup
+
+```bash
+init.sh
+uvicorn app.main:app --reload
+```
 
 ## Debug
 
-> python -m app.debug
+```bash 
+python -m app.debug
+```
 
 Run tests
 
-> pytest
+```bash 
+pytest
+pytest app\test\test_volunteer.py
+```
 
-Run specific tests
+Run coverage tests
 
-> pytest app\test\test_volunteer.py
+```bash 
+coverage run -m pytest
+coverage html
+```
 
 ## Update requirements
 
-```
-> poetry lock
-> poetry export -f requirements.txt --output requirements.txt --without-hashes
-> poetry export -f requirements.txt --output requirements-dev.txt --without-hashes --with dev
+```bash
+poetry lock
+poetry export -f requirements.txt --output requirements.txt --without-hashes
+oetry export -f requirements.txt --output requirements-dev.txt --without-hashes --with dev
 ```
 
 ## Credit

+ 0 - 8
app/api/deps.py

@@ -114,14 +114,6 @@ def require_org_role(*allowed_roles: OrgRole):
     return dependency
 
 
-def require_commission_membership():
-    """For CREATE endpoints (template/slot): confirms org membership only.
-    The finer 'does this respo_commission own the commission_id in the
-    payload' check happens inside the handler via assert_commission_ownership,
-    since the dependency layer can't see the parsed body cheaply."""
-    return require_org_role(OrgRole.ORG_ADMIN, OrgRole.RESPO_BENEVOLE, OrgRole.RESPO_COMMISSION)
-
-
 def assert_commission_ownership(
     session: Session, current_user: User, project_id: UUID, commission_id: str | None
 ) -> None: