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 gen_readme #298

Merged
merged 2 commits into from Apr 2, 2022
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 10 additions & 2 deletions .github/workflows/test.yml
Expand Up @@ -17,13 +17,21 @@ jobs:
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Lint
run: ./tests/run_linters.sh
- name: Unit tests
run: ./tests/run_unit_tests.sh
- name: Integration tests
run: ./tests/run_integration_tests.sh

lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: "3.x"
- name: Lint
run: ./tests/run_linters.sh

check-docs:
runs-on: ubuntu-latest
steps:
Expand Down
3 changes: 2 additions & 1 deletion examples/gen_readme.py
@@ -1,7 +1,8 @@
#!/usr/bin/env python3
"""Generate the dockerfiles from a jinja template."""
from pathlib import Path
from jinja2 import Environment, FileSystemLoader, Markup
from jinja2 import Environment, FileSystemLoader
from markupsafe import Markup

import os
import yaml
Expand Down
2 changes: 1 addition & 1 deletion examples/ok-with-mkdocstrings/module.grepout
Expand Up @@ -9,7 +9,7 @@ documentation!</p>


<h3 id="module.main" class="doc doc-heading">
<code class="highlight language-python"><span class="n">module</span><span class="o">.</span><span class="n">main</span><span class="p">()</span></code>
<code class="highlight language-python">module.main()</code>


</h3>
Expand Down
9 changes: 5 additions & 4 deletions requirements.txt
@@ -1,10 +1,11 @@
click==8.0.4
click==8.1.2
flake8==4.0.1
mkdocs-awesome-pages-plugin==2.7.0
mkdocs-macros-plugin==0.6.4
mkdocs-material==8.2.6
mkdocs==1.2.3
mkdocs-macros-plugin==0.7.0
mkdocs-material==8.2.8
mkdocs==1.3.0
mkdocstrings==0.18.1
pip-upgrader==1.4.15
pydocstyle==6.1.1
pymdown-extensions==9.3
MarkupSafe==2.1.1
4 changes: 2 additions & 2 deletions tests/generator_test.py
Expand Up @@ -111,9 +111,9 @@ def test_theme(self):
"""
self._test_env_setting(
env_variable="THEME",
env_value="material",
env_value="readthedocs",
config_name="theme",
config_value={"name": "material"},
config_value={"name": "readthedocs"},
loaded_type=theme.Theme)


Expand Down
2 changes: 1 addition & 1 deletion tests/run_integration_tests.sh
@@ -1,8 +1,8 @@
#!/bin/bash
set -e
sudo apt-get install bats
pip install -r requirements.txt
pip install -e .
pip install mkdocs-macros-plugin mkdocstrings
# md file="test.snippet"
# ### Integration tests
#
Expand Down
1 change: 0 additions & 1 deletion tests/run_unit_tests.sh
@@ -1,6 +1,5 @@
#!/bin/bash
set -e
pip install -r requirements.txt
pip install -e .
# md file="test.snippet"
# ### Unit tests
Expand Down
2 changes: 0 additions & 2 deletions tests/test_local.sh
Expand Up @@ -23,8 +23,6 @@ function docker_run_integration_tests() {
docker build -t mkdocs-simple-test-runner:$1 -f- . <<EOF
FROM python:$1
RUN apt-get -y update && apt-get -yyy install bats gcc sudo
COPY ./requirements.txt /workspace/requirements.txt
RUN pip install -r /workspace/requirements.txt
COPY . /workspace
WORKDIR /workspace
EOF
Expand Down