Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix readthedocs yaml #339

Merged
merged 2 commits into from
Nov 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,26 @@
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

formats:
- pdf
- epub

# Set the version of Python and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.11"

# We recommend specifying your dependencies to enable reproducible builds:
# https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
python:
version: "3.6"
install:
- requirements: requirements.txt
- requirements: requirements.txt

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/source/conf.py
fail_on_warning: false

12 changes: 5 additions & 7 deletions podman/domain/containers_create.py
Original file line number Diff line number Diff line change
Expand Up @@ -657,13 +657,11 @@ def parse_host_port(_container_port, _protocol, _host):
}

for item in args.pop("ulimits", []):
params["r_limits"].append(
{
"type": item["Name"],
"hard": item["Hard"],
"soft": item["Soft"],
}
)
params["r_limits"].append({
"type": item["Name"],
"hard": item["Hard"],
"soft": item["Soft"],
})

for item in args.pop("volumes", {}).items():
key, value = item
Expand Down
10 changes: 4 additions & 6 deletions podman/domain/images_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,12 +153,10 @@ def prune(
error.append(element["Err"])
else:
reclaimed += element["Size"]
deleted.append(
{
"Deleted": element["Id"],
"Untagged": "",
}
)
deleted.append({
"Deleted": element["Id"],
"Untagged": "",
})
if len(error) > 0:
raise APIError(response.url, response=response, explanation="; ".join(error))

Expand Down
26 changes: 11 additions & 15 deletions podman/domain/ipam.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,12 @@ def __init__(
aux_addresses: Ignored.
"""
super().__init__()
self.update(
{
"AuxiliaryAddresses": aux_addresses,
"Gateway": gateway,
"IPRange": iprange,
"Subnet": subnet,
}
)
self.update({
"AuxiliaryAddresses": aux_addresses,
"Gateway": gateway,
"IPRange": iprange,
"Subnet": subnet,
})


class IPAMConfig(dict):
Expand All @@ -52,10 +50,8 @@ def __init__(
options: Options to provide to the Network driver.
"""
super().__init__()
self.update(
{
"Config": pool_configs or [],
"Driver": driver,
"Options": options or {},
}
)
self.update({
"Config": pool_configs or [],
"Driver": driver,
"Options": options or {},
})
22 changes: 9 additions & 13 deletions podman/tests/integration/test_container_create.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,12 +149,10 @@ def test_container_ports(self):
self.containers.append(container)

self.assertTrue(
all(
[
x in port_test['expected_output']
for x in container.attrs.get('HostConfig', {}).get('PortBindings')
]
)
all([
x in port_test['expected_output']
for x in container.attrs.get('HostConfig', {}).get('PortBindings')
])
)

def test_container_healthchecks(self):
Expand Down Expand Up @@ -243,13 +241,11 @@ def test_container_devices(self):
for device in devices:
path_on_host, path_in_container = device.split(':', 1)
self.assertTrue(
any(
[
c.get('PathOnHost') == path_on_host
and c.get('PathInContainer') == path_in_container
for c in container_devices
]
)
any([
c.get('PathOnHost') == path_on_host
and c.get('PathInContainer') == path_in_container
for c in container_devices
])
)

with self.subTest("Check devices in running container object"):
Expand Down
14 changes: 6 additions & 8 deletions podman/tests/integration/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,12 @@ def __init__(
if os.environ.get("container") == "oci":
self.cmd.append("--storage-driver=vfs")

self.cmd.extend(
[
"system",
"service",
f"--time={timeout}",
socket_uri,
]
)
self.cmd.extend([
"system",
"service",
f"--time={timeout}",
socket_uri,
])

process = subprocess.run(
[podman_exe, "--version"], check=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT
Expand Down
1 change: 1 addition & 0 deletions podman/tlsconfig.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"""Holds TLS configuration."""


class TLSConfig:
"""TLS configuration.

Expand Down
Loading