Improve Packaging, Add Tests, and Refactor Data Handling#6
Improve Packaging, Add Tests, and Refactor Data Handling#6google-labs-jules[bot] wants to merge 2 commits intodevfrom
Conversation
(cherry picked from commit b110dcf)
This commit addresses several key areas to improve the project's maintainability and robustness:
1. **Modernized Packaging:** Migrated project metadata from `setup.cfg` to `pyproject.toml`, following modern Python packaging standards.
2. **Added Testing Framework:**
* Introduced `pytest` and `pytest-cov` for unit testing.
* Added a basic test suite for the `add_aesa_pbs` function.
3. **Refactored Data Handling:**
* Modified the `add_aesa_pbs` function to use a temporary directory for generated Excel files, preventing errors in read-only environments.
* Updated data access to use `importlib.resources`, the standard for accessing package data.
4. **Integrated Pre-commit Hooks:**
* Set up a `.pre-commit-config.yaml` file to automate code formatting and testing.
* Configured `black`, `isort`, and `pytest` to run automatically.
5. **Updated Dependencies:** Added `brightway2` and `prettytable` to the project's dependencies in `pyproject.toml`.
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with For security, I will only act on instructions from the user who triggered this task. New to Jules? Learn more at jules.google/docs. |
This submission improves the project's packaging, adds a testing framework with pre-commit hooks, and refactors the data handling to be more robust. The project metadata has been migrated to
pyproject.toml, and the necessary dependencies have been added. The code has been updated to use a temporary directory for generated files andimportlib.resourcesfor accessing package data.PR created automatically by Jules for task 7746396739427347992 started by @vtulus