Conversation
There was a problem hiding this comment.
Pull request overview
This pull request modernizes the buildingid project by migrating from Poetry to uv for package management, updating Python version support (dropping 3.9 and 3.10, adding support through 3.14), and applying modern Python best practices throughout the codebase.
Changes:
- Migrated from Poetry to uv build backend, updating pyproject.toml and removing poetry.lock
- Modernized Python code with updated type hints (PEP 604 union syntax), f-strings, and absolute imports
- Updated testing and CI infrastructure for Windows/macOS support and modern tooling
- Enhanced linting configuration with additional ruff rules and pre-commit hooks
Reviewed changes
Copilot reviewed 28 out of 30 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| pyproject.toml | Migrated from Poetry to uv, updated dependencies and Python version requirements, changed package name from buildingid-nrel to buildingid |
| poetry.lock | Removed in favor of uv.lock |
| ruff.toml | Enhanced linting rules, added DTZ and NPY checks, simplified ignore list |
| mypy.ini | Removed (configuration should be moved to pyproject.toml) |
| buildingid/command_line/exceptions.py | Renamed CustomException to CustomExceptionError, modernized string formatting |
| buildingid/command_line/init.py | Changed to use importlib.metadata for version, updated imports to absolute paths, converted to f-strings |
| buildingid/command_line/dict_*.py | Modernized type hints, updated imports to absolute paths, simplified super() calls |
| buildingid/code.py | Modernized type hints using PEP 604 union syntax, updated imports |
| buildingid/code_pattern.py | Added copyright header, reformatted regex pattern with fmt: off/on |
| tests/buildingid/test_*.py | Replaced unittest assertRaises with pytest.raises, removed file headers |
| .github/workflows/test.yml | Updated to use uv, added Windows/macOS testing, updated to Python 3.11-3.14 |
| .github/workflows/pypi_release.yml | Updated to use uv for building |
| .github/dependabot.yml | Changed package-ecosystem from pip to uv |
| .pre-commit-config.yaml | Added mypy, pyupgrade, and ruff hooks |
| README.rst | Updated installation instructions to use uv |
Comments suppressed due to low confidence (1)
README.rst:43
- The README.rst still references pip for dependencies installation in line 19, but the project has migrated to uv. This should be updated to mention uv instead of pip. Additionally, lines 42-43 still show pip3 install instructions for pytest-cov, which is inconsistent with the uv-based installation shown earlier. These should be updated to use uv commands (e.g., "uv run pytest --cov=buildingid --cov-report=html tests/").
Dependencies are automatically installed using `pip <https://pypi.python.org/pypi/pip>`_.
Clone the repository, and then install the ``buildingid`` package:
::
git clone git@github.com:SEED-platform/buildingid.git
cd buildingid
uv sync
Test
====
Test the ``buildingid`` package using the `pytest <https://docs.pytest.org/>`_ package:
::
pytest tests/
Coverage testing is enabled using the `pytest-cov <https://pytest-cov.readthedocs.io/>`_ plugin:
::
pip3 install pytest-cov
pytest --cov=buildingid --cov-report=html tests/
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
831b639 to
d2d8d3e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull request overview
This PR makes several changes to update the project following modern best practices:
version.pyfile2.3.0