Skip to content

Commit

Permalink
Move docs to doc
Browse files Browse the repository at this point in the history
Signed-off-by: paul.profizi <[email protected]>
  • Loading branch information
PProfizi committed Jan 15, 2024
1 parent 5e08d21 commit 08c8427
Show file tree
Hide file tree
Showing 111 changed files with 174 additions and 175 deletions.
4 changes: 2 additions & 2 deletions .ci/build_doc.bat
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
set SPHINX_APIDOC_OPTIONS=inherited-members
call sphinx-apidoc -o ../docs/source/api ../src/ansys ../src/ansys/dpf/core/log.py ^
call sphinx-apidoc -o ../doc/source/api ../src/ansys ../src/ansys/dpf/core/log.py ^
../src/ansys/dpf/core/help.py ../src/ansys/dpf/core/mapping_types.py ../src/ansys/dpf/core/ipconfig.py ^
../src/ansys/dpf/core/field_base.py ../src/ansys/dpf/core/cache.py ../src/ansys/dpf/core/misc.py ^
../src/ansys/dpf/core/check_version.py ../src/ansys/dpf/core/operators/build.py ../src/ansys/dpf/core/operators/specification.py ^
Expand All @@ -8,7 +8,7 @@ call sphinx-apidoc -o ../docs/source/api ../src/ansys ../src/ansys/dpf/core/log.
../src/ansys/dpf/core/property_fields_container.py ^
-f --implicit-namespaces --separate --no-headings
pushd .
cd ../docs/
cd ../doc/
call make clean
call make html -v -v -v -P

Expand Down
2 changes: 1 addition & 1 deletion .ci/build_operators_doc.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
# Generate entry documentation
print("Generating operator documentation")
print(f"Current context: {SERVER_CONTEXT}")
dpf.operators.utility.html_doc(r"../docs/source/_static/dpf_operators.html").eval()
dpf.operators.utility.html_doc(r"../doc/source/_static/dpf_operators.html").eval()
print("Done.\n")
2 changes: 1 addition & 1 deletion .flake8
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[flake8]
exclude = venv, src/ansys/dpf/core/operators, __init__.py, docs/build, .venv, src/ansys/dpf/gate, src/ansys/dpf/gatebin, src/ansys/grpc/dpf
exclude = venv, src/ansys/dpf/core/operators, __init__.py, doc/build, .venv, src/ansys/dpf/gate, src/ansys/dpf/gatebin, src/ansys/grpc/dpf
select = W191, W391, E115, E117, E122, E124, E125, E301, W291, W293, E225, E231, E303, E501, F401, F403
per-file-ignores =
__init__.py:F401,F403
Expand Down
2 changes: 1 addition & 1 deletion .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
documentation:
- docs/source/**/*
- doc/source/**/*
- examples/**/*
maintenance:
- .flake8
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ jobs:
uses: ansys/actions/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
vale-config: "docs/.vale.ini"

docs:
name: "Documentation"
Expand Down Expand Up @@ -140,12 +139,12 @@ jobs:
shell: cmd
working-directory: .ci
run: |
build_doc.bat > ..\docs\log.txt && type ..\docs\log.txt 2>&1
build_doc.bat > ..\doc\log.txt && type ..\doc\log.txt 2>&1
timeout-minutes: 60

- name: "Check for success"
shell: bash
working-directory: docs
working-directory: doc
run: |
case `grep -F "build succeeded" log.txt >/dev/null; echo $?` in
0)
Expand Down Expand Up @@ -175,13 +174,13 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: doc-${{env.PACKAGE_NAME}}-log
path: docs/*.txt
path: doc/*.txt
if: always()

- name: "Zip HTML Documentation"
shell: pwsh
run: |
Compress-Archive -Path docs/build/html/* -Destination HTML-doc-${{env.PACKAGE_NAME}}.zip
Compress-Archive -Path doc/build/html/* -Destination HTML-doc-${{env.PACKAGE_NAME}}.zip
if: always()

- name: "Upload HTML Documentation"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update_operators.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ jobs:
src/ansys/dpf/gatebin/*
src/ansys/grpc/*
src/ansys/dpf/core/operators/*
docs/source/_static/dpf_operators.html
doc/source/_static/dpf_operators.html
commit-message: update generated code
title: Update generated code for DPF ${{ github.event.inputs.ANSYS_VERSION || '242' }}${{ github.event.inputs.standalone_branch_suffix || '' }} on ${{ github.ref_name }}
body: An update of generated code has been triggered either manually or by an update in the dpf-standalone repository.
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
exclude: |
(?x)^(
docs/source/|
doc/source/|
src/ansys/dpf/core/operators/|
examples_notebooks/|
src/ansys/dpf/core/__init__.py|
docs/styles/|
doc/styles/|
src/ansys/dpf/gate/|
src/ansys/dpf/gatebin/|
src/ansys/grpc/dpf/|
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Simple makefile to simplify repetitive build env management tasks under posix

CODESPELL_DIRS ?= ./
CODESPELL_SKIP ?= "*.pyc,*.txt,*.gif,*.png,*.jpg,*.js,*.html,*.doctree,*.ttf,*.woff,*.woff2,*.eot,*.mp4,*.inv,*.pickle,*.ipynb,flycheck*,./.git/*,./.hypothesis/*,*.yml,./docs/build/*,./docs/images/*,./dist/*,*~,.hypothesis*,./docs/source/examples/*,*cover,*.dat,*.mac,\#*,build,./ansys/dpf/core/raw_operators.py,./run_client.bat,./docker/v211"
CODESPELL_SKIP ?= "*.pyc,*.txt,*.gif,*.png,*.jpg,*.js,*.html,*.doctree,*.ttf,*.woff,*.woff2,*.eot,*.mp4,*.inv,*.pickle,*.ipynb,flycheck*,./.git/*,./.hypothesis/*,*.yml,./doc/build/*,./doc/images/*,./dist/*,*~,.hypothesis*,./doc/source/examples/*,*cover,*.dat,*.mac,\#*,build,./ansys/dpf/core/raw_operators.py,./run_client.bat,./docker/v211"
CODESPELL_IGNORE ?= "ignore_words.txt"

all: doctest
Expand Down
2 changes: 1 addition & 1 deletion codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ coverage:
if_no_uploads: error
ignore:
- "examples" # ignore folder and all its contents
- "docs" # ignore folder and all its contents
- "doc" # ignore folder and all its contents
- "docker" # ignore folder and all its contents
- "tests" # ignore folder and all its contents
- "src/ansys/dpf/core/operators" # ignore folder and all its contents
Expand Down
84 changes: 42 additions & 42 deletions docs/.vale.ini → doc/.vale.ini
Original file line number Diff line number Diff line change
@@ -1,43 +1,43 @@
# Core settings
# =============

# Location of our `styles`
StylesPath = "styles"

# The options are `suggestion`, `warning`, or `error` (defaults to “warning”).
MinAlertLevel = warning

# By default, `code` and `tt` are ignored.
IgnoredScopes = code, tt

# By default, `script`, `style`, `pre`, and `figure` are ignored.
SkippedScopes = script, style, pre, figure

# WordTemplate specifies what Vale will consider to be an individual word.
WordTemplate = \b(?:%s)\b

# List of Packages to be used for our guidelines
Packages = Google

# Define the Ansys vocabulary
Vocab = ANSYS

[*.{md,rst}]

# Apply the following styles
BasedOnStyles = Vale, Google

# Removing Google-specific rule - Not applicable under some circumstances
Google.WordList = NO
Google.Colons = NO
Google.Headings = NO

[formats]
# Format associations appear under
# the optional "formats" section.

[*]
# Format-specific settings appear
# under a user-provided "glob"
# pattern.
# Core settings
# =============

# Location of our `styles`
StylesPath = "styles"

# The options are `suggestion`, `warning`, or `error` (defaults to “warning”).
MinAlertLevel = warning

# By default, `code` and `tt` are ignored.
IgnoredScopes = code, tt

# By default, `script`, `style`, `pre`, and `figure` are ignored.
SkippedScopes = script, style, pre, figure

# WordTemplate specifies what Vale will consider to be an individual word.
WordTemplate = \b(?:%s)\b

# List of Packages to be used for our guidelines
Packages = Google

# Define the Ansys vocabulary
Vocab = ANSYS

[*.{md,rst}]

# Apply the following styles
BasedOnStyles = Vale, Google

# Removing Google-specific rule - Not applicable under some circumstances
Google.WordList = NO
Google.Colons = NO
Google.Headings = NO

[formats]
# Format associations appear under
# the optional "formats" section.

[*]
# Format-specific settings appear
# under a user-provided "glob"
# pattern.
TokenIgnores = (:class:\x60.*\x60|:meth:\x60.*\x60|:py:class:\x60.*\x60|:py:meth:\x60.*\x60)
144 changes: 72 additions & 72 deletions docs/make.bat → doc/make.bat
Original file line number Diff line number Diff line change
@@ -1,72 +1,72 @@
@ECHO OFF

pushd %~dp0

REM Command file for Sphinx documentation

if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=source
set BUILDDIR=build

if "%1" == "" goto help
if "%1" == "clean" goto clean

%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.http://sphinx-doc.org/
exit /b 1
)

%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end

:clean
echo.Cleaning files form previous build...
IF EXIST "build" (
rmdir "build" /s /q
)
IF EXIST "source\images\auto-generated" (
rmdir "source\images\auto-generated" /s /q
)
IF EXIST "source\examples\07-python-operators\plugins" (
robocopy "source\examples\07-python-operators\plugins" "source\_temp\plugins" /E >nul 2>&1
)
IF EXIST "source\examples\04-advanced\02-volume_averaged_stress" (
robocopy "source\examples\04-advanced\02-volume_averaged_stress" "source\_temp\04_advanced" /E >nul 2>&1
)
IF EXIST "source\examples\12-fluids\02-fluids_results" (
robocopy "source\examples\12-fluids\02-fluids_results" "source\_temp\12_fluids" /E >nul 2>&1
)
IF EXIST "source\examples" (
rmdir "source\examples" /s /q
)
IF EXIST "source\_temp\plugins" (
robocopy "source\_temp\plugins" "source\examples\07-python-operators\plugins" /E >nul 2>&1
)
IF EXIST "source\_temp\04_advanced" (
robocopy "source\_temp\04_advanced" "source\examples\04-advanced\02-volume_averaged_stress" /E >nul 2>&1
)
IF EXIST "source\_temp\12_fluids" (
robocopy "source\_temp\12_fluids" "source\examples\12-fluids\02-fluids_results" /E >nul 2>&1
)
IF EXIST "source\_temp" (
rmdir "source\_temp" /s /q
)

echo.Done.
goto end

:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%

:end
popd
@ECHO OFF

pushd %~dp0

REM Command file for Sphinx documentation

if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=source
set BUILDDIR=build

if "%1" == "" goto help
if "%1" == "clean" goto clean

%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.http://sphinx-doc.org/
exit /b 1
)

%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end

:clean
echo.Cleaning files form previous build...
IF EXIST "build" (
rmdir "build" /s /q
)
IF EXIST "source\images\auto-generated" (
rmdir "source\images\auto-generated" /s /q
)
IF EXIST "source\examples\07-python-operators\plugins" (
robocopy "source\examples\07-python-operators\plugins" "source\_temp\plugins" /E >nul 2>&1
)
IF EXIST "source\examples\04-advanced\02-volume_averaged_stress" (
robocopy "source\examples\04-advanced\02-volume_averaged_stress" "source\_temp\04_advanced" /E >nul 2>&1
)
IF EXIST "source\examples\12-fluids\02-fluids_results" (
robocopy "source\examples\12-fluids\02-fluids_results" "source\_temp\12_fluids" /E >nul 2>&1
)
IF EXIST "source\examples" (
rmdir "source\examples" /s /q
)
IF EXIST "source\_temp\plugins" (
robocopy "source\_temp\plugins" "source\examples\07-python-operators\plugins" /E >nul 2>&1
)
IF EXIST "source\_temp\04_advanced" (
robocopy "source\_temp\04_advanced" "source\examples\04-advanced\02-volume_averaged_stress" /E >nul 2>&1
)
IF EXIST "source\_temp\12_fluids" (
robocopy "source\_temp\12_fluids" "source\examples\12-fluids\02-fluids_results" /E >nul 2>&1
)
IF EXIST "source\_temp" (
rmdir "source\_temp" /s /q
)

echo.Done.
goto end

:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%

:end
popd
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions docs/styles/.gitignore → doc/styles/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*
!Vocab
!Vocab/**
*
!Vocab
!Vocab/**
!.gitignore
Loading

0 comments on commit 08c8427

Please sign in to comment.