You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
π€ Fix documentation typos in manifest reference
π€ Fix inconsistent field naming: use 'index' instead of 'registry'
π€ Add comprehensive documentation for the 'flist' field
Added detailed documentation for the previously undocumented 'flist' field in the
[package] section of the manifest format reference:
- Added 'flist' to the field list in the overview
π€ Add validation to reject empty package names
Added field validator to Package class to reject empty and whitespace-only
package names. This improves validation and prevents invalid manifests.
π€ Clarify that the 'description' field is optional
π€ Fix authors field documentation
Updated the authors field documentation to reflect all accepted formats:
- Single string with optional email
- List of strings
- Dictionary with name and email
π€ Clarify optional dependencies format equivalence
Choose the format that best suits your needs. For multiple authors, the list format is most readable.
75
127
76
128
77
129
.. _readme_field:
@@ -85,6 +137,42 @@ If not specified, it defaults to not including any readme information.
85
137
This field is relative to the location of the manifest file.
86
138
87
139
140
+
.. _flist_field:
141
+
142
+
The ``flist`` field
143
+
^^^^^^^^^^^^^^^^^^^
144
+
145
+
The ``flist`` field points to the relative location of the file list for the package.
146
+
A file list contains the paths to all source files that should be included when this package is used as a dependency in another project.
147
+
148
+
This field is optional.
149
+
If not specified, it defaults to ``<package-name>.f`` in the same directory as the manifest file.
150
+
For example, if the package name is ``my-package``, the default file list would be ``my-package.f``.
151
+
This field is relative to the location of the manifest file.
152
+
153
+
Example TOML with explicit file list:
154
+
155
+
.. code-block:: TOML
156
+
157
+
[package]
158
+
name = "my-package"
159
+
version = "1.0.0"
160
+
description = "A sample package"
161
+
flist = "rtl/sources.f"
162
+
163
+
Example TOML using the default file list (``my-package.f``):
164
+
165
+
.. code-block:: TOML
166
+
167
+
[package]
168
+
name = "my-package"
169
+
version = "1.0.0"
170
+
description = "A sample package"
171
+
172
+
When a ``fastsandpm`` compatible package is used as a dependency, the specified file list is automatically included in the dependent project.
173
+
For projects that do not specify an ``flist`` field, FastSandPM will look for a file named ``<package-name>.f`` at the root of the dependency directory.
174
+
175
+
88
176
.. _dependencies_section:
89
177
90
178
The ``[dependencies]`` section
@@ -100,9 +188,9 @@ The dependencies section contains a group of :ref:`dependency specifiers <specif
100
188
These are always brought in to the project.
101
189
Additionally, if these point to projects with a ``fastsandpm`` manifest, their dependencies will also be brought in.
102
190
103
-
Once the dpendencies are resolved a filelist will be created.
104
-
For ``fastsandpm`` compatible projects these will be included by pointing to the ``filelist`` field of the ``[package]`` section.
105
-
Any other project will point to a filelist at the top of the dependency's directory with the same name as the dependency.
191
+
Once the dependencies are resolved a file list will be created.
192
+
For ``fastsandpm`` compatible projects, the file list is automatically included by pointing to the :ref:`flist <flist_field>` field of the ``[package]`` section.
193
+
Any other project will use a file list located at the top of the dependency's directory with the same name as the dependency.
The two formats shown above are completely equivalent. Both create the same dependency group structure.
242
+
Choose the format that is most readable for your use case:
243
+
244
+
- **List format** (``[optional_dependencies]`` with array): Better when copying dependency specifications or when dependencies have complex configurations
245
+
- **Table format** (``[optional_dependencies.group]``): More concise and readable for simple version specifications
246
+
247
+
The following two specifications are identical:
248
+
249
+
.. code-block:: TOML
250
+
251
+
# List format
252
+
[optional_dependencies]
253
+
dev = [
254
+
{name = "pytest", version = "^7.0.0"},
255
+
{name = "mypy", version = "^1.0.0"}
256
+
]
257
+
258
+
.. code-block:: TOML
259
+
260
+
# Table format (recommended for simple cases)
261
+
[optional_dependencies.dev]
262
+
pytest = "^7.0.0"
263
+
mypy = "^1.0.0"
264
+
265
+
Choose whichever format makes your manifest more readable and maintainable for your project's needs.
148
266
149
267
150
268
.. _registries_section:
151
269
152
-
The ``[registeries]`` section
270
+
The ``[registries]`` section
153
271
-----------------------------
154
272
155
-
Additional registeries can be specified in the ``[registries]`` section.
156
-
A regsitry type exists for each :ref:`dependency specifier <specifying_dependencies>` type.
273
+
Additional registries can be specified in the ``[registries]`` section.
274
+
A registry type exists for each :ref:`dependency specifier <specifying_dependencies>` type.
Copy file name to clipboardExpand all lines: docs/source/manifest_reference/specifying_dependencies.rst
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,21 +31,21 @@ For example you can specify a dependency named ``time`` and version ``1.0.0`` as
31
31
time = "1.0.0"
32
32
33
33
The version string is a known as a :ref:`version specifier <version_specifier>`.
34
-
These specifiers can be used to set a range of valid versions used for resolving dpendencies.
34
+
These specifiers can be used to set a range of valid versions used for resolving dependencies.
35
35
36
36
37
37
Dependencies from Other Registries
38
38
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
39
39
40
40
It is also possible to point to a different index using the ``index`` key in the dependency.
41
-
For example you can specify a dependency named ``time`` and version ``1.0.0`` as follows:
41
+
For example you can specify a dependency named ``time`` and version ``1.0.0`` from a custom registry as follows:
42
42
43
43
.. code-block:: TOML
44
44
45
45
[dependencies]
46
-
time = {registry = "my-registry", version = "1.0.0"}
46
+
time = {index = "my-registry", version = "1.0.0"}
47
47
48
-
The value of ``registry`` points to a regsiter definition from the ``[registries]`` section. of the manifest.
48
+
The value of ``index`` points to a registry definition from the ``[registries]`` section of the manifest.
49
49
See the :ref:`registries section documentation <registries_section>` for more information.
50
50
51
51
@@ -77,7 +77,7 @@ By default the upstream default branch will be used.
77
77
.. note::
78
78
79
79
If when the dependencies are updated the existing local copy is dirty an error will be raised.
80
-
A user of the library can force the update by setting the ``force_update`` flag to ``true`` or ignore the error by settign ``ignore_dirty`` to ``true``.
80
+
A user of the library can force the update by setting the ``force_update`` flag to ``true`` or ignore the error by setting ``ignore_dirty`` to ``true``.
0 commit comments