Skip to content

Commit fc38712

Browse files
authored
Update documentation (#15582)
1 parent 2d9d2ff commit fc38712

File tree

36 files changed

+494
-466
lines changed

36 files changed

+494
-466
lines changed

.github/workflows/docs.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
sudo apt-get install -y --no-install-recommends libkrb5-dev
4343
4444
- name: Build documentation
45-
run: ddev docs build -v
45+
run: ddev -v docs build --check
4646

4747
- uses: actions/upload-artifact@v2
4848
with:

.linkcheckerrc

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# https://linkchecker.github.io/linkchecker/man/linkcheckerrc.html
2+
[AnchorCheck]

datadog_checks_base/CHANGELOG.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## Unreleased
44

5+
***Added***:
6+
7+
* Improve documentation of APIs ([#15582](https://github.com/DataDog/integrations-core/pull/15582))
8+
59
***Fixed***:
610

711
* Bump cryptography to 41.0.3 ([#15517](https://github.com/DataDog/integrations-core/pull/15517))
@@ -1974,4 +1978,3 @@
19741978
***Added***:
19751979

19761980
* adds `datadog_checks`
1977-

datadog_checks_base/datadog_checks/base/checks/base.py

+166-79
Large diffs are not rendered by default.

datadog_checks_base/datadog_checks/base/utils/db/transform.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def get_tag_list(transformers, column_name, **modifiers):
6464
Tag name is determined by `column_name`. The column value represents a list of values. It is expected to be either
6565
a list of strings, or a comma-separated string.
6666
67-
For example, if the column is named `server_tag` and the column returned the value `'us,primary'`, then all
67+
For example, if the column is named `server_tag` and the column returned the value `us,primary`, then all
6868
submissions for that row will be tagged by `server_tag:us` and `server_tag:primary`.
6969
"""
7070
template = '%s:{}' % column_name

datadog_checks_dev/CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
* Migrate `validate http` to ddev ([#15526](https://github.com/DataDog/integrations-core/pull/15526))
88
* Remove the `ddev validate recommended-monitors` command ([#15563](https://github.com/DataDog/integrations-core/pull/15563))
99
* Remove files in datadog_checks_dev for `validate ci, http, and metadata` ([#15546](https://github.com/DataDog/integrations-core/pull/15546))
10+
* Migrate documentation commands to ddev ([#15582](https://github.com/DataDog/integrations-core/pull/15582))
1011

1112
***Fixed***:
1213

datadog_checks_dev/datadog_checks/dev/docker.py

+36-21
Original file line numberDiff line numberDiff line change
@@ -127,27 +127,42 @@ def docker_run(
127127
"""
128128
A convenient context manager for safely setting up and tearing down Docker environments.
129129
130-
- **compose_file** (_str_) - A path to a Docker compose file. A custom tear
131-
down is not required when using this.
132-
- **build** (_bool_) - Whether or not to build images for when `compose_file` is provided
133-
- **service_name** (_str_) - Optional name for when ``compose_file`` is provided
134-
- **up** (_callable_) - A custom setup callable
135-
- **down** (_callable_) - A custom tear down callable. This is required when using a custom setup.
136-
- **on_error** (_callable_) - A callable called in case of an unhandled exception
137-
- **sleep** (_float_) - Number of seconds to wait before yielding. This occurs after all conditions are successful.
138-
- **endpoints** (_List[str]_) - Endpoints to verify access for before yielding. Shorthand for adding
139-
`CheckEndpoints(endpoints)` to the `conditions` argument.
140-
- **log_patterns** (_List[str|re.Pattern]_) - Regular expression patterns to find in Docker logs before yielding.
141-
This is only available when `compose_file` is provided. Shorthand for adding
142-
`CheckDockerLogs(compose_file, log_patterns, 'all')` to the `conditions` argument.
143-
- **mount_logs** (_bool_) - Whether or not to mount log files in Agent containers based on example logs
144-
configuration
145-
- **conditions** (_callable_) - A list of callable objects that will be executed before yielding to
146-
check for errors
147-
- **env_vars** (_dict_) - A dictionary to update `os.environ` with during execution
148-
- **wrappers** (_List[callable]_) - A list of context managers to use during execution
149-
- **attempts** (_int_) - Number of attempts to run `up` and the `conditions` successfully. Defaults to 2 in CI
150-
- **attempts_wait** (_int_) - Time to wait between attempts
130+
Parameters:
131+
132+
compose_file (str):
133+
A path to a Docker compose file. A custom tear
134+
down is not required when using this.
135+
build (bool):
136+
Whether or not to build images for when `compose_file` is provided
137+
service_name (str):
138+
Optional name for when ``compose_file`` is provided
139+
up (callable):
140+
A custom setup callable
141+
down (callable):
142+
A custom tear down callable. This is required when using a custom setup.
143+
on_error (callable):
144+
A callable called in case of an unhandled exception
145+
sleep (float):
146+
Number of seconds to wait before yielding. This occurs after all conditions are successful.
147+
endpoints (list[str]):
148+
Endpoints to verify access for before yielding. Shorthand for adding
149+
`CheckEndpoints(endpoints)` to the `conditions` argument.
150+
log_patterns (list[str | re.Pattern]):
151+
Regular expression patterns to find in Docker logs before yielding.
152+
This is only available when `compose_file` is provided. Shorthand for adding
153+
`CheckDockerLogs(compose_file, log_patterns, 'all')` to the `conditions` argument.
154+
mount_logs (bool):
155+
Whether or not to mount log files in Agent containers based on example logs configuration
156+
conditions (callable):
157+
A list of callable objects that will be executed before yielding to check for errors
158+
env_vars (dict[str, str]):
159+
A dictionary to update `os.environ` with during execution
160+
wrappers (list[callable]):
161+
A list of context managers to use during execution
162+
attempts (int):
163+
Number of attempts to run `up` and the `conditions` successfully. Defaults to 2 in CI
164+
attempts_wait (int):
165+
Time to wait between attempts
151166
"""
152167
if compose_file and up:
153168
raise TypeError('You must select either a compose file or a custom setup callable, not both.')

datadog_checks_dev/datadog_checks/dev/terraform.py

+15-8
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,21 @@ def terraform_run(directory, sleep=None, endpoints=None, conditions=None, env_va
4141
"""
4242
A convenient context manager for safely setting up and tearing down Terraform environments.
4343
44-
- **directory** (_str_) - A path containing Terraform files
45-
- **sleep** (_float_) - Number of seconds to wait before yielding. This occurs after all conditions are successful.
46-
- **endpoints** (_List[str]_) - Endpoints to verify access for before yielding. Shorthand for adding
47-
`CheckEndpoints(endpoints)` to the `conditions` argument.
48-
- **conditions** (_callable_) - A list of callable objects that will be executed before yielding to
49-
check for errors
50-
- **env_vars** (_dict_) - A dictionary to update `os.environ` with during execution
51-
- **wrappers** (_List[callable]_) - A list of context managers to use during execution
44+
Parameters:
45+
46+
directory (str):
47+
A path containing Terraform files
48+
sleep (float):
49+
Number of seconds to wait before yielding. This occurs after all conditions are successful.
50+
endpoints (list[str]):
51+
Endpoints to verify access for before yielding. Shorthand for adding
52+
`CheckEndpoints(endpoints)` to the `conditions` argument.
53+
conditions (list[callable]):
54+
A list of callable objects that will be executed before yielding to check for errors
55+
env_vars (dict[str, str]):
56+
A dictionary to update `os.environ` with during execution
57+
wrappers (list[callable]):
58+
A list of context managers to use during execution
5259
"""
5360
if not which('terraform'):
5461
pytest.skip('Terraform not available')

datadog_checks_dev/datadog_checks/dev/tooling/commands/__init__.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,11 @@
77
from .config import config
88
from .create import create
99
from .dep import dep
10-
from .docs import docs
1110
from .env import env
1211
from .meta import meta
1312
from .release import release
1413
from .run import run
1514
from .test import test
1615
from .validate import validate
1716

18-
ALL_COMMANDS = (agent, ci, clean, config, create, dep, docs, env, meta, release, run, test, validate)
17+
ALL_COMMANDS = (agent, ci, clean, config, create, dep, env, meta, release, run, test, validate)

datadog_checks_dev/datadog_checks/dev/tooling/commands/docs/__init__.py

-20
This file was deleted.

datadog_checks_dev/datadog_checks/dev/tooling/commands/docs/build.py

-28
This file was deleted.

datadog_checks_dev/datadog_checks/dev/tooling/commands/docs/deploy.py

-91
This file was deleted.

datadog_checks_dev/datadog_checks/dev/tooling/commands/docs/serve.py

-76
This file was deleted.

datadog_checks_dev/datadog_checks/dev/tooling/commands/docs/utils.py

-17
This file was deleted.

0 commit comments

Comments
 (0)