Skip to content

Modernization updates#15

Merged
axelstudios merged 2 commits intomainfrom
task/uv-python-3.14
Jan 29, 2026
Merged

Modernization updates#15
axelstudios merged 2 commits intomainfrom
task/uv-python-3.14

Conversation

@axelstudios
Copy link
Member

@axelstudios axelstudios commented Jan 27, 2026

Pull request overview

This PR makes several changes to update the project following modern best practices:

  • Added support for Python 3.14+, dropped support for Python 3.9 and 3.10 (for numpy)
  • Replaced poetry with uv
  • Upgraded to pandas v3 and tldm
  • Added windows/macos testing
  • Updated all dependencies
  • Updated all ruff/mypy enforcement
  • Deleted the outdated version.py file
  • Bumped the version to 2.3.0

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.

@axelstudios axelstudios merged commit e629c49 into main Jan 29, 2026
13 checks passed
@axelstudios axelstudios deleted the task/uv-python-3.14 branch January 29, 2026 18:07
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.

1 participant