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

Performance improvements, new tests, more typing annotations and miscellaneous fixes #967

Open
wants to merge 74 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
15a0fe9
Support member references in compound
JasperCraeghs Jun 19, 2023
d7160fe
Store member nodes
JasperCraeghs Jun 20, 2023
6ef8cf0
Support member references in compound
JasperCraeghs Jun 21, 2023
d0fea4b
Remove unused import 'pprint'
JasperCraeghs Jun 28, 2023
d746a4b
Support member references in compound
JasperCraeghs Jun 19, 2023
2a9ed6b
Store member nodes
JasperCraeghs Jun 20, 2023
b1de593
Support member references in compound
JasperCraeghs Jun 21, 2023
b6359af
Remove unused import 'pprint'
JasperCraeghs Jun 28, 2023
ce5f503
Merge branch 'memberdef-in-groups' of github.com:JasperCraeghs/breath…
JasperCraeghs Oct 30, 2023
06f37d8
Revert bad changes
JasperCraeghs Oct 30, 2023
86b06e9
Revert unneeded change
JasperCraeghs Oct 30, 2023
4d89014
Minor refactoring to make diff in PR smaller
JasperCraeghs Oct 30, 2023
3498158
Use a matrix to test Doxygen 1.9.7
JasperCraeghs Oct 30, 2023
20f9a22
Always read in the xml file referenced by the compound
JasperCraeghs Nov 1, 2023
5b23a92
Test doxygenfunction directive with function in group
JasperCraeghs Nov 1, 2023
1247172
Began incorporating C parser
Rouslan Nov 16, 2023
3d05263
Made progress on new parser integration
Rouslan Nov 17, 2023
7e1a87a
Replaced many references to old classes
Rouslan Nov 21, 2023
4122200
Getting close to working again
Rouslan Nov 25, 2023
eee9d22
Appears to be working now
Rouslan Nov 26, 2023
58aadd4
Replaced filter objects with plain functions
Rouslan Nov 29, 2023
8b11b89
Fixed the filters
Rouslan Dec 1, 2023
a670b76
Small fixes and new tests
Rouslan Dec 5, 2023
997e1a8
More tests and another fix
Rouslan Dec 5, 2023
7163482
more tests, more fixes
Rouslan Dec 6, 2023
23cdf28
A few more fixes; a bunch more tests
Rouslan Dec 10, 2023
918525e
Another little fix
Rouslan Dec 11, 2023
ec4010e
Uncoupled test and example code and more tests
Rouslan Dec 12, 2023
4323b9c
Formatted with Black and added test
Rouslan Dec 13, 2023
5f55b64
Update unit test action
Rouslan Dec 13, 2023
5626a08
Update git actions - attempt 2
Rouslan Dec 13, 2023
cec80a6
Attempted fix for code that works locally but not on test runner
Rouslan Dec 13, 2023
6583436
Fix in Github actions and Python compatibility
Rouslan Dec 13, 2023
d64b641
Fixed problem introduced by previous fix
Rouslan Dec 13, 2023
42f9e11
Neglected to install Doxygen in unit test action
Rouslan Dec 13, 2023
9c20dc7
Updated Github actions and added much needed cache
Rouslan Dec 13, 2023
d7f7746
Better caching
Rouslan Dec 13, 2023
2f27528
Fixed mistake in actions
Rouslan Dec 13, 2023
cdb8564
Another attempt at Github actions
Rouslan Dec 13, 2023
7f48ddb
Made tests compatible with older packages and Doxygen versions
Rouslan Dec 15, 2023
925f1a1
Compatibility fixes
Rouslan Dec 15, 2023
a6e1135
A fix, new tests and linter/typing conformance
Rouslan Dec 15, 2023
771ca62
One small fix
Rouslan Dec 15, 2023
fd22f6b
Remove unused import
JasperCraeghs Dec 20, 2023
86815a9
Reorganized setup code and metadata
Rouslan Dec 20, 2023
9323b9f
Style fix
JasperCraeghs Dec 21, 2023
4071ffc
Check type of object to prevent AttributeError
JasperCraeghs Dec 21, 2023
5c3b6fb
Don't warn about duplicate memberdef with the same signature
JasperCraeghs Dec 21, 2023
5f5f7ce
Prevent IndexError when no result was found due to arg spec
JasperCraeghs Dec 22, 2023
8568960
Refactored "finders", eliminating huge bottleneck
Rouslan Dec 24, 2023
94d5f00
Parser now converts html entity tags
Rouslan Dec 26, 2023
fb2fd79
Minor fix and added new doc-strings
Rouslan Dec 26, 2023
becb3a5
Tweaked setup options and added internal documentation
Rouslan Dec 28, 2023
f70f22e
Added ability to run tests with "cached" Doxygen output
Rouslan Jan 8, 2024
a580332
Now generates pure-python parser in addition to compiled extension
Rouslan Jan 13, 2024
d479834
Removed compiled version of parser
Rouslan Jan 14, 2024
1659373
Fixed working with multiple "projects"
Rouslan Jan 22, 2024
fab44ad
Now compatible with in-development sphinx version 7.3
Rouslan Jan 22, 2024
c8fb596
Updated makefile and version check script
Rouslan Jan 23, 2024
5465c9d
fixed/silenced mypy errors
Rouslan Jan 23, 2024
db2ae32
Merge branch 'main' of https://github.com/Rouslan/breathe into member…
Rouslan Feb 10, 2024
5113947
Added Doxygen 1.9.7 to unit test action matrix
Rouslan Feb 10, 2024
01c61cd
Fixed minor lint error
Rouslan Feb 10, 2024
65f2ee1
Fixed mistake in actions
Rouslan Feb 10, 2024
26cce59
Another Github action fix
Rouslan Feb 10, 2024
31a3206
Copied fixes from "name-qualification" branch
Rouslan Apr 28, 2024
96ff636
Merged upstream changes
Rouslan Aug 2, 2024
4ce8751
Add --editable for mypy and test actions install
Rouslan Aug 2, 2024
59a31df
Fix encoding warning and compatibility with older Python
Rouslan Aug 2, 2024
eaf04b0
Made encoding explicit when using Path.write_text
Rouslan Aug 2, 2024
8d07745
Made encoding explicit when using "open()"
Rouslan Aug 2, 2024
d32d168
Make encoding explicit when using subprocess.run
Rouslan Aug 2, 2024
9e15125
Lint fix
Rouslan Aug 2, 2024
aa4cb7b
Update xml_parser_generator/schema.json
Rouslan Aug 2, 2024
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
33 changes: 33 additions & 0 deletions .github/workflows/cache_doxygen.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: download and cache Doxygen
on:
workflow_call
jobs:
install:
runs-on: ubuntu-latest
concurrency:
group: linux-doxygen-${{ matrix.doxygen-version }}-cache
strategy:
fail-fast: false
matrix:
doxygen-version: ['1.9.4', '1.9.7']
steps:
- uses: actions/cache/restore@v4
id: cache-doxygen
with:
path: doxygen-bin-arc
key: ${{ runner.os }}-doxygen-${{ matrix.doxygen-version }}
lookup-only: true
restore-keys: |
${{ runner.os }}-doxygen-

- name: download Doxygen from SF binary archives
if: steps.cache-doxygen.outputs.cache-hit != 'true'
run: |
mkdir doxygen-bin-arc && cd doxygen-bin-arc
curl -L https://sourceforge.net/projects/doxygen/files/rel-${{ matrix.doxygen-version }}/doxygen-${{ matrix.doxygen-version }}.linux.bin.tar.gz > doxygen.tar.gz

- uses: actions/cache/save@v4
if: steps.cache-doxygen.outputs.cache-hit != 'true'
with:
path: doxygen-bin-arc
key: ${{ steps.cache-doxygen.outputs.cache-primary-key }}
109 changes: 69 additions & 40 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -1,47 +1,76 @@
name: build the documentation
on: [push, pull_request]
name: Build documentation

on:
push:
pull_request:
workflow_dispatch:

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

env:
DOXYGEN_VERSION: 1.9.4
FORCE_COLOR: "1"

jobs:
build:
cache-doxygen:
uses: ./.github/workflows/cache_doxygen.yml

build:
needs: cache-doxygen
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('requirements/*.txt') }}
restore-keys: |
${{ runner.os }}-pip-

- name: set up python
uses: actions/setup-python@v1

- name: install dependencies
run: |
pip install -r requirements/development.txt
sudo apt-get -y update
sudo apt-get -y install graphviz libclang1-11 libclang-cpp11

- name: install doxygen from SF binary archives
env:
DOXYGEN_VERSION: 1.9.4
run: |
mkdir doxygen-bin-arc && cd doxygen-bin-arc
curl -L https://sourceforge.net/projects/doxygen/files/rel-$DOXYGEN_VERSION/doxygen-$DOXYGEN_VERSION.linux.bin.tar.gz > doxygen.tar.gz
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3"
cache: 'pip'

- name: Install apt dependencies
run: |
sudo apt-get -y update
sudo apt-get -y install graphviz libclang1-11 libclang-cpp11

- uses: actions/cache/restore@v4
id: cache-doxygen
with:
path: doxygen-bin-arc
fail-on-cache-miss: true
key: ${{ runner.os }}-doxygen-${{ env.DOXYGEN_VERSION }}

- name: Install doxygen
# at some point actions/cache/restore@4 started unpacking doxygen.tar.gz
# automatically and I don't know why -- Rouslan
run: |
cd doxygen-bin-arc
if test -d doxygen; then
cd doxygen
else
gunzip doxygen.tar.gz
tar xf doxygen.tar
cd doxygen-$DOXYGEN_VERSION
sudo make install

- name: build the documentation
run: |
make html
rm documentation/build/html/.buildinfo

- uses: actions/upload-artifact@v2
with:
name: docs build artifacts
path: |
documentation/build/html
examples/*/*/xml
cd doxygen-${{ env.DOXYGEN_VERSION }}
fi
sudo make install

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install .[docs]

- name: Build the documentation
run: |
make html
rm documentation/build/html/.buildinfo

- uses: actions/upload-artifact@v4
with:
name: docs build artifacts
path: |
documentation/build/html
examples/*/*/xml
108 changes: 80 additions & 28 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,85 @@
name: lint
on: [push, pull_request]
name: Lint source code

on:
push:
pull_request:
workflow_dispatch:

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

env:
FORCE_COLOR: "1"

jobs:
build:
black:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install "black==22.3.0"
- name: Format with black
run: black --check .

flake8:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade "flake8>=6"
- name: Lint with flake8
run: flake8 breathe

mypy:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3"
- name: Install dependencies
# "--editable" is needed so that _parser.py is placed in the local folder
# where pytest will import from
run: |
python -m pip install --upgrade pip
python -m pip install --editable ".[lint]"
- name: Type check with mypy
run: mypy --warn-redundant-casts --warn-unused-ignores breathe tests

twine:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('requirements/*.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: set up python
uses: actions/setup-python@v1

- name: install dependencies
run: |
pip install -r requirements/development.txt

- name: lint the source code
run: make flake8

- name: check source code formatting
run: make black

- name: type check the source code
run: make type-check

- name: check version numbers are in sync
run: make version-check
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade twine build
- name: Lint with twine
run: |
python -m build .
twine check dist/*
Loading