Skip to content

Commit

Permalink
Merge pull request #339 from umohnani8/docfixes-2
Browse files Browse the repository at this point in the history
Fix readthedocs yaml
  • Loading branch information
openshift-merge-bot[bot] authored Nov 9, 2023
2 parents 1a8624f + 9037bd8 commit 392ceaa
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 52 deletions.
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

0 comments on commit 392ceaa

Please sign in to comment.