Skip to content

Commit

Permalink
Release v3.0b4
Browse files Browse the repository at this point in the history
  • Loading branch information
Fizzadar committed Jun 25, 2024
1 parent 5c6b862 commit 9a5f172
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 34 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# v3.0.beta3
# v3.0.beta4

Welcome to pyinfra v3! This version is the biggest overhaul of pyinfra since it was created back in 2015. Most v2 deployment code should be automatically compatible, but as always be aware. Major changes:

Expand Down
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@
"docsearch_index_name": "pyinfra",
"plausible_domain": "docs.pyinfra.com",
"plausible_stats_domain": "stats.oxygem.com",
"doc_versions": ["2.x", "1.x", "0.x", "latest"],
"primary_doc_version": "2.x",
"doc_versions": ["3.x", "2.x", "1.x", "0.x", "latest"],
"primary_doc_version": "3.x",
}

templates_path = ["templates"]
Expand Down
18 changes: 11 additions & 7 deletions pyinfra/connectors/ssh.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,14 +122,18 @@ class SSHConnector(BaseConnector):
.. code:: python
hosts = (
[
"my-host-1.net",
"my-host-2.net",
],
{
"ssh_username": "ssh-user",
},
["my-host-1.net", "my-host-2.net"],
{"ssh_username": "ssh-user"},
)
Multiple hosts with different SSH usernames:
.. code:: python
hosts = [
("my-host-1.net", {"ssh_username": "ssh-user"}),
("my-host-2.net", {"ssh_username": "other-user"}),
]
"""

handles_execution = True
Expand Down
48 changes: 24 additions & 24 deletions scripts/generate_connectors_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,24 +30,31 @@ def build_connectors_docs():
lines.append(doc)
lines.append("")

data_title = "Usage"
lines.append(data_title)
lines.append(title_line("~", data_title))
lines.append("")

names_argument_key = getfullargspec(connector.make_names_data).args[0]
if names_argument_key == "_":
names_argument_key = ""
examples_doc = getattr(connector, "__examples_doc__", None)
if examples_doc:
lines.append("Examples")
lines.append(title_line("~", "Examples"))
lines.append("")
lines.append(cleandoc(examples_doc))
else:
names_argument_key = f"/{names_argument_key}"
lines.append(
f"""
.. code:: shell
pyinfra @{connector_name}{names_argument_key} ...
""".strip(),
)
lines.append("")
data_title = "Usage"
lines.append(data_title)
lines.append(title_line("~", data_title))
lines.append("")

names_argument_key = getfullargspec(connector.make_names_data).args[0]
if names_argument_key == "_":
names_argument_key = ""
else:
names_argument_key = f"/{names_argument_key}"
lines.append(
f"""
.. code:: shell
pyinfra @{connector_name}{names_argument_key} ...
""".strip(),
)
lines.append("")

data_key_lines = []

Expand Down Expand Up @@ -90,13 +97,6 @@ def build_connectors_docs():
)
lines.append("")

examples_doc = getattr(connector, "__examples_doc__", None)
if examples_doc:
lines.append("Examples")
lines.append(title_line("~", "Examples"))
lines.append("")
lines.append(cleandoc(examples_doc))

module_filename = path.join(docs_dir, "connectors", f"{connector_name}.rst")
print("--> Writing {0}".format(module_filename))

Expand Down

0 comments on commit 9a5f172

Please sign in to comment.