Rename package to dcp-tools and align packaging#118
Merged
Conversation
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>
995f3a8 to
650143e
Compare
This was referenced Jun 25, 2026
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.
Closes #115.
What this does
Renames the package from
bblocks-datacommons-toolstodcp-tools, and the import path frombblocks.datacommons_toolstodcp_tools. The old PyPI name keeps working through a small shim distribution inshim/. The shim depends ondcp-toolsand redirects everybblocks.datacommons_tools.*import todcp_tools.*with aDeprecationWarning, 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,
tytype 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 anisinstancebranch.validate_mcf_file_namereturned theMCFFileNameobject instead of its string for non-string input.upload_to_cloud_storage(directory=None)was documented to fall back tosettings.local_pathbut 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, andty checkare clean. 89 tests pass on the upgraded stack. Bothdcp-toolsand the shim build as sdist and wheel. A newtests/test_shim.pyexercises the import redirect and the warning in a subprocess.Follow-ups
Tracked as separate issues.
KGSettingsusesField(alias=...), which changesmodel_dumpoutput keys, and loads JSON viamodel_validate, which bypasses the settings sources. Both change runtime behaviour, so they belong in their own PR.dcp-toolsand the shim to PyPI, and the docs.one.org release.Co-authored-by: Claude noreply@anthropic.com