26 Commits

Author SHA1 Message Date
Liaiss Merzougue
4b4a55fd75 Fix INP001 rules
We need to explicit add __init__.py for src/e3 package

Ref:   it/org/software-supply-chain/production-pipeline/issues#193
2026-01-19 17:57:11 +01:00
Léo Cardao
7d1b6938ec Fix sphinx build error when generating documentation for e3.anod.qualifier
This commit fixes the following errors:
/docs/source/autoapi/anod/qualifier/index.rst:25: ERROR: Unexpected indentation.
/docs/source/autoapi/anod/qualifier/index.rst:26: WARNING: Block quote ends without a blank line; unexpected unindent.
/docs/source/autoapi/anod/qualifier/index.rst:29: ERROR: Unexpected indentation.
/docs/source/autoapi/anod/qualifier/index.rst:32: WARNING: Inline strong start-string without end-string.

This error is caused by the Python default documentation of a dictionary.
On Sphinx when no class documentation is provided, the default class
documentation becomes the documentation of the inherited type. Visibly, the
default documentation of the Python `dict` is not correct from the Sphinx
point of view.

This commit also improves some minor parts of the documentation of this
module.
2025-10-28 14:18:56 +01:00
Léo Cardao
b84e65135a Fix documentation build
The issue comes from the astroid version used. Currently, `astroid>=4`
cannot be used to build the documentation.

This commit fix the documentation build on readthedocs by adding
`astroid>=3,<4` to the `docs/requirements.txt`.

The fix for `tox -e docs` will be done in the cookiecutter repository as
the `tox.ini` file is managed by cookiecutter. See: it/cookiecutter-e3!92

it/e3-core#61
2025-10-17 13:45:56 +02:00
Olivier Ramonat
438381a447 Create a pytest plugin to reuse fixtures in other projects
Remove deprecated requirements traceability which is not maintained.
Create e3.pytest to reuse part of the code in conftest.py in other
projects.
Document the new plugin.
2024-03-26 18:07:55 +01:00
Frederic Leger
0133ca57ca Added SLSA provenance package.
This provenance package is the implementation of the SLSA provenance
specifications at https://slsa.dev/spec/v1.0/provenance

For now, at least two enhancements are possible:

- Some parameters are TypeURI or ResourceURI, but the specification
  says they are strings. Setting those attributes as `str` and having
  a check that they fit with TypeURI or ResourceURI classes could be
  better.

Documentation fixes
-------------------
Removed some warning about autoapi documentation, and some about
possible classes mixes.

Still the warning about PIPE import in TYPE_CHECKING could not be resolved.

Review changes
--------------
- Removed DigestSet and DigestAlgorithm enum. A digest set is considered
  a dictionary of str: str. The ResourceDescriptor's digest may be set,
  or new digest added by the add_digest() method.
- The dir_hash() method has been moved to ResourceDescriptor ... maybe not
  the best place though.
- Fixed a minor typo in the dsse package documentation
- Added `as_dict()`, `as_json()`, `load_dict()` and `load_json()` for all
  the objects.
- Added a provenance file example in the tests, and load it.
2023-10-31 17:52:53 +01:00
Léo Cardao
a32777a6c0 Fix doc build failure
Last time, the doc build failed because rtd was not fully supported by
Sphinx7. (See: https://github.com/readthedocs/sphinx_rtd_theme/issues/1463)

This problem has now been corrected, so we want to use the latest
rtd-compatible version of Sphinx.

Also fix the requirements version used in order to avoid future build
failure.
2023-10-04 16:00:28 +02:00
Léo Cardao
83ab6664fb Add .readthedocs.yaml (V2) configuration file
We do not support the latest versions of sphinx (at least sphinx v7.2.5).

Currently, we have forced readthedoc to use the latest version of sphinx
known to work with e3-core: v5.3.0.
2023-09-04 17:24:34 +02:00
Kévin Le Gouguec
c0205cc2bc Fix typo in quickstart guide 2022-02-17 07:00:47 +04:00
Olivier Ramonat
bfac6a9029 Rely on pep585 for Dict types 2021-02-03 20:39:19 +01:00
Olivier Ramonat
a11efb7945 Update flake8 (minor update)
Adding pygments dependency to check docstrings
2020-11-05 08:43:20 +01:00
Olivier Ramonat
7119b945ef Get rid of unused is_virtual discriminant
The mechanism used to detect whether a machine was virtual or not was
not reliable enough.

TN: T421-011
2020-06-23 15:16:22 +02:00
Olivier Ramonat
78cdba3c8c Removing encoding declaration
utf-8 is the default with python3
2020-04-03 18:14:38 +02:00
Olivier Ramonat
7725e619ed Remove unneeded u"" prefix for unicode string 2020-04-03 16:09:12 +02:00
Olivier Ramonat
6eac1d5421 Fix minor style error detected by flake8
TN: T330-016
2020-03-30 12:20:09 +02:00
Olivier Ramonat
2d9240d246 Ignore mypy type checking on non critical suport files
TN: T330-016
2020-03-30 12:19:52 +02:00
Olivier Ramonat
eeaec3dc2d Add type annotations compatible with mypy 2020-03-26 09:43:23 +01:00
Olivier Ramonat
443438e935 Fix doc autoapi_dirs after moving sources under src/ 2020-03-25 20:48:34 +01:00
Olivier Ramonat
b7f824e517 Convert code to Python3 using 2to3 and black
Code converted using:
   $ 2to3-3.7 -w --no-diffs -j8 --nobackups e3/ tests docs/*.py
   $ black e3 setup.py tests docs/*.py
   $ sed -i -e '/2to3/d' setup.py

TN: T113-010
2020-03-12 12:41:42 +01:00
Nicolas Roche
1cbaee2c09 Review usage of yaml.load and yaml.dump
Whenever possible use safe_load and safe_dump
2020-01-28 10:10:11 +01:00
Olivier Ramonat
cf498cd054 Bump to version 21.0
TN: T112-003
2020-01-12 18:21:09 +01:00
Olivier Ramonat
dc0344a84e Add traceability between tests and requirements 2017-07-17 14:33:29 +02:00
Olivier Ramonat
90c24b8f37 Showcase several e3-core modules 2017-05-21 23:01:51 +02:00
Olivier Ramonat
64fbb7f1fb Generate automatically the e3 api doc
Use sphinx-autoapi to generate the api documentation and retrieve
initial doc from the GitHub wiki.

Add a tox command to build the doc:

   tox -e docs
2017-05-21 22:11:21 +02:00
Olivier Ramonat
3685f04db6 Documentation has been moved to the GitHub wiki 2017-01-20 12:07:42 +01:00
Olivier Ramonat
7729b8acf8 There is no static sources in docs/_static
Avoid error 'docs/_static does not exist'.

Change-Id: Ifb2bef6c995d853a07186d731344224adc844126
2016-01-20 11:59:25 +01:00