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

Fixing vale warning #2394

Merged
merged 50 commits into from
Oct 17, 2023
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
abe810d
fix: vale warning
clatapie Oct 6, 2023
abf7a61
Merge branch 'main' into fix/codestyle
clatapie Oct 6, 2023
8952c3a
Apply suggestions from code review
clatapie Oct 6, 2023
3d783e1
fix: `troubleshoot.rst`
clatapie Oct 6, 2023
dea400f
Merge branch 'fix/codestyle' of https://github.com/ansys/pymapdl into…
clatapie Oct 6, 2023
8d63aa8
fix: .vale
clatapie Oct 6, 2023
f9458e5
test: adding code and tt in `SkippedScopes`
clatapie Oct 6, 2023
48d43f1
fix: vale checks
clatapie Oct 6, 2023
f4f3da8
fix: moving .vale.ini
clatapie Oct 6, 2023
185c345
maint: affing `vale-config` path
clatapie Oct 6, 2023
6e69e9a
Merge branch 'main' into fix/codestyle
clatapie Oct 6, 2023
3a164f6
maint: removing skip
clatapie Oct 6, 2023
e3bddb8
maint: fixing .vale.ini
clatapie Oct 6, 2023
fe8793e
Merge branch 'main' into fix/codestyle
clatapie Oct 6, 2023
7022169
maint: reverting changes with `.vale.ini` location
clatapie Oct 9, 2023
cfcc528
fix: `StylesPath` in `.vale.ini`
clatapie Oct 9, 2023
f09ea0c
Merge branch 'main' into fix/codestyle
clatapie Oct 9, 2023
bff477c
fix: vale configuration to ignore `class` and `func`
clatapie Oct 11, 2023
e9d492d
fix: `.vale.ini`
clatapie Oct 11, 2023
def856f
Merge branch 'main' into fix/codestyle
clatapie Oct 11, 2023
51c465a
fix: adding :attr: in TokenIgnores
clatapie Oct 11, 2023
ac5719d
fix: adding `:meth:` in TokenIgnores
clatapie Oct 11, 2023
9cabcf6
fix: vale warnings
clatapie Oct 11, 2023
b7400b8
fix: applying Revathy's review
clatapie Oct 11, 2023
3ef1bea
fix: vale check
clatapie Oct 11, 2023
df3cd0f
fic: ignoring vale for links
clatapie Oct 11, 2023
3f70faa
fix: `.vale.ini`
clatapie Oct 11, 2023
10811f0
fix: `.vale.ini` configuration
clatapie Oct 11, 2023
51bf5a1
fix: applying Revathy's review
clatapie Oct 11, 2023
fb80b15
fic: `.vale.ini` configuration
clatapie Oct 11, 2023
adb3916
doc: applying fixes from vale warnings
clatapie Oct 11, 2023
c706b2c
Update doc/.vale.ini
clatapie Oct 11, 2023
e80ce17
doc: fixes references and formatting
clatapie Oct 11, 2023
a3aeced
maint: updating cicd
clatapie Oct 11, 2023
6a03a65
fix: adding ref in `troubleshoots.rst`
clatapie Oct 11, 2023
70e07d9
Merge branch 'main' into fix/codestyle
clatapie Oct 11, 2023
03be46e
fix: reverting changes from `.vale.ini`
clatapie Oct 13, 2023
3f000b6
fix: updating `TokenIgnores`
clatapie Oct 13, 2023
702da64
Merge branch 'main' into fix/codestyle
clatapie Oct 13, 2023
71e6a9d
fix: adding `py` in `TokenIgnores`
clatapie Oct 13, 2023
c0287c0
Merge branch 'fix/codestyle' of https://github.com/pyansys/pymapdl in…
clatapie Oct 13, 2023
7a55fd7
maint: removing [Mm]apdl as accepted words
clatapie Oct 13, 2023
c805aa1
fix: skipping code sections
clatapie Oct 13, 2023
0423478
Update doc/source/user_guide/mapdl.rst
clatapie Oct 13, 2023
b5532ab
Update the image cache
clatapie Oct 13, 2023
5502a03
Merge branch 'main' into fix/codestyle
germa89 Oct 16, 2023
0ed79fa
Merge branch 'main' into fix/codestyle
germa89 Oct 16, 2023
2c25672
Update the image cache
germa89 Oct 16, 2023
241fc57
Empty comment to trigger CICD
germa89 Oct 16, 2023
db6da8e
Merge branch 'fix/codestyle' of https://github.com/pyansys/pymapdl in…
germa89 Oct 16, 2023
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
3 changes: 1 addition & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,12 @@ jobs:
doc-style:
name: "Documentation style check"
runs-on: ubuntu-latest
#Skipping until 2394 is fixed
if: github.ref == 'Skip for now'
steps:
- name: "Ansys documentation style checks"
uses: ansys/actions/doc-style@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
vale-config: .vale.ini

smoke-tests:
name: "Build and smoke tests"
Expand Down
62 changes: 31 additions & 31 deletions doc/.vale.ini → .vale.ini
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
# 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.Colons = NO
# Core settings
# =============

# Location of our `styles`
StylesPath = "./doc/styles"

clatapie marked this conversation as resolved.
Show resolved Hide resolved
# 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.Colons = NO
8 changes: 6 additions & 2 deletions doc/source/user_guide/convert.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Translate scripts
===================

The `ansys-mapdl-core <pymapdl_docs_>`_
library contains a few basic functions to translate existing MAPDL
scripts into PyMAPDL scripts. Ideally, all math and variable setting
Expand All @@ -8,7 +9,7 @@


Command-line interface
~~~~~~~~~~~~~~~~~~~~~~
----------------------

In PyMAPDL v0.64.0 and later, you use the converter from the command line.
After you have activated and installed the package as described
Expand Down Expand Up @@ -40,7 +41,7 @@
Hence, this command accepts most of this function's arguments.

Usage
-----
~~~~~

You can call this command from the terminal with different
arguments. Here is an example that converts the ``mapdl.dat``
Expand Down Expand Up @@ -90,11 +91,12 @@

Caveats
~~~~~~~

These examples only show an automatic translation of a verification:
file and not optimized code. Should it be necessary to pull
parameters or arrays from ansys, use the :func:`Mapdl.get_value()
<ansys.mapdl.core.Mapdl.get_value>` function, which is quite similar to the

Check failure on line 98 in doc/source/user_guide/convert.rst

View workflow job for this annotation

GitHub Actions / vale

[vale] doc/source/user_guide/convert.rst#L98

[Google.Spacing] 'e.M' should have one space.
Raw output
{"message": "[Google.Spacing] 'e.M' should have one space.", "location": {"path": "doc/source/user_guide/convert.rst", "range": {"start": {"line": 98, "column": 17}}}, "severity": "ERROR"}
MAPDL :func:`Mapdl.get() <ansys.mapdl.core.Mapdl.get>`

Check failure on line 99 in doc/source/user_guide/convert.rst

View workflow job for this annotation

GitHub Actions / vale

[vale] doc/source/user_guide/convert.rst#L99

[Google.Spacing] 'e.M' should have one space.
Raw output
{"message": "[Google.Spacing] 'e.M' should have one space.", "location": {"path": "doc/source/user_guide/convert.rst", "range": {"start": {"line": 99, "column": 42}}}, "severity": "ERROR"}
command shown here:

.. code:: pycon
Expand All @@ -103,7 +105,7 @@
4.532094298033

Alternatively, if a parameter is already defined, you can access it
using the :attr:`Mapdl.parameters <ansys.mapdl.core.Mapdl.parameters>` attribute

Check failure on line 108 in doc/source/user_guide/convert.rst

View workflow job for this annotation

GitHub Actions / vale

[vale] doc/source/user_guide/convert.rst#L108

[Google.Spacing] 'e.M' should have one space.
Raw output
{"message": "[Google.Spacing] 'e.M' should have one space.", "location": {"path": "doc/source/user_guide/convert.rst", "range": {"start": {"line": 108, "column": 51}}}, "severity": "ERROR"}
with:

.. code:: pycon
Expand All @@ -122,6 +124,7 @@

Script translation
~~~~~~~~~~~~~~~~~~

Existing Ansys scripts can be translated using the :func:`convert_script() <ansys.mapdl.core.convert_script>`
function:

Expand Down Expand Up @@ -158,7 +161,7 @@
commands can be called as a method to the Ansys object rather than
sending a string as a command. Additionally, take note that some
commands require the :attr:`Mapdl.non_interactive
<ansys.mapdl.core.Mapdl.non_interactive>` context manager since some

Check failure on line 164 in doc/source/user_guide/convert.rst

View workflow job for this annotation

GitHub Actions / vale

[vale] doc/source/user_guide/convert.rst#L164

[Google.Spacing] 'e.M' should have one space.
Raw output
{"message": "[Google.Spacing] 'e.M' should have one space.", "location": {"path": "doc/source/user_guide/convert.rst", "range": {"start": {"line": 164, "column": 17}}}, "severity": "ERROR"}
commands require and may break the server connection for some
interfaces (such as CORBA) or are invalid (as in gRPC).

Expand All @@ -169,6 +172,7 @@

Example: VM1 - statically indeterminate reaction force analysis
---------------------------------------------------------------

Ansys MAPDL contains over 200 verification files used for Ansys
validation and demonstration. These validation files are used here to
demo the use of the PyMAPDL file translator :func:`convert_script()
Expand Down Expand Up @@ -336,7 +340,7 @@
``mapdl.run('/COM')``. Also, note that the ``*VWRITE`` command
requires a command immediately following it. This normally locks the
interface, so it's implemented in the background as an input file
using the :attr:`Mapdl.non_interactive <ansys.mapdl.core.Mapdl.non_interactive>`

Check failure on line 343 in doc/source/user_guide/convert.rst

View workflow job for this annotation

GitHub Actions / vale

[vale] doc/source/user_guide/convert.rst#L343

[Google.Spacing] 'e.M' should have one space.
Raw output
{"message": "[Google.Spacing] 'e.M' should have one space.", "location": {"path": "doc/source/user_guide/convert.rst", "range": {"start": {"line": 343, "column": 56}}}, "severity": "ERROR"}
attribute.


Expand Down
29 changes: 7 additions & 22 deletions doc/source/user_guide/troubleshoot.rst
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@



.. _ref_troubleshooting:


=======================
Troubleshooting PyMAPDL
=======================

Expand All @@ -13,9 +9,8 @@
some of the most common problems and frequently asked questions are posted here.


*****************
Debug in PyMAPDL
*****************
----------------

If you are having trouble with PyMAPDL, you can record some internal
logs into a file using a logger.
Expand Down Expand Up @@ -43,11 +38,9 @@
`PyMAPDL Issues page <pymapdl_issues_>`_.


.. _debugging_launch_mapdl:

****************
Launching issues
****************
----------------

There are several issues that can cause MAPDL not to launch, including:

Expand Down Expand Up @@ -255,9 +248,6 @@
such file or directory``, you are likely missing some necessary
dependencies.


.. _installing_mapdl_on_centos7:

CentOS 7
--------

Expand All @@ -268,8 +258,6 @@
yum install openssl openssh-clients mesa-libGL mesa-libGLU motif libgfortran


.. _installing_mapdl_on_ubuntu:

Ubuntu
------

Expand Down Expand Up @@ -520,14 +508,10 @@
information, see :ref:`conflicts_student_version`.


.. _ref_pymapdl_limitations:

*********************
PyMAPDL usage issues
*********************

.. _ref_numpy_arrays_in_mapdl:

Issues when importing and exporting numpy arrays in MAPDL
=========================================================

Expand Down Expand Up @@ -584,7 +568,6 @@



.. _ref_pymapdl_stability:

*****************
PyMAPDL stability
Expand All @@ -602,7 +585,7 @@

When possible, pass ``mute=True`` to individual MAPDL commands or
set it globally with the :func:`Mapdl.mute
<ansys.mapdl.core.mapdl_grpc.MapdlGrpc>` method. This disables streaming

Check failure on line 588 in doc/source/user_guide/troubleshoot.rst

View workflow job for this annotation

GitHub Actions / vale

[vale] doc/source/user_guide/troubleshoot.rst#L588

[Google.Spacing] 'c.M' should have one space.
Raw output
{"message": "[Google.Spacing] 'c.M' should have one space.", "location": {"path": "doc/source/user_guide/troubleshoot.rst", "range": {"start": {"line": 588, "column": 28}}}, "severity": "ERROR"}
back the response from MAPDL for each command and marginally
improves performance and stability. Consider having a debug flag in
your program or script so that you can turn on and off logging and
Expand All @@ -613,12 +596,14 @@
======

.. note::

MAPDL 2021 R1 has a stability issue with the :func:`Mapdl.input()
<ansys.mapdl.core.Mapdl.input>` method. Avoid using input files if

Check failure on line 601 in doc/source/user_guide/troubleshoot.rst

View workflow job for this annotation

GitHub Actions / vale

[vale] doc/source/user_guide/troubleshoot.rst#L601

[Google.Spacing] 'e.M' should have one space.
Raw output
{"message": "[Google.Spacing] 'e.M' should have one space.", "location": {"path": "doc/source/user_guide/troubleshoot.rst", "range": {"start": {"line": 601, "column": 20}}}, "severity": "ERROR"}
possible. Attempt to use the :func:`Mapdl.upload()
<ansys.mapdl.core.Mapdl.upload>` method to upload nodes and elements and read them
in via the :func:`Mapdl.nread() <ansys.mapdl.core.Mapdl.nread>` and
possible. Attempt to use the
:func:`Mapdl.upload() <ansys.mapdl.core.Mapdl.upload>` method to upload

Check failure on line 603 in doc/source/user_guide/troubleshoot.rst

View workflow job for this annotation

GitHub Actions / vale

[vale] doc/source/user_guide/troubleshoot.rst#L603

[Google.Spacing] 'e.M' should have one space.
Raw output
{"message": "[Google.Spacing] 'e.M' should have one space.", "location": {"path": "doc/source/user_guide/troubleshoot.rst", "range": {"start": {"line": 603, "column": 42}}}, "severity": "ERROR"}
nodes and elements and read them in via the
:func:`Mapdl.nread() <ansys.mapdl.core.Mapdl.nread>` and

Check failure on line 605 in doc/source/user_guide/troubleshoot.rst

View workflow job for this annotation

GitHub Actions / vale

[vale] doc/source/user_guide/troubleshoot.rst#L605

[Google.Spacing] 'e.M' should have one space.
Raw output
{"message": "[Google.Spacing] 'e.M' should have one space.", "location": {"path": "doc/source/user_guide/troubleshoot.rst", "range": {"start": {"line": 605, "column": 41}}}, "severity": "ERROR"}
:func:`Mapdl.eread() <ansys.mapdl.core.Mapdl.eread>` methods.

Check failure on line 606 in doc/source/user_guide/troubleshoot.rst

View workflow job for this annotation

GitHub Actions / vale

[vale] doc/source/user_guide/troubleshoot.rst#L606

[Google.Spacing] 'e.M' should have one space.
Raw output
{"message": "[Google.Spacing] 'e.M' should have one space.", "location": {"path": "doc/source/user_guide/troubleshoot.rst", "range": {"start": {"line": 606, "column": 41}}}, "severity": "ERROR"}



Expand Down
2 changes: 2 additions & 0 deletions doc/styles/Vocab/ANSYS/accept.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
[Ee]igensolver
[Hh]yperelasticity
[Kk]eypoints
[Mm]apdl
clatapie marked this conversation as resolved.
Show resolved Hide resolved
[Mm]atplotlib
[Nn]umpy
[Pp]ostprocess
Expand Down Expand Up @@ -146,6 +147,7 @@ UPF
UPFs
viscoplastic
vise
von
VTK
wan
WAN
Expand Down
Loading