Commit graph

471 commits

Author SHA1 Message Date
Pedro Algarvio
cea048be5f Update docs related requirements
Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
2023-02-04 14:11:36 +00:00
Daniel A. Wozniak
682777e1d1 Add tools docs 2023-01-27 07:35:00 -07:00
Megan Wilhite
4b209e3ee3 Update latest_version in doc/conf.py to include .0 2022-12-09 07:19:53 -07:00
Pedro Algarvio
2f6844f621 A few additional replacements for `SaltStack, Inc` 2022-04-06 15:35:31 -04:00
Benjamin Drung
f2201bb260 docs: Support building documentation locally
Building the documentation locally without Internet access will fail,
because sphinx will try to download the intersphinx inventory from
http://docs.python.org/3/objects.inv.

Support building the documentation locally without Internet access by
searching for locally installed intersphinx inventory first.

Bug-Debian: https://bugs.debian.org/755026
Signed-off-by: Benjamin Drung <benjamin.drung@ionos.com>
2021-12-13 14:49:33 -05:00
Gareth J. Greenaway
4b2bce83b8 Deprecating and removing salt-unity. 2021-12-07 16:15:56 -05:00
ScriptAutomate
c7a1d471f9 Setting up CSE search values through 3006 2021-08-30 14:22:51 -04:00
Bryce Larson
73cc8d6120 change repo.saltstack.com to repo.saltproject.io 2021-08-16 14:20:43 -04:00
ScriptAutomate
3f53193a9a Update Slack links 2021-04-29 10:58:05 -07:00
ScriptAutomate
b4dd6c8a26 Remove conditional or from latest release var 2021-03-19 06:30:57 -04:00
ScriptAutomate
6e503e9b7c Add back version var used by Sphinx 2021-03-19 06:30:57 -04:00
Pedro Algarvio
44ca6f6e69 Use the checkout major version as the latest release 2021-03-19 06:30:57 -04:00
ScriptAutomate
2ebb741ae8 Updating default fallback for latest_release 2021-03-19 06:30:57 -04:00
Pedro Algarvio
b7de268ee6 Remove old/dead/unnecessary code 2021-02-26 11:30:23 -05:00
Pedro Algarvio
75c29e7d51 Use .format() instead 2021-02-24 11:04:06 -05:00
Bryce Larson
db97de58e9 convert images when needed 2021-02-08 06:09:08 -05:00
Bryce Larson
3e65e080ad add newer versions of google custom search engines 2020-09-10 08:55:31 -07:00
ScriptAutomate
9547e54ece Auto-changes made to conf.py by pre-commit 2020-09-04 15:23:53 -07:00
ScriptAutomate
0ef1c50a3f Removing Python 2 references on latest minion 2020-09-04 15:23:53 -07:00
Bryce Larson
4c374a8ff3 don't overwrite rst files with autodoc 2020-06-06 21:00:50 -07:00
Pedro Algarvio
fe075aaace Distro is now a hard dependency
Refs #55310
Refs #55835
2020-05-11 19:06:03 -07:00
Derek Ardolf
5a73ef699f
Various Link Redirect and HTTP/HTTPS Fixes in docs (#56655)
* Fixing various redirected links

* Change links to https

* Reintroduced macro link reference

* Change man page to original at master; revert added line
2020-05-04 01:28:38 -07:00
Daniel Wozniak
bd47db7026
Merge pull request #55963 from bdrung/master-fix-doc-import-kubernetesmod
Mock kubernetes when building the documentation
2020-04-22 12:08:20 -07:00
Bryce Larson
bba8405c6b
update sphinx to 3.0.1 2020-04-17 16:49:14 -06:00
Benjamin Drung
afc209f794 Mock kubernetes when building the documentation
Importing kubernetesmod fails, when building the documentation:

```
doc/ref/modules/all/index.rst:20: WARNING: failed to import kubernetesmod
doc/ref/modules/all/index.rst:20: WARNING: toctree references unknown document 'ref/modules/all/kubernetesmod'
WARNING: autodoc: failed to import module 'kubernetesmod' from module
'salt.modules'; the following exception was raised:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/sphinx/ext/autodoc/importer.py", line 154, in import_module
    __import__(modname)
  File "salt/modules/kubernetesmod.py", line 71, in <module>
    import kubernetes  # pylint: disable=import-self
  File "/usr/lib/python3/dist-packages/kubernetes/__init__.py", line 20, in <module>
    import kubernetes.config
  File "/usr/lib/python3/dist-packages/kubernetes/config/__init__.py", line 17, in <module>
    from .kube_config import (list_kube_config_contexts, load_kube_config,
  File "/usr/lib/python3/dist-packages/kubernetes/config/kube_config.py", line 27, in <module>
    from requests_oauthlib import OAuth2Session
  File "/usr/lib/python3/dist-packages/requests_oauthlib/__init__.py", line 11, in <module>
    if requests.__version__ < '2.0.0':
TypeError: '<' not supported between instances of 'module' and 'str'
```

Therefore also mock `kubernetes` and `kubernetes.config`.

Signed-off-by: Benjamin Drung <benjamin.drung@cloud.ionos.com>
2020-04-14 15:58:20 +02:00
Blacken Salt
0b2a5613b3
Blacken salt 2020-04-03 13:05:41 -05:00
Bryce Larson
789dc10a94
set release versions with environment variables in the docs 2020-01-17 11:01:34 -07:00
Frode Gundersen
406af6c46b
Update release version 2020-01-14 19:39:34 +00:00
Bryce Larson
1f9bc58950
update docs to build off master instead of develop 2019-10-28 14:02:02 -06:00
Pedro Algarvio
14bde12b9d
Fill in the configurable branch at build time 2019-10-25 18:28:53 +01:00
Pedro Algarvio
9bf2d0d524
f1 2019-10-24 16:58:12 +01:00
Pedro Algarvio
adef6a4a17
Have the repo primary branch configurable for docs 2019-10-24 16:56:06 +01:00
Frode
8359af4b13
Update release versions for the master branch 2019-10-23 17:26:58 +00:00
Bryce Larson
e9a2a700bc
update version numbers to be correct 2019-10-04 17:09:03 -06:00
Gareth J. Greenaway
94a1e3bf25
Porting PR #52752 to 2019.2.1 2019-10-04 16:10:35 -06:00
Dmitry Kuzmenko
7f26e764fc
Revert "Update doc conf with the new import tornado.queues"
This reverts commit 684bf584f6.
2019-04-17 02:00:22 +03:00
Ch3LL
63962b547a
Merge branch '2018.3' into '2019.2'
Conflicts:
  - salt/states/linux_acl.py
  - salt/transport/ipc.py
2019-03-28 11:10:45 -04:00
Dmitry Kuzmenko
684bf584f6
Update doc conf with the new import tornado.queues 2019-03-20 21:04:49 +03:00
Ch3LL
f28cc9bff1
[2019.2] change build_type and release in doc/conf.py 2019-02-22 15:26:16 -05:00
Ch3LL
904beb3548
[2018.3] change build_type and release in doc/conf.py 2019-02-22 15:18:33 -05:00
Ch3LL
4c670e2e62
Update release versions for the 2019.2 branch 2019-02-22 15:02:48 -05:00
Ch3LL
3efcea50f1
Update release versions for the 2018.3 branch 2019-02-22 15:01:24 -05:00
Gareth J. Greenaway
490a39dda5
Adding missing line back into doc/conf.py 2018-12-21 08:29:30 -08:00
Gareth J. Greenaway
9c04986641
Merge branch '2018.3' into merge-fluorine
Conflicts:
	doc/conf.py
	doc/topics/development/dunder_dictionaries.rst
	salt/client/ssh/ssh_py_shim.py
	salt/grains/core.py
	salt/modules/mysql.py
	salt/modules/state.py
2018-12-20 17:20:42 -08:00
Benjamin Drung
ecdb452e8a doc: Indroduce MOCK_MODULES_MAPPING
Some mocks needs some attributes defined (instead of having them returning a
mock object). Introduce a MOCK_MODULES_MAPPING mapping that defines these
attributes. This gets rid of a special handling for psutil.

Signed-off-by: Benjamin Drung <benjamin.drung@cloud.ionos.com>
2018-12-19 13:55:37 +01:00
Benjamin Drung
cf648246ea doc: Move mock_decorator_with_params up
Refactor conf.py and move mock_decorator_with_params for the following commit.

Signed-off-by: Benjamin Drung <benjamin.drung@cloud.ionos.com>
2018-12-19 13:55:37 +01:00
Benjamin Drung
08ef6694ea doc: Address pylint issues in conf.py
pylint finds issues in doc/conf.py:

```
pylint3 conf.py
************* Module conf
conf.py:226:0: C0330: Wrong hanging indentation (remove 4 spaces).
        os.pardir,  # salt itself (for autodoc)
    |   ^ (bad-continuation)
conf.py:227:0: C0330: Wrong hanging indentation (remove 4 spaces).
        '_ext',  # custom Sphinx extensions
    |   ^ (bad-continuation)
conf.py:374:0: C0301: Line too long (106/100) (line-too-long)
conf.py:442:0: C0330: Wrong hanging indentation (add 2 spaces).
  ('contents', 'Salt.tex', 'Salt Documentation', 'SaltStack, Inc.', 'manual'),
  ^ | (bad-continuation)
conf.py:485:0: C0301: Line too long (107/100) (line-too-long)
conf.py:27:0: W0613: Unused argument 'args' (unused-argument)
conf.py:27:0: W0613: Unused argument 'kwargs' (unused-argument)
conf.py:58:4: R0201: Method could be a function (no-self-use)
conf.py:198:8: R1705: Unnecessary "else" after "return" (no-else-return)
conf.py:197:0: W0613: Unused argument 'iargs' (unused-argument)
conf.py:197:0: W0613: Unused argument 'ikwargs' (unused-argument)
conf.py:187:0: W0613: Unused argument 'oargs' (unused-argument)
conf.py:187:0: W0613: Unused argument 'okwargs' (unused-argument)
conf.py:533:0: R0913: Too many arguments (6/5) (too-many-arguments)
conf.py:533:25: W0613: Unused argument 'app' (unused-argument)
conf.py:533:30: W0613: Unused argument 'what' (unused-argument)
conf.py:533:47: W0613: Unused argument 'skip' (unused-argument)
conf.py:533:53: W0613: Unused argument 'options' (unused-argument)
conf.py:542:7: W0621: Redefining name 'path' from outer scope (line 230) (redefined-outer-name)
conf.py:6:0: W0611: Unused import functools (unused-import)
conf.py:310:4: W0611: Unused import sphinxcontrib.spelling (unused-import)
```

Address those or silince pylint for wanted behavior.

Signed-off-by: Benjamin Drung <benjamin.drung@cloud.ionos.com>
2018-12-19 13:55:35 +01:00
Benjamin Drung
67a3e371a6 doc: Mark preamble variable as raw string
Importing `doc/conf.py` fails with Python 3.7:

```
>>> from conf import Mock
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "doc/conf.py", line 454
    ''',
SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 5-6: truncated \uXXXX escape
```

Therefore mark the string as raw due to the backslashes.

Signed-off-by: Benjamin Drung <benjamin.drung@cloud.ionos.com>
2018-12-19 13:55:03 +01:00
Benjamin Drung
b973e7aae1 doc: Fix iterating over the Mock object in Python 3
Building the documentation for salt.modules.snapper fails with Python 3:

```
$ make -C doc html
[...]
WARNING: [autosummary] failed to import 'salt.modules.snapper': no module named salt.modules.snapper
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 109 source files that are out of date
updating environment: [config changed] 1608 added, 17 changed, 0 removed
reading sources... [100%] topics/yaml/index
doc/ref/modules/all/index.rst:20: WARNING: failed to import snapper
doc/ref/modules/all/index.rst:20: WARNING: toctree references unknown document 'ref/modules/all/snapper'
WARNING: autodoc: failed to import module 'salt.modules.snapper'; the following exception was raised:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/sphinx/ext/autodoc/importer.py", line 152, in import_module
    __import__(modname)
  File "salt/modules/snapper.py", line 72, in <module>
    if SNAPPER_DBUS_OBJECT in bus.list_activatable_names():
TypeError: argument of type 'Mock' is not iterable
```

Fix the Mock object to be iterable (as it was intended to).

Signed-off-by: Benjamin Drung <benjamin.drung@cloud.ionos.com>
2018-12-19 13:54:39 +01:00
Benjamin Drung
bb2994898c doc: Do not mock non-existing __mro_entries__ attribute
Building the documentation with the Python 3.7 version of sphinx fails:

```
$ make -C doc html SPHINXBUILD="python3.7 /usr/bin/sphinx-build"
[...]
WARNING: autodoc: failed to import module 'salt.states.pkg'; the following exception was raised:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/sphinx/ext/autodoc/importer.py", line 152, in import_module
    __import__(modname)
  File "salt/states/pkg.py", line 84, in <module>
    import salt.utils.pkg
  File "salt/utils/pkg/__init__.py", line 13, in <module>
    import salt.utils.data
  File "salt/utils/data.py", line 23, in <module>
    import salt.utils.yaml
  File "salt/utils/yaml.py", line 9, in <module>
    from salt.utils.yamldumper import *
  File "salt/utils/yamldumper.py", line 34, in <module>
    class IndentMixin(Dumper):
TypeError: __mro_entries__ must return a tuple
```

Instead of returning a Mock object for the `__mro_entries__` attribute, raise
an AttributeError instead.

Signed-off-by: Benjamin Drung <benjamin.drung@cloud.ionos.com>
2018-12-19 13:28:04 +01:00