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

Fix the documentation #14

Merged
merged 53 commits into from
Jan 19, 2023
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
1356a3c
Adding warnings
clatapie Jan 9, 2023
a656eaa
Adding the favicon + fixing Sphinx version
clatapie Jan 10, 2023
c21a765
Creating the documentation skeleton
clatapie Jan 11, 2023
2fe0e44
Merge branch 'main' into fix/documentation
clatapie Jan 11, 2023
f75f4b9
Adding the documentation content
clatapie Jan 11, 2023
774fca3
Merge branch 'fix/documentation' of https://github.com/pyansys/ansys-…
clatapie Jan 11, 2023
08c80fa
Fixing typos and updating README.rst
clatapie Jan 11, 2023
011d71b
Fixing vale errors
clatapie Jan 11, 2023
aa783c9
Fixing the vale error
clatapie Jan 11, 2023
d7b5c3b
Merge branch 'main' into fix/documentation
clatapie Jan 11, 2023
53c2c5e
Apply suggestions from code review
clatapie Jan 12, 2023
eced37f
Changes from Roberto's review
clatapie Jan 12, 2023
73e6939
Merge branch 'fix/documentation' of https://github.com/pyansys/ansys-…
clatapie Jan 12, 2023
a38ef8b
Code style changes
clatapie Jan 12, 2023
55cf4b9
Fixing an issue with the README.rst
clatapie Jan 12, 2023
82404df
Fixing a typo
clatapie Jan 12, 2023
cbf2e0c
Apply suggestions from code review
clatapie Jan 13, 2023
f3982fe
Apply suggestions from code review
clatapie Jan 13, 2023
479b964
Apply suggestions from code review
clatapie Jan 13, 2023
78ee81f
Code style changes
clatapie Jan 13, 2023
301e407
Flake8 changes
clatapie Jan 13, 2023
262560f
Apply suggestions from code review
clatapie Jan 13, 2023
93b5076
Changing 'APDLMath' into 'AnsMath' obj for clarity
clatapie Jan 13, 2023
380af34
Fixing typos in the doc
clatapie Jan 13, 2023
5dfe6fe
Update examples/scipy_sparse_matrix.py
clatapie Jan 16, 2023
efc7270
Apply changes from Kathy's review
clatapie Jan 16, 2023
5d49c4f
Merge branch 'main' into fix/documentation
clatapie Jan 16, 2023
777dbdf
Modifying the project name to PyAnsys-Math
clatapie Jan 16, 2023
e2b24ce
Merge branch 'fix/documentation' of https://github.com/pyansys/ansys-…
clatapie Jan 16, 2023
69a791b
Fixing issues with the repository name
clatapie Jan 16, 2023
b028e48
Fixing a typo
clatapie Jan 16, 2023
2885ecb
Fixing issues
clatapie Jan 16, 2023
eef5c07
Fixing a documentation issue
clatapie Jan 16, 2023
1926cd7
Fixing the building error
clatapie Jan 16, 2023
25f62f6
Apply suggestions from code review
clatapie Jan 17, 2023
cf0e721
Apply suggestions from code review
clatapie Jan 17, 2023
cd17af3
Changes from Kathy's review
clatapie Jan 17, 2023
e78e82d
Merge branch 'fix/documentation' of https://github.com/pyansys/ansys-…
clatapie Jan 17, 2023
7de45a9
Apply suggestions from code review
clatapie Jan 17, 2023
398eb52
Fixing the format of sentences
clatapie Jan 17, 2023
6322cbf
Merge branch 'main' into fix/documentation
clatapie Jan 17, 2023
30c1559
Chainging `PyAnsys-Math` name into `PyAnsys Math`
clatapie Jan 17, 2023
b24c934
Fixing Unit Test issues
clatapie Jan 17, 2023
4413fbb
Modifying the mat function init default value
clatapie Jan 17, 2023
81adfba
Apply suggestions from code review - Examples files
clatapie Jan 18, 2023
9978412
Apply suggestions from code review
clatapie Jan 18, 2023
70b4858
Fixing the _autosummary warnings
clatapie Jan 18, 2023
114a5c6
Merge branch 'fix/documentation' of https://github.com/pyansys/ansys-…
clatapie Jan 18, 2023
7501bf1
First commit from Kathy's review
clatapie Jan 18, 2023
03a60f5
Fixing the warning issue
clatapie Jan 18, 2023
9c0e7cd
Second commit from Kathy's review - math.py file
clatapie Jan 18, 2023
1543cbb
Third commit from Kathy's review - math.py file
clatapie Jan 18, 2023
f6a2fb8
Precising the needed Ansys license
clatapie Jan 19, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
35 changes: 4 additions & 31 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Ansys Math
==========
AnsysMath
=========
clatapie marked this conversation as resolved.
Show resolved Hide resolved

|pyansys| |pypi| |PyPIact| |GH-CI| |codecov| |zenodo| |MIT| |black|

Expand Down Expand Up @@ -30,36 +30,9 @@ Ansys Math
:alt: black


Overview
--------
AnsysMath is a Python repository holding Ansys mathematical libraries.

Ansys Math is a Python repository holding Ansys mathematical libraries.

.. include:: ref_getting_started_
clatapie marked this conversation as resolved.
Show resolved Hide resolved

Code Style
----------
Code style can be checked by running:

.. code-block:: text

tox -e style

Previous command will run `pre-commit <https://pre-commit.com/>`_ for checking code quality.


Documentation
-------------
Documentation can be rendered by running:

.. code-block:: text

tox -e doc

The resultant HTML files can be inspected using your favorite web browser:

.. code-block:: text

<browser> .tox/doc_out_html/index.html

Previous will open the rendered documentation in the desired browser.

15 changes: 15 additions & 0 deletions doc/source/api_ref/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@

.. _ref_index_api:

API reference
=============

This page gives an overview of the API of the public AnsysMath classes,
functions, and attributes.
clatapie marked this conversation as resolved.
Show resolved Hide resolved



.. toctree::
:maxdepth: 1

math
12 changes: 12 additions & 0 deletions doc/source/api_ref/math.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
.. _ref_math:

.. currentmodule:: ansys.math.core

.. autosummary::
:toctree: _autosummary

math.Math
math.ApdlMathObj
math.AnsVec
math.AnsMat
math.AnsSolver
24 changes: 22 additions & 2 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""Sphinx documentation configuration file."""
from datetime import datetime
import os
import warnings

from ansys_sphinx_theme import ansys_favicon, get_version_match, pyansys_logo_black
import numpy as np
Expand Down Expand Up @@ -28,7 +29,14 @@
pyvista.BUILDING_GALLERY = True
amath.BUILDING_GALLERY = True

# Project information
# suppress annoying matplotlib bug
warnings.filterwarnings(
"ignore",
category=UserWarning,
message="Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure.",
RobPasMue marked this conversation as resolved.
Show resolved Hide resolved
clatapie marked this conversation as resolved.
Show resolved Hide resolved
)

# -- Project information -----------------------------------------------------
project = "ansys-math-core"
copyright = f"(c) {datetime.now().year} ANSYS, Inc. All rights reserved"
author = "ANSYS, Inc."
Expand All @@ -37,7 +45,7 @@
# Select desired logo, theme, and declare the html title
html_logo = pyansys_logo_black
html_theme = "ansys_sphinx_theme"
html_short_title = html_title = "Ansys Math"
html_short_title = html_title = "AnsysMath"

cname = os.getenv("DOCUMENTATION_CNAME", "<DEFAULT_CNAME>")
"""The canonical name of the webpage hosting the documentation."""
Expand All @@ -48,6 +56,8 @@
"github_url": "https://github.com/pyansys/ansys-math",
"show_prev_next": False,
"show_breadcrumbs": True,
"collapse_navigation": True,
"use_edit_page_button": True,
"additional_breadcrumbs": [
("PyAnsys", "https://docs.pyansys.com/"),
],
Expand All @@ -65,6 +75,14 @@
"navbar_end": ["version-switcher", "theme-switcher", "navbar-icon-links"],
}

html_context = {
clatapie marked this conversation as resolved.
Show resolved Hide resolved
"display_github": True, # Integrate GitHub
"github_user": "pyansys",
"github_repo": "pymapdl",
clatapie marked this conversation as resolved.
Show resolved Hide resolved
"github_version": "main",
"doc_path": "doc/source",
}

# Sphinx extensions
extensions = [
"jupyter_sphinx",
Expand Down Expand Up @@ -114,6 +132,8 @@
# "grpc": ("https://grpc.github.io/grpc/python/", None),
}

suppress_warnings = ["label.*"]
# supress_warnings = ["ref.option"]
clatapie marked this conversation as resolved.
Show resolved Hide resolved
# numpydoc configuration
numpydoc_show_class_members = False
numpydoc_xref_param_type = True
Expand Down
80 changes: 80 additions & 0 deletions doc/source/contributing/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
.. _ref_contributing:

Contributing
============

Overall guidance on contributing to a PyAnsys library appears in the
`Contributing <dev_guide_contributing_>`_ topic
in the *PyAnsys Developer's Guide*. Ensure that you are thoroughly familiar
with it and all `Coding style <dev_guide_coding_style_>`_ before attempting to
contribute to PyMAPDL.
clatapie marked this conversation as resolved.
Show resolved Hide resolved

The following contribution information is specific to PyMAPDL.
clatapie marked this conversation as resolved.
Show resolved Hide resolved

Cloning the AnsysMath repository
clatapie marked this conversation as resolved.
Show resolved Hide resolved
--------------------------------

Run this code to clone and install the latest version of PyMAPDL in development mode::
clatapie marked this conversation as resolved.
Show resolved Hide resolved

git clone https://github.com/pyansys/ansys-math
cd ansys-math
python -m pip install --upgrade pip
pip install -e .

Posting issues
--------------

Use the `AnsysMath Issues <amath_issues_>`_ page to submit questions,
report bugs, and request new features. When possible,use these issue
clatapie marked this conversation as resolved.
Show resolved Hide resolved
templates:

* Bug report template
* Feature request template

If your issue does not fit into one of these categories, create your own issue.

To reach the project support team, email `pyansys.support@ansys.com <pyansys_support_>`_.
clatapie marked this conversation as resolved.
Show resolved Hide resolved


Building documentation
----------------------

To build the AnsysMath documentation locally, in the root directory of the repository, run::

pip install .[doc]
.\doc\make.bat html

Documentation for the latest stable release of AnsysMath is hosted at
`AnsysMath Documentation <amath_docs_>`_.

Documentation for the latest development version, which tracks the
``main`` branch, is hosted at
`Development AnsysMath Documentation <amath_dev_docs_>`_.
This version is automatically kept up to date via GitHub actions.


Code style
----------

AnsysMath follows PEP8 standard as outlined in the `PyAnsys Development Guide
clatapie marked this conversation as resolved.
Show resolved Hide resolved
<dev_guide_pyansys_>`_ and implements style checking using
`pre-commit <precommit_>`_.

To ensure your code meets minimum code styling standards, run::
clatapie marked this conversation as resolved.
Show resolved Hide resolved

pip install pre-commit
pre-commit run --all-files

You can also install this as a pre-commit hook by running::
clatapie marked this conversation as resolved.
Show resolved Hide resolved

pre-commit install

This way, it's not possible for you to push code that fails the style checks. For example::

$ pre-commit install
$ git commit -am "added my cool feature"
black....................................................................Passed
isort....................................................................Passed
flake8...................................................................Passed
codespell................................................................Passed
clatapie marked this conversation as resolved.
Show resolved Hide resolved

36 changes: 25 additions & 11 deletions doc/source/getting_started/index.rst
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
===============
.. _ref_getting_started:

Getting started
===============
To use Ansys Math, you must have a local installation of Ansys.
To use AnsysMath, you must have a local installation of Ansys.

For more information on getting a licensed copy of Ansys, visit
`Ansys <ansys_>`_ .



************
Installation
************
------------

Python module
~~~~~~~~~~~~~
For users
~~~~~~~~~
The ``ansys.math.core`` package currently supports Python 3.7 through
Python 3.10 on Windows, Mac OS, and Linux.

Expand All @@ -22,13 +22,16 @@ Python 3.10 on Windows, Mac OS, and Linux.
pip install ansys-math-core

Alternatively, install the latest from
`Ansys Math GitHub <ansys_math_github_>`_ via:
`AnsysMath GitHub <amath_github_>`_ via:

.. code::

pip install git+https://github.com/pyansys/ansys-math.git



For developers
~~~~~~~~~~~~~~~
clatapie marked this conversation as resolved.
Show resolved Hide resolved
For a local *development* version, install with:

.. code::
Expand All @@ -43,17 +46,28 @@ after restarting the Python kernel.


Verify your installation
~~~~~~~~~~~~~~~~~~~~~~~~
Check that you can start Ansys Math from Python by running:
------------------------

Check that you can start AnsysMath from Python by running:

.. code:: python

import ansys.math.core.math as amath

# Start Ansys Math
# Start AnsysMath
mm = amath.Math()
print(mm)


If you see a response from the server, congratulations. You're ready
to get started using Ansys Math as a service.
to get started using AnsysMath as a service.

Ansys software requirements
---------------------------

You must have a copy of Ansys 2021 R1 or later installed locally.

.. note::

The latest versions of Ansys provide significantly better support
and features. AnsysMath is not supported on earlier Ansys versions.