Skip to content

Test/coverage links#13

Open
vargastat wants to merge 12 commits into
mainfrom
test/coverageLinks
Open

Test/coverage links#13
vargastat wants to merge 12 commits into
mainfrom
test/coverageLinks

Conversation

@vargastat
Copy link
Copy Markdown
Contributor

No description provided.

berthetclement and others added 12 commits December 9, 2025 17:52
…`uv.lock` accordingly, and include new test data files
- Added new reference CSV files (`ref_pays.csv`, `ref_links.csv`, `study_scenario.csv`, `peak_hours.csv`, `peak_months.csv`) for parameterized tests.
- Updated `test_links.py` with new fixtures and global configurations.
- Fixed test inputs for `links.create_links_part` to support additional reference parameters.
…ssing logic

- Removed obsolete test files from `data_test` directory.
- Enhanced median calculation logic in `links.create_links_part` and incorporated reference parameters (`peak_hours`, `peak_months`).
- Updated `test_links.py` to include `ref_params` for updated data handling logic.
…ring, and add type hints

- Improved median calculation logic in `links.create_links_part` with grouped pivoting and merging approaches.
- Added new `scenario_filter` function for scenario-based filtering with type annotations.
- Updated `test_links.py` to incorporate new logic and additional parameters like `calendar_year`.
…inks` module

- Introduced `LocalConfiguration` class for managing input configuration paths, with validation checks for directories and scenario names.
- Refactored `create_links_part` to use `LocalConfiguration` for enhanced clarity and reusability.
- Replaced `LinksFileNames` with `LinksFileConfig` for better encapsulation of link file names.
- Added new unit tests for `LocalConfiguration` validation.
…ta processing logic

- Renamed `data_references` to `data_references_path` and added `calendar_year` in `LocalConfiguration`.
- Updated `create_links_part` to integrate `.xlsx` reading for peak hours, months, and scenarios.
- Refactored handling of `Transfer Links` and `NTCs Index` by replacing hardcoded filenames with `LinksFileConfig`.
- Added `openpyxl` as a dependency for Excel file support and updated `uv.lock` and `pyproject.toml`.
- Replaced `ref_params` with `LocalConfiguration` in tests and introduced new fixtures for mocking Excel data.
…xtures

- Deleted unused CSV files `peak_hours.csv`, `peak_months.csv`, `ref_links.csv`, `ref_pays.csv`, and `study_scenario.csv`.
- Added new fixture `mock_links_data_csv` with minimal test data for `Transfer Links`.
- Updated `test_links.py` to integrate the new fixture.
…ities, and fix column assignment

- Removed obsolete fixtures and redundant variables from `test_links.py`.
- Updated `mock_links_data_csv` to include structured and minimal test data for `Transfer Links` and `NTCs`.
- Fixed column assignment for `colname` in `links.py` to avoid direct attribute modification.

chore(tests): remove outdated `NTCs.csv` file from `data_test` directory
…_links_part`

- Introduced enums (`ReferentialSheetNames`, `PeakParamsColumnsNames`, etc.) for structured referential data in `conf_links.py`.
- Updated `create_links_part` to utilize enums for sheet names and column references, improving readability and maintainability.
…ata management, and update tests

- Moved `scenario_filter` function to `tools.py` for reusability and modularity.
- Renamed `create_links_part` to `links_data_management` and refined its logic for better readability and maintainability.
- Added a new `"ANTARES"` column with alphabetical sorting in links processing.
- Updated test cases to reflect renamed function and extended mock data for additional scenarios and countries.
- Removed unused constants from `conf_links.py`.
…t, and update test fixtures

- Added `pyarrow` as a dependency for optional `parquet` support in `uv.lock` and `tox.ini`.
- Updated `links.py` to replace unused `np.sort` logic with string concatenation for `border` column.
- Introduced new test fixtures for converting parquet files to CSV in `test_links.py`.
@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

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