Skip to content

Commit 3e741dd

Browse files
committed
Upgrade pymdown-extensions and markdown
Also merges where python dependencies are specified to requirements.txt. Resolves: #3041
1 parent e9f1f56 commit 3e741dd

File tree

7 files changed

+15
-9
lines changed

7 files changed

+15
-9
lines changed

.config/python/dev/requirements.txt

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,15 @@ importlib-metadata>=3.10
99
json-schema-for-humans
1010
jsonpickle
1111
jsonschema
12+
markdown
1213
mdx_truly_sane_lists
1314
mkdocs
1415
mkdocs-glightbox==0.3.2
1516
mkdocs-material
1617
multiprocessing_logging
1718
pychalk
1819
pygithub
19-
pymdown-extensions==9.11
20+
pymdown-extensions
2021
pytablewriter
2122
pytest-cov
2223
pytest-timeout

.devcontainer/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/
1111
# [Optional] If your pip requirements rarely change, uncomment this section to add them to the image.
1212
COPY .config/python/dev/requirements.txt /tmp/pip-tmp/
1313
RUN pip3 --disable-pip-version-check --no-cache-dir install -r /tmp/pip-tmp/requirements.dev.txt \
14-
&& rm -rf /tmp/pip-tmp && pip3 install --no-cache-dir mkdocs-material pymdown-extensions==9.11 mkdocs-glightbox==0.3.2 pymdown-extensions==9.11
14+
&& rm -rf /tmp/pip-tmp
1515

1616
RUN npm install markdown-table-formatter -g
1717

.github/CONTRIBUTING.md

+8-4
Original file line numberDiff line numberDiff line change
@@ -114,17 +114,21 @@ Draft pull requests are also welcome to get feedback early on, or if there is so
114114

115115
Apart from the descriptors, it will usually involve modifying files such as [.automation/build.py](https://github.com/oxsecurity/megalinter/blob/main/.automation/build.py)
116116

117-
In order to be able to run locally a server that serves all the documentation and make the testing as real as possible you will have to run at least 2 commands.
117+
In order to be able to run locally a server that serves all the documentation and make the testing as real as possible you should setup a virtual environment and.
118118

119-
Command to execute (only one time):
119+
Commands to execute (only one time):
120120

121121
```bash
122-
pip install --upgrade "markdown==3.3.7" mike mkdocs-material "pymdown-extensions==9.11" "mkdocs-glightbox==0.3.2" mdx_truly_sane_lists jsonschema json-schema-for-humans giturlparse webpreview github-dependents-info
122+
mkdir venv
123+
python -m venv venv/
124+
source venv/bin/activate
125+
pip install --upgrade -r .config/python/dev/requirements.txt
123126
```
124127

125-
Command to run every time you want to bring up the server:
128+
Commands to run every time you want to enter the environment and run the server:
126129

127130
```bash
131+
source venv/bin/activate
128132
mkdocs serve
129133
```
130134

.github/workflows/build-deploy-docs.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
- uses: actions/setup-python@v4.5.0
3030
with:
3131
python-version: 3.10.4
32-
- run: pip install --upgrade markdown==3.3.7 mike mkdocs-material pymdown-extensions==9.11 mkdocs-glightbox==0.3.2 mdx_truly_sane_lists json-schema-for-humans giturlparse webpreview
32+
- run: pip install --upgrade -r .config/python/dev/requirements.txt
3333
- run: cd .automation && bash build_schemas_doc.sh && cd ..
3434
# - run: mkdocs gh-deploy --force
3535
- run: |

.github/workflows/deploy-RELEASE.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ jobs:
155155
- uses: actions/setup-python@v4.5.0
156156
with:
157157
python-version: 3.x
158-
- run: pip install --upgrade markdown==3.3.7 mike mkdocs-material pymdown-extensions==9.11 mkdocs-glightbox==0.3.2 mdx_truly_sane_lists json-schema-for-humans giturlparse webpreview
158+
- run: pip install --upgrade -r .config/python/dev/requirements.txt
159159
- run: cd .automation && bash build_schemas_doc.sh && cd ..
160160
# - run: mkdocs gh-deploy --force
161161
- run: |

entrypoint.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ if [ "${UPGRADE_LINTERS_VERSION}" == "true" ]; then
3535
# Run only get_linter_help test methods
3636
pytest -v --durations=0 -k _get_linter_help megalinter/
3737
# Reinstall mkdocs-material because of broken dependency
38-
pip3 install --upgrade "markdown==3.3.7" mike mkdocs-material "pymdown-extensions==9.11" "mkdocs-glightbox==0.3.2" mdx_truly_sane_lists jsonschema json-schema-for-humans giturlparse webpreview "github-dependents-info==0.10.0"
38+
pip3 install --upgrade -r .config/python/dev/requirements.txt
3939
cd /tmp/lint || exit 1
4040
chmod +x build.sh
4141
GITHUB_TOKEN="${GITHUB_TOKEN}" bash build.sh --doc --dependents --stats

mkdocs.yml

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ markdown_extensions:
3030
- pymdownx.snippets:
3131
base_path: docs
3232
check_paths: true
33+
restrict_base_path: False
3334
- mdx_truly_sane_lists
3435
- attr_list
3536
extra_javascript:

0 commit comments

Comments
 (0)