Skip to content

Commit cc4c9c5

Browse files
committed
Run migration script
1 parent 83a46be commit cc4c9c5

File tree

110 files changed

+1919
-1808
lines changed

Some content is hidden

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

110 files changed

+1919
-1808
lines changed

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: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,27 +35,27 @@ ignore = [
3535
"TRY003", # Avoid specifying long messages outside the exception class
3636
]
3737

38-
logger-objects = ["griffe.logger"]
38+
logger-objects = ["griffelib.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/extensions/built-in/dataclasses.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ Additional metadata like `ClassVar`, the `init` and `kw_only` parameters, or the
2929

3030
=== "CLI"
3131
```console
32-
$ griffe dump -e dataclasses,other my_package
32+
$ griffecli dump -e dataclasses,other my_package
3333
```
3434

3535
=== "Python"
3636
```python
3737
import griffe
3838

39-
my_package = griffe.load("my_package", extensions=griffe.load_extensions("dataclasses", "other"))
39+
my_package = griffelib.load("my_package", extensions=griffelib.load_extensions("dataclasses", "other"))
4040
```
4141

4242
=== "mkdocstrings"

docs/extensions/built-in/unpack-typeddict.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,14 @@ To enable the extension:
6565

6666
=== "CLI"
6767
```console
68-
$ griffe dump -e unpack_typeddict my_package
68+
$ griffecli dump -e unpack_typeddict my_package
6969
```
7070

7171
=== "Python"
7272
```python
7373
import griffe
7474

75-
my_package = griffe.load("my_package", extensions=griffe.load_extensions("unpack_typeddict"))
75+
my_package = griffelib.load("my_package", extensions=griffelib.load_extensions("unpack_typeddict"))
7676
```
7777

7878
=== "mkdocstrings"

docs/extensions/official/runtime-objects.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ This extension stores runtime objects corresponding to each loaded Griffe object
1111

1212
```pycon
1313
>>> import griffe
14-
>>> griffe_data = griffe.load("griffe", extensions=griffe.load_extensions("griffe_runtime_objects"), resolve_aliases=True)
14+
>>> griffe_data = griffelib.load("griffe", extensions=griffelib.load_extensions("griffe_runtime_objects"), resolve_aliases=True)
1515
>>> griffe_data["parse"].extra
1616
defaultdict(<class 'dict'>, {'runtime-objects': {'object': <function parse at 0x78685c951260>}})
1717
>>> griffe_data["Module"].extra
18-
defaultdict(<class 'dict'>, {'runtime-objects': {'object': <class 'griffe._internal.models.Module'>}})
18+
defaultdict(<class 'dict'>, {'runtime-objects': {'object': <class 'griffelib._internal.models.Module'>}})
1919
```
2020

2121
It can be useful in combination with mkdocstrings-python and custom templates, to iterate over object values or their attributes that couldn't be loaded by Griffe itself (for example, objects built dynamically and loaded as attributes won't have "members" to iterate over).

docs/extensions/official/warnings-deprecated.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
---
99

10-
This extension adds support for functions and classes decorated with [`@warnings.deprecated(...)`][warnings.deprecated], as implemented thanks to [PEP 702](https://peps.python.org/pep-0702/). The message provided in the decorator call will be stored in the corresponding Griffe object's [`deprecated`][griffe.Object.deprecated] attribute (usable by downstream rendering templates), and will also add an admonition to the object's docstring with the provided message as text.
10+
This extension adds support for functions and classes decorated with [`@warnings.deprecated(...)`][warnings.deprecated], as implemented thanks to [PEP 702](https://peps.python.org/pep-0702/). The message provided in the decorator call will be stored in the corresponding Griffe object's [`deprecated`][griffelib.Object.deprecated] attribute (usable by downstream rendering templates), and will also add an admonition to the object's docstring with the provided message as text.
1111

1212
```python
1313
from warnings import deprecated

docs/guide/contributors/architecture.md

Lines changed: 5 additions & 5 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.",
@@ -104,11 +104,11 @@ Sources are located in the `src` folder, following the [src-layout](https://pack
104104

105105
Our test suite is located in the `tests` folder. It is located outside of the sources as to not pollute distributions (it would be very wrong to publish a `tests` package as part of our distributions, since this name is extremely common), or worse, the public API. The `tests` folder is however included in our source distributions (`.tar.gz`), alongside most of our metadata and configuration files. Check out `pyproject.toml` to get the full list of files included in our source distributions.
106106

107-
The test suite is based on [pytest](https://docs.pytest.org/en/8.2.x/). Test modules reflect our internal API structure, and except for a few test modules that test specific aspects of our API, each test module tests the logic from the corresponding module in the internal API. For example, `test_finder.py` tests code of the `griffe._internal.finder` internal module, while `test_functions` tests our ability to extract correct information from function signatures, statically. The general rule of thumb when writing new tests is to mirror the internal API. If a test touches to many aspects of the loading process, it can be added to the `test_loader` test module.
107+
The test suite is based on [pytest](https://docs.pytest.org/en/8.2.x/). Test modules reflect our internal API structure, and except for a few test modules that test specific aspects of our API, each test module tests the logic from the corresponding module in the internal API. For example, `test_finder.py` tests code of the `griffelib._internal.finder` internal module, while `test_functions` tests our ability to extract correct information from function signatures, statically. The general rule of thumb when writing new tests is to mirror the internal API. If a test touches to many aspects of the loading process, it can be added to the `test_loader` test module.
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 `griffelib._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():

0 commit comments

Comments
 (0)