Skip to content

Commit be63408

Browse files
authored
Merge pull request #308 from ansforge/feat/15-smur-conversion
Feat/15 smur conversion
2 parents 2d2f61b + 949f9ad commit be63408

File tree

95 files changed

+4100
-1540
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+4100
-1540
lines changed

.github/workflows/converter-tests.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,15 @@ jobs:
3636
uv sync
3737
uv add pytest-cov
3838
39+
- name: Check formatting
40+
run: uv run ruff format --check .
41+
42+
- name: Check linting
43+
run: uv run ruff check .
44+
45+
- name: Check typing
46+
run: uv run --active mypy .
47+
3948
- name: Run tests with HTML and XML coverage reports
4049
run: |
4150
uv run pytest --cov=converter --cov-report=html --cov-report=xml --cov-config=pyproject.toml -rP

.pre-commit-config.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
repos:
2+
# Lint & format converter code
3+
- repo: https://github.com/astral-sh/ruff-pre-commit
4+
rev: v0.14.0
5+
hooks:
6+
- id: ruff-check
7+
files: ^converter/
8+
- id: ruff-format
9+
args: ["--check"]
10+
files: ^converter/
11+
12+
# Type-check converter code
13+
- repo: https://github.com/pre-commit/mirrors-mypy
14+
rev: v1.18.2
15+
hooks:
16+
- id: mypy
17+
files: ^converter/
18+
additional_dependencies:
19+
- types-jsonschema
20+
- types-pyyaml
21+
- types-requests

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,18 @@ N. B. : Pour accéder aux versions les plus recentes des fichiers, veuillez util
6666
Les contributions, *issues* & *pull requests* sont les bienvenues !
6767
<br />N'hésitez pas à utiliser notre [page d'*issues*](https://github.com/ansforge/SAMU-Hub-Modeles/issues).
6868

69+
### Pre-commit
70+
71+
Ce projet utilise [pre-commit](https://pre-commit.com/) pour faciliter le travail du développeur et qu'il détecte des erreurs de format/lint/typing le plus rapidement possible.
72+
Pour l'utiliser en local, exécuter les commandes suivantes :
73+
74+
```bash
75+
pip install pre-commit
76+
pre-commit install
77+
```
78+
79+
Avant chaque commit, les hooks seront exécutés automatiquement et le commit sera annulé si des erreurs sont détectées.
80+
6981
## Montrez votre support
7082

7183
Mettez une ⭐️ si ce projet vous a aidé !

converter/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,4 @@ HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
4848
CMD curl -f http://localhost:8080/health || exit 1
4949

5050
# Use Gunicorn for production deployment
51-
CMD ["uv", "run", "gunicorn", "-w", "4", "-b", "0.0.0.0:8080", "converter.converter:app"]
51+
CMD ["uv", "run", "--no-dev", "gunicorn", "-w", "4", "-b", "0.0.0.0:8080", "converter.converter:app"]

converter/converter/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
# Empty file to mark directory as Python package
1+
# Empty file to mark directory as Python package

converter/converter/cisu/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)