Skip to content

fix: restructuring of project structure and ci/cd pipeline fix

Praveena Veeranki requested to merge feature-final into dev

What does this MR do? This merge request reorganizes the project structure to improve maintainability and implements a comprehensive GitLab CI/CD pipeline. Key changes include:

Moving test files, utility scripts, and assets into dedicated directories (tests/, scripts/, assets/, reports/). Adding a

.gitlab-ci.yml file to automate linting, testing, and building. Cleaning up unused legacy code and resolving critical merge conflicts. Updating project configuration and dependencies in

pyproject.toml and

.gitignore . Motivation / Use Case The project structure was becoming "messy" with many files in the root directory, making it difficult to study and maintain. Automated CI/CD is essential for ensuring that new changes don't break existing functionality and that the code style remains consistent across contributors.

Implementation Notes Organization: Consistently moved all test_*.py files to tests/ and utility/scripts to scripts/. Removed the unused gitlabutils/ directory. CI/CD: The pipeline uses uv for fast dependency management and execution. It includes: lint: Runs

ruff with customized rules for this project.

test : Runs pytest with pytest-asyncio and PYTHONPATH set to root. build: Verifies that the package can be built successfully. Fixes: Resolved a merge conflict in

user_profile/profile_utils.py . Updated

tests/test_bad_mrs.py to use proper mocking, preventing tests from failing due to external network requests. Configured

ruff to be lenient on line length and complexity where appropriate for the current codebase. How to Test Pull the feature-final branch. Install dependencies: uv sync --extra dev Run linting: uv run ruff check . Run tests: PYTHONPATH=. uv run pytest tests/ Verify the app launches: streamlit run app.py Checklist Feature is documented (this MR description and walkthrough) Code is clean, readable, and follows the project style No breaking changes (reorganization only, app logic is intact) Tests are updated and passing Feature works as intended in local testing Related Issues or Discussions Closes the requirement for a pipeline file and code reorganization.

This merge request reorganizes the project structure to improve maintainability and implements a comprehensive GitLab CI/CD pipeline. Key changes include:

Moving test files, utility scripts, and assets into dedicated directories (tests/, scripts/, assets/, reports/). Adding a

.gitlab-ci.yml file to automate linting, testing, and building. Cleaning up unused legacy code and resolving critical merge conflicts. Updating project configuration and dependencies in

pyproject.toml and

.gitignore . Motivation / Use Case The project structure was becoming "messy" with many files in the root directory, making it difficult to study and maintain. Automated CI/CD is essential for ensuring that new changes don't break existing functionality and that the code style remains consistent across contributors.

Implementation Notes Organization: Consistently moved all test_*.py files to tests/ and utility/scripts to scripts/. Removed the unused gitlabutils/ directory. CI/CD: The pipeline uses uv for fast dependency management and execution. It includes: lint: Runs

ruff with customized rules for this project.

test : Runs pytest with pytest-asyncio and PYTHONPATH set to root. build: Verifies that the package can be built successfully. Fixes: Resolved a merge conflict in

user_profile/profile_utils.py . Updated

tests/test_bad_mrs.py to use proper mocking, preventing tests from failing due to external network requests. Configured

ruff to be lenient on line length and complexity where appropriate for the current codebase. How to Test Pull the feature-final branch. Install dependencies: uv sync --extra dev Run linting: uv run ruff check . Run tests: PYTHONPATH=. uv run pytest tests/ Verify the app launches: streamlit run app.py

Merge request reports

Loading