Skip to content

Commit

Permalink
Merge branch 'main' into fix/test_heal
Browse files Browse the repository at this point in the history
  • Loading branch information
germa89 authored Jul 14, 2023
2 parents c65ced4 + 876533b commit 14493fa
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 47 deletions.
50 changes: 16 additions & 34 deletions .github/workflows/linkchecker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,21 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
ON_CI: True
DOCKER_PACKAGE: ghcr.io/ansys/mapdl
DOCKER_IMAGE_VERSION_DOCS_BUILD: v23.1.0
MAIN_PYTHON_VERSION: '3.9'
PYANSYS_OFF_SCREEN: True
DPF_START_SERVER: False
DPF_PORT: 21002
DISPLAY: ':99.0'

jobs:
linkchecker:
name: Check Links
runs-on: ubuntu-latest
env:
PYANSYS_OFF_SCREEN: "True"
PYMAPDL_PORT: 21000 # default won't work on GitHub runners
PYMAPDL_DB_PORT: 21001 # default won't work on GitHub runners
PYMAPDL_START_INSTANCE: FALSE
Expand All @@ -35,14 +43,6 @@ jobs:
sudo apt update
sudo apt install zip pandoc libgl1-mesa-glx xvfb texlive-latex-extra latexmk graphviz
- name: "Cache pip"
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: Python-v${{ env.RESET_PIP_CACHE }}-Linux-${{ env.MAIN_PYTHON_VERSION }}-${{ hashFiles('pyproject.toml') }}
restore-keys: |
Python-v${{ env.RESET_PIP_CACHE }}-Linux-${{ env.MAIN_PYTHON_VERSION }}
- name: "Test virtual framebuffer"
run: |
pip install -r .ci/requirements_test_xvfb.txt
Expand Down Expand Up @@ -72,30 +72,6 @@ jobs:
echo "PYMAPDL_VERSION=$(python -c 'from ansys.mapdl.core import __version__; print(__version__)')" >> $GITHUB_OUTPUT
echo "PyMAPDL version is: $(python -c "from ansys.mapdl.core import __version__; print(__version__)")"
- name: "Cache examples"
uses: actions/cache@v3
with:
path: doc/source/examples
key: Examples-v${{ env.RESET_EXAMPLES_CACHE }}-${{ steps.version.outputs.PYMAPDL_VERSION }}-${{ github.sha }}
restore-keys: |
Examples-v${{ env.RESET_EXAMPLES_CACHE }}-${{ steps.version.outputs.PYMAPDL_VERSION }}
- name: "Cache docs build directory"
uses: actions/cache@v3
with:
path: doc/_build
key: doc-build-v${{ env.RESET_DOC_BUILD_CACHE }}-${{ steps.version.outputs.PYMAPDL_VERSION }}-${{ github.sha }}
restore-keys: |
doc-build-v${{ env.RESET_DOC_BUILD_CACHE }}-${{ steps.version.outputs.PYMAPDL_VERSION }}
- name: "Cache autosummary"
uses: actions/cache@v3
with:
path: doc/source/**/_autosummary/*.rst
key: autosummary-v${{ env.RESET_AUTOSUMMARY_CACHE }}-${{ steps.version.outputs.PYMAPDL_VERSION }}-${{ github.sha }}
restore-keys: |
autosummary-v${{ env.RESET_AUTOSUMMARY_CACHE }}-${{ steps.version.outputs.PYMAPDL_VERSION }}
- name: "Install docs build requirements"
run: |
pip install .[doc]
Expand All @@ -107,9 +83,15 @@ jobs:
- name: LinkCheck
run: |
make -C doc linkcheck
make -C doc linkcheck SPHINXOPTS="-j auto -W --keep-going"
- name: "Display linkchecker results"
run: |
echo "::group:: Display linkcher output" && cat doc/*/output.txt && echo "::endgroup::" || echo "Failed to display the output file."
- name: "Upload artifacts"
uses: actions/upload-artifact@v3
with:
name: output
path: doc/**/output.txt
retention-days: 30
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ repos:
- id: isort

- repo: https://github.com/psf/black
rev: 23.3.0 # IF VERSION CHANGES --> MODIFY "blacken-docs" MANUALLY AS WELL!!
rev: 23.7.0 # IF VERSION CHANGES --> MODIFY "blacken-docs" MANUALLY AS WELL!!
hooks:
- id: black
args:
- --line-length=88

- repo: https://github.com/adamchainz/blacken-docs
rev: 1.14.0
rev: 1.15.0
hooks:
- id: blacken-docs
additional_dependencies: [black==23.3.0]
additional_dependencies: [black==23.7.0]

- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
Expand Down
4 changes: 2 additions & 2 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,7 @@
"sphinx.ext.coverage",
"sphinx.ext.doctest",
"sphinx.ext.extlinks",
# sphinx.ext.linkcode
# This add the button ``[Source]`` to each website.
# sphinx.ext.linkcode add the button ``[Source]`` to each website.
# The link of that button is created by calling ``linkcode_resolve``
# function which we overwrite in ansys.mapdl.core.docs
"sphinx.ext.linkcode",
Expand All @@ -82,6 +81,7 @@
"sphinx_gallery.gen_gallery",
"sphinxemoji.sphinxemoji",
"sphinx.ext.graphviz",
"sphinx_reredirects",
]

# Intersphinx mapping
Expand Down
2 changes: 1 addition & 1 deletion docker/docker-compose.dpf.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## To be executed after license server
services:
dpf:
image: 'ghcr.io/pyansys/dpf-core:22.2dev'
image: 'ghcr.io/ansys/dpf-core:22.2dev'
ports:
- '50056:50052'
restart: always
Expand Down
2 changes: 1 addition & 1 deletion docker/docker-compose.license_server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ version: '3.3'

services:
license_server:
image: 'ghcr.io/pyansys/ansyslm:222'
image: 'ghcr.io/ansys/ansyslm:222'
ports:
- '1055:1055'
- '2325:2325'
Expand Down
2 changes: 1 addition & 1 deletion docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ services:
ports:
- '50052:50052'
- '50055:50055'
image: 'ghcr.io/pyansys/mapdl:v22.2-ubuntu'
image: 'ghcr.io/ansys/mapdl:v22.2-ubuntu'
user: "0:0"
entrypoint: "/bin/bash ansys -grpc"

7 changes: 4 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ dependencies = [
"protobuf>=3.12.2", # minimum required based on latest ansys-grpc-mapdl
"psutil>=5.9.4",
"pyansys-tools-versioning>=0.3.3",
"ansys-tools-path==0.2.6",
"ansys-tools-path>=0.3.1",
"pyiges[full]>=0.3.1", # Since v0.3.0, the 'full' flag is needed in order to install 'geomdl'
"pyvista>=0.33.0",
"scipy>=1.3.0", # for sparse (consider optional?)
Expand Down Expand Up @@ -64,7 +64,7 @@ tests = [
"pyiges[full]==0.3.1",
"pytest==7.4.0",
"pytest-cov==4.1.0",
"pyvista==0.40.0",
"pyvista==0.40.1",
"pyansys-tools-report==0.6.0",
"vtk==9.2.6",
"pytest-rerunfailures==12.0",
Expand All @@ -87,14 +87,15 @@ doc = [
"pypandoc==1.11",
"pytest-sphinx==0.5.0",
"pythreejs==2.4.2",
"pyvista[trame]==0.40.0",
"pyvista[trame]==0.40.1",
"sphinx-autobuild==2021.3.14",
"sphinx-autodoc-typehints==1.23.0",
"sphinx-copybutton==0.5.2",
"sphinx-gallery==0.13.0",
"sphinx-notfound-page==0.8.3",
"sphinxcontrib-websupport==1.2.4",
"sphinxemoji==0.2.0",
"sphinx-reredirects==0.1.2",
"vtk==9.2.6",
]

Expand Down
14 changes: 12 additions & 2 deletions src/ansys/mapdl/core/_commands/preproc/material_data_tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ def tbdata(self, stloc="", c1="", c2="", c3="", c4="", c5="", c6="", **kwargs):
)
return self.run(command, **kwargs)

def tbdele(self, lab="", mat1="", mat2="", inc="", **kwargs):
def tbdele(self, lab="", mat1="", mat2="", inc="", tbopt="", **kwargs):
"""APDL Command: TBDELE
Deletes previously defined material data tables.
Expand All @@ -381,12 +381,22 @@ def tbdele(self, lab="", mat1="", mat2="", inc="", **kwargs):
steps of INC (defaults to 1). If MAT1= ALL, ignore MAT2 and INC
and delete data tables for all materials.
tbopt
Material data table option. Visit :meth:`Mapdl.tb <ansys.mapdl.core.Mapdl.tb>` for valid ``tbopt`` values for a given Lab.
**kwargs
Extra arguments to be passed to :meth:`Mapdl.run <ansys.mapdl.core.Mapdl.run>`.
Notes
-----
This command is also valid in SOLUTION.
If ``lab = "ALL"``, delete all material data tables.
If ``mat1= "ALL"``, ``mat2`` and ``inc`` are ignored and all material data tables are deleted.
If ``tbopt`` is specified, the material data table corresponding to ``Lab`` is deleted if it also has the specified table option. If ``tbopt`` is not specified, all material data tables corresponding to ``Lab`` are deleted. ``tbopt`` is ignored when ``Lab = "ALL"``.
This command is also valid in the solution processor (:meth:`mapdl.slashsolu() <ansys.mapdl.core.Mapdl.slashsolu>`), but is not intended for changing material behaviors between load steps.
"""
command = "TBDELE,%s,%s,%s,%s" % (
str(lab),
Expand Down

0 comments on commit 14493fa

Please sign in to comment.