Skip to content

Commit

Permalink
Pull request #208: Contributions guideline - adding rst mention
Browse files Browse the repository at this point in the history
Merge in HYP/hypernetx from contributions_guideline_2 to develop

* commit 'bb3f233e8484f8a0c435e80d9ab04ba210fde1b0':
  updating contributions guideline with rst documentation stuff and figure update.
  • Loading branch information
amyersppnl authored and ryandanehy committed Aug 14, 2024
2 parents b624f1e + bb3f233 commit 82f4898
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion docs/source/contributions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Contributions can be slow, but the closer the pull request is to our guidelines
The required new files for any new module are listed below and an example file structure of the additional files is shown in the figure below.

.. image:: ./images/module_addition_file_structure.png
:width: 300px
:width: 330px
:align: right

* Python file: Create a new Python file named **<module_name>.py** under the folder **hypernetx/hypernetx/algorithms/.**. This file will contain the core functionalities of your module. All methods need to have docstrings in the new module.
Expand All @@ -22,6 +22,8 @@ The required new files for any new module are listed below and an example file s

* Test file: Write unit tests for your module in a file named **test_<module_name>.py** under the tests folder located at **hypernetx/tests/algorithms/.**. These tests should ensure the correctness and functionality of your code.

* Documentation: Write an rst file named **<module_name>.rst** under the algorithms documentation folder located at **hypernetx/docs/source/algorithms/.**. This documentations should focus on the mathematics or theory behind your module with citations to relevant papers and documents. Additionally it should provide code snippets demonstrating usage that parallel the tutorial.

Step-by-Step Process
~~~~~~~~~~~~~~~~~~~~

Expand All @@ -35,6 +37,8 @@ Step-by-Step Process

#. Testing: Write unit tests in the test_<module_name>.py file to ensure your module functions as expected. This should be located in the algorithm tests folder. In the top hypernetx directory you can use the makefile and the command ``make test`` to validate everything is passing. Please see other tests and follow a similar format.

# Read the Docs: Include your rst file in the algorithms folder of the source docs overviewing the theory/mathematics of the new module with example code. See other rst files as examples of formatting.

#. __init__.py Update: Update the __init__.py file in the **hypernetx/hypernetx/algorithms/** folder to import your new module. Please follow the style of importing used by the other modules.

#. Commit and Push: Commit your changes with clear and concise commit messages describing each modification. Push your commits to your branch on the remote repository.
Expand Down
Binary file modified docs/source/images/module_addition_file_structure.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 82f4898

Please sign in to comment.