Skip to content

Commit

Permalink
Add PyGrep pre-commit hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
ffl096 committed Jun 21, 2024
1 parent 6cf0ab3 commit ab511db
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 20 deletions.
7 changes: 7 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,10 @@ repos:
rev: "v3.1.0"
hooks:
- id: prettier

- repo: https://github.com/pre-commit/pygrep-hooks
rev: "v1.10.0"
hooks:
- id: rst-backticks
- id: rst-directive-colons
- id: rst-inline-touching-normal
14 changes: 7 additions & 7 deletions docs/api/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
API Reference
=============

The API reference gives an overview of `TopoNetX`, which consists of several modules:
The API reference gives an overview of ``TopoNetX``, which consists of several modules:

- `classes` implements the topological domains: simplicial complexes, cellular complexes, combinatorial complexes.
- `algorithms` implements signal processing techniques on topological domains, such as the eigendecomposition of a laplacian.
- `datasets` implements utilities to load small datasets on topological domains.
- `transform` implements functions to transform the topological domain that supports a dataset, effectively "lifting" the dataset onto another domain.
- `generators` implements functions to generate random topological domains.
- `transform` implements functions to convert a graph to a topological domain: simplicial complexes etc.
- ``classes`` implements the topological domains: simplicial complexes, cellular complexes, combinatorial complexes.
- ``algorithms`` implements signal processing techniques on topological domains, such as the eigendecomposition of a laplacian.
- ``datasets`` implements utilities to load small datasets on topological domains.
- ``transform`` implements functions to transform the topological domain that supports a dataset, effectively "lifting" the dataset onto another domain.
- ``generators`` implements functions to generate random topological domains.
- ``transform`` implements functions to convert a graph to a topological domain: simplicial complexes etc.


.. toctree::
Expand Down
12 changes: 6 additions & 6 deletions docs/contributing/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Follow these steps before submitting a PR:
$ git add <modified_files>
$ git commit -m "Add my feature"
to record your changes. Then push the changes to your fork of `TopoNextX` with:
to record your changes. Then push the changes to your fork of ``TopoNetX`` with:

.. code-block:: bash
Expand All @@ -54,9 +54,9 @@ Follow these steps before submitting a PR:
Write Tests
-----------

The tests consist of classes appropriately named, located in the `test` folder, that check the validity of the code.
The tests consist of classes appropriately named, located in the ``test`` folder, that check the validity of the code.

Test functions should be located in files whose filenames start with `test_`. For example:
Test functions should be located in files whose filenames start with ``test_``. For example:

.. code-block:: bash
Expand All @@ -68,12 +68,12 @@ Test functions should be located in files whose filenames start with `test_`. Fo
def test_capital_case():
assert add(4, 5) == 9
Use an `assert` statement to check that the function under test returns the correct output.
Use an ``assert`` statement to check that the function under test returns the correct output.

Run Tests
~~~~~~~~~

Install `pytest` which is the software tools used to run tests:
Install ``pytest`` which is the software tools used to run tests:

.. code-block:: bash
Expand All @@ -85,7 +85,7 @@ Then run the test using:
$ pytest test_add.py
Verify that the code you have added does not break `TopoNetX` by running all the tests.
Verify that the code you have added does not break ``TopoNetX`` by running all the tests.

.. code-block:: bash
Expand Down
14 changes: 7 additions & 7 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
🌐 TopoNetX (TNX) 🍩
====================

`TopoNetX` is a Python package for computing on topological domains. Topological domains are the natural mathematical structures representing relations between the components of a dataset.
``TopoNetX`` is a Python package for computing on topological domains. Topological domains are the natural mathematical structures representing relations between the components of a dataset.

.. figure:: https://user-images.githubusercontent.com/8267869/234068354-af9480f1-1d18-4914-92f1-916d9093e44d.png
:alt: natural shapes
Expand All @@ -11,22 +11,22 @@
Many natural systems as diverse as social networks and proteins are characterized by relational structure. This is the structure of interactions between
components in the system, such as social interactions between individuals or electrostatic interactions between atoms.

`TopoNetX` provides a unifying interface to compute with such relational data.
``TopoNetX`` provides a unifying interface to compute with such relational data.

🎯 Scope and functionality
--------------------------

`TopoNetX` (TNX) is a package for computing with topological domains and studying their properties.
``TopoNetX`` (TNX) is a package for computing with topological domains and studying their properties.

With its dynamic construction capabilities and support for arbitrary
attributes and data, `TopoNetX` allows users to easily explore the topological structure
attributes and data, ``TopoNetX`` allows users to easily explore the topological structure
of their data and gain insights into its underlying geometric and algebraic properties.

Available functionality ranges
from computing boundary operators and Hodge Laplacians on simplicial/cell/combinatorial complexes
to performing higher-order adjacency calculations.

TNX is similar to `NetworkX`, a popular graph package, and extends its capabilities to support a
TNX is similar to ``NetworkX``, a popular graph package, and extends its capabilities to support a
wider range of mathematical structures, including cell complexes, simplicial complexes and
combinatorial complexes.

Expand All @@ -35,7 +35,7 @@ found in higher-order networks such as simplicial, cellular, CW and combinatoria
This package serves as a repository of the methods and algorithms we find most useful
as we explore the knowledge that can be encoded via higher-order networks.

TNX supports the construction of topological structures including the `CellComplex`, `SimplicialComplex` and `CombinatorialComplex` classes.
TNX supports the construction of topological structures including the ``CellComplex``, ``SimplicialComplex`` and ``CombinatorialComplex`` classes.

These classes provide methods for computing boundary operators, Hodge Laplacians
and higher-order adjacency operators on cell, simplicial and combinatorial complexes,
Expand All @@ -49,7 +49,7 @@ TNX was developed by the pyt-team.

1. Dynamic construction of cell, simplicial and combinatorial complexes, allowing users to add or remove objects from these structures after their initial creation.

2. Compatibility with the `NetworkX` and `gudhi` packages, enabling users to leverage the powerful algorithms and data structures provided by these packages.
2. Compatibility with the ``NetworkX`` and ``gudhi`` packages, enabling users to leverage the powerful algorithms and data structures provided by these packages.

3. Support for attaching arbitrary attributes and data to cells, simplices and other entities in a complex, allowing users to store and manipulate a versatile range of information about these objects.

Expand Down

0 comments on commit ab511db

Please sign in to comment.