mirror of https://github.com/locustio/locust.git
Add locust-cloud docs
This commit is contained in:
parent
3b5763ccf0
commit
36b6640d65
|
@ -5,6 +5,7 @@ locustio.egg-info/**
|
|||
locust/_version.py
|
||||
locust/test/mock_*.py
|
||||
docs/_build/**
|
||||
docs/locust-cloud/**
|
||||
docs/cli-help-output.txt
|
||||
docs/config-options.rst
|
||||
mock.*.egg
|
||||
|
|
19
docs/conf.py
19
docs/conf.py
|
@ -7,11 +7,14 @@
|
|||
# All configuration values have a default value; values that are commented out
|
||||
# serve to show the default value.
|
||||
|
||||
from locust.argument_parser import get_empty_argument_parser, setup_parser_arguments
|
||||
from locust.argument_parser import get_parser
|
||||
|
||||
import os
|
||||
import shutil
|
||||
import subprocess
|
||||
|
||||
import locust_cloud
|
||||
|
||||
# Add fixes for RTD deprecation
|
||||
# https://about.readthedocs.com/blog/2024/07/addons-by-default/
|
||||
|
||||
|
@ -36,14 +39,24 @@ def save_locust_help_output():
|
|||
|
||||
save_locust_help_output()
|
||||
|
||||
|
||||
def get_locust_cloud_docs():
|
||||
locust_cloud_docs = os.path.join(locust_cloud.__path__[0], "docs/")
|
||||
print("Copying `locust-cloud` docs/")
|
||||
shutil.copytree(
|
||||
locust_cloud_docs, os.path.join(os.path.abspath(os.path.dirname(__file__)), "locust-cloud/"), dirs_exist_ok=True
|
||||
)
|
||||
|
||||
|
||||
get_locust_cloud_docs()
|
||||
|
||||
# Generate RST table with help/descriptions for all available environment variables
|
||||
|
||||
|
||||
def save_locust_env_variables():
|
||||
env_options_output_file = os.path.join(os.path.abspath(os.path.dirname(__file__)), "config-options.rst")
|
||||
print(f"Generating RST table for Locust environment variables and storing in {env_options_output_file}")
|
||||
parser = get_empty_argument_parser()
|
||||
setup_parser_arguments(parser)
|
||||
parser = get_parser()
|
||||
table_data = []
|
||||
for action in parser._actions:
|
||||
if action.env_var and action.help != "==SUPPRESS==":
|
||||
|
|
|
@ -61,6 +61,15 @@ Locust Documentation
|
|||
api
|
||||
|
||||
|
||||
.. toctree ::
|
||||
:caption: Locust Cloud
|
||||
:maxdepth: 2
|
||||
:glob:
|
||||
|
||||
locust-cloud/*
|
||||
|
||||
If you have questions or get stuck, feel free to reach out to us at `support@locust.cloud <mailto:support@locust.cloud>`_.
|
||||
|
||||
|
||||
|
||||
.. toctree ::
|
||||
|
|
|
@ -98,6 +98,7 @@ docs = [
|
|||
"sphinxcontrib-qthelp==1.0.3",
|
||||
"sphinxcontrib-serializinghtml==1.1.10",
|
||||
"sphinxcontrib-googleanalytics>=0.4",
|
||||
"locust-cloud>=1.18.0",
|
||||
]
|
||||
|
||||
[project.scripts]
|
||||
|
|
Loading…
Reference in New Issue