Skip to content

Rename package to dcp-tools and align packaging#118

Merged
jm-rivera merged 1 commit into
mainfrom
feat/rename-to-dcp-tools
Jun 25, 2026
Merged

Rename package to dcp-tools and align packaging#118
jm-rivera merged 1 commit into
mainfrom
feat/rename-to-dcp-tools

Conversation

@jm-rivera

@jm-rivera jm-rivera commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

Closes #115.

What this does

Renames the package from bblocks-datacommons-tools to dcp-tools, and the import path from bblocks.datacommons_tools to dcp_tools. The old PyPI name keeps working through a small shim distribution in shim/. The shim depends on dcp-tools and redirects every bblocks.datacommons_tools.* import to dcp_tools.* with a DeprecationWarning, so existing users are not broken on upgrade.

It also aligns packaging with the bblocks-projects copier template (v1.0.2): a full ruff lint preset, ty type checking, pre-commit hooks, coverage config, and a trusted-publishing release workflow. The Python floor moves to 3.13 and every dependency is bumped to its latest release (pandas 3.0, pydantic 2.13, pytest 9, ruff 0.15.19).

All 204 ruff and 72 ty warnings are cleared. Three were real bugs, not style.

  • CustomDataManager.__init__ never loaded a list of MCF files, because the load loop sat inside an isinstance branch.
  • validate_mcf_file_name returned the MCFFileName object instead of its string for non-string input.
  • upload_to_cloud_storage(directory=None) was documented to fall back to settings.local_path but never did, and crashed.

The "part of the bblocks projects" wording is gone from the description and docs, and codecov is removed.

Testing

ruff check, ruff format --check, and ty check are clean. 89 tests pass on the upgraded stack. Both dcp-tools and the shim build as sdist and wheel. A new tests/test_shim.py exercises the import redirect and the warning in a subprocess.

Follow-ups

Tracked as separate issues.

  • Two pre-existing pydantic-settings issues flagged in review. KGSettings uses Field(alias=...), which changes model_dump output keys, and loads JSON via model_validate, which bypasses the settings sources. Both change runtime behaviour, so they belong in their own PR.
  • Publishing dcp-tools and the shim to PyPI, and the docs.one.org release.

Co-authored-by: Claude noreply@anthropic.com

Renames the distribution from bblocks-datacommons-tools to dcp-tools and
the import path from bblocks.datacommons_tools to dcp_tools. A separate
shim distribution keeps the old name installable and importable, and warns
on use before redirecting to dcp_tools.

Aligns packaging with the bblocks-projects template: ruff, ty, pre-commit,
coverage config, and a trusted-publishing release workflow. Moves the
Python floor to 3.13 and bumps every dependency to its latest release
(pandas 3, pydantic 2.13, pytest 9). Clears all ruff and ty warnings, three
of which were real bugs: the mcf_files list path in CustomDataManager,
validate_mcf_file_name's return value, and the unwired directory default in
upload_to_cloud_storage.

BREAKING CHANGE: import dcp_tools instead of bblocks.datacommons_tools.

Co-authored-by: Claude <noreply@anthropic.com>
@jm-rivera jm-rivera force-pushed the feat/rename-to-dcp-tools branch from 995f3a8 to 650143e Compare June 25, 2026 11:00
@jm-rivera jm-rivera requested a review from tillywoodfield June 25, 2026 11:00
@jm-rivera jm-rivera marked this pull request as ready for review June 25, 2026 11:02
@jm-rivera jm-rivera changed the title feat!: rename package to dcp-tools and align packaging Rename package to dcp-tools and align packaging Jun 25, 2026
@jm-rivera jm-rivera removed the request for review from tillywoodfield June 25, 2026 11:14
@jm-rivera jm-rivera merged commit 022cd06 into main Jun 25, 2026
3 checks passed
@jm-rivera jm-rivera deleted the feat/rename-to-dcp-tools branch June 25, 2026 11:14
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.

Update packaging approach

1 participant