Commit Graph

62 Commits

Author SHA1 Message Date
b0e623d68e fix(tests): use secure token generation for access token in navigation client
Some checks failed
CI / lint (push) Successful in 15s
CI / build (push) Has been skipped
CI / test (push) Failing after 18s
CI / deploy (push) Has been skipped
2025-11-14 13:08:09 +01:00
31b9a1058a refactor: remove unused imports and streamline code in calculations and navigation services
Some checks failed
CI / test (push) Has been skipped
CI / build (push) Has been skipped
CI / lint (push) Failing after 14s
CI / deploy (push) Has been skipped
2025-11-14 12:28:48 +01:00
4d0e1a9989 feat(navigation): Enhance navigation links and add legacy route redirects
Some checks failed
CI / test (push) Has been skipped
CI / build (push) Has been skipped
CI / lint (push) Failing after 14s
CI / deploy (push) Has been skipped
- Updated navigation links in `init_db.py` to include href overrides and parent slugs for profitability, opex, and capex planners.
- Modified `NavigationService` to handle child links and href overrides, ensuring proper routing when context is missing.
- Adjusted scenario detail and list templates to use new route names for opex and capex forms, with legacy fallbacks.
- Introduced integration tests for legacy calculation routes to ensure proper redirection and error handling.
- Added tests for navigation sidebar to validate role-based access and link visibility.
- Enhanced navigation sidebar tests to include calculation links and contextual URLs based on project and scenario IDs.
2025-11-13 20:23:53 +01:00
ed8e05147c feat: update status codes and navigation structure in calculations and reports routes 2025-11-13 17:14:17 +01:00
522b1e4105 feat: add scenarios list page with metrics and quick actions
Some checks failed
CI / test (push) Has been skipped
CI / build (push) Has been skipped
CI / lint (push) Failing after 15s
CI / deploy (push) Has been skipped
- Introduced a new template for listing scenarios associated with a project.
- Added metrics for total, active, draft, and archived scenarios.
- Implemented quick actions for creating new scenarios and reviewing project overview.
- Enhanced navigation with breadcrumbs for better user experience.

refactor: update Opex and Profitability templates for consistency

- Changed titles and button labels for clarity in Opex and Profitability templates.
- Updated form IDs and action URLs for better alignment with new naming conventions.
- Improved navigation links to include scenario and project overviews.

test: add integration tests for Opex calculations

- Created new tests for Opex calculation HTML and JSON flows.
- Validated successful calculations and ensured correct data persistence.
- Implemented tests for currency mismatch and unsupported frequency scenarios.

test: enhance project and scenario route tests

- Added tests to verify scenario list rendering and calculator shortcuts.
- Ensured scenario detail pages link back to the portfolio correctly.
- Validated project detail pages show associated scenarios accurately.
2025-11-13 16:21:36 +01:00
4f00bf0d3c feat: Add CRUD tests for project and scenario models 2025-11-13 11:06:39 +01:00
3551b0356d feat: Add comprehensive test suite for project and scenario models 2025-11-13 11:05:36 +01:00
1feae7ff85 feat: Add Processing Opex functionality
- Introduced OpexValidationError for handling validation errors in processing opex calculations.
- Implemented ProjectProcessingOpexRepository and ScenarioProcessingOpexRepository for managing project and scenario-level processing opex snapshots.
- Enhanced UnitOfWork to include repositories for processing opex.
- Updated sidebar navigation and scenario detail templates to include links to the new Processing Opex Planner.
- Created a new template for the Processing Opex Planner with form handling for input components and parameters.
- Developed integration tests for processing opex calculations, covering HTML and JSON flows, including validation for currency mismatches and unsupported frequencies.
- Added unit tests for the calculation logic, ensuring correct handling of various scenarios and edge cases.
2025-11-13 09:26:57 +01:00
1240b08740 feat: Persist initial capex calculations and enhance navigation links in UI 2025-11-12 23:52:06 +01:00
d9fd82b2e3 feat: Implement initial capex calculation feature
- Added CapexComponentInput, CapexParameters, CapexCalculationRequest, CapexCalculationResult, and related schemas for capex calculations.
- Introduced calculate_initial_capex function to aggregate capex components and compute totals and timelines.
- Created ProjectCapexRepository and ScenarioCapexRepository for managing capex snapshots in the database.
- Developed capex.html template for capturing and displaying initial capex data.
- Registered common Jinja2 filters for formatting currency and percentages.
- Implemented unit and integration tests for capex calculation functionality.
- Updated unit of work to include new repositories for capex management.
2025-11-12 23:51:52 +01:00
6d496a599e feat: Resolve test suite regressions and enhance token tamper detection
feat: Add UI router to application for improved routing
style: Update breadcrumb styles in main.css and remove redundant styles from scenarios.css
2025-11-12 20:30:40 +01:00
1f892ebdbb feat: Implement SQLAlchemy enum helper and normalize enum values in database initialization 2025-11-12 18:11:19 +01:00
23523f70f1 feat: Add comprehensive tests for database initialization and seeding 2025-11-12 16:38:20 +01:00
6e466a3fd2 Refactor database initialization and remove Alembic migrations
- Removed legacy Alembic migration files and consolidated schema management into a new Pydantic-backed initializer (`scripts/init_db.py`).
- Updated `main.py` to ensure the new DB initializer runs on startup, maintaining idempotency.
- Adjusted session management in `config/database.py` to prevent DetachedInstanceError.
- Introduced new enums in `models/enums.py` for better organization and clarity.
- Refactored various models to utilize the new enums, improving code maintainability.
- Enhanced middleware to handle JSON validation more robustly, ensuring non-JSON requests do not trigger JSON errors.
- Added tests for middleware and enums to ensure expected behavior and consistency.
- Updated changelog to reflect significant changes and improvements.
2025-11-12 16:29:44 +01:00
e06a6ae068 feat: Implement random password and token generation for tests 2025-11-12 11:53:44 +01:00
5d6592d657 feat: Use secure random tokens for authentication and password handling in tests 2025-11-12 11:36:19 +01:00
4cfc5d9ffa fix: Resolve Ruff E402 warnings and clean up imports across multiple modules
Some checks failed
CI / lint (push) Successful in 15s
CI / test (push) Failing after 27s
CI / build (push) Has been skipped
2025-11-12 11:10:50 +01:00
ce9c174b53 feat: Enhance project and scenario creation with monitoring metrics
Some checks failed
CI / lint (push) Failing after 1m14s
CI / test (push) Has been skipped
CI / build (push) Has been skipped
- Added monitoring metrics for project creation success and error handling in `ProjectRepository`.
- Implemented similar monitoring for scenario creation in `ScenarioRepository`.
- Refactored `run_monte_carlo` function in `simulation.py` to include timing and success/error metrics.
- Introduced new CSS styles for headers, alerts, and navigation buttons in `main.css` and `projects.css`.
- Created a new JavaScript file for navigation logic to handle chevron buttons.
- Updated HTML templates to include new navigation buttons and improved styling for buttons.
- Added tests for reporting service and routes to ensure proper functionality and access control.
- Removed unused imports and optimized existing test files for better clarity and performance.
2025-11-12 10:36:24 +01:00
795a9f99f4 feat: Enhance currency handling and validation across scenarios
- Updated form template to prefill currency input with default value and added help text for clarity.
- Modified integration tests to assert more descriptive error messages for invalid currency codes.
- Introduced new tests for currency normalization and validation in various scenarios, including imports and exports.
- Added comprehensive tests for pricing calculations, ensuring defaults are respected and overrides function correctly.
- Implemented unit tests for pricing settings repository, ensuring CRUD operations and default settings are handled properly.
- Enhanced scenario pricing evaluation tests to validate currency handling and metadata defaults.
- Added simulation tests to ensure Monte Carlo runs are accurate and handle various distribution scenarios.
2025-11-11 18:29:59 +01:00
032e6d2681 feat: implement persistent audit logging for import/export operations with Prometheus metrics 2025-11-10 21:37:07 +01:00
43b1e53837 feat: implement export functionality for projects and scenarios with CSV and Excel support 2025-11-10 18:32:24 +01:00
4b33a5dba3 feat: add Excel export functionality with support for metadata and customizable sheets 2025-11-10 18:32:09 +01:00
5f183faa63 feat: implement CSV export functionality with customizable columns and formatters 2025-11-10 15:36:14 +01:00
1a7581cda0 feat: add export filters for projects and scenarios with filtering capabilities 2025-11-10 15:36:06 +01:00
b1a0153a8d feat: expand import ingestion workflow with staging previews, transactional commits, and new API tests 2025-11-10 10:14:42 +01:00
eaef99f0ac feat: enhance import functionality with commit results and summary models for projects and scenarios 2025-11-10 09:20:41 +01:00
3bc124c11f feat: implement import functionality for projects and scenarios with CSV/XLSX support, including validation and error handling 2025-11-10 09:10:47 +01:00
24cb3c2f57 feat: implement admin bootstrap settings and ensure default roles and admin account 2025-11-09 23:43:13 +01:00
118657491c feat: add tests for authorization guards and role-based access control 2025-11-09 23:27:10 +01:00
0f79864188 feat: enhance project and scenario management with role-based access control
- Implemented role-based access control for project and scenario routes.
- Added authorization checks to ensure users have appropriate roles for viewing and managing projects and scenarios.
- Introduced utility functions for ensuring project and scenario access based on user roles.
- Refactored project and scenario routes to utilize new authorization helpers.
- Created initial data seeding script to set up default roles and an admin user.
- Added tests for authorization helpers and initial data seeding functionality.
- Updated exception handling to include authorization errors.
2025-11-09 23:14:54 +01:00
27262bdfa3 feat: Implement session management with middleware and update authentication flow 2025-11-09 23:14:41 +01:00
3601c2e422 feat: Implement user and role management with repositories
- Added RoleRepository and UserRepository for managing roles and users.
- Implemented methods for creating, retrieving, and assigning roles to users.
- Introduced functions to ensure default roles and an admin user exist in the system.
- Updated UnitOfWork to include user and role repositories.
- Created new security module for password hashing and JWT token management.
- Added tests for authentication flows, including registration, login, and password reset.
- Enhanced HTML templates for user registration, login, and password management with error handling.
- Added a logo image to the static assets.
2025-11-09 21:48:35 +01:00
53879a411f feat: implement user and role models with password hashing, and add tests for user functionality 2025-11-09 21:45:29 +01:00
2d848c2e09 feat: add integration tests for project and scenario lifecycles, update templates to new Starlette signature, and optimize project retrieval logic 2025-11-09 19:47:35 +01:00
dad862e48e feat: reorder project route registration to prioritize static UI paths and add pytest coverage for navigation endpoints 2025-11-09 19:21:25 +01:00
7f5ed6a42d feat: enhance dashboard with new metrics, project and scenario utilities, and comprehensive tests 2025-11-09 19:02:36 +01:00
02da881d3e feat: implement scenario comparison validation and API endpoint with comprehensive unit tests 2025-11-09 18:42:04 +01:00
8bf46b80c8 feat: add pytest coverage for repository and unit-of-work behaviors 2025-11-09 17:17:42 +01:00
d807a50f77 v2 init 2025-11-09 16:49:27 +01:00
54137b88d7 feat: Enhance Python environment setup with system Python option and improve dependency installation
Some checks failed
Run Tests / e2e tests (push) Failing after 50s
Run Tests / lint tests (push) Failing after 1m53s
Run Tests / unit tests (push) Failing after 2m25s
refactor: Clean up imports in currencies and users routes
fix: Update theme settings saving logic and clean up test imports
2025-10-27 18:39:20 +01:00
573e255769 fix: Enhance argument handling in seed data script and add unit tests
Some checks failed
Run Tests / e2e tests (push) Failing after 2s
Run Tests / lint tests (push) Failing after 2s
Run Tests / unit tests (push) Failing after 2s
2025-10-27 15:12:50 +01:00
b1d50a56e0 feat: Consolidate user, role, and theme settings tables into a single migration file
Some checks failed
Run Tests / e2e tests (push) Failing after 3s
Run Tests / lint tests (push) Failing after 1m30s
Run Tests / unit tests (push) Failing after 1m32s
2025-10-27 14:56:37 +01:00
97b1c0360b Refactor test cases for improved readability and consistency
Some checks failed
Run Tests / e2e tests (push) Failing after 1m27s
Run Tests / lint tests (push) Failing after 6s
Run Tests / unit tests (push) Failing after 7s
- Updated test functions in various test files to enhance code clarity by formatting long lines and improving indentation.
- Adjusted assertions to use multi-line formatting for better readability.
- Added new test cases for theme settings API to ensure proper functionality.
- Ensured consistent use of line breaks and spacing across test files for uniformity.
2025-10-27 10:32:55 +01:00
75f533b87b fix: Update HTTP status code for unprocessable entity and improve test database setup
All checks were successful
Run Tests / test (push) Successful in 1m51s
2025-10-25 19:26:43 +02:00
5b1322ddbc feat: Add application-level settings for CSS color management
Some checks failed
Run Tests / test (push) Failing after 1m51s
- Introduced a new table `application_setting` to store configurable application options.
- Implemented functions to manage CSS color settings, including loading, updating, and reading environment overrides.
- Added a new settings view to render and manage theme colors.
- Updated UI to include a settings page with theme color management and environment overrides display.
- Enhanced CSS styles for the settings page and sidebar navigation.
- Created unit and end-to-end tests for the new settings functionality and CSS management.
2025-10-25 19:20:52 +02:00
bff75a722e fix: Disable trust_env for httpx requests in live server and currency seeding fixtures
All checks were successful
Run Tests / test (push) Successful in 1m49s
2025-10-25 16:40:55 +02:00
d455320eea fix: Update CI workflow to configure APT proxy and improve currency workflow tests
Some checks failed
Run Tests / test (push) Failing after 2m5s
2025-10-25 16:34:10 +02:00
5c66bf7899 fix: Update import statement for client in currency workflow tests
Some checks failed
Run Tests / test (push) Has been cancelled
2025-10-25 16:21:26 +02:00
dd3f3141e3 feat: Add currency management feature with CRUD operations
Some checks failed
Run Tests / test (push) Failing after 5m2s
- Introduced a new template for currency overview and management (`currencies.html`).
- Updated footer to include attribution to AllYouCanGET.
- Added "Currencies" link to the main navigation header.
- Implemented end-to-end tests for currency creation, update, and activation toggling.
- Created unit tests for currency API endpoints, including creation, updating, and activation toggling.
- Added a fixture to seed default currencies for testing.
- Enhanced database setup tests to ensure proper seeding and migration handling.
2025-10-25 15:44:57 +02:00
93a2f54f97 fix: build workflow variables
Some checks failed
Build and Push Docker Image / build-and-push (push) Failing after 4m10s
Deploy to Server / deploy (push) Failing after 2s
2025-10-23 19:28:41 +02:00