-
-
Notifications
You must be signed in to change notification settings - Fork 62
change: Reorganize as griffe and griffelib packages with uv workspaces
#434
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
johnslavik
wants to merge
53
commits into
main
Choose a base branch
from
b/migrate
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+425
−119
Open
Changes from all commits
Commits
Show all changes
53 commits
Select commit
Hold shift + click to select a range
8239fd9
Fix NameError & reformat everything
johnslavik 272cd11
Apply suggestions from code review
johnslavik e951084
Run migration script
johnslavik b2dad08
Initial plan
Copilot 72b1bbd
Fix griffelib/griffecli separation and add proper exports
Copilot 6b829c8
Fix test imports and paths for new package structure
Copilot bb98dca
Address code review feedback on comments and documentation
Copilot 95c310e
Add version locking for griffe's dependencies on griffelib and griffecli
Copilot 538c553
Use double brackets for version interpolation and re-export griffelib…
Copilot 3b28334
Initial plan
Copilot e080e57
Fix missing pyproject.toml config and CLI program name
Copilot b310df2
Fix griffe._internal references to griffelib._internal in docs
Copilot e647fed
reapply yore fix -b2
pawamoy 7be9780
access members from griffe in tests
pawamoy 697e2ea
casing and order in pyproject.toml
pawamoy e2bdab5
Add info about griffelib to installation
johnslavik bfdd1be
Fix reference docs
johnslavik 2b39ee3
Add more info on griffelib
johnslavik 2814aa7
Fix documention build warnings
johnslavik b6bb973
Don't introduce the new `griffelib` namespace
johnslavik c7d2fe9
Fix packaging
johnslavik 8a6b14a
Additional cleanups/fixes
johnslavik 7dd30c3
Fix coverage config
johnslavik e2ea8b8
Remove pointless option in ruff config
johnslavik 0571dda
Remove unnecessary change
johnslavik 77b44fc
Fix cross-ref
johnslavik e0f3490
Fix warning
johnslavik 4886bdb
Fix quality checks
johnslavik ebca858
Fix CLI glue code
johnslavik 38abea4
Fix lint problems
johnslavik 8a1e655
Fix typing problems
johnslavik a02b3ed
Update paths to inventories
johnslavik 4e53073
Use double quoted strings
johnslavik 09d0864
Fix inventory paths again
johnslavik f50fd18
Make API tests generic over packages
johnslavik a4ce6fb
Workaround single locations test
johnslavik c71d034
More descriptive duty names
johnslavik f37ffdc
Fix lint problems
johnslavik 0c5610c
Fix test rewrite
johnslavik 0b1ca26
Remove `public_objects` fixture reference
johnslavik 449ff54
Fix tests to new layout
johnslavik e90f3c1
Fix import
johnslavik 01d4d7c
Improve test structure
johnslavik 8d91988
Workaround pytest moodiness
johnslavik 333a1b6
Fix problems with building
johnslavik b455adf
Fix comment
johnslavik e44a595
Update the documentation
johnslavik ce2c62e
Apply suggestions from code review
johnslavik 87ce03f
Apply suggestions from code review
johnslavik b550102
Update example comment in Griffe finder
johnslavik 6f3b755
Keep original descriptions
johnslavik b3cf2f3
Revert one suggestion
johnslavik 524f534
Add `"griffe"` to version debug check candidates
johnslavik File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| [build-system] | ||
| # pdm-backend is left here as a dependency of the version discovery script currently in use. | ||
| # It may be removed in the future. See mkdocstrings/griffe#430 | ||
| requires = ["hatchling", "pdm-backend", "uv-dynamic-versioning>=0.7.0"] | ||
| build-backend = "hatchling.build" | ||
|
|
||
| [project] | ||
| name = "griffecli" | ||
pawamoy marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| description = "Signatures for entire Python programs. Extract the structure, the frame, the skeleton of your project, to generate API documentation or find breaking changes in your API." | ||
| authors = [{name = "Timothée Mazzucotelli", email = "dev@pawamoy.fr"}] | ||
| license = "ISC" | ||
| license-files = ["LICENSE"] | ||
| requires-python = ">=3.10" | ||
| keywords = ["api", "signature", "breaking-changes", "static-analysis", "dynamic-analysis"] | ||
| dynamic = ["version", "dependencies"] | ||
| classifiers = [ | ||
| "Development Status :: 5 - Production/Stable", | ||
| "Intended Audience :: Developers", | ||
| "Programming Language :: Python", | ||
| "Programming Language :: Python :: 3", | ||
| "Programming Language :: Python :: 3 :: Only", | ||
| # YORE: EOL 3.10: Remove line. | ||
| "Programming Language :: Python :: 3.10", | ||
| # YORE: EOL 3.11: Remove line. | ||
| "Programming Language :: Python :: 3.11", | ||
| # YORE: EOL 3.12: Remove line. | ||
| "Programming Language :: Python :: 3.12", | ||
| # YORE: EOL 3.13: Remove line. | ||
| "Programming Language :: Python :: 3.13", | ||
| # YORE: EOL 3.14: Remove line. | ||
| "Programming Language :: Python :: 3.14", | ||
| "Topic :: Documentation", | ||
| "Topic :: Software Development", | ||
| "Topic :: Software Development :: Documentation", | ||
| "Topic :: Utilities", | ||
| "Typing :: Typed", | ||
| ] | ||
|
|
||
| [project.scripts] | ||
| griffecli = "griffecli:main" | ||
pawamoy marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| [tool.hatch.version] | ||
| source = "code" | ||
| path = "../../scripts/get_version.py" | ||
| expression = "get_version()" | ||
|
|
||
| [tool.hatch.build.targets.sdist.force-include] | ||
| "../../CHANGELOG.md" = "CHANGELOG.md" | ||
| "../../LICENSE" = "LICENSE" | ||
| "../../README.md" = "README.md" | ||
|
|
||
| [tool.hatch.metadata.hooks.uv-dynamic-versioning] | ||
| # Dependencies are dynamically versioned; {{version}} is substituted at build time. | ||
| dependencies = ["griffelib=={{version}}", "colorama>=0.4"] | ||
|
|
||
| [tool.hatch.build.targets.wheel] | ||
| packages = ["src/griffecli"] | ||
|
|
||
| [tool.uv.sources] | ||
| griffelib = { workspace = true } | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| # This top-level module imports all public names from the CLI package, | ||
| # and exposes them as public objects. | ||
|
|
||
| """Griffe CLI package. | ||
| The CLI (Command Line Interface) for the griffe library. | ||
| This package provides command-line tools for interacting with griffe. | ||
| ## CLI entrypoints | ||
| - [`griffecli.main`][]: Run the main program. | ||
| - [`griffecli.check`][]: Check for API breaking changes in two versions of the same package. | ||
| - [`griffecli.dump`][]: Load packages data and dump it as JSON. | ||
| - [`griffecli.get_parser`][]: Get the argument parser for the CLI. | ||
johnslavik marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| """ | ||
|
|
||
| from __future__ import annotations | ||
|
|
||
| from griffecli._internal.cli import DEFAULT_LOG_LEVEL, check, dump, get_parser, main | ||
|
|
||
| __all__ = [ | ||
| "DEFAULT_LOG_LEVEL", | ||
| "check", | ||
| "dump", | ||
| "get_parser", | ||
| "main", | ||
| ] | ||
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| # Internal modules for the griffecli package. |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.