Skip to content

Commit cf531e4

Browse files
authored
doc/edits to fix generation of ToC for PDF of doc (#47)
1 parent 9c2330e commit cf531e4

File tree

9 files changed

+116
-124
lines changed

9 files changed

+116
-124
lines changed

README.rst

Lines changed: 1 addition & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#########################
12
PyAnsys Developer's Guide
23
#########################
34

@@ -9,48 +10,7 @@ This guide serves as the central document for:
910
- Anyone who is interested in learning more about the PyAnsys
1011
project and libraries
1112

12-
1313
Web-based documentation can be found in `PyAnsys Developer's Guide <https://dev.docs.pyansys.com>`_.
1414

15-
1615
A PDF version of this guide can be found in the release notes in `Releases
1716
<https://github.com/pyansys/about/releases>`_.
18-
19-
20-
Generate Documentation
21-
----------------------
22-
To generate this documentation locally, you can install the requirements into
23-
your Python environment with:
24-
25-
.. code::
26-
27-
pip install -r requirements_docs.txt
28-
29-
or if you want to configure and activate a Python virtual environment with the
30-
required packages:
31-
32-
.. code::
33-
34-
configure_venv
35-
36-
Then, depending on your operating system, generate the documentation.
37-
38-
On Windows, generate with:
39-
40-
.. code::
41-
42-
cd doc
43-
make.bat html
44-
45-
On Linux, generate with:
46-
47-
.. code::
48-
49-
make -C doc html
50-
51-
52-
Contributing
53-
------------
54-
To contribute to this guide, either create a branch and
55-
contribute directly or fork and submit a pull request. All
56-
pull requests are reviewed before they can be merged.

doc/source/guidelines/doc_practices.rst

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -344,9 +344,9 @@ Installing Build Requirements
344344
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
345345
You can build documentation for the `dev_guide <https://github.com/pyansys/dev-guide>`_
346346
and `pyansys-sphinx-theme <https://github.com/pyansys/pyansys-sphinx-theme>`_ repositories without
347-
installing a PyAnsys library in development mode. However, when you push changes that you have made
348-
in a local branch to the GitHub repository for other PyAnsys libraries, CI checks typically require
349-
that the full library is installed.
347+
installing a PyAnsys library in development mode. However, for many other PyAnsys libraries, when
348+
you push changes that you have made in a local branch to the library's GitHub repository, CI checks
349+
typically require that the full library is installed.
350350

351351
#. In Anaconda Powershell, navigate to the base directory in the library's cloned repository.
352352

@@ -362,22 +362,33 @@ that the full library is installed.
362362
363363
pip install -r requirements_docs.txt
364364
365-
#. If you are running on a Linux/Mac OS, to build the documentation, enter:
365+
366+
.. note::
367+
If you want to configure and activate a Python virtual environment with the
368+
required packages, you can use ``configure_venv``.
369+
370+
Once build requirements are installed, you can build HTML documentation.
371+
372+
Building HTML Documentation
373+
~~~~~~~~~~~~~~~~~~~~~~~~~~~
374+
How you build HTML documentation depends on your operating system.
375+
376+
#. If you are running on Linux or Mac, enter:
366377

367378
.. code::
368379
369380
make -C doc html
370381
371-
#. If you are running on Windows, to build the documentation, enter two
372-
commands:
382+
383+
#. If you are running on Windows, enter two commands:
373384

374385
.. code::
375386
376387
cd doc
377388
.\make.bat html
378389
379390
380-
As Sphinx is generating HTML output in the library's ``../doc/_build/html`` directory,
391+
As Sphinx generates HTML output in the library's ``../doc/_build/html`` directory,
381392
Anaconda Powershell displays any errors and warnings for unexpected indentations,
382393
bad target locations for links, missing files, and extra files included in the
383394
repository but not referenced by any ``index.rst`` file.
@@ -390,8 +401,8 @@ that the full library is installed.
390401
repeating the local build process until there are no errors or obvious issues.
391402

392403
.. note::
393-
You can use ``make.bat`` to build more than HTML output. To view a summary of
394-
all target options, enter ``make.bat``.
404+
You can use ``.\make.bat`` to build more than HTML output. To view a summary of
405+
all target options, enter ``.\make.bat``.
395406

396407
Your next step is to push your changes to the library's GitHub repository
397408
by creating a PR. For more information, see :ref:`create_pr`.
@@ -407,13 +418,18 @@ On Windows, building a PDF is a manual process that you run locally:
407418

408419
#. Install `MiKTeX <https://miktex.org/download>`_ for Windows, selecting the
409420
recommended option for installing it for only your own use.
421+
410422
#. From the Windows Start menu, start the MiKTeX Console.
423+
411424
#. On the Welcome page, click ``Check for updates`` and install any available
412425
updates.
426+
413427
#. Install the latest version of Strawbery Perl, which enables you to build
414428
LaTeX files, accepting the default installation location (``C:\Strawberry\``).
429+
415430
#. In the Command Prompt window, type ``perl-v`` to test that your installation is
416-
successful.
431+
successful.
432+
417433
#. Ensure that these Perl directory locations have been added to your ``Path``
418434
system environment variable:
419435

doc/source/guidelines/index.rst

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
1+
#############################
12
Guidelines and Best Practices
23
#############################
3-
This section describes and outlines several best practices that can be
4-
applied to PyAnsys libaries for the purpose of creating effective and
5-
efficient Python libraries to interface with Ansys products and
6-
services. These guidelines demonstrate how applications and complex
7-
services expose functionalities such as logging, data transfer, and
8-
Application APIs.
94

10-
Table of Contents
11-
-----------------
5+
This section describes several guidelines and best practices for
6+
creating effective and efficient Python libraries to interface
7+
with Ansys products and services. Topics also demonstrate how
8+
applications and complex services expose functionalities such as
9+
logging, data transfer, and application APIs.
1210

1311
.. toctree::
14-
:maxdepth: 2
12+
:maxdepth: 3
1513

1614
dev_practices
1715
version_support

doc/source/library_description/index.rst

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1+
################
12
Library Overview
23
################
4+
35
A PyAnsys library eliminates the need to share snippets of code that
46
perform actions. Users can instead create workflows consisting of
57
their own Python modules and third-party libraries. This extends
@@ -34,29 +36,11 @@ that maps the raw API into a carefully designed, object-oriented data
3436
model and API.
3537

3638

37-
Template
38-
--------
39-
Within the `PyAnsys Organization <https://github.com/pyansys>`_, there
40-
is a `template repository <https://github.com/pyansys/template>`_
41-
where you can `create a repository from a template`_ and create a
42-
PyAnsys project that follows the guidelines specified in this developer's
43-
guide.
44-
45-
The template repository contains a generalized library skeleton that includes:
46-
47-
- Library skeleton with sample classes and methods
48-
- Sample documentation build including customized templates
49-
- Sample GitHub actions specific to PyAnsys libraries
50-
- Licensing, example README, and setup files
51-
- ``.gitignore`` and other requirements files
52-
53-
To use this template, `create a repository from a template`_.
54-
55-
5639
.. toctree::
5740
:hidden:
5841
:maxdepth: 3
5942

43+
template
6044
library_structure
6145
library_names
6246
repo_directory_structure
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
################
2+
Library Template
3+
################
4+
5+
Within the `PyAnsys Organization <https://github.com/pyansys>`_, there
6+
is a `template repository <https://github.com/pyansys/template>`_
7+
where you can `create a repository from a template`_ and create a
8+
PyAnsys project that follows the guidelines specified in this developer's
9+
guide.
10+
11+
The template repository contains a generalized library skeleton that includes:
12+
13+
- Library skeleton with sample classes and methods
14+
- Sample documentation build including customized templates
15+
- Sample GitHub actions specific to PyAnsys libraries
16+
- Licensing, example README, and setup files
17+
- ``.gitignore`` and other requirements files
18+
19+
To use this template, `create a repository from a template`_.
20+
21+
22+
.. _Create a repository from a template: https://docs.github.com/en/repositories/creating-and-managing-repositories/creating-a-repository-from-a-template

doc/source/overview/administration.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1+
######################
12
Project Administration
23
######################
4+
35
The PyAnsys project allows you to create your own workflows and
46
interfaces to Ansys products using Ansys APIs. While using PyAnsys
57
libraries requires that the relevant Ansys products are licensed
@@ -23,7 +25,6 @@ To view this license, see the `LICENSE <https://github.com/pyansys/dev-guide/blo
2325
of this repository. This file must be included in the root
2426
directory of the repository of every PyAnsys library.
2527

26-
2728
Project Approval
2829
================
2930
Exposing new Ansys technologies through the PyAnsys project is subject
@@ -54,7 +55,6 @@ Each repository is expected to follow this minimum set of standards:
5455

5556
Release Procedures and Versioning
5657
=================================
57-
5858
PyAnsys library releases are managed through both automated
5959
and manual review processes.
6060

@@ -108,7 +108,7 @@ Release Management
108108
A release may be a major, minor, or patch release depending on the
109109
features, changes, or bug fixes to be released.
110110

111-
See :ref:`release_procedures` for the details on release management.
111+
For more information, see :ref:`release_procedures`.
112112

113113

114114
Product Version Matching

doc/source/overview/basic.rst

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,37 @@
1+
############################
2+
PyAnsys Project Organization
3+
############################
4+
5+
The PyAnsys project is hosted on GitHub at `PyAnsys
6+
<https://github.com/pyansys>`_. It contains several repositories with
7+
Python libraries that interface with Ansys products or services.
8+
To try out a library, visit one of these links:
9+
10+
* `PyAnsys Project <https://docs.pyansys.com/>`_
11+
* `PyMAPDL`_
12+
* `PyAEDT`_
13+
* `DPF-Core <https://github.com/pyansys/DPF-Core>`_
14+
* `DPF-Post <https://github.com/pyansys/DPF-Post>`_
15+
* `Legacy PyMAPDL Reader <https://github.com/pyansys/pymapdl-reader>`_
16+
17+
If you want to create, develop, or contribute to a PyAnsys library,
18+
visit these links:
19+
20+
* `PyAnsys Project Developer's Guide <https://github.com/pyansys/about>`_
21+
* `PyAnsys Sphinx Theme Documentation <https://github.com/pyansys/pyansys-sphinx-theme>`_
22+
* `gRPC Hello-world Example <https://github.com/pyansys/pyansys-helloworld>`_
23+
* `Material Example Data <https://github.com/pyansys/example-data>`_
24+
25+
Using the following tools, developers generate library packages from
26+
PROTO files, create coverage reports, and report on system coverage:
27+
28+
* `pyansys-protos-generator <https://github.com/pyansys/pyansys-protos-generator>`_
29+
* `example-coverage <https://github.com/pyansys/example-coverage>`_
30+
* `system-reporting-tool <https://github.com/pyansys/system-reporting-tool>`_
31+
32+
#################
133
Quick Start Guide
2-
=================
34+
#################
335

436
This is a brief overview on how to get started right away with your own PyAnsys
537
repository on the `PyAnsys GitHub Organization`_. A repository is generally a
@@ -48,7 +80,8 @@ project for a particular PyAnsys library.
4880

4981
Others like requests, RPC, COM, etc.
5082

51-
83+
.. _PyAEDT: https://github.com/pyansys/PyAEDT
84+
.. _PyMAPDL: https://github.com/pyansys/pymapdl
5285
.. _pytest-cov: https://pytest-cov.readthedocs.io/en/latest/reporting.html
5386
.. _pyansys/template: https://github.com/pyansys/template
5487
.. _Creating a repository from a template: https://docs.github.com/en/repositories/creating-and-managing-repositories/creating-a-repository-from-a-template

0 commit comments

Comments
 (0)