Skip to content

Commit

Permalink
Merge branch 'issues/CSD-316-beta-user-feedback' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
diegoabt committed Jan 10, 2025
2 parents ff98ae2 + 0bafda6 commit 3cc43e0
Show file tree
Hide file tree
Showing 19 changed files with 624 additions and 251 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,12 @@ The authors of the original implementations integrated to this packages are:

See the references in the documentation for more details.

## Contributing

Would you like to contribute to the development of **ProbINet**? Contributions are welcome and
appreciated! You can find detailed information on how to get started here: [Contributing Guide](https://mpi-is.github.io/probinet/contributing.html).


## License

This project is licensed under the GNU GPL version 3 - see the [LICENSE](LICENSE.md) file for
Expand Down
3 changes: 2 additions & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
"myst_nb", # add Jupyter notebooks
"sphinx.ext.napoleon", # 'sphinxcontrib.napoleon' is deprecated # Google style docs
"sphinxcontrib.bibtex",
"sphinx_copybutton", # adds a copy button to code blocks
]
autodoc_default_options = {
"members": True, # when set to True, Sphinx will automatically document all members
Expand All @@ -73,7 +74,7 @@
nb_execution_timeout = 1000 # This is the timeout for executing a notebook cell

# -- Options for sphinxcontrib extension ---------------------------------------
bibtex_bibfiles = ['references.bib']
bibtex_bibfiles = ["references.bib"]

# -- Options for HTML evaluation -------------------------------------------------

Expand Down
123 changes: 123 additions & 0 deletions docs/source/contributing.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
Contributing
============

Thank you for your interest in contributing to **ProbINet**! Your contributions help improve the
package and make it more useful for everyone. Please follow the steps below to get started.

Getting Started
---------------

- Fork this repository to your GitHub account: `https://github.com/MPI-IS/probinet <https://github.com/MPI-IS/probinet>`_. You can fork it by clicking the "Fork" button in the top-right corner of the page.
- Clone the forked repository to your local machine:

.. code-block:: bash
git clone https://github.com/<your-username>/probinet.git
- Navigate to the project directory:

.. code-block:: bash
cd probinet
- Add the original repository as a remote named ``upstream`` to keep your fork updated:

.. code-block:: bash
git remote add upstream https://github.com/MPI-IS/probinet.git
Setting Up the Development Environment
--------------------------------------

This project uses ``pyproject.toml`` for dependency management. To set up a development environment:

- Install the package with the ``.dev`` flag:

.. code-block:: bash
pip install ".[dev]"
- Verify the installation by running the following command:

.. code-block:: bash
pip show probinet
If the package is installed, this will display details about it, such as the version and installation location.

Syncing Your Fork
-----------------

Before starting work on a new feature or bug fix, ensure your fork is up to date with the original repository:

- Fetch the latest changes from the ``upstream`` repository:

.. code-block:: bash
git fetch upstream
- Update your local ``main`` branch:

.. code-block:: bash
git checkout main
git merge upstream/main
Making Changes
--------------

- Create a new branch for your contribution:

.. code-block:: bash
git checkout -b feature/your-feature-name
- Make your changes in this branch. Ensure the code is:

- Well-documented.
- Aligned with the existing code style.

- Add or update unit tests for your changes. You can see the existing tests in the ``tests`` directory.

Running Tests
-------------

Tests are written using Python's built-in ``unittest`` framework.

- Run all tests to verify your changes:

.. code-block:: bash
python -W ignore -m unittest discover
Submitting Your Contribution
----------------------------

- Commit your changes with a clear and concise message:

.. code-block:: bash
git commit -m "Add description of your changes"
- Push your changes to your fork:

.. code-block:: bash
git push origin feature/your-feature-name
- Open a Pull Request (PR) to the **original repository**. Include:

- A detailed explanation of your changes.
- The issue number your PR addresses (if applicable).
- Any additional context or screenshots.

You can view all open and merged Pull Requests `here <https://github.com/MPI-IS/probinet/pulls>`_.


Code of Conduct
---------------

By contributing to this repository, you agree to abide by our `Code of Conduct
<https://policies.python.org/python.org/code-of-conduct/>`_.

We appreciate your contributions and will review your Pull Request promptly!
6 changes: 6 additions & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ Thank you for choosing ProbINet. We hope you enjoy using it!
Cross-Validation And Anomaly Detection With The ACD Algorithm <tutorials/ACD.ipynb>
Analyzing Network Data With Unknown Community Structure <tutorials/Unknown_structure.ipynb>

.. toctree::
:maxdepth: 1
:caption: Contributing

How To Contribute <contributing.rst>

.. toctree::
:maxdepth: 1
:caption: References
Expand Down
5 changes: 2 additions & 3 deletions docs/source/tutorials/ACD.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"\n",
"In this section, we will load the synthetic data required for our analyses. We will start by \n",
"importing the necessary libraries and defining the file path for the adjacency matrix, and then, \n",
"we will use the `import_data` method to read it."
"we will use the `build_adjacency_from_file` method to read it."
],
"id": "600d6df30883a002"
},
Expand Down Expand Up @@ -105,7 +105,7 @@
"metadata": {},
"cell_type": "markdown",
"source": [
"As we have seen in previous tutorials, the `import_data` outputs a list of MultiDiGraph NetworkX \n",
"As we have seen in previous tutorials, the `build_adjacency_from_file` outputs a list of MultiDiGraph NetworkX\n",
"objects, a graph adjacency tensor `B`, a transposed graph adjacency tensor `B_T`, and\n",
" an array with values of entries `A[j, i]` given non-zero entry `(i, j)`. These outputs are \n",
" essential for analyzing the network structure and performing further computations. \n",
Expand Down Expand Up @@ -180,7 +180,6 @@
"- `cross_validation`: Functions for general cross-validation.\n",
"- `masking`: Functions for masking data during cross-validation.\n",
"- `labeling`: Functions for labeling data.\n",
"- `metrics`: Functions for computing evaluation metrics.\n",
"- `main`: Entry point for the cross-validation process. Although each algorithm has its own cross-validation submodule, the `main` submodule provides a unified interface for running cross-validation for all algorithms.\n",
"\n",
"Additionally, the module provides specialized cross-validation submodules for different algorithms:\n",
Expand Down
Loading

0 comments on commit 3cc43e0

Please sign in to comment.