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

FY24 documentation improvements (part 1) #142

Merged
merged 55 commits into from
Jun 14, 2024
Merged
Show file tree
Hide file tree
Changes from 54 commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
3629b54
Add a syntax executable
hugary1995 Apr 24, 2024
eb927aa
Update doxygen and theme version; Remove the doxygen-awesome-css subm…
hugary1995 May 2, 2024
9b58d05
Reorganize doc content; Update developer guide according to the curre…
hugary1995 May 2, 2024
73497e2
Improve syntax documentation
hugary1995 May 2, 2024
8e97686
Change Catch2 from git submodule to CMake FetchContent; Upgrade from …
hugary1995 May 3, 2024
c641ce9
Migrate benchmark tests from catch2 v2->v3
hugary1995 May 3, 2024
ad779e2
Change gpertools and hit from git submodule to cmake fetchcontent
hugary1995 May 3, 2024
ecc83c0
Change pybind11 from a python package dependency to cmake fetchcontent
hugary1995 May 3, 2024
d0b2c48
requirements.txt no longer needed before python build
hugary1995 May 3, 2024
d7da6a0
minor installation guide tweak
hugary1995 May 3, 2024
cf31a1e
There is a gperftool bug after 2.13
hugary1995 May 3, 2024
fc0af51
But does it even pull those unittests?
hugary1995 May 3, 2024
dcbb660
Add header permalink; Add physics documentation
hugary1995 May 3, 2024
2916100
split systems docs
hugary1995 May 6, 2024
fdc0248
Reorganization and more docs
hugary1995 May 7, 2024
64d2f51
Try previewing ghpages in PRs
hugary1995 May 7, 2024
c340733
No need to build unit tests anymore for the docs targets
hugary1995 May 7, 2024
5db15f9
Allow the PR ghpage preview to cleanup after itself
hugary1995 May 7, 2024
be022f7
Suppress a few parameters to make syntax documentation less clustered
hugary1995 May 14, 2024
9c29ec1
Make parameters in syntax documentation collapsible
hugary1995 May 14, 2024
cce393a
Split syntax documentation by section
hugary1995 May 14, 2024
eb3c708
Say VariableName instead of LabeledAxisAccessor
hugary1995 May 14, 2024
c6028e1
Cross reference system and syntax documentations
hugary1995 May 14, 2024
be75a57
Document the solid mechanics physics module
hugary1995 May 14, 2024
97dd57c
Install graphviz; Fix all doxygen warnings
hugary1995 May 14, 2024
7e7d323
Fixing typos and stubgen
hugary1995 May 15, 2024
3c6c948
Add Python API reference
hugary1995 May 17, 2024
b782076
Fix workflow build command; Fix test targets output directory
hugary1995 May 17, 2024
d1f8fe7
Remove doxyfile
hugary1995 May 17, 2024
9b2c59e
Guard policies
hugary1995 May 17, 2024
81a6d26
Fix profiler name conflict; Install PyTorch for documentation
hugary1995 May 17, 2024
b054333
Flatten python API namespace
hugary1995 May 17, 2024
e1255e7
Check python deps
hugary1995 May 20, 2024
74371f6
of course
hugary1995 May 20, 2024
1f94966
Switch from scikit-build-core to setuptools; Give up on building relo…
hugary1995 Jun 5, 2024
2c15ae1
Fix setuptools install directory
hugary1995 Jun 5, 2024
26488da
Fix workflows
hugary1995 Jun 5, 2024
d3f75c0
Fix pytest result publishing
hugary1995 Jun 5, 2024
04964a0
Fix c++ tests and coverage
hugary1995 Jun 6, 2024
5af2f5d
Fix testutils linking
hugary1995 Jun 6, 2024
eb6245e
Adapt documentation
hugary1995 Jun 6, 2024
6cc74c6
Add python installation instructions; Add more to the getting started…
hugary1995 Jun 6, 2024
a2fb1ec
Added crystal plasticity docs
reverendbedford Jun 12, 2024
78a5677
Address individual comments
hugary1995 Jun 12, 2024
8b350c4
some more cpp docstring (not syntax docstring)
hugary1995 Jun 12, 2024
c6148d2
Remove Fill3DVec; Document syntax for all tensors
hugary1995 Jun 13, 2024
04aa2c9
Documented all models in the framework (excluding physics modules)
hugary1995 Jun 13, 2024
7b96df7
Documented all solid mechanics models (excluding crystal plasticity) …
hugary1995 Jun 13, 2024
ccbd15d
Document all drivers
hugary1995 Jun 13, 2024
48345c2
Log missing syntax doc
hugary1995 Jun 13, 2024
bcc0fa3
Action to write missing syntax to github comments
reverendbedford Jun 13, 2024
bda360d
Some docs, a test the comment updates
reverendbedford Jun 13, 2024
4614d84
Added all my missing docs, plus a few that Gary missed
reverendbedford Jun 13, 2024
dac6b33
Hmm, learn to spell Gary
reverendbedford Jun 13, 2024
27dd988
Relocate latex formulae in option docstring
hugary1995 Jun 14, 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
40 changes: 29 additions & 11 deletions .github/workflows/build_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ on:
branches: [main]
pull_request:
branches: [main]
types:
- opened
- reopened
- synchronize
- closed # This is important for the ghpage preview to clean up after itself
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

Expand All @@ -24,26 +29,39 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: "3.8"
- run: sudo apt install graphviz
- run: pip install -r requirements.txt
- name: Install PyTorch
run: pip install torch==2.2.2
- run: |
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_UNITY_BUILD=OFF \
-DNEML2_UNIT=ON \
-DNEML2_REGRESSION=OFF \
-DNEML2_VERIFICATION=OFF \
-DNEML2_BENCHMARK=OFF \
-DNEML2_PROFILING=OFF \
-DNEML2_PYBIND=OFF \
-DCMAKE_UNITY_BUILD=ON \
-DNEML2_TESTS=OFF \
-DNEML2_RUNNER=OFF \
-DNEML2_PYBIND=ON \
-DNEML2_DOC=ON \
.
- run: make doc-syntax -j 2
- run: make doc-html
- run: cat doc/doxygen.log
- run: cmake --build . --target html -j 2 --
- run: cat doc/doxygen.html.log
- run: cat doc/doxygen.python.log
- name: Preview GitHub Pages
if: ${{ github.event_name == 'pull_request' }}
uses: rossjrw/pr-preview-action@v1
with:
source-dir: doc/build/html
- name: Deploy to GitHub Pages
if: ${{ github.event_name == 'push' }}
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: doc/build/html
single-commit: true
clean-exclude: pr-preview/
force: false
- name: Scold users about missing docs
if: ${{ github.event_name == 'pull_request'}}
uses: thollander/actions-comment-pull-request@v2
with:
filePath: doc/syntax_error.log
comment_tag: doc_scold
GITHUB_TOKEN: ${{ secrets.PR_ACTION }}
64 changes: 7 additions & 57 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- uses: psf/black@stable
with:
options: "--check -v"
src: "python/neml2 tests/python"
src: "python/neml2 python/tests"
build-test:
name: Build and test Python bindings
needs: black
Expand All @@ -53,32 +53,19 @@ jobs:
run: pip install -r requirements.txt
- name: Install PyTorch
run: pip install torch==2.2.2
- run: |
cmake \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_UNITY_BUILD=ON \
-DNEML2_UNIT=OFF \
-DNEML2_REGRESSION=OFF \
-DNEML2_VERIFICATION=OFF \
-DNEML2_BENCHMARK=OFF \
-DNEML2_PROFILING=OFF \
-DNEML2_PYBIND=ON \
-DNEML2_DOC=OFF \
-B build \
.
- run: cd build && make -j 2
- run: PYTHONPATH=build/python pytest --junitxml=build/python/pytest.xml tests
- run: pip install -v .
- run: pytest --junitxml=pytest.xml python/tests
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
if: matrix.os == 'ubuntu-latest'
with:
files: build/python/pytest.xml
files: pytest.xml
check_name: Python Binding Test Results (${{ matrix.os }})
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action/composite@v2
if: matrix.os == 'macos-12'
with:
files: build/python/pytest.xml
files: pytest.xml
check_name: Python Binding Test Results (${{ matrix.os }})
sdist:
name: Build source distribution
Expand All @@ -93,45 +80,8 @@ jobs:
with:
name: package-sdist
path: dist/*.tar.gz
wheels:
needs: build-test
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-12]
runs-on: ${{ matrix.os }}
steps:
- name: Backup docker
if: matrix.os == 'ubuntu-latest'
run: sudo mv /var/lib/docker ${GITHUB_WORKSPACE}/docker
- name: Maximize build space
if: matrix.os == 'ubuntu-latest'
uses: easimon/maximize-build-space@master
with:
remove-dotnet: "true"
remove-android: "true"
remove-haskell: "true"
remove-codeql: "true"
build-mount-path: "/var/lib/docker/"
- name: Remount docker
if: matrix.os == 'ubuntu-latest'
run: sudo sh -c "mv ${GITHUB_WORKSPACE}/docker/* /var/lib/docker"
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: jwlawson/actions-setup-cmake@v2
with:
cmake-version: "3.23"
- name: Build wheels
uses: pypa/[email protected]
- name: Upload wheels
if: github.event_name == 'release' && github.event.action == 'published'
uses: actions/upload-artifact@v4
with:
name: package-wheels-${{ matrix.os }}-${{ strategy.job-index }}
path: ./wheelhouse/*.whl
PyPI:
needs: [sdist, wheels]
needs: sdist
environment: pypi
permissions:
id-token: write
Expand All @@ -140,7 +90,7 @@ jobs:
steps:
- uses: actions/download-artifact@v4
with:
pattern: package-*
pattern: package-sdist
path: dist
merge-multiple: true
- uses: pypa/gh-action-pypi-publish@release/v1
35 changes: 14 additions & 21 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,20 +68,17 @@ jobs:
cmake \
-DCMAKE_BUILD_TYPE=${{ matrix.btype }} \
-DCMAKE_UNITY_BUILD=${{ matrix.unity }} \
-DNEML2_UNIT=ON \
-DNEML2_REGRESSION=ON \
-DNEML2_VERIFICATION=ON \
-DNEML2_BENCHMARK=OFF \
-DNEML2_PROFILING=OFF \
-DNEML2_TESTS=ON \
-DNEML2_RUNNER=OFF \
-DNEML2_PYBIND=OFF \
-DNEML2_DOC=OFF \
.
- run: make -j 2
- run: cd tests && ./unit_tests -r junit > unit_tests.xml
- run: cd tests && ./unit/unit_tests -r junit > unit_tests.xml
continue-on-error: true
- run: cd tests && ./regression_tests -r junit > regression_tests.xml
- run: cd tests && ./regression/regression_tests -r junit > regression_tests.xml
continue-on-error: true
- run: cd tests && ./verification_tests -r junit > verification_tests.xml
- run: cd tests && ./verification/verification_tests -r junit > verification_tests.xml
continue-on-error: true
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
Expand Down Expand Up @@ -117,11 +114,9 @@ jobs:
cmake \
-DCMAKE_BUILD_TYPE=${{ matrix.btype }} \
-DCMAKE_UNITY_BUILD=${{ matrix.unity }} \
-DNEML2_UNIT=ON \
-DNEML2_REGRESSION=ON \
-DNEML2_VERIFICATION=ON \
-DNEML2_BENCHMARK=ON \
-DNEML2_PROFILING=ON \
-DNEML2_TESTS=ON \
-DNEML2_RUNNER=ON \
-DNEML2_RUNNER_AS_PROFILER=ON \
-DNEML2_PYBIND=OFF \
-DNEML2_DOC=OFF \
.
Expand All @@ -147,11 +142,9 @@ jobs:
cmake \
-DCMAKE_BUILD_TYPE=Coverage \
-DCMAKE_UNITY_BUILD=OFF \
-DNEML2_UNIT=ON \
-DNEML2_REGRESSION=ON \
-DNEML2_VERIFICATION=ON \
-DNEML2_BENCHMARK=OFF \
-DNEML2_PROFILING=OFF \
-DNEML2_TESTS=ON \
-DNEML2_RUNNER=OFF \
-DNEML2_PYBIND=OFF \
-DNEML2_DOC=OFF \
.
- run: make -j 2
Expand Down Expand Up @@ -182,23 +175,23 @@ jobs:
echo -e "\
#include \"neml2/base/Registry.h\"\n\
int main() {\n\
neml2::Registry::print(std::cout);\n\
return 0;\n\
}\
" > main.cxx
- run: cat main.cxx
- name: Create a CMakeLists.txt file for testing purposes
run: |
echo -e "\
cmake_minimum_required(VERSION 3.5)
cmake_minimum_required(VERSION 3.23)
project(FOO)\n\
add_subdirectory(neml2)\n\
add_executable(foo main.cxx)\n\
add_compile_definitions(_GLIBCXX_USE_CXX11_ABI=0)\n\
target_link_libraries(foo neml2)\n\
" > CMakeLists.txt
- run: cat CMakeLists.txt
- name: Configure with CMake
run: cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DNEML2_DOC=OFF -B build .
run: cmake -DNEML2_TESTS=OFF -B build .
- name: Compile
run: cd build && make -j 2
- run: cd build && ./foo
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,4 @@ neml2.egg-info
src/neml2/base/config.h
install
conftest.py
.env
13 changes: 0 additions & 13 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,13 +0,0 @@
[submodule "extern/Catch2"]
path = extern/Catch2
url = https://github.com/catchorg/Catch2.git
ignore = dirty
[submodule "extern/doxygen-awesome-css"]
path = extern/doxygen-awesome-css
url = https://github.com/jothepro/doxygen-awesome-css.git
[submodule "extern/hit/hit"]
path = extern/hit/hit
url = https://github.com/idaholab/hit.git
[submodule "extern/gperftools"]
path = extern/gperftools
url = https://github.com/gperftools/gperftools.git
Loading
Loading