Skip to content

Commit

Permalink
Use sentence-style capitalization in headers (#161)
Browse files Browse the repository at this point in the history
* Use sentence-style capitalization in headers
* Fix remaining Vale warnings
* Tweak blurb in grid cards
* Fix capitalization in links
* Update pre-commit hooks

Following guidance from @PipKat in #160.
  • Loading branch information
greschd authored Jan 30, 2023
1 parent 29e72b5 commit d6c4ca5
Show file tree
Hide file tree
Showing 24 changed files with 45 additions and 42 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ repos:
- id: black

- repo: https://github.com/pycqa/isort
rev: 5.11.4
rev: 5.12.0
hooks:
- id: isort

Expand All @@ -16,7 +16,7 @@ repos:
- id: flake8

- repo: https://github.com/pycqa/pydocstyle
rev: 6.1.1
rev: 6.3.0
hooks:
- id: pydocstyle
additional_dependencies: [toml]
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
PyDPF Composites
****************
-----------------
Developer's Guide
Developer's guide
-----------------
|pyansys| |python| |pypi| |GH-CI| |codecov| |MIT| |black|

Expand Down
2 changes: 1 addition & 1 deletion doc/source/_static/README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Static files will be found here (like images and other assets).
Static files can be added here (like images and other assets).
2 changes: 1 addition & 1 deletion doc/source/api/composite_model.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Composite Model
Composite model
---------------

.. module:: ansys.dpf.composites.composite_model
Expand Down
2 changes: 1 addition & 1 deletion doc/source/api/data_sources.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Data Sources
Data sources
------------

.. module:: ansys.dpf.composites.data_sources
Expand Down
2 changes: 1 addition & 1 deletion doc/source/api/failure_criteria.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.. _failure_criteria:

Failure Criteria
Failure criteria
----------------

.. module:: ansys.dpf.composites.failure_criteria
Expand Down
10 changes: 5 additions & 5 deletions doc/source/api/layup_info.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
.. _layup_information_classes:

Layup Information
Layup information
-----------------
General functionality to access information on the composite layup.
General features to access information on the composite layup.

.. module:: ansys.dpf.composites.layup_info

Expand All @@ -20,9 +20,9 @@ General functionality to access information on the composite layup.
LayupProperty


Material Properties
Material properties
'''''''''''''''''''
A note on material ids: In the pydpf-composites module,
A note on material ids: in the PyDPF Composites module,
materials are reference by their ``dpf_material_id``. The ``dpf_material_id``
is generated based on the materials present in the result file.
The ``dpf_material_id`` can be different from the material id used in the solver.
Expand All @@ -44,7 +44,7 @@ example shows how to evaluate material properties.
get_constant_property_dict


Material Operators
Material operators
''''''''''''''''''

.. module:: ansys.dpf.composites.layup_info.material_operators
Expand Down
2 changes: 1 addition & 1 deletion doc/source/api/result_definition.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Result Definition
Result definition
-----------------

.. module:: ansys.dpf.composites.result_definition
Expand Down
2 changes: 1 addition & 1 deletion doc/source/api/sampling_point.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Sampling Point
Sampling point
--------------

.. module:: ansys.dpf.composites.sampling_point
Expand Down
4 changes: 2 additions & 2 deletions doc/source/api/select_indices.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.. _select_indices:

Select Elementary Indices
Select elementary indices
-------------------------

This module provides functions to filter elementary data.
Expand Down Expand Up @@ -38,7 +38,7 @@ Here are some examples:

The functions in this module compute an array of elementary indices for a given selection of
layers, nodes, spots, DPF material IDs or analysis plies. These elementary indices can be used to index the first axis
of the elementary data array. Please check the :ref:`sphx_glr_examples_gallery_examples_6_filter_composite_data_example.py`
of the elementary data array. Please refer to the :ref:`sphx_glr_examples_gallery_examples_6_filter_composite_data_example.py`
section for complete usage examples.


Expand Down
2 changes: 1 addition & 1 deletion doc/source/api/server_helpers.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Server Helpers
Server helpers
--------------

.. module:: ansys.dpf.composites.server_helpers
Expand Down
25 changes: 13 additions & 12 deletions doc/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
intro
api/index
examples/index
Developer's Guide <developers_guide>
Developer's guide <developers_guide>

PyDPF Composites
----------------
Expand All @@ -20,25 +20,26 @@ criteria and computation.
.. grid:: 1 1 2 2
:gutter: 2

.. grid-item-card:: :octicon:`rocket` Getting Started
.. grid-item-card:: :octicon:`rocket` Getting started
:link: intro
:link-type: doc

Installation, load model and failure plot.
The getting started guide contains installation instructions, and a simple
example to create a failure plot from a Workbench project.

.. grid-item-card:: :octicon:`play` Examples
:link: examples/index
:link-type: doc

Collection of examples.
The examples demonstrate the use of PyDPF Composites for various workflows.

.. grid-item-card:: :octicon:`file-code` API Reference
.. grid-item-card:: :octicon:`file-code` API reference
:link: api/index
:link-type: doc

Reference for the public Python classes, methods and functions.

.. grid-item-card:: :octicon:`code` Developer's Guide
.. grid-item-card:: :octicon:`code` Developer's guide
:link: developers_guide
:link-type: doc

Expand All @@ -49,13 +50,13 @@ Key features

* Failure criteria evaluator.
See this :doc:`Example </examples/gallery_examples/1_failure_operator_example>`.
* :doc:`Sampling Point <api/_autosummary/ansys.dpf.composites.sampling_point.SamplingPoint>` to extract and visualize result over the
* :doc:`Sampling points <api/_autosummary/ansys.dpf.composites.sampling_point.SamplingPoint>` to extract and visualize result over the
entire thickness of the laminate.
:doc:`Here <examples/gallery_examples/2_sampling_point_example>` is an example.
* :doc:`Result Definition <api/_autosummary/ansys.dpf.composites.result_definition.ResultDefinition>` to configure combined failure criteria and scopes.
* :doc:`Result definition <api/_autosummary/ansys.dpf.composites.result_definition.ResultDefinition>` to configure combined failure criteria and scopes.
* Accessors to lay-up data such as plies and materials. Refer to the examples
:doc:`Lay-up Properties <examples/gallery_examples/5_get_layup_properties_example>`
and :doc:`Material Properties <examples/gallery_examples/4_get_material_properties_example>`.
:doc:`Lay-up properties <examples/gallery_examples/5_get_layup_properties_example>`
and :doc:`Material properties <examples/gallery_examples/4_get_material_properties_example>`.
* Interface to implement custom failure criteria and analysis as shown in this
:doc:`Example <examples/gallery_examples/4_get_material_properties_example>`.
* Post-processing of homogeneous elements.
Expand All @@ -70,10 +71,10 @@ Pre-requisites and compatibility
Limitations
'''''''''''
- Layered elements (section data) which have not been pre-processed with ACP are not supported.
Refer to the Section `Import Legacy Models`_ on the official Ansys help
Refer to the Section `Import legacy models`_ on the official Ansys help
to learn how to convert legacy models.
- Other solvers than MAPDL are not supported.

.. _Ansys Workbench: https://download.ansys.com/Current%20Release
.. _Import Legacy Models: https://ansyshelp.ansys.com/account/secured?returnurl=/Views/Secured/corp/v231/en/acp_ug/acp_import_legacy_APDL_comp.html
.. _Import legacy models: https://ansyshelp.ansys.com/account/secured?returnurl=/Views/Secured/corp/v231/en/acp_ug/acp_import_legacy_APDL_comp.html
.. _Compatibility: https://dpf.docs.pyansys.com/getting_started/compatibility.html
8 changes: 4 additions & 4 deletions doc/source/intro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ Install the ``ansys-dpf-composites`` module with ``pip``:
pip install ansys-dpf-composites
We recommend using a `virtual environment <https://docs.python.org/3/library/venv.html>`_
to keep Python packages isolated from your system Python.
It is recommended to use a `virtual environment <https://docs.python.org/3/library/venv.html>`_,
which keeps Python packages isolated from your system Python.


Examples
Expand All @@ -25,11 +25,11 @@ Get started with some basic :doc:`examples/index` :
* :ref:`sphx_glr_examples_gallery_examples_2_sampling_point_example.py`

In the end of each example, there is a button to download the python source code of the example.
The examples will download the example files (results, composite definition..) from an examples repository.
The examples download their input files (results, composite definition, etc.) from a git repository.

For larger models it can be slow to initialize a :class:`.CompositeModel`, because it automatically creates many
different providers that are not needed in all the workflows. Consider using the
:ref:`Layup Information classes <layup_information_classes>` directly.
:ref:`Layup information classes <layup_information_classes>` directly.

Start from a local Ansys Workbench project
""""""""""""""""""""""""""""""""""""""""""
Expand Down
1 change: 1 addition & 0 deletions doc/styles/Vocab/Custom/accept.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
accessor
interlaminar
PyDPF Composites
1 change: 1 addition & 0 deletions doc/styles/Vocab/Custom/reject.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pydpf-composites
2 changes: 1 addition & 1 deletion examples/1_failure_operator_example.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
.. _failure_operator_example:
Composite Failure Analysis
Composite failure analysis
--------------------------
Analyse a composite structure by a combined failure criterion.
Expand Down
2 changes: 1 addition & 1 deletion examples/2_sampling_point_example.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
.. _sampling_point_example:
Sampling Point
Sampling point
--------------
Extract ply-wise laminate properties and results.
Expand Down
2 changes: 1 addition & 1 deletion examples/3_short_fiber_example.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
.. _short_fiber_example:
Failure Analysis for Short Fiber Composites
Failure analysis for short fiber composites
-------------------------------------------
Failure analysis of a short fiber reinforced part.
Expand Down
2 changes: 1 addition & 1 deletion examples/4_get_material_properties_example.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
.. _material_properties:
Material Properties and Custom Failure Criterion
Material properties and custom failure criterion
------------------------------------------------
Access material properties and implement a custom failure criterion.
Expand Down
2 changes: 1 addition & 1 deletion examples/5_get_layup_properties_example.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
.. _layup_properties_plot:
Get Lay-up Properties
Get lay-up properties
---------------------
Extract elemental layered properties such as thickness and material.
Expand Down
2 changes: 1 addition & 1 deletion examples/6_filter_composite_data_example.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
.. _filter_composite_data:
Filter Result Data by Different Criteria
Filter result data by different criteria
----------------------------------------
Filter strains and stresses by material, layer or analysis ply.
Expand Down
2 changes: 1 addition & 1 deletion examples/7_interlaminar_normal_stress_example.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
.. _interlaminar_normal_stress_example:
Interlaminar Normal Stresses
Interlaminar normal stresses
----------------------------
Compute interlaminar normal stresses for layered shells.
Expand Down
2 changes: 1 addition & 1 deletion examples/8_assembly_example.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
.. _assembly_example:
Post-process an Assembly
Post-process an assembly
------------------------
Post-process an assembly with multiple composite parts.
Expand Down
2 changes: 1 addition & 1 deletion examples/dpf_composite_failure_workflow.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
.. _basic_example:
DPF Composite Failure Workflow
DPF composite failure workflow
------------------------------
Use of native DPF Python interface to configure and run composite failure evaluator.
Expand Down

0 comments on commit d6c4ca5

Please sign in to comment.