baobab-auth-database 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- baobab_auth_database-0.1.0/.cursor/rules/000-core.mdc +23 -0
- baobab_auth_database-0.1.0/.editorconfig +18 -0
- baobab_auth_database-0.1.0/.env.example +12 -0
- baobab_auth_database-0.1.0/.gitattributes +18 -0
- baobab_auth_database-0.1.0/.github/ISSUE_TEMPLATE/01-user-story.yml +32 -0
- baobab_auth_database-0.1.0/.github/ISSUE_TEMPLATE/02-feature.yml +32 -0
- baobab_auth_database-0.1.0/.github/ISSUE_TEMPLATE/03-task.yml +34 -0
- baobab_auth_database-0.1.0/.github/ISSUE_TEMPLATE/config.yml +1 -0
- baobab_auth_database-0.1.0/.github/dependabot.yml +20 -0
- baobab_auth_database-0.1.0/.github/pull_request_template.md +21 -0
- baobab_auth_database-0.1.0/.github/workflows/ci.yml +145 -0
- baobab_auth_database-0.1.0/.github/workflows/release.yml +114 -0
- baobab_auth_database-0.1.0/.gitignore +52 -0
- baobab_auth_database-0.1.0/.pre-commit-config.yaml +52 -0
- baobab_auth_database-0.1.0/AGENTS.md +109 -0
- baobab_auth_database-0.1.0/CHANGELOG.md +46 -0
- baobab_auth_database-0.1.0/CLAUDE.md +15 -0
- baobab_auth_database-0.1.0/CONTRIBUTING.md +36 -0
- baobab_auth_database-0.1.0/LICENSE +21 -0
- baobab_auth_database-0.1.0/Makefile +43 -0
- baobab_auth_database-0.1.0/PKG-INFO +342 -0
- baobab_auth_database-0.1.0/README.md +281 -0
- baobab_auth_database-0.1.0/SECURITY.md +27 -0
- baobab_auth_database-0.1.0/docs/_static/.gitkeep +0 -0
- baobab_auth_database-0.1.0/docs/api/index.rst +10 -0
- baobab_auth_database-0.1.0/docs/conf.py +31 -0
- baobab_auth_database-0.1.0/docs/guides/how-to/ajouter-une-classe.rst +25 -0
- baobab_auth_database-0.1.0/docs/guides/how-to/configurer-la-database.rst +27 -0
- baobab_auth_database-0.1.0/docs/guides/how-to/ecrire-tests-integration.rst +67 -0
- baobab_auth_database-0.1.0/docs/guides/how-to/utiliser-bootstrap-et-cli.rst +74 -0
- baobab_auth_database-0.1.0/docs/guides/how-to/utiliser-migrations-embarquees.rst +22 -0
- baobab_auth_database-0.1.0/docs/guides/index.rst +33 -0
- baobab_auth_database-0.1.0/docs/guides/reference/architecture.rst +44 -0
- baobab_auth_database-0.1.0/docs/guides/reference/repositories-et-uow.rst +50 -0
- baobab_auth_database-0.1.0/docs/guides/reference/schema-et-migrations.rst +54 -0
- baobab_auth_database-0.1.0/docs/guides/tutorials/integrer-la-librairie.rst +92 -0
- baobab_auth_database-0.1.0/docs/guides/tutorials/premiers-pas.rst +37 -0
- baobab_auth_database-0.1.0/docs/index.rst +24 -0
- baobab_auth_database-0.1.0/docs/security_storage.rst +92 -0
- baobab_auth_database-0.1.0/docs/specifications/cahier-des-charges/cahier-des-charges.md +1764 -0
- baobab_auth_database-0.1.0/docs/specifications/glossary.rst +16 -0
- baobab_auth_database-0.1.0/docs/specifications/index.rst +37 -0
- baobab_auth_database-0.1.0/docs/specifications/us/US-001-initialiser-librairie/FEAT-001.1-identite-package.rst +29 -0
- baobab_auth_database-0.1.0/docs/specifications/us/US-001-initialiser-librairie/FEAT-001.2-outillage-qualite.rst +29 -0
- baobab_auth_database-0.1.0/docs/specifications/us/US-001-initialiser-librairie/index.rst +34 -0
- baobab_auth_database-0.1.0/docs/specifications/us/US-002-configurer-acces-database/FEAT-002.1-settings-database.rst +29 -0
- baobab_auth_database-0.1.0/docs/specifications/us/US-002-configurer-acces-database/FEAT-002.2-engine-session.rst +29 -0
- baobab_auth_database-0.1.0/docs/specifications/us/US-002-configurer-acces-database/FEAT-002.3-exceptions-logging.rst +29 -0
- baobab_auth_database-0.1.0/docs/specifications/us/US-002-configurer-acces-database/index.rst +34 -0
- baobab_auth_database-0.1.0/docs/specifications/us/US-003-definir-schema-auth/FEAT-003.1-metadata-types.rst +29 -0
- baobab_auth_database-0.1.0/docs/specifications/us/US-003-definir-schema-auth/FEAT-003.2-modeles-identite-acces.rst +29 -0
- baobab_auth_database-0.1.0/docs/specifications/us/US-003-definir-schema-auth/FEAT-003.3-modeles-sessions-audit-jwk.rst +28 -0
- baobab_auth_database-0.1.0/docs/specifications/us/US-003-definir-schema-auth/index.rst +34 -0
- baobab_auth_database-0.1.0/docs/specifications/us/US-004-gerer-migrations/FEAT-004.1-alembic-embarque.rst +29 -0
- baobab_auth_database-0.1.0/docs/specifications/us/US-004-gerer-migrations/FEAT-004.2-migration-initiale.rst +29 -0
- baobab_auth_database-0.1.0/docs/specifications/us/US-004-gerer-migrations/FEAT-004.3-migration-runner.rst +28 -0
- baobab_auth_database-0.1.0/docs/specifications/us/US-004-gerer-migrations/index.rst +34 -0
- baobab_auth_database-0.1.0/docs/specifications/us/US-005-integrer-core-repositories/FEAT-005.1-inspection-core.rst +29 -0
- baobab_auth_database-0.1.0/docs/specifications/us/US-005-integrer-core-repositories/FEAT-005.2-mappers-core.rst +29 -0
- baobab_auth_database-0.1.0/docs/specifications/us/US-005-integrer-core-repositories/FEAT-005.3-repositories-identite-acces.rst +29 -0
- baobab_auth_database-0.1.0/docs/specifications/us/US-005-integrer-core-repositories/FEAT-005.4-repositories-sessions-audit-jwk.rst +30 -0
- baobab_auth_database-0.1.0/docs/specifications/us/US-005-integrer-core-repositories/FEAT-005.5-alignement-schema-core.rst +37 -0
- baobab_auth_database-0.1.0/docs/specifications/us/US-005-integrer-core-repositories/index.rst +42 -0
- baobab_auth_database-0.1.0/docs/specifications/us/US-005-integrer-core-repositories/inspection-core.rst +168 -0
- baobab_auth_database-0.1.0/docs/specifications/us/US-006-orchestrer-transactions/FEAT-006.1-unit-of-work.rst +29 -0
- baobab_auth_database-0.1.0/docs/specifications/us/US-006-orchestrer-transactions/FEAT-006.2-tests-contrat-transactions.rst +29 -0
- baobab_auth_database-0.1.0/docs/specifications/us/US-006-orchestrer-transactions/index.rst +33 -0
- baobab_auth_database-0.1.0/docs/specifications/us/US-007-fournir-bootstrap-cli-tests/FEAT-007.1-bootstrap-roles-permissions.rst +28 -0
- baobab_auth_database-0.1.0/docs/specifications/us/US-007-fournir-bootstrap-cli-tests/FEAT-007.2-cli-database.rst +28 -0
- baobab_auth_database-0.1.0/docs/specifications/us/US-007-fournir-bootstrap-cli-tests/FEAT-007.3-utilitaires-tests.rst +28 -0
- baobab_auth_database-0.1.0/docs/specifications/us/US-007-fournir-bootstrap-cli-tests/index.rst +34 -0
- baobab_auth_database-0.1.0/docs/specifications/us/US-008-documenter-stabiliser-release/FEAT-008.1-documentation-usage.rst +29 -0
- baobab_auth_database-0.1.0/docs/specifications/us/US-008-documenter-stabiliser-release/FEAT-008.2-documentation-securite.rst +29 -0
- baobab_auth_database-0.1.0/docs/specifications/us/US-008-documenter-stabiliser-release/FEAT-008.3-stabilisation-release.rst +28 -0
- baobab_auth_database-0.1.0/docs/specifications/us/US-008-documenter-stabiliser-release/index.rst +34 -0
- baobab_auth_database-0.1.0/docs/specifications/us/index.rst +19 -0
- baobab_auth_database-0.1.0/docs/workflow/README.md +66 -0
- baobab_auth_database-0.1.0/docs/workflow/SETUP.md +109 -0
- baobab_auth_database-0.1.0/docs/workflow/gates.md +38 -0
- baobab_auth_database-0.1.0/docs/workflow/handoff.md +53 -0
- baobab_auth_database-0.1.0/docs/workflow/prompts/init.md +41 -0
- baobab_auth_database-0.1.0/docs/workflow/prompts/orchestration.md +25 -0
- baobab_auth_database-0.1.0/docs/workflow/roles/00-orchestrateur.md +24 -0
- baobab_auth_database-0.1.0/docs/workflow/roles/01-product-owner.md +22 -0
- baobab_auth_database-0.1.0/docs/workflow/roles/02-architecte.md +22 -0
- baobab_auth_database-0.1.0/docs/workflow/roles/03-developpeur.md +23 -0
- baobab_auth_database-0.1.0/docs/workflow/roles/04-relecteur.md +24 -0
- baobab_auth_database-0.1.0/docs/workflow/roles/05-securite.md +26 -0
- baobab_auth_database-0.1.0/docs/workflow/roles/06-release-manager.md +27 -0
- baobab_auth_database-0.1.0/docs/workflow/roles/07-support.md +22 -0
- baobab_auth_database-0.1.0/pyproject.toml +143 -0
- baobab_auth_database-0.1.0/scripts/setup_github.sh +58 -0
- baobab_auth_database-0.1.0/src/baobab_auth_database/__init__.py +46 -0
- baobab_auth_database-0.1.0/src/baobab_auth_database/auth_base.py +20 -0
- baobab_auth_database-0.1.0/src/baobab_auth_database/auth_engine_factory.py +48 -0
- baobab_auth_database-0.1.0/src/baobab_auth_database/auth_session_factory.py +27 -0
- baobab_auth_database-0.1.0/src/baobab_auth_database/auth_sql_types.py +42 -0
- baobab_auth_database-0.1.0/src/baobab_auth_database/bootstrap/__init__.py +12 -0
- baobab_auth_database-0.1.0/src/baobab_auth_database/bootstrap/default_auth_catalog.py +98 -0
- baobab_auth_database-0.1.0/src/baobab_auth_database/bootstrap/seed_defaults.py +150 -0
- baobab_auth_database-0.1.0/src/baobab_auth_database/cli/__init__.py +12 -0
- baobab_auth_database-0.1.0/src/baobab_auth_database/cli/auth_database_cli.py +123 -0
- baobab_auth_database-0.1.0/src/baobab_auth_database/cli/cli_configuration.py +37 -0
- baobab_auth_database-0.1.0/src/baobab_auth_database/cli/main.py +16 -0
- baobab_auth_database-0.1.0/src/baobab_auth_database/database_url_masker.py +27 -0
- baobab_auth_database-0.1.0/src/baobab_auth_database/exceptions/__init__.py +22 -0
- baobab_auth_database-0.1.0/src/baobab_auth_database/exceptions/database_errors.py +46 -0
- baobab_auth_database-0.1.0/src/baobab_auth_database/mappers/__init__.py +20 -0
- baobab_auth_database-0.1.0/src/baobab_auth_database/mappers/audit_event_mapper.py +89 -0
- baobab_auth_database-0.1.0/src/baobab_auth_database/mappers/permission_mapper.py +69 -0
- baobab_auth_database-0.1.0/src/baobab_auth_database/mappers/role_mapper.py +83 -0
- baobab_auth_database-0.1.0/src/baobab_auth_database/mappers/session_mapper.py +92 -0
- baobab_auth_database-0.1.0/src/baobab_auth_database/mappers/user_mapper.py +96 -0
- baobab_auth_database-0.1.0/src/baobab_auth_database/mappers/user_profile_mapper.py +80 -0
- baobab_auth_database-0.1.0/src/baobab_auth_database/migration_runner.py +146 -0
- baobab_auth_database-0.1.0/src/baobab_auth_database/migrations/__init__.py +12 -0
- baobab_auth_database-0.1.0/src/baobab_auth_database/migrations/env.py +11 -0
- baobab_auth_database-0.1.0/src/baobab_auth_database/migrations/migration_environment.py +107 -0
- baobab_auth_database-0.1.0/src/baobab_auth_database/migrations/migration_resource_locator.py +59 -0
- baobab_auth_database-0.1.0/src/baobab_auth_database/migrations/script.py.mako +28 -0
- baobab_auth_database-0.1.0/src/baobab_auth_database/migrations/versions/0001_initial_auth_schema.py +178 -0
- baobab_auth_database-0.1.0/src/baobab_auth_database/migrations/versions/0002_align_core_schema.py +54 -0
- baobab_auth_database-0.1.0/src/baobab_auth_database/migrations/versions/__init__.py +4 -0
- baobab_auth_database-0.1.0/src/baobab_auth_database/models/__init__.py +26 -0
- baobab_auth_database-0.1.0/src/baobab_auth_database/models/audit_event_model.py +37 -0
- baobab_auth_database-0.1.0/src/baobab_auth_database/models/jwk_key_model.py +52 -0
- baobab_auth_database-0.1.0/src/baobab_auth_database/models/permission_model.py +44 -0
- baobab_auth_database-0.1.0/src/baobab_auth_database/models/profile_model.py +46 -0
- baobab_auth_database-0.1.0/src/baobab_auth_database/models/role_model.py +48 -0
- baobab_auth_database-0.1.0/src/baobab_auth_database/models/role_permission_model.py +45 -0
- baobab_auth_database-0.1.0/src/baobab_auth_database/models/session_model.py +69 -0
- baobab_auth_database-0.1.0/src/baobab_auth_database/models/user_model.py +73 -0
- baobab_auth_database-0.1.0/src/baobab_auth_database/models/user_role_model.py +45 -0
- baobab_auth_database-0.1.0/src/baobab_auth_database/naming_convention.py +26 -0
- baobab_auth_database-0.1.0/src/baobab_auth_database/py.typed +0 -0
- baobab_auth_database-0.1.0/src/baobab_auth_database/repositories/__init__.py +32 -0
- baobab_auth_database-0.1.0/src/baobab_auth_database/repositories/jwk_key_record.py +32 -0
- baobab_auth_database-0.1.0/src/baobab_auth_database/repositories/repository_support.py +67 -0
- baobab_auth_database-0.1.0/src/baobab_auth_database/repositories/sql_alchemy_audit_repository.py +73 -0
- baobab_auth_database-0.1.0/src/baobab_auth_database/repositories/sql_alchemy_auth_unit_of_work.py +142 -0
- baobab_auth_database-0.1.0/src/baobab_auth_database/repositories/sql_alchemy_jwk_key_repository.py +112 -0
- baobab_auth_database-0.1.0/src/baobab_auth_database/repositories/sql_alchemy_permission_repository.py +117 -0
- baobab_auth_database-0.1.0/src/baobab_auth_database/repositories/sql_alchemy_role_repository.py +125 -0
- baobab_auth_database-0.1.0/src/baobab_auth_database/repositories/sql_alchemy_session_repository.py +125 -0
- baobab_auth_database-0.1.0/src/baobab_auth_database/repositories/sql_alchemy_user_repository.py +151 -0
- baobab_auth_database-0.1.0/src/baobab_auth_database/settings.py +86 -0
- baobab_auth_database-0.1.0/src/baobab_auth_database/testing/__init__.py +14 -0
- baobab_auth_database-0.1.0/src/baobab_auth_database/testing/auth_schema_assertions.py +64 -0
- baobab_auth_database-0.1.0/src/baobab_auth_database/testing/auth_sqlite_test_helper.py +72 -0
- baobab_auth_database-0.1.0/src/baobab_auth_database/testing/auth_test_factories.py +202 -0
- baobab_auth_database-0.1.0/tests/baobab_auth_database/bootstrap/conftest.py +26 -0
- baobab_auth_database-0.1.0/tests/baobab_auth_database/bootstrap/test_bootstrap_package.py +20 -0
- baobab_auth_database-0.1.0/tests/baobab_auth_database/bootstrap/test_default_auth_catalog.py +40 -0
- baobab_auth_database-0.1.0/tests/baobab_auth_database/bootstrap/test_seed_defaults.py +217 -0
- baobab_auth_database-0.1.0/tests/baobab_auth_database/cli/test_auth_database_cli.py +104 -0
- baobab_auth_database-0.1.0/tests/baobab_auth_database/cli/test_cli_configuration.py +38 -0
- baobab_auth_database-0.1.0/tests/baobab_auth_database/cli/test_cli_package.py +20 -0
- baobab_auth_database-0.1.0/tests/baobab_auth_database/cli/test_main.py +26 -0
- baobab_auth_database-0.1.0/tests/baobab_auth_database/contract/conftest.py +124 -0
- baobab_auth_database-0.1.0/tests/baobab_auth_database/contract/test_audit_repository_contract.py +71 -0
- baobab_auth_database-0.1.0/tests/baobab_auth_database/contract/test_jwk_key_repository_contract.py +78 -0
- baobab_auth_database-0.1.0/tests/baobab_auth_database/contract/test_permission_repository_contract.py +61 -0
- baobab_auth_database-0.1.0/tests/baobab_auth_database/contract/test_role_repository_contract.py +84 -0
- baobab_auth_database-0.1.0/tests/baobab_auth_database/contract/test_session_repository_contract.py +79 -0
- baobab_auth_database-0.1.0/tests/baobab_auth_database/contract/test_unit_of_work_contract.py +86 -0
- baobab_auth_database-0.1.0/tests/baobab_auth_database/contract/test_user_repository_contract.py +90 -0
- baobab_auth_database-0.1.0/tests/baobab_auth_database/mappers/test_audit_event_mapper.py +70 -0
- baobab_auth_database-0.1.0/tests/baobab_auth_database/mappers/test_permission_mapper.py +63 -0
- baobab_auth_database-0.1.0/tests/baobab_auth_database/mappers/test_role_mapper.py +54 -0
- baobab_auth_database-0.1.0/tests/baobab_auth_database/mappers/test_session_mapper.py +71 -0
- baobab_auth_database-0.1.0/tests/baobab_auth_database/mappers/test_user_mapper.py +69 -0
- baobab_auth_database-0.1.0/tests/baobab_auth_database/mappers/test_user_profile_mapper.py +65 -0
- baobab_auth_database-0.1.0/tests/baobab_auth_database/migrations/test_align_core_schema.py +70 -0
- baobab_auth_database-0.1.0/tests/baobab_auth_database/migrations/test_initial_auth_schema.py +102 -0
- baobab_auth_database-0.1.0/tests/baobab_auth_database/migrations/test_migration_environment.py +113 -0
- baobab_auth_database-0.1.0/tests/baobab_auth_database/migrations/test_migration_resource_locator.py +34 -0
- baobab_auth_database-0.1.0/tests/baobab_auth_database/migrations/test_migrations_package.py +20 -0
- baobab_auth_database-0.1.0/tests/baobab_auth_database/models/test_audit_event_model.py +59 -0
- baobab_auth_database-0.1.0/tests/baobab_auth_database/models/test_jwk_key_model.py +71 -0
- baobab_auth_database-0.1.0/tests/baobab_auth_database/models/test_models_package.py +64 -0
- baobab_auth_database-0.1.0/tests/baobab_auth_database/models/test_permission_model.py +53 -0
- baobab_auth_database-0.1.0/tests/baobab_auth_database/models/test_profile_model.py +57 -0
- baobab_auth_database-0.1.0/tests/baobab_auth_database/models/test_role_model.py +42 -0
- baobab_auth_database-0.1.0/tests/baobab_auth_database/models/test_role_permission_model.py +36 -0
- baobab_auth_database-0.1.0/tests/baobab_auth_database/models/test_session_model.py +81 -0
- baobab_auth_database-0.1.0/tests/baobab_auth_database/models/test_user_model.py +70 -0
- baobab_auth_database-0.1.0/tests/baobab_auth_database/models/test_user_role_model.py +37 -0
- baobab_auth_database-0.1.0/tests/baobab_auth_database/repositories/conftest.py +37 -0
- baobab_auth_database-0.1.0/tests/baobab_auth_database/repositories/test_repositories_package.py +31 -0
- baobab_auth_database-0.1.0/tests/baobab_auth_database/repositories/test_repository_support.py +43 -0
- baobab_auth_database-0.1.0/tests/baobab_auth_database/repositories/test_sql_alchemy_audit_repository.py +60 -0
- baobab_auth_database-0.1.0/tests/baobab_auth_database/repositories/test_sql_alchemy_auth_unit_of_work.py +97 -0
- baobab_auth_database-0.1.0/tests/baobab_auth_database/repositories/test_sql_alchemy_jwk_key_repository.py +81 -0
- baobab_auth_database-0.1.0/tests/baobab_auth_database/repositories/test_sql_alchemy_permission_repository.py +74 -0
- baobab_auth_database-0.1.0/tests/baobab_auth_database/repositories/test_sql_alchemy_role_repository.py +77 -0
- baobab_auth_database-0.1.0/tests/baobab_auth_database/repositories/test_sql_alchemy_session_repository.py +79 -0
- baobab_auth_database-0.1.0/tests/baobab_auth_database/repositories/test_sql_alchemy_user_repository.py +85 -0
- baobab_auth_database-0.1.0/tests/baobab_auth_database/test_auth_base.py +40 -0
- baobab_auth_database-0.1.0/tests/baobab_auth_database/test_auth_engine_factory.py +64 -0
- baobab_auth_database-0.1.0/tests/baobab_auth_database/test_auth_session_factory.py +35 -0
- baobab_auth_database-0.1.0/tests/baobab_auth_database/test_auth_sql_types.py +51 -0
- baobab_auth_database-0.1.0/tests/baobab_auth_database/test_database_errors.py +65 -0
- baobab_auth_database-0.1.0/tests/baobab_auth_database/test_database_url_masker.py +26 -0
- baobab_auth_database-0.1.0/tests/baobab_auth_database/test_migration_runner.py +87 -0
- baobab_auth_database-0.1.0/tests/baobab_auth_database/test_naming_convention.py +58 -0
- baobab_auth_database-0.1.0/tests/baobab_auth_database/test_package.py +109 -0
- baobab_auth_database-0.1.0/tests/baobab_auth_database/test_settings.py +117 -0
- baobab_auth_database-0.1.0/tests/baobab_auth_database/testing/test_auth_schema_assertions.py +32 -0
- baobab_auth_database-0.1.0/tests/baobab_auth_database/testing/test_auth_sqlite_test_helper.py +34 -0
- baobab_auth_database-0.1.0/tests/baobab_auth_database/testing/test_auth_test_factories.py +30 -0
- baobab_auth_database-0.1.0/tests/baobab_auth_database/testing/test_testing_package.py +26 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Règles de développement du projet (source unique de vérité)
|
|
3
|
+
globs:
|
|
4
|
+
alwaysApply: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Règles de développement
|
|
8
|
+
|
|
9
|
+
La **source unique de vérité** des règles de ce projet est le fichier [`AGENTS.md`](../../AGENTS.md)
|
|
10
|
+
à la racine du dépôt. **Lis-le et applique-le intégralement.** Ne duplique pas son contenu.
|
|
11
|
+
|
|
12
|
+
Rappels prioritaires (le détail complet est dans `AGENTS.md`) :
|
|
13
|
+
|
|
14
|
+
- **Python ≥ 3.11, orienté objet.** 1 classe = 1 fichier (module nommé d'après la classe).
|
|
15
|
+
- **PEP 8** + **PEP 20** ; en cas de conflit, **PEP 8 prime**.
|
|
16
|
+
- **Type hints obligatoires** ; `ruff` (lint+format) ; `mypy` strict.
|
|
17
|
+
- **Docstrings en reStructuredText**, avec `:spec: <ID>`.
|
|
18
|
+
- **Tests `pytest` en arborescence miroir** ; 1 classe testée = 1 classe de test ;
|
|
19
|
+
classe abstraite testée via une classe concrète de test ; **couverture ≥ 90 %**.
|
|
20
|
+
- Doc **Sphinx/RST** ; dossier `docs/guides/` obligatoire.
|
|
21
|
+
- Environnement virtuel **`.venv`** (`python -m venv .venv`), non versionné.
|
|
22
|
+
- Aucun secret en clair (`.env` gitignoré + `.env.example`).
|
|
23
|
+
- **Conventional Commits** + chaîne d'ID **US-001 / FEAT-001.1 / TASK-001.1.1**.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
root = true
|
|
2
|
+
|
|
3
|
+
[*]
|
|
4
|
+
charset = utf-8
|
|
5
|
+
end_of_line = lf
|
|
6
|
+
insert_final_newline = true
|
|
7
|
+
trim_trailing_whitespace = true
|
|
8
|
+
indent_style = space
|
|
9
|
+
|
|
10
|
+
[*.py]
|
|
11
|
+
indent_size = 4
|
|
12
|
+
max_line_length = 100
|
|
13
|
+
|
|
14
|
+
[*.{rst,md,yml,yaml,toml,cfg}]
|
|
15
|
+
indent_size = 2
|
|
16
|
+
|
|
17
|
+
[Makefile]
|
|
18
|
+
indent_style = tab
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Copiez ce fichier en `.env` et renseignez vos valeurs locales.
|
|
2
|
+
# `.env` est gitignoré : n'y mettez jamais de secret dans le dépôt.
|
|
3
|
+
# Chargé/validé via `baobab_auth_database.AuthDatabaseSettings`.
|
|
4
|
+
|
|
5
|
+
BAOBAB_AUTH_DATABASE_URL=sqlite+pysqlite:///:memory:
|
|
6
|
+
BAOBAB_AUTH_DATABASE_ECHO=false
|
|
7
|
+
BAOBAB_AUTH_DATABASE_POOL_SIZE=5
|
|
8
|
+
BAOBAB_AUTH_DATABASE_MAX_OVERFLOW=10
|
|
9
|
+
BAOBAB_AUTH_DATABASE_POOL_PRE_PING=true
|
|
10
|
+
BAOBAB_AUTH_DATABASE_SCHEMA=
|
|
11
|
+
BAOBAB_AUTH_ALEMBIC_VERSION_TABLE=auth_alembic_version
|
|
12
|
+
BAOBAB_AUTH_ENABLE_SQL_LOGGING=false
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Normalise les fins de ligne : LF dans le dépôt, quel que soit l'OS du dev.
|
|
2
|
+
* text=auto eol=lf
|
|
3
|
+
|
|
4
|
+
# Scripts Windows : conserver CRLF (requis par cmd.exe).
|
|
5
|
+
*.bat text eol=crlf
|
|
6
|
+
*.cmd text eol=crlf
|
|
7
|
+
|
|
8
|
+
# Fichiers binaires : aucune normalisation.
|
|
9
|
+
*.png binary
|
|
10
|
+
*.jpg binary
|
|
11
|
+
*.jpeg binary
|
|
12
|
+
*.gif binary
|
|
13
|
+
*.ico binary
|
|
14
|
+
*.pdf binary
|
|
15
|
+
*.zip binary
|
|
16
|
+
*.gz binary
|
|
17
|
+
*.woff binary
|
|
18
|
+
*.woff2 binary
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
name: "📘 User Story"
|
|
2
|
+
description: "Décrire un besoin utilisateur (US)"
|
|
3
|
+
title: "[US-XXX] "
|
|
4
|
+
labels: ["type:us"]
|
|
5
|
+
body:
|
|
6
|
+
- type: input
|
|
7
|
+
id: id
|
|
8
|
+
attributes:
|
|
9
|
+
label: Identifiant
|
|
10
|
+
placeholder: "US-001"
|
|
11
|
+
validations:
|
|
12
|
+
required: true
|
|
13
|
+
- type: textarea
|
|
14
|
+
id: story
|
|
15
|
+
attributes:
|
|
16
|
+
label: Récit
|
|
17
|
+
description: "En tant que… je veux… afin de…"
|
|
18
|
+
placeholder: "En tant qu'utilisateur, je veux …, afin de …"
|
|
19
|
+
validations:
|
|
20
|
+
required: true
|
|
21
|
+
- type: textarea
|
|
22
|
+
id: acceptance
|
|
23
|
+
attributes:
|
|
24
|
+
label: Critères d'acceptation
|
|
25
|
+
placeholder: "- [ ] …"
|
|
26
|
+
validations:
|
|
27
|
+
required: true
|
|
28
|
+
- type: input
|
|
29
|
+
id: spec
|
|
30
|
+
attributes:
|
|
31
|
+
label: Spécification (RST)
|
|
32
|
+
placeholder: "docs/specifications/us/US-001-.../index.rst"
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
name: "🧩 Feature"
|
|
2
|
+
description: "Découper une US en fonctionnalité (FEAT)"
|
|
3
|
+
title: "[FEAT-XXX.Y] "
|
|
4
|
+
labels: ["type:feat"]
|
|
5
|
+
body:
|
|
6
|
+
- type: input
|
|
7
|
+
id: id
|
|
8
|
+
attributes:
|
|
9
|
+
label: Identifiant
|
|
10
|
+
placeholder: "FEAT-001.1"
|
|
11
|
+
validations:
|
|
12
|
+
required: true
|
|
13
|
+
- type: input
|
|
14
|
+
id: parent
|
|
15
|
+
attributes:
|
|
16
|
+
label: US parente
|
|
17
|
+
placeholder: "US-001 (#numéro de l'issue)"
|
|
18
|
+
validations:
|
|
19
|
+
required: true
|
|
20
|
+
- type: textarea
|
|
21
|
+
id: description
|
|
22
|
+
attributes:
|
|
23
|
+
label: Description
|
|
24
|
+
validations:
|
|
25
|
+
required: true
|
|
26
|
+
- type: textarea
|
|
27
|
+
id: acceptance
|
|
28
|
+
attributes:
|
|
29
|
+
label: Critères d'acceptation
|
|
30
|
+
placeholder: "- [ ] …"
|
|
31
|
+
validations:
|
|
32
|
+
required: true
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
name: "🔧 Task (backlog)"
|
|
2
|
+
description: "Tâche concrète rattachée à une Feature"
|
|
3
|
+
title: "[TASK-XXX.Y.Z] "
|
|
4
|
+
labels: ["type:task"]
|
|
5
|
+
body:
|
|
6
|
+
- type: input
|
|
7
|
+
id: id
|
|
8
|
+
attributes:
|
|
9
|
+
label: Identifiant
|
|
10
|
+
placeholder: "TASK-001.1.1"
|
|
11
|
+
validations:
|
|
12
|
+
required: true
|
|
13
|
+
- type: input
|
|
14
|
+
id: parent
|
|
15
|
+
attributes:
|
|
16
|
+
label: Feature parente
|
|
17
|
+
placeholder: "FEAT-001.1 (#numéro de l'issue)"
|
|
18
|
+
validations:
|
|
19
|
+
required: true
|
|
20
|
+
- type: textarea
|
|
21
|
+
id: description
|
|
22
|
+
attributes:
|
|
23
|
+
label: Description / étapes
|
|
24
|
+
validations:
|
|
25
|
+
required: true
|
|
26
|
+
- type: checkboxes
|
|
27
|
+
id: dod
|
|
28
|
+
attributes:
|
|
29
|
+
label: Definition of Done
|
|
30
|
+
options:
|
|
31
|
+
- label: "Code POO, 1 classe/fichier, type hints complets"
|
|
32
|
+
- label: "ruff + mypy strict passent"
|
|
33
|
+
- label: "Test miroir présent, couverture ≥ 90 %"
|
|
34
|
+
- label: "Docstrings RST / guide à jour si besoin"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
blank_issues_enabled: false
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
updates:
|
|
3
|
+
- package-ecosystem: "pip"
|
|
4
|
+
directory: "/"
|
|
5
|
+
schedule:
|
|
6
|
+
interval: "weekly"
|
|
7
|
+
open-pull-requests-limit: 5
|
|
8
|
+
commit-message:
|
|
9
|
+
prefix: "chore"
|
|
10
|
+
include: "scope"
|
|
11
|
+
labels:
|
|
12
|
+
- "type:task"
|
|
13
|
+
- "dependencies"
|
|
14
|
+
|
|
15
|
+
- package-ecosystem: "github-actions"
|
|
16
|
+
directory: "/"
|
|
17
|
+
schedule:
|
|
18
|
+
interval: "weekly"
|
|
19
|
+
commit-message:
|
|
20
|
+
prefix: "ci"
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
## Description
|
|
2
|
+
|
|
3
|
+
<!-- Que fait cette PR ? Rattachez l'ID spec. -->
|
|
4
|
+
|
|
5
|
+
Closes #
|
|
6
|
+
|
|
7
|
+
## Type de changement
|
|
8
|
+
|
|
9
|
+
- [ ] `feat` — nouvelle fonctionnalité
|
|
10
|
+
- [ ] `fix` — correction de bug
|
|
11
|
+
- [ ] `docs` — documentation
|
|
12
|
+
- [ ] `refactor` / `test` / `chore`
|
|
13
|
+
|
|
14
|
+
## Checklist (Definition of Done)
|
|
15
|
+
|
|
16
|
+
- [ ] 1 classe = 1 fichier ; type hints complets ; docstrings RST avec `:spec:`
|
|
17
|
+
- [ ] Test miroir présent (classe abstraite testée via classe concrète de test)
|
|
18
|
+
- [ ] `ruff` + `mypy` strict passent
|
|
19
|
+
- [ ] Couverture ≥ 90 %
|
|
20
|
+
- [ ] Doc / guide mis à jour si le comportement public change
|
|
21
|
+
- [ ] Commits en Conventional Commits avec ID
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
|
|
8
|
+
# Annule les runs obsolètes sur une même branche/PR.
|
|
9
|
+
concurrency:
|
|
10
|
+
group: ci-${{ github.ref }}
|
|
11
|
+
cancel-in-progress: true
|
|
12
|
+
|
|
13
|
+
permissions:
|
|
14
|
+
contents: read
|
|
15
|
+
|
|
16
|
+
jobs:
|
|
17
|
+
lint:
|
|
18
|
+
runs-on: ubuntu-latest
|
|
19
|
+
steps:
|
|
20
|
+
- uses: actions/checkout@v4
|
|
21
|
+
with:
|
|
22
|
+
fetch-depth: 0 # hatch-vcs a besoin de l'historique/tags
|
|
23
|
+
- uses: actions/setup-python@v5
|
|
24
|
+
with:
|
|
25
|
+
python-version: "3.12"
|
|
26
|
+
cache: pip
|
|
27
|
+
- run: pip install -e ".[dev]"
|
|
28
|
+
- name: Ruff (lint)
|
|
29
|
+
run: ruff check .
|
|
30
|
+
- name: Ruff (format)
|
|
31
|
+
run: ruff format --check .
|
|
32
|
+
|
|
33
|
+
type:
|
|
34
|
+
runs-on: ubuntu-latest
|
|
35
|
+
steps:
|
|
36
|
+
- uses: actions/checkout@v4
|
|
37
|
+
with:
|
|
38
|
+
fetch-depth: 0
|
|
39
|
+
- uses: actions/setup-python@v5
|
|
40
|
+
with:
|
|
41
|
+
python-version: "3.12"
|
|
42
|
+
cache: pip
|
|
43
|
+
- run: pip install -e ".[dev]"
|
|
44
|
+
- name: Mypy (strict)
|
|
45
|
+
run: mypy
|
|
46
|
+
|
|
47
|
+
security:
|
|
48
|
+
runs-on: ubuntu-latest
|
|
49
|
+
permissions:
|
|
50
|
+
contents: read
|
|
51
|
+
security-events: write # publier le SARIF dans l'onglet Security
|
|
52
|
+
steps:
|
|
53
|
+
- uses: actions/checkout@v4
|
|
54
|
+
with:
|
|
55
|
+
fetch-depth: 0
|
|
56
|
+
- uses: actions/setup-python@v5
|
|
57
|
+
with:
|
|
58
|
+
python-version: "3.12"
|
|
59
|
+
cache: pip
|
|
60
|
+
- run: pip install -e ".[dev]"
|
|
61
|
+
- name: Bandit (génère le SARIF)
|
|
62
|
+
run: bandit -c pyproject.toml -r src -f sarif -o bandit.sarif
|
|
63
|
+
continue-on-error: true
|
|
64
|
+
- name: Publier le SARIF dans l'onglet Security
|
|
65
|
+
if: always()
|
|
66
|
+
continue-on-error: true # tolère repo privé sans GitHub Advanced Security
|
|
67
|
+
uses: github/codeql-action/upload-sarif@v3
|
|
68
|
+
with:
|
|
69
|
+
sarif_file: bandit.sarif
|
|
70
|
+
- name: Bandit (gate)
|
|
71
|
+
run: bandit -c pyproject.toml -r src
|
|
72
|
+
- name: pip-audit (dépendances)
|
|
73
|
+
run: pip-audit
|
|
74
|
+
|
|
75
|
+
build:
|
|
76
|
+
runs-on: ubuntu-latest
|
|
77
|
+
steps:
|
|
78
|
+
- uses: actions/checkout@v4
|
|
79
|
+
with:
|
|
80
|
+
fetch-depth: 0
|
|
81
|
+
- uses: actions/setup-python@v5
|
|
82
|
+
with:
|
|
83
|
+
python-version: "3.12"
|
|
84
|
+
- name: Build sdist + wheel (validation packaging)
|
|
85
|
+
run: |
|
|
86
|
+
python -m pip install --upgrade build
|
|
87
|
+
python -m build
|
|
88
|
+
- uses: actions/upload-artifact@v4
|
|
89
|
+
with:
|
|
90
|
+
name: dist-ci
|
|
91
|
+
path: dist/
|
|
92
|
+
retention-days: 7
|
|
93
|
+
|
|
94
|
+
docs:
|
|
95
|
+
runs-on: ubuntu-latest
|
|
96
|
+
steps:
|
|
97
|
+
- uses: actions/checkout@v4
|
|
98
|
+
with:
|
|
99
|
+
fetch-depth: 0
|
|
100
|
+
- uses: actions/setup-python@v5
|
|
101
|
+
with:
|
|
102
|
+
python-version: "3.12"
|
|
103
|
+
cache: pip
|
|
104
|
+
- run: pip install -e ".[docs]"
|
|
105
|
+
- name: Build Sphinx (validation stricte)
|
|
106
|
+
run: sphinx-build -b html -W docs docs/_build/html
|
|
107
|
+
- name: Upload doc HTML (aperçu, sans hébergement)
|
|
108
|
+
uses: actions/upload-artifact@v4
|
|
109
|
+
with:
|
|
110
|
+
name: docs-html
|
|
111
|
+
path: docs/_build/html/
|
|
112
|
+
retention-days: 14
|
|
113
|
+
|
|
114
|
+
test:
|
|
115
|
+
runs-on: ubuntu-latest
|
|
116
|
+
strategy:
|
|
117
|
+
fail-fast: false
|
|
118
|
+
matrix:
|
|
119
|
+
python-version: ["3.12", "3.13"]
|
|
120
|
+
steps:
|
|
121
|
+
- uses: actions/checkout@v4
|
|
122
|
+
with:
|
|
123
|
+
fetch-depth: 0
|
|
124
|
+
- uses: actions/setup-python@v5
|
|
125
|
+
with:
|
|
126
|
+
python-version: ${{ matrix.python-version }}
|
|
127
|
+
cache: pip
|
|
128
|
+
- run: pip install -e ".[dev]"
|
|
129
|
+
- name: Tests + coverage (JUnit + HTML)
|
|
130
|
+
run: pytest --junitxml=junit-${{ matrix.python-version }}.xml --cov-report=html
|
|
131
|
+
- name: Upload rapports (couverture HTML + JUnit)
|
|
132
|
+
if: always()
|
|
133
|
+
uses: actions/upload-artifact@v4
|
|
134
|
+
with:
|
|
135
|
+
name: reports-py${{ matrix.python-version }}
|
|
136
|
+
path: |
|
|
137
|
+
junit-${{ matrix.python-version }}.xml
|
|
138
|
+
htmlcov/
|
|
139
|
+
retention-days: 14
|
|
140
|
+
- name: Upload coverage to Codecov
|
|
141
|
+
if: matrix.python-version == '3.12'
|
|
142
|
+
uses: codecov/codecov-action@v4
|
|
143
|
+
with:
|
|
144
|
+
files: coverage.xml
|
|
145
|
+
fail_ci_if_error: false
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
# Déclenché par un tag de version créé par le Release Manager (ex. v1.2.0).
|
|
4
|
+
# Tag de pré-release (ex. v1.2.0rc1) → TestPyPI ; tag final → PyPI public.
|
|
5
|
+
on:
|
|
6
|
+
push:
|
|
7
|
+
tags: ["v*"]
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: read
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
meta:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
outputs:
|
|
16
|
+
prerelease: ${{ steps.detect.outputs.prerelease }}
|
|
17
|
+
steps:
|
|
18
|
+
- id: detect
|
|
19
|
+
run: |
|
|
20
|
+
if [[ "${GITHUB_REF_NAME}" =~ (rc|a|b|alpha|beta|dev)[0-9]*$ ]]; then
|
|
21
|
+
echo "prerelease=true" >> "$GITHUB_OUTPUT"
|
|
22
|
+
else
|
|
23
|
+
echo "prerelease=false" >> "$GITHUB_OUTPUT"
|
|
24
|
+
fi
|
|
25
|
+
|
|
26
|
+
build:
|
|
27
|
+
needs: meta
|
|
28
|
+
runs-on: ubuntu-latest
|
|
29
|
+
permissions:
|
|
30
|
+
id-token: write # attestation de provenance
|
|
31
|
+
attestations: write
|
|
32
|
+
contents: read
|
|
33
|
+
steps:
|
|
34
|
+
- uses: actions/checkout@v4
|
|
35
|
+
with:
|
|
36
|
+
fetch-depth: 0 # tag complet requis pour hatch-vcs
|
|
37
|
+
- uses: actions/setup-python@v5
|
|
38
|
+
with:
|
|
39
|
+
python-version: "3.12"
|
|
40
|
+
- name: Build sdist + wheel
|
|
41
|
+
run: |
|
|
42
|
+
python -m pip install --upgrade build
|
|
43
|
+
python -m build
|
|
44
|
+
- name: Attestation de provenance (supply chain)
|
|
45
|
+
uses: actions/attest-build-provenance@v1
|
|
46
|
+
with:
|
|
47
|
+
subject-path: "dist/*"
|
|
48
|
+
- uses: actions/upload-artifact@v4
|
|
49
|
+
with:
|
|
50
|
+
name: dist
|
|
51
|
+
path: dist/
|
|
52
|
+
|
|
53
|
+
publish-testpypi:
|
|
54
|
+
needs: [meta, build]
|
|
55
|
+
if: needs.meta.outputs.prerelease == 'true'
|
|
56
|
+
runs-on: ubuntu-latest
|
|
57
|
+
environment: testpypi
|
|
58
|
+
permissions:
|
|
59
|
+
id-token: write # Trusted Publishing (OIDC)
|
|
60
|
+
steps:
|
|
61
|
+
- uses: actions/download-artifact@v4
|
|
62
|
+
with:
|
|
63
|
+
name: dist
|
|
64
|
+
path: dist/
|
|
65
|
+
- name: Publish to TestPyPI
|
|
66
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
67
|
+
with:
|
|
68
|
+
repository-url: https://test.pypi.org/legacy/
|
|
69
|
+
|
|
70
|
+
publish-pypi:
|
|
71
|
+
needs: [meta, build]
|
|
72
|
+
if: needs.meta.outputs.prerelease == 'false'
|
|
73
|
+
runs-on: ubuntu-latest
|
|
74
|
+
environment: pypi
|
|
75
|
+
permissions:
|
|
76
|
+
id-token: write # Trusted Publishing (OIDC) — aucun token stocké
|
|
77
|
+
steps:
|
|
78
|
+
- uses: actions/download-artifact@v4
|
|
79
|
+
with:
|
|
80
|
+
name: dist
|
|
81
|
+
path: dist/
|
|
82
|
+
- name: Publish to PyPI
|
|
83
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
84
|
+
|
|
85
|
+
github-release:
|
|
86
|
+
needs: [meta, build]
|
|
87
|
+
runs-on: ubuntu-latest
|
|
88
|
+
permissions:
|
|
89
|
+
contents: write # créer la Release + attacher les assets
|
|
90
|
+
steps:
|
|
91
|
+
- uses: actions/checkout@v4
|
|
92
|
+
with:
|
|
93
|
+
fetch-depth: 0 # hatch-vcs (install du paquet pour le SBOM)
|
|
94
|
+
- uses: actions/setup-python@v5
|
|
95
|
+
with:
|
|
96
|
+
python-version: "3.12"
|
|
97
|
+
- uses: actions/download-artifact@v4
|
|
98
|
+
with:
|
|
99
|
+
name: dist
|
|
100
|
+
path: dist/
|
|
101
|
+
- name: Générer le SBOM (CycloneDX)
|
|
102
|
+
run: |
|
|
103
|
+
python -m pip install pip-audit .
|
|
104
|
+
pip-audit -f cyclonedx-json -o sbom.json
|
|
105
|
+
continue-on-error: true
|
|
106
|
+
- name: Create GitHub Release (dist + SBOM attachés)
|
|
107
|
+
uses: softprops/action-gh-release@v2
|
|
108
|
+
with:
|
|
109
|
+
files: |
|
|
110
|
+
dist/*
|
|
111
|
+
sbom.json
|
|
112
|
+
generate_release_notes: true
|
|
113
|
+
prerelease: ${{ needs.meta.outputs.prerelease == 'true' }}
|
|
114
|
+
body: "Voir le CHANGELOG.md pour le détail des changements."
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Environnement virtuel (jamais versionné)
|
|
2
|
+
.venv/
|
|
3
|
+
venv/
|
|
4
|
+
env/
|
|
5
|
+
|
|
6
|
+
# Secrets
|
|
7
|
+
.env
|
|
8
|
+
.env.*
|
|
9
|
+
!.env.example
|
|
10
|
+
|
|
11
|
+
# Python
|
|
12
|
+
__pycache__/
|
|
13
|
+
*.py[cod]
|
|
14
|
+
*$py.class
|
|
15
|
+
*.egg-info/
|
|
16
|
+
.eggs/
|
|
17
|
+
build/
|
|
18
|
+
dist/
|
|
19
|
+
*.egg
|
|
20
|
+
|
|
21
|
+
# Tests & couverture
|
|
22
|
+
.pytest_cache/
|
|
23
|
+
.coverage
|
|
24
|
+
.coverage.*
|
|
25
|
+
htmlcov/
|
|
26
|
+
coverage.xml
|
|
27
|
+
junit*.xml
|
|
28
|
+
.tox/
|
|
29
|
+
.nox/
|
|
30
|
+
|
|
31
|
+
# Rapports d'analyse (générés en CI)
|
|
32
|
+
bandit.sarif
|
|
33
|
+
sbom.json
|
|
34
|
+
|
|
35
|
+
# Typage / lint caches
|
|
36
|
+
.mypy_cache/
|
|
37
|
+
.ruff_cache/
|
|
38
|
+
.dmypy.json
|
|
39
|
+
|
|
40
|
+
# Documentation construite
|
|
41
|
+
docs/_build/
|
|
42
|
+
docs/api/_autosummary/
|
|
43
|
+
|
|
44
|
+
# IDE / OS
|
|
45
|
+
.idea/
|
|
46
|
+
.vscode/
|
|
47
|
+
.DS_Store
|
|
48
|
+
Thumbs.db
|
|
49
|
+
|
|
50
|
+
# Claude Code (local uniquement)
|
|
51
|
+
CLAUDE.local.md
|
|
52
|
+
.claude/settings.local.json
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Garde-fous mécaniques : appliqués quoi que l'IA décide.
|
|
2
|
+
# Installation : pre-commit install
|
|
3
|
+
default_language_version:
|
|
4
|
+
python: python3
|
|
5
|
+
|
|
6
|
+
repos:
|
|
7
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
8
|
+
rev: v4.6.0
|
|
9
|
+
hooks:
|
|
10
|
+
- id: trailing-whitespace
|
|
11
|
+
- id: end-of-file-fixer
|
|
12
|
+
- id: check-yaml
|
|
13
|
+
- id: check-toml
|
|
14
|
+
- id: check-added-large-files
|
|
15
|
+
- id: detect-private-key
|
|
16
|
+
|
|
17
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
18
|
+
rev: v0.6.9
|
|
19
|
+
hooks:
|
|
20
|
+
- id: ruff # lint
|
|
21
|
+
args: [--fix]
|
|
22
|
+
- id: ruff-format # format
|
|
23
|
+
|
|
24
|
+
- repo: https://github.com/pre-commit/mirrors-mypy
|
|
25
|
+
rev: v1.11.2
|
|
26
|
+
hooks:
|
|
27
|
+
- id: mypy
|
|
28
|
+
additional_dependencies:
|
|
29
|
+
- "alembic"
|
|
30
|
+
- "pydantic-settings"
|
|
31
|
+
- "pytest"
|
|
32
|
+
- "sqlalchemy"
|
|
33
|
+
- "testcontainers"
|
|
34
|
+
- "psycopg[binary]"
|
|
35
|
+
args: [--strict]
|
|
36
|
+
|
|
37
|
+
- repo: https://github.com/PyCQA/bandit
|
|
38
|
+
rev: 1.7.10
|
|
39
|
+
hooks:
|
|
40
|
+
- id: bandit
|
|
41
|
+
args: ["-c", "pyproject.toml"]
|
|
42
|
+
additional_dependencies: ["bandit[toml]"]
|
|
43
|
+
|
|
44
|
+
- repo: local
|
|
45
|
+
hooks:
|
|
46
|
+
- id: pytest-cov-90
|
|
47
|
+
name: pytest (couverture >= 90%)
|
|
48
|
+
entry: pytest
|
|
49
|
+
language: system
|
|
50
|
+
pass_filenames: false
|
|
51
|
+
always_run: true
|
|
52
|
+
stages: [pre-push]
|