-
-
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
Draft
johnslavik
wants to merge
18
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.
+1,370
−1,110
Draft
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
5835e69
Fix NameError & reformat everything
johnslavik adb5807
Apply suggestions from code review
johnslavik 8721cf5
Run migration script
johnslavik 5ab0e55
Initial plan
Copilot 91ebbb6
Fix griffelib/griffecli separation and add proper exports
Copilot c9fe781
Fix test imports and paths for new package structure
Copilot a85b87d
Address code review feedback on comments and documentation
Copilot 6b60e22
Add version locking for griffe's dependencies on griffelib and griffecli
Copilot 20e7d97
Use double brackets for version interpolation and re-export griffelib…
Copilot e26db96
Initial plan
Copilot 879be4e
Fix missing pyproject.toml config and CLI program name
Copilot 1c3b869
Fix griffe._internal references to griffelib._internal in docs
Copilot 3baa382
reapply yore fix -b2
pawamoy b301b91
access members from griffe in tests
pawamoy d8b049c
casing and order in pyproject.toml
pawamoy 6948777
Add info about griffelib to installation
johnslavik 783d531
Fix reference docs
johnslavik 57f5078
Add more info on griffelib
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,7 +2,7 @@ | |
| branch = true | ||
| parallel = true | ||
| source = | ||
| src/griffe | ||
| packages/griffe/src/griffe | ||
| tests/ | ||
|
|
||
| [coverage:paths] | ||
|
|
||
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 |
|---|---|---|
|
|
@@ -2,7 +2,7 @@ | |
|
|
||
| ## **Main API** | ||
|
|
||
| ::: griffe.main | ||
| ::: griffecli.main | ||
|
|
||
| ::: griffe.check | ||
|
|
||
|
|
||
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,57 @@ | ||
| [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" | ||
| description = "The Griffe CLI" | ||
| authors = [{name = "Timothée Mazzucotelli", email = "[email protected]"}] | ||
| license = "ISC" | ||
| license-files = ["LICENSE"] | ||
| requires-python = ">=3.10" | ||
| keywords = ["api", "signature", "breaking-changes", "static-analysis", "dynamic-analysis"] | ||
| dynamic = ["version", "dependencies", "optional-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" | ||
|
|
||
| [tool.hatch.version] | ||
| source = "code" | ||
| path = "../../scripts/get_version.py" | ||
| expression = "get_version()" | ||
|
|
||
| [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.metadata.hooks.uv-dynamic-versioning.optional-dependencies] | ||
| # No optional dependencies for the CLI package | ||
|
|
||
| [tool.hatch.build.targets.sdist] | ||
|
|
||
| [tool.hatch.build.targets.wheel] | ||
| sources = ["src/"] |
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. | ||
| """ | ||
|
|
||
| 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", | ||
| ] | ||
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see a mix of cross-ref, some using
griffe.*, some usinggriffecli.*orgriffelib.*, we should make them consistent.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes -- I'd opt for griffe where possible, as in #434 (comment)