Skip to content

Commit

Permalink
Lint + update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
JakubAndrysek committed Apr 2, 2024
1 parent c5e574f commit 7c8980a
Show file tree
Hide file tree
Showing 11 changed files with 47 additions and 22 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/mkdoxy-pytest-repo.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: MkDoxy build all supported Python versions

on: [push, pull_request]

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest] # windows-latest, macos-latest requires doxygen to be installed manually
python-version: ["3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -e ".[dev]"
sudo apt-get install doxygen
- name: Run Pytest
run: |
pytest tests/
2 changes: 1 addition & 1 deletion .github/workflows/mkdoxy-test-demos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest] # windows-latest, macos-latest requires doxygen to be installed manually
python-version: ["3.9", "3.10", "3.11"]
python-version: ["3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/mkdoxy-test-repo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest] # windows-latest, macos-latest requires doxygen to be installed manually
python-version: ["3.9", "3.10", "3.11"]
python-version: ["3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .idea/misc.xml

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

17 changes: 4 additions & 13 deletions .idea/workspace.xml

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

2 changes: 1 addition & 1 deletion demo-projects/animal/Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ RECURSIVE = YES
EXAMPLE_PATH = examples
SHOW_NAMESPACES = YES
GENERATE_HTML = NO
GENERATE_LATEX = YES
GENERATE_LATEX = YES
2 changes: 1 addition & 1 deletion docs/usage/advanced.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ plugins:
doxy-cfg-file: path/to/Doxyfile # relative path to the Doxygen configuration file (relative to the mkdocs.yml file)
doxy-cfg: # standard doxygen configuration (key: value)
FILE_PATTERNS: ... # other configuration options - merge (this will override the configuration from the Doxyfile)
```
```
4 changes: 3 additions & 1 deletion mkdoxy/doxyrun.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,10 @@ def getOutputFolder(self) -> PurePath:
class DoxygenBinPathNotValid(Exception):
pass


class DoxygenCustomConfigNotFound(Exception):
pass


class DoxygenCustomConfigNotValid(Exception):
pass
pass
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,13 @@ def requirements():
install_requires=["mkdocs"],
extras_require={
"dev": [
"mkdocs-material==9.1.18",
"mkdocs-material~=9.1.18",
"Jinja2~=3.1.2",
"mkdocs-open-in-new-tab~=1.0.2",
"pathlib~=1.0.1",
"path~=16.7.1",
"isort~=5.12.0",
"pytest~=6.2.5",
],
},
classifiers=[
Expand Down
2 changes: 1 addition & 1 deletion tests/data/Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ RECURSIVE = YES
EXAMPLE_PATH = examples
SHOW_NAMESPACES = YES
GENERATE_HTML = NO
GENERATE_LATEX = NO
GENERATE_LATEX = NO
5 changes: 4 additions & 1 deletion tests/test_doxyrun.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
from mkdoxy.doxyrun import DoxygenRun


def test_dox_dict2str():
dox_dict = {
"DOXYFILE_ENCODING": "UTF-8",
Expand All @@ -23,6 +25,7 @@ def test_dox_dict2str():

assert result == expected_result


# Sets the Doxygen configuration using a custom config file
def test_set_doxy_cfg_custom_file():
dox_dict = {}
Expand Down Expand Up @@ -74,4 +77,4 @@ def test_str2dox_dict():
"GENERATE_LATEX": False,
}

assert result == expected_result
assert result == expected_result

0 comments on commit 7c8980a

Please sign in to comment.