Skip to content

Restructuration - #38

Merged
rosasbehoundja merged 6 commits into
mainfrom
restructuration
Aug 12, 2026
Merged

Restructuration#38
rosasbehoundja merged 6 commits into
mainfrom
restructuration

Conversation

@rosasbehoundja

Copy link
Copy Markdown
Member

This pull request introduces a significant restructuring and modernization of the codebase for the MPVRP-CC platform. The main changes include a full backend directory reorganization, improved CORS configuration for development and production, a rewritten and clarified README.md at the project root, and updates to the backend API to use the new directory structure and improved instance generation logic. These changes enhance maintainability, clarify project structure, and streamline both development and deployment workflows.

Backend directory reorganization and API updates:

  • The backend code has been moved from the backup/ directory to backend/, and all internal imports have been updated accordingly. The new structure separates HTTP routing, core logic, and database adapters for greater clarity and maintainability. ([[1]](https://github.com/IFRI-AI-Classes/MPVRP-CC/pull/38/files#diff-82608d38c4441937a3cfb9ff7da1bed9dd59292dec62308de75bfaa2809419a3L8-R15), [[2]](https://github.com/IFRI-AI-Classes/MPVRP-CC/pull/38/files#diff-82608d38c4441937a3cfb9ff7da1bed9dd59292dec62308de75bfaa2809419a3L23-R25), [[3]](https://github.com/IFRI-AI-Classes/MPVRP-CC/pull/38/files#diff-82608d38c4441937a3cfb9ff7da1bed9dd59292dec62308de75bfaa2809419a3L33-R39), [[4]](https://github.com/IFRI-AI-Classes/MPVRP-CC/pull/38/files#diff-7020b04346dabea8abcc1bc0497816b9be947f10cb076cbe5f14eb307053055aL3-R10), [[5]](https://github.com/IFRI-AI-Classes/MPVRP-CC/pull/38/files#diff-b3c17e5f83c8b87f344ebde59374f8a13232a4bd7b97cc6de7e5ba6c51763f38L6-R8), [[6]](https://github.com/IFRI-AI-Classes/MPVRP-CC/pull/38/files#diff-63a873fcbb117c31befbaf128c8541e76b32a7c9a20b0b5501c6969a23875e94L5-R6), [[7]](https://github.com/IFRI-AI-Classes/MPVRP-CC/pull/38/files#diff-9db26ba678635c2dd0c0a53057972cd5adad08d9787c10a9d62863f18193b130L10-R12), [[8]](https://github.com/IFRI-AI-Classes/MPVRP-CC/pull/38/files#diff-9db26ba678635c2dd0c0a53057972cd5adad08d9787c10a9d62863f18193b130L30-R33), [[9]](https://github.com/IFRI-AI-Classes/MPVRP-CC/pull/38/files#diff-a54d2dad1be5eea9e70f8514ae65d89b65357120a312bfb9f644ddeb1844ca0dR1-R13))

  • The instance generation API (generator.py) now uses a new GenerationConfig dataclass and a generate function, supporting more flexible and modern configuration options for instance creation. ([[1]](https://github.com/IFRI-AI-Classes/MPVRP-CC/pull/38/files#diff-7020b04346dabea8abcc1bc0497816b9be947f10cb076cbe5f14eb307053055aL3-R10), [[2]](https://github.com/IFRI-AI-Classes/MPVRP-CC/pull/38/files#diff-7020b04346dabea8abcc1bc0497816b9be947f10cb076cbe5f14eb307053055aL33-R52))

Deployment and CORS improvements:

  • The Docker command and deployment workflow have been updated to use the new backend entrypoint (backend.app.main:app). ([DockerfileL19-R19](https://github.com/IFRI-AI-Classes/MPVRP-CC/pull/38/files#diff-dd2c0eb6ea5cfc6c4bd4eac30934e2d5746747af48fef6da689e85b752f39557L19-R19))
  • The deployment GitHub Actions workflow now excludes additional directories from the static frontend build, ensuring only the intended assets are deployed. ([.github/workflows/deploy.ymlL23-R23](https://github.com/IFRI-AI-Classes/MPVRP-CC/pull/38/files#diff-28802fbf11c83a2eee09623fb192785e7ca92a3f40602a517c011b947a1822d3L23-R23))
  • CORS configuration is improved to allow only explicitly configured origins and, optionally, localhost for development, with support for a regex-based origin match. ([[1]](https://github.com/IFRI-AI-Classes/MPVRP-CC/pull/38/files#diff-82608d38c4441937a3cfb9ff7da1bed9dd59292dec62308de75bfaa2809419a3L23-R25), [[2]](https://github.com/IFRI-AI-Classes/MPVRP-CC/pull/38/files#diff-82608d38c4441937a3cfb9ff7da1bed9dd59292dec62308de75bfaa2809419a3L33-R39))

Documentation and onboarding:

  • The project root README.md has been rewritten and streamlined, providing a concise overview, clear setup instructions, and an updated directory structure reflecting the new backend organization. ([README.mdL1-R110](https://github.com/IFRI-AI-Classes/MPVRP-CC/pull/38/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5L1-R110))
  • A new backend/README.md explains the backend's structure and clarifies the separation between backend and frontend responsibilities. ([backend/README.mdR1-R13](https://github.com/IFRI-AI-Classes/MPVRP-CC/pull/38/files#diff-a54d2dad1be5eea9e70f8514ae65d89b65357120a312bfb9f644ddeb1844ca0dR1-R13))

These changes collectively modernize the codebase, clarify the development workflow, and improve both developer and user experience.

- Updated import paths in test files to reflect the new backend module structure.
- Consolidated integration tests into a single workflow test for generating and parsing instances.
- Simplified scoring tests to improve clarity and maintainability.
- Enhanced solution indexing tests to cover edge cases and ensure robustness against path traversal vulnerabilities.
- Removed deprecated tests and streamlined the test suite for better performance and readability.
This commit introduces a new Python script, `generate_doc_pdfs.py`, which converts Markdown documents into stable PDF formats using Google Chrome in headless mode. The script processes specific Markdown files related to the MPVRP-CC project and applies custom styling to the generated PDFs. It includes functions for converting Markdown to HTML and handling various Markdown elements such as headings, lists, and tables.
- Added example instance and solution data for quick testing.
- Implemented error handling for file uploads with user-friendly messages.
- Introduced validation for instance and solution formats to ensure data integrity.
- Enhanced the fleet legend with visibility controls for trucks.
- Updated UI components for better accessibility and responsiveness.
- Refactored code for improved readability and maintainability.
… with improved background and error handling
Copilot AI lite review requested due to automatic review settings August 12, 2026 14:09

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review this pull request because it exceeds the maximum number of files (300). Try reducing the number of changed files and requesting a review from Copilot again.

@rosasbehoundja
rosasbehoundja merged commit 6781a07 into main Aug 12, 2026
2 checks passed
rosasbehoundja added a commit that referenced this pull request Aug 15, 2026
Merge pull request #38 from IFRI-AI-Classes/restructuration
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