Skip to content

Commit b2196d3

Browse files
committed
Run migration script
1 parent 09b0682 commit b2196d3

84 files changed

Lines changed: 672 additions & 657 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

config/coverage.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
branch = true
33
parallel = true
44
source =
5-
src/griffe
5+
packages/griffe/src/griffe
66
tests/
77

88
[coverage:paths]

config/ruff.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,24 +38,24 @@ ignore = [
3838
logger-objects = ["griffe.logger"]
3939

4040
[lint.per-file-ignores]
41-
"src/griffe/__main__.py" = [
41+
"packages/griffe/src/griffe/__main__.py" = [
4242
"D100", # Missing module docstring
4343
]
44-
"src/griffe/_internal/cli.py" = [
44+
"packages/griffe/src/griffe/_internal/cli.py" = [
4545
"T201", # Print statement
4646
]
47-
"src/griffe/_internal/git.py" = [
47+
"packages/griffe/src/griffe/_internal/git.py" = [
4848
"S603", # `subprocess` call: check for execution of untrusted input
4949
"S607", # Starting a process with a partial executable path
5050
]
51-
"src/griffe/_internal/agents/nodes/*.py" = [
51+
"packages/griffe/src/griffe/_internal/agents/nodes/*.py" = [
5252
"ARG001", # Unused function argument
5353
"N812", # Lowercase `keyword` imported as non-lowercase `NodeKeyword`
5454
]
55-
"src/griffe/_internal/debug.py" = [
55+
"packages/griffe/src/griffe/_internal/debug.py" = [
5656
"T201", # Print statement
5757
]
58-
"src/griffe/_internal/**.py" = [
58+
"packages/griffe/src/griffe/_internal/**.py" = [
5959
"D100", # Missing docstring in public module
6060
]
6161
"scripts/*.py" = [

docs/guide/contributors/architecture.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ descriptions = {
2222
"scripts": "Our different scripts. See [Scripts, configuration](#scripts-configuration).",
2323
"site": "Documentation site, built with `make run mkdocs build` (git-ignored).",
2424
"src": "The source of our Python package(s). See [Sources](#sources) and [Program structure](#program-structure).",
25-
"src/griffe": "Our public API, exposed to users. See [Program structure](#program-structure).",
26-
"src/griffe/_internal": "Our internal API, hidden from users. See [Program structure](#program-structure).",
25+
"packages/griffe/src/griffe": "Our public API, exposed to users. See [Program structure](#program-structure).",
26+
"packages/griffe/src/griffe/_internal": "Our internal API, hidden from users. See [Program structure](#program-structure).",
2727
"tests": "Our test suite. See [Tests](#tests).",
2828
".copier-answers.yml": "The answers file generated by [Copier](https://copier.readthedocs.io/en/stable/). See [Boilerplate](#boilerplate).",
2929
"devdeps.txt": "Our development dependencies specification. See [`make setup`][command-setup] command.",
@@ -108,7 +108,7 @@ The test suite is based on [pytest](https://docs.pytest.org/en/8.2.x/). Test mod
108108

109109
## Program structure
110110

111-
The internal API is contained within the `src/griffe/_internal` folder. The top-level `griffe/__init__.py` module exposes all the public API, by importing the internal objects from various submodules of `griffe._internal`.
111+
The internal API is contained within the `packages/griffe/src/griffe/_internal` folder. The top-level `griffe/__init__.py` module exposes all the public API, by importing the internal objects from various submodules of `griffe._internal`.
112112

113113
Users then import `griffe` directly, or import objects from it.
114114

@@ -122,7 +122,7 @@ if os.getenv("DEPLOY") == "true":
122122
from pydeps.target import Target
123123

124124
cli.verbose = cli._not_verbose
125-
options = cli.parse_args(["src/griffe", "--noshow", "--reverse"])
125+
options = cli.parse_args(["packages/griffe/src/griffe", "--noshow", "--reverse"])
126126
colors.START_COLOR = 128
127127
target = Target(options["fname"])
128128
with target.chdir_work():

docs/guide/users/checking.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -713,11 +713,11 @@ When running `griffe check` in CI, you can enable GitHub's annotations thanks to
713713

714714
```console
715715
% python -m griffe check -fgithub -ssrc griffe
716-
::warning file=src/griffe/finder.py,line=58,title=Package.name::Attribute value was changed: `name` -> unset
717-
::warning file=src/griffe/finder.py,line=60,title=Package.path::Attribute value was changed: `path` -> unset
718-
::warning file=src/griffe/finder.py,line=62,title=Package.stubs::Attribute value was changed: `stubs` -> `None`
719-
::warning file=src/griffe/finder.py,line=75,title=NamespacePackage.name::Attribute value was changed: `name` -> unset
720-
::warning file=src/griffe/finder.py,line=77,title=NamespacePackage.path::Attribute value was changed: `path` -> unset
716+
::warning file=packages/griffe/src/griffe/finder.py,line=58,title=Package.name::Attribute value was changed: `name` -> unset
717+
::warning file=packages/griffe/src/griffe/finder.py,line=60,title=Package.path::Attribute value was changed: `path` -> unset
718+
::warning file=packages/griffe/src/griffe/finder.py,line=62,title=Package.stubs::Attribute value was changed: `stubs` -> `None`
719+
::warning file=packages/griffe/src/griffe/finder.py,line=75,title=NamespacePackage.name::Attribute value was changed: `name` -> unset
720+
::warning file=packages/griffe/src/griffe/finder.py,line=77,title=NamespacePackage.path::Attribute value was changed: `path` -> unset
721721
```
722722

723723
## Next steps
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
"""Griffe CLI package. Re-exports griffelib, with CLI-only symbols on top."""
2+
3+
from griffe._internal.cli import DEFAULT_LOG_LEVEL, check, dump, get_parser, main
4+
from griffelib import *
5+
from griffelib import __all__ as __lib_all__
6+
7+
__all__ = [
8+
"DEFAULT_LOG_LEVEL",
9+
"check",
10+
"dump",
11+
"get_parser",
12+
"main",
13+
*__lib_all__,
14+
]

src/griffe/__main__.py renamed to packages/griffe/src/griffe/griffe/__main__.py

File renamed without changes.

src/griffe/_internal/cli.py renamed to packages/griffe/src/griffe/griffe/_internal/cli.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,21 +24,21 @@
2424

2525
import colorama
2626

27-
from griffe._internal import debug
28-
from griffe._internal.diff import find_breaking_changes
29-
from griffe._internal.encoders import JSONEncoder
30-
from griffe._internal.enumerations import ExplanationStyle, Parser
31-
from griffe._internal.exceptions import ExtensionError, GitError
32-
from griffe._internal.extensions.base import load_extensions
33-
from griffe._internal.git import _get_latest_tag, _get_repo_root
34-
from griffe._internal.loader import GriffeLoader, load, load_git, load_pypi
35-
from griffe._internal.logger import logger
27+
from griffelib._internal import debug
28+
from griffelib._internal.diff import find_breaking_changes
29+
from griffelib._internal.encoders import JSONEncoder
30+
from griffelib._internal.enumerations import ExplanationStyle, Parser
31+
from griffelib._internal.exceptions import ExtensionError, GitError
32+
from griffelib._internal.extensions.base import load_extensions
33+
from griffelib._internal.git import _get_latest_tag, _get_repo_root
34+
from griffelib._internal.loader import GriffeLoader, load, load_git, load_pypi
35+
from griffelib._internal.logger import logger
3636

3737
if TYPE_CHECKING:
3838
from collections.abc import Sequence
3939

40-
from griffe._internal.docstrings.parsers import DocstringOptions, DocstringStyle
41-
from griffe._internal.extensions.base import Extension, Extensions
40+
from griffelib._internal.docstrings.parsers import DocstringOptions, DocstringStyle
41+
from griffelib._internal.extensions.base import Extension, Extensions
4242

4343

4444
DEFAULT_LOG_LEVEL = os.getenv("GRIFFE_LOG_LEVEL", "INFO").upper()

src/griffe/_internal/py.typed renamed to packages/griffe/src/griffe/griffe/_internal/py.typed

File renamed without changes.

src/griffe/py.typed renamed to packages/griffe/src/griffe/griffe/py.typed

File renamed without changes.

0 commit comments

Comments
 (0)