Skip to content

DF Documentation 🔖 #60

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

Merged
merged 80 commits into from
Aug 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
e4c23e9
ADD: documentation folder
9and3 Aug 5, 2024
916ad90
ADD: new entry for output folder in build
9and3 Aug 5, 2024
51ffd08
ADD: simple convinient invoke for sphinx
9and3 Aug 5, 2024
7dae118
WIP-CAP: basic functioning sphinx
9and3 Aug 6, 2024
009e219
WIP: working pyyd version + copying from cmake
9and3 Aug 6, 2024
d4ad623
WIP: working version for df_visualization
9and3 Aug 6, 2024
9e53bcd
ADD: mermaid to sphinx integrated
9and3 Aug 7, 2024
da0eca1
ADD: logo centered for better visuals in html sphinx
9and3 Aug 7, 2024
b346cee
ADD-CAP: basic DF API Py sphinx docu added
9and3 Aug 7, 2024
6d05624
ADD: redirect file as temp fix
9and3 Aug 11, 2024
0b69fb2
CLEAN: the not necessary docstrings of the code components
9and3 Aug 11, 2024
4f2d591
CAP-ADD: sphinx generation of components working, need contributing a…
9and3 Aug 11, 2024
1f3bd99
ADD: documentation structure basics
9and3 Aug 14, 2024
9f0e8b1
WIP-ADD: preliminary build sphinx workflow
9and3 Aug 14, 2024
387e827
WIP: testing ci build sphinx x1
9and3 Aug 14, 2024
481a87d
WIP: testing sphinx build
9and3 Aug 16, 2024
46452e0
WIP: testing only conda caching x1
9and3 Aug 16, 2024
cc0b12a
WIP: testing only conda caching x2
9and3 Aug 16, 2024
97e8e6d
WIP: testing only conda caching x3
9and3 Aug 16, 2024
fab696e
WIP: testing only conda caching x3
9and3 Aug 16, 2024
7551663
WIP: testing only conda caching x4
9and3 Aug 16, 2024
f9706a4
WIP: testing only conda caching x5
9and3 Aug 16, 2024
1d2ed37
WIP: testing only conda caching x6
9and3 Aug 16, 2024
6e5c5fe
WIP: testing only conda caching x7
9and3 Aug 16, 2024
aa9cdee
CAP-WIP: working cached anaconda
9and3 Aug 16, 2024
97da216
WIP: testin sphinx build + artifacts
9and3 Aug 16, 2024
b438917
WIP: testin sphinx build + artifacts x1
9and3 Aug 16, 2024
0241757
WIP: testin sphinx build + artifacts x2
9and3 Aug 16, 2024
8011fef
WIP: testin sphinx build + artifacts x3
9and3 Aug 16, 2024
15cd73a
WIP: testin sphinx build + artifacts x4
9and3 Aug 16, 2024
b765984
WIP: testin sphinx build + artifacts x5
9and3 Aug 16, 2024
416220c
WIP: testin sphinx build + artifacts x6
9and3 Aug 16, 2024
dc0992c
WIP: testin sphinx build + artifacts x7
9and3 Aug 16, 2024
1697db1
WIP: testin sphinx build + artifacts x8
9and3 Aug 16, 2024
91685c3
ADD: testing docu on sphinx docs
9and3 Aug 16, 2024
ff55f97
WIP: testin sphinx build + artifacts x10
9and3 Aug 16, 2024
5bcd2e1
WIP: testin sphinx build + artifacts x11
9and3 Aug 16, 2024
3300036
WIP: testin sphinx build + artifacts x12
9and3 Aug 16, 2024
56505b9
ADD-CAP: docuemntation sphinx page for devs
9and3 Aug 16, 2024
e6d2a9e
WIP: testin sphinx build + artifacts x13
9and3 Aug 16, 2024
cbd7866
WIP: testin sphinx build + artifacts x14
9and3 Aug 16, 2024
8c3e62e
WIP: testin sphinx build + artifacts x15
9and3 Aug 16, 2024
2f6d813
ADD-FIX: minor infos to documentation
9and3 Aug 16, 2024
108008f
WIP: testin sphinx build + artifacts x16
9and3 Aug 16, 2024
cc69f1d
WIP: testin sphinx build + artifacts x17
9and3 Aug 16, 2024
a385fbc
WIP: testin sphinx build + artifacts x18
9and3 Aug 16, 2024
1f5f2ca
WIP: testin sphinx build + artifacts x19
9and3 Aug 16, 2024
398573e
WIP: testin sphinx build + artifacts x20
9and3 Aug 16, 2024
a47c192
WIP-FIX: trying to solve submodules x2
9and3 Aug 16, 2024
c521707
WIP-FIX: Remove a submodule eigen
9and3 Aug 16, 2024
98da1b5
FIX: added back eigen deps
9and3 Aug 16, 2024
2abd372
FIX: updated requirements for env sphinx theme + testing ci sphinx
9and3 Aug 17, 2024
13db498
WIP: testing split step workflow for docs
9and3 Aug 17, 2024
74bf7bd
WIP: testing split step workflow for docs x2
9and3 Aug 17, 2024
200e2a6
CAP: working two jobs docu ci --> going to implement page deployement
9and3 Aug 17, 2024
7cc103c
WIP: debugging page deployement x1
9and3 Aug 17, 2024
28f9dd5
WIP: debugging page deployement x2
9and3 Aug 17, 2024
2b95205
WIP: debugging page deployement x3
9and3 Aug 17, 2024
2fc7094
WIP: testing last job ci concurrency
9and3 Aug 17, 2024
d214c3a
WIP: testing last job ci concurrency x2
9and3 Aug 17, 2024
9428f33
WIP: testing deployemet github
9and3 Aug 17, 2024
b101a5e
WIP: testing deployemet github x2
9and3 Aug 17, 2024
0af7663
WIP: testing deployemet github x3
9and3 Aug 17, 2024
2604d72
CAP: deployement for pages with pure action to be tested
9and3 Aug 17, 2024
3bae7c5
ADD: badge doc to readme [no ci]
9and3 Aug 17, 2024
1237461
WIP: testing block 3rd job x2
9and3 Aug 17, 2024
c53c822
ADD: front iamge to index (thanks @Damien)
9and3 Aug 18, 2024
6a4840d
CAP-ADD: add type checker mypy + refactoring for precommit check pass
9and3 Aug 18, 2024
39ee208
ADD: precommit ignores
9and3 Aug 18, 2024
0485601
ADD-WIP: basic structure for pre-commits local + mypy setup
9and3 Aug 18, 2024
5037234
Merging conflict for mypy refactoring
9and3 Aug 18, 2024
4994453
CAP-ADD: ruff + fixes for ruff precommit added
9and3 Aug 19, 2024
9c31b7c
ADD-WIP: action for py-sanity check
9and3 Aug 19, 2024
a0dccbe
FIX: action typo title
9and3 Aug 19, 2024
4a6f0d0
WIP: testing cache conda x1
9and3 Aug 19, 2024
803ffb0
FIX: removed precommits ignores
9and3 Aug 19, 2024
092e055
WIP: testing ci for pre-commits x1
9and3 Aug 19, 2024
5d35d09
CAP: adding dev docu pages
9and3 Aug 20, 2024
26dfb2c
UPDATE: removed the CONTRIBUTING file since not used anymore, everyth…
9and3 Aug 20, 2024
499e805
FIX: pre commit hook removed argument for config since failing in CI
9and3 Aug 20, 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
148 changes: 148 additions & 0 deletions .github/workflows/doc-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
name: doc-build

on: [push, pull_request, workflow_dispatch]

permissions:
contents: write
pages: write
id-token: write

jobs:
build-source:
runs-on: windows-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup conda environment
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: 3.9.1

- name: Create diff_check conda environment
run: |
conda env create -f environment.yml

- name: Cache conda environment cache
uses: actions/cache@v2
with:
path: C:\Miniconda\envs\diff_check
key: ${{ runner.os }}-conda-${{ hashFiles('environment.yml') }}

- name: Cmake Configure
run: |
conda run --name diff_check --no-capture-output cmake -S . -B build -A x64 -DBUILD_PYTHON_MODULE=ON -DBUILD_TESTS=OFF -DRUN_TESTS=OFF

- name: CMake Build
run: conda run --name diff_check --no-capture-output cmake --build build --config Release

# upload artifacts
- name: Move dlls and pyd files to single directories
run: |
mkdir $env:GITHUB_WORKSPACE\artifacts_dlls
mkdir $env:GITHUB_WORKSPACE\artifacts_pyds
Get-ChildItem -Path $env:GITHUB_WORKSPACE\build\bin\Release -Filter *.dll -Recurse | Move-Item -Destination $env:GITHUB_WORKSPACE\artifacts_dlls
Get-ChildItem -Path $env:GITHUB_WORKSPACE\build\Release -Filter *.pyd -Recurse | Move-Item -Destination $env:GITHUB_WORKSPACE\artifacts_pyds
shell: pwsh
- name: Upload artifacts - dlls
uses: actions/upload-artifact@v2
with:
name: __build_artifacts_dlls__
path: ${{ github.workspace }}/artifacts_dlls/*
- name: Upload artifacts - pyds
uses: actions/upload-artifact@v2
with:
name: __build_artifacts_pyds__
path: ${{ github.workspace }}/artifacts_pyds/*


build-docs:
runs-on: windows-latest
needs: build-source

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup conda environment
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: 3.9.1

- name: Restore conda environment cache
uses: actions/cache@v2
with:
path: C:\Miniconda\envs\diff_check
key: ${{ runner.os }}-conda-${{ hashFiles('environment.yml') }}
restore-keys: |
${{ runner.os }}-conda-

# download artifacts
- name: Download dlls for doc folder
uses: actions/download-artifact@v2
with:
name: __build_artifacts_dlls__
path: ${{github.workspace}}/doc
- name: Download pyds for doc folder
uses: actions/download-artifact@v2
with:
name: __build_artifacts_pyds__
path: ${{github.workspace}}/doc
- name: Download dlls for diffCheck py package
uses: actions/download-artifact@v2
with:
name: __build_artifacts_dlls__
path: ${{github.workspace}}/src/gh/diffCheck/diffCheck/dlls
- name: Download pyds for diffCheck py package
uses: actions/download-artifact@v2
with:
name: __build_artifacts_pyds__
path: ${{github.workspace}}/src/gh/diffCheck/diffCheck

- name: Sphinx build
run: |
conda run --name diff_check --no-capture-output sphinx-build -b html -v doc _build

- name: Upload documentation
uses: actions/upload-artifact@v2
with:
name: __build_sphx_docs__
path: ${{ github.workspace }}/_build


page-deployement:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build-docs
# Run only on pushes to the default branch
if: github.ref == 'refs/heads/main'
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Download sphinx docs
uses: actions/download-artifact@v2
with:
name: __build_sphx_docs__
path: ${{github.workspace}}/_build

- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: '_build'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
38 changes: 38 additions & 0 deletions .github/workflows/py-sanity-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: py-sanity-checks

on: [push, pull_request]

jobs:
build:
runs-on: windows-latest

steps:
- uses: actions/checkout@v2

- name: Setup conda environment
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: 3.9.1
- name: Cache conda environment cache
uses: actions/cache@v2
with:
path: C:\Miniconda\envs\diff_check
key: ${{ runner.os }}-conda-${{ hashFiles('environment.yml') }}
restore-keys: |
${{ runner.os }}-conda-
id: cache-conda
- name: Create diff_check conda environment if not cached
if: steps.cache-conda.outputs.cache-hit != 'true'
run: |
conda env create -f environment.yml

- name: Cache pre-commit hooks
uses: actions/cache@v2
with:
path: ~/.cache/pre-commit
key: ${{ runner.os }}-precommit-${{ hashFiles('.pre-commit-config.yaml') }}
- name: Install pre-commit
run: pip install pre-commit
- name: Run pre-commit
run: conda run --name diff_check --no-capture-output pre-commit run --all-files
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -247,3 +247,9 @@ cython_debug/

# egg-info
*.egg-info/

#######################################
## Sphinx
#######################################
# get rid of output folder
_build/
6 changes: 3 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
path = deps/googletest
url = https://github.com/google/googletest
branch = main
[submodule "deps/eigen"]
path = deps/eigen
url = https://gitlab.com/libeigen/eigen.git
[submodule "deps/open3d"]
path = deps/open3d
url = https://github.com/diffCheckOrg/submodule-open3d.git
Expand All @@ -20,3 +17,6 @@
[submodule "deps/submodule-cilantro"]
path = deps/submodule-cilantro
url = https://github.com/diffCheckOrg/submodule-cilantro.git
[submodule "deps/eigen"]
path = deps/eigen
url = https://gitlab.com/libeigen/eigen.git
44 changes: 44 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Install the pre-commit hooks below with
# 'pre-commit install'

# Auto-update the version of the hooks with
# 'pre-commit autoupdate'

# Run the hooks on all files with
# 'pre-commit run --all'

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-ast
exclude: ^deps/
- id: check-merge-conflict
- id: end-of-file-fixer
# only include python files
files: \.py$
- id: trailing-whitespace
# only include python files
files: \.py$
- id: end-of-file-fixer
# only include python files
files: \.py$

- repo: https://github.com/pre-commit/mirrors-mypy
rev: 'v1.11.0'
hooks:
- id: mypy
files: (src/gh|tests|invokes\.py)
exclude: src/gh/components/
additional_dependencies: [
types-requests==2.31.0,
numpy==2.0.1,
pytest==8.3.1,
types-setuptools>=71.1.0.20240818
]
args: [--config=pyproject.toml]

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.4
hooks:
- id: ruff
11 changes: 9 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ if (BUILD_PYTHON_MODULE)
set(PYBINDMODULE_NAME diffcheck_bindings)
set(PYPI_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src/gh/diffCheck/diffCheck)
set(TARGET_DLL_PYPI_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src/gh/diffCheck/diffCheck/dlls)
set(SPHINX_DOC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/doc)

download_submodule_project(pybind11)
add_subdirectory(deps/pybind11)
Expand All @@ -162,12 +163,18 @@ if (BUILD_PYTHON_MODULE)
${PYPI_DIR}
)
copy_dlls(${TARGET_DLL_PYPI_DIR} ${PYBINDMODULE_NAME})
# copy the pyd/dlls for the sphinx documentation
add_custom_command(TARGET ${PYBINDMODULE_NAME} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy
$<TARGET_FILE:${PYBINDMODULE_NAME}>
${SPHINX_DOC_DIR}
)
copy_dlls(${SPHINX_DOC_DIR} ${PYBINDMODULE_NAME})
endif()

#--------------------------------------------------------------------------
# Tests
#--------------------------------------------------------------------------
if(BUILD_TESTS)
include(tests)
endif()

endif()
Loading
Loading