File tree Expand file tree Collapse file tree 1 file changed +17
-4
lines changed
Expand file tree Collapse file tree 1 file changed +17
-4
lines changed Original file line number Diff line number Diff line change 171171 [tool.setuptools.dynamic]
172172 version = {attr = "dataprep.VERSION"}
173173
174+ If you would like to make this version available in your package, you can
175+ use the following code:
176+
177+ .. code-block :: python
178+ :caption: src/ dataprep/ __init__ .py
179+
180+ import importlib.metadata
181+
182+ try :
183+ __version__ = importlib.metadata.version(__name__ )
184+ except importlib.metadata.PackageNotFoundError:
185+ __version__ = " 0.1.dev0" # Fallback for development mode
186+
174187 .. tip ::
175188 If the version is in several text files, the use of `Bump My Version
176189 <https://github.com/callowayproject/bump-my-version> `_ may be
@@ -282,17 +295,17 @@ Dependency groups
282295
283296.. literalinclude :: dataprep/pyproject.toml
284297 :language: toml
285- :lines: 24-34
286- :lineno-start: 34
298+ :lines: 26-36
299+ :lineno-start: 26
287300
288301Recursive dependency groups are also possible. For example, for ``dev `` you can
289302take over all dependencies from ``docs `` and ``test `` in addition to
290303``pre-commit ``:
291304
292305.. literalinclude :: dataprep/pyproject.toml
293306 :language: toml
294- :lines: 35-39
295- :lineno-start: 35
307+ :lines: 37-41
308+ :lineno-start: 37
296309
297310You can install these dependency groups, for example with:
298311
You can’t perform that action at this time.
0 commit comments