Skip to content

Authentification + améliorations#25

Open
SANAJ12s wants to merge 25 commits into
mainfrom
dev-auth
Open

Authentification + améliorations#25
SANAJ12s wants to merge 25 commits into
mainfrom
dev-auth

Conversation

@SANAJ12s
Copy link
Copy Markdown
Collaborator

@SANAJ12s SANAJ12s commented May 2, 2026

No description provided.

jeandavidt and others added 25 commits January 14, 2026 10:58
Break down monolithic documentation generation into focused, testable modules:

- scripts/generate_dictionary_reference.py: Generate table/valueset docs
- scripts/generate_erd.py: Generate ERD diagrams and HTML
- scripts/generate_sql.py: Generate SQL schemas for target databases
- scripts/orchestrate_docs.py: Coordinate all generation tasks

Benefits:
- Each script can be run independently for testing
- Clearer separation of concerns
- Easier to maintain and extend
- Better testability

Remove obsolete scripts:
- Old monolithic hooks (docs/hooks/erd_generator.py, generate_docs.py)
- One-time migration scripts (csv_to_json.py, remove_fk_target.py, etc.)

Update helpers.py to support new modular architecture.
Restructure tests for better organization and maintainability:

New structure:
- tests/unit/: Isolated unit tests for each module
  - test_dictionary_reference.py: Dictionary markdown generation
  - test_erd_generator.py: ERD generation logic
  - test_sql_generator.py: SQL schema generation
  - test_models.py: Pydantic model validation
  - test_helpers.py: Helper function tests

- tests/integration/: End-to-end integration tests
  - test_orchestration.py: Full documentation pipeline
  - test_erd_integrity.py: ERD structural validation

- tests/fixtures/: Shared test data and utilities
  - sample_dictionary.py: Reusable test fixtures
  - conftest.py: Pytest configuration

Benefits:
- Clearer separation between unit and integration tests
- Faster test execution (unit tests can run independently)
- Easier to locate and maintain specific tests
- Shared fixtures reduce duplication
Replace inline documentation generation with orchestrator-based approach:

Changes to docs/hooks/call_orchestrator.py:
- Lightweight hook that delegates to scripts/orchestrate_docs.py
- Passes configuration from mkdocs.yml to orchestrator
- Cleaner separation between MkDocs and generation logic

Changes to mkdocs.yml:
- Update hooks configuration to use new call_orchestrator
- Adjust paths and references for new script structure
- Maintain compatibility with existing documentation structure

Benefits:
- MkDocs hook becomes a thin wrapper
- Generation logic can be tested independently of MkDocs
- Same scripts work both in MkDocs builds and standalone execution
- Easier to debug and maintain
Regenerate all auto-generated documentation using new modular scripts:

Documentation updates:
- docs/reference/tables.md: Fresh table documentation with anchors
- docs/reference/valuesets.md: Updated value set references
- docs/reference/erd.md: New ERD page with interactive diagram
- docs/reference/schema.md: Streamlined schema overview
- docs/contributing/dictionary.md: New contributor guide for dictionary

Removed outdated documentation:
- docs/contributing/parts_table.md: Superseded by dictionary.md

Improvements:
- Consistent anchor linking between tables and valuesets
- Better cross-references using Part_ID anchors
- Interactive ERD with zoom, pan, and export capabilities
- Cleaner, more maintainable markdown structure

All documentation now auto-generated from src/dictionary.json using
the new modular script architecture.
Regenerate MSSQL schema using new scripts/generate_sql.py:

Changes:
- Fresh SQL DDL generated from current dictionary.json state
- Consistent with data model after fk_target_part_id removal
- Proper foreign key constraint generation
- Up-to-date with latest table and field definitions

The SQL schema is now generated using the modular generation
system, ensuring consistency with documentation and ERD diagrams.
Add pytest to dev dependency group for test suite:

Changes to pyproject.toml:
- Add pytest>=8.4.2 to [dependency-groups].dev
- Supports new unit and integration test structure
- Enables local test execution with 'uv run pytest'

The reorganized test suite requires pytest for execution.
This formalizes the testing infrastructure for the project.
Restructure project to improve organization and clarity:

Structure changes:
- Create src/open_dateaubase/data_model/ submodule
- Move models.py → data_model/models.py
- Move helpers.py → data_model/helpers.py
- Move dictionary.json to project root (from src/)

Benefits:
- Clearer separation: data model code is now in dedicated submodule
- More accessible: dictionary.json at root is easier to find/use
- Better imports: explicit data_model namespace clarifies purpose
- Improved maintainability: related code grouped together

Updated references throughout:
- All import statements: open_dateaubase.data_model.{models,helpers}
- All file paths: dictionary.json (instead of src/dictionary.json)
- Documentation examples in dictionary.md
- Script usage examples and help text
- Test imports
- MkDocs hook paths

All tests and imports verified working.
- Moved dictionary inside the package itself
API: signup/login/me endpoints with PBKDF2 password hashing and HMAC-SHA256 bearer tokens.
App: Streamlit login/signup forms, session state guards, and api_client auth functions.
Migration: adds UserAccount table (v2.1.0 → v2.1.1).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants