Skip to content

Commit

Permalink
fix doc build (#1567)
Browse files Browse the repository at this point in the history
* fix doc build

* resolve docker build issues with older poetry

* resolving failing test with pylint

* resolving failing test with pylint
  • Loading branch information
whitej6 authored Dec 5, 2023
1 parent fe6d6e3 commit f7d9168
Show file tree
Hide file tree
Showing 5 changed files with 1,033 additions and 905 deletions.
9 changes: 6 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,12 @@ RUN apt-get update && \

RUN pip install --upgrade pip

RUN curl -sSL https://install.python-poetry.org -o /tmp/install-poetry.py && \
python /tmp/install-poetry.py --version 1.2.0 && \
rm -f /tmp/install-poetry.py
# Install Poetry manually via its installer script;
# We might be using an older version of ntc-templates that includes an older version of Poetry
# and CI and local development may have a newer version of Poetry
# Since this is only used for development and we don't ship this container, pinning Poetry back is not expressly necessary
# We also don't need virtual environments in container
RUN which poetry || curl -sSL https://install.python-poetry.org | python3 -

# Add poetry install location to the $PATH
ENV PATH="${PATH}:/root/.local/bin"
Expand Down
11 changes: 4 additions & 7 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
mkdocs==1.3.1
# Material for MkDocs theme
mkdocs-material==8.3.9
# Render custom markdown for version added/changed/remove notes
mkdocs==1.5.2
mkdocs-material==9.1.15
mkdocs-version-annotations==1.0.0
# Automatic documentation from sources, for MkDocs
mkdocstrings==0.19
mkdocstrings-python==0.7.1
mkdocstrings-python==1.5.2
mkdocstrings==0.22.0
4 changes: 3 additions & 1 deletion ntc_templates/parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ def parse_output(platform=None, command=None, data=None):
cli_table.ParseCmd(data, attrs)
structured_data = _clitable_to_dict(cli_table)
except clitable.CliTableError as err:
raise Exception(f'Unable to parse command "{command}" on platform {platform} - {str(err)}') from err
raise Exception( # pylint: disable=broad-exception-raised
f'Unable to parse command "{command}" on platform {platform} - {str(err)}'
) from err
# Invalid or Missing template
# module.fail_json(msg='parsing error', error=str(e))
# rather than fail, fallback to return raw text
Expand Down
Loading

0 comments on commit f7d9168

Please sign in to comment.