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 docs build for ltm-1.6 #102

Merged
merged 3 commits into from
Oct 16, 2024
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
22 changes: 22 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the version of Python in the build environment.
build:
os: "ubuntu-22.04"
tools:
python: "3.10"

mkdocs:
configuration: "mkdocs.yml"
fail_on_warning: false
gsnider2195 marked this conversation as resolved.
Show resolved Hide resolved

# Use our docs/requirements.txt during installation.
python:
install:
- requirements: "docs/requirements.txt"
4 changes: 2 additions & 2 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
mkdocs==1.3.0
markdown-include==0.6.0
mkdocs==1.6.1
gsnider2195 marked this conversation as resolved.
Show resolved Hide resolved
markdown-include==0.8.1
74 changes: 55 additions & 19 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,23 +74,23 @@ def task_wrapper(function=None):


def docker_compose(context, command, **kwargs):
"""Helper function for running a specific docker-compose command with all appropriate parameters and environment.
"""Helper function for running a specific docker compose command with all appropriate parameters and environment.

Args:
context (obj): Used to run specific commands
command (str): Command string to append to the "docker-compose ..." command, such as "build", "up", etc.
command (str): Command string to append to the "docker compose ..." command, such as "build", "up", etc.
**kwargs: Passed through to the context.run() call.
"""
build_env = {
"NAUTOBOT_VER": context.nautobot_capacity_metrics.nautobot_ver,
"PYTHON_VER": context.nautobot_capacity_metrics.python_ver,
}
compose_command = f'docker-compose --project-name {context.nautobot_capacity_metrics.project_name} --project-directory "{context.nautobot_capacity_metrics.compose_dir}"'
compose_command = f'docker compose --project-name {context.nautobot_capacity_metrics.project_name} --project-directory "{context.nautobot_capacity_metrics.compose_dir}"'
for compose_file in context.nautobot_capacity_metrics.compose_files:
compose_file_path = os.path.join(context.nautobot_capacity_metrics.compose_dir, compose_file)
compose_command += f' -f "{compose_file_path}"'
compose_command += f" {command}"
print(f'Running docker-compose command "{command}"')
print(f'Running docker compose command "{command}"')
return context.run(compose_command, env=build_env, **kwargs)


Expand Down
Loading