Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update license and contributing #539

Merged
merged 4 commits into from
May 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions HOW_TO_CONTRIBUTE.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,14 @@ Please note we have a [code of conduct](/CODE_OF_CONDUCT.md), please follow it i
2. [Optional, but STRONGLY preferred] Add unit tests for features being added or bugs being fixed.
3. [Optional, but STRONGLY preferred] Include any new method/function in the corresponding docs file.
4. Run `pytest` to verify all unit tests pass.
5. [Optional, but STRONGLY preferred] Run `pylint xgi/ --disable all --enable W0611` and `nbqa pylint . --disable all --enable W0611` and remove any unnecessary dependencies.
6. [Optional, but STRONGLY preferred] Run `isort .` and `nbqa isort .` to sort any new import statements in the source code and tutorials.
7. [Optional, but STRONGLY preferred] Run `black .` for consistent styling.
8. Update the "Current Version" section of CHANGELOG.md with overview of changes to the interface and add the usernames of all contributors.
5. Identify the unnecessary imports in the
1. source code by running `pylint xgi/ --disable all --enable W0611`
2. notebooks by running `nbqa pylint . --disable all --enable W0611`
6. Remove these unnecessary imports.
7. Sort the import statements in the
1. source code by running `isort .`
2. notebooks by running `nbqa isort .` to sort any new import statements in the source code and tutorials.
8. Format the source code and notebooks by running `black .` for consistent styling.
9. Submit Pull Request with a list of changes, links to issues that it addresses (if applicable)
10. You may merge the Pull Request in once you have the sign-off of at least one other developer, or if you do not have permission to do that, you may request the reviewer to merge it for you.

Expand Down
52 changes: 1 addition & 51 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
XGI is distributed with the 3-clause BSD license.

Copyright (C) 2023, XGI Developers
Copyright (C) 2024, XGI Developers

All rights reserved.

Expand Down Expand Up @@ -31,53 +31,3 @@ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

----------------------------------------------------------------------
HyperNetX

Copyright © 2018, Battelle Memorial Institute

Battelle Memorial Institute (hereinafter Battelle) hereby grants permission to any person or entity lawfully obtaining a copy of this software and associated documentation files (hereinafter “the Software”) to redistribute and use the Software in source and binary forms, with or without modification. Such person or entity may use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and may permit others to do so, subject to the following conditions:

Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimers.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other
Other than as used herein, neither the name Battelle Memorial Institute or Battelle may be used in any form whatsoever without the express written consent of Battelle.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BATTELLE OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


----------------------------------------------------------------------
NetworkX is distributed with the 3-clause BSD license.

Copyright (C) 2004-2021, NetworkX Developers
Aric Hagberg <[email protected]>
Dan Schult <[email protected]>
Pieter Swart <[email protected]>
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.

* Neither the name of the NetworkX Developers nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ We acknowledge the importance of good software to support research, and we note
## License
Released under the 3-Clause BSD license (see [`LICENSE.md`](LICENSE.md))

Copyright (C) 2021-2023 XGI Developers
Copyright (C) 2021-2024 XGI Developers

The XGI library has copied or modified code from the HyperNetX and NetworkX libraries, the licenses of which can be found in our [license file](LICENSE.md)

Expand Down
2 changes: 1 addition & 1 deletion docs/source/about.rst
Original file line number Diff line number Diff line change
Expand Up @@ -109,4 +109,4 @@ License
This project is licensed under the `BSD 3-Clause License
<https://github.com/xgi-org/xgi/blob/main/LICENSE.md>`_.

Copyright (C) 2021-2023 XGI Developers
Copyright (C) 2021-2024 XGI Developers
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

# -- Project information -----------------------------------------------------
project = "XGI"
copyright = "Copyright (C) 2021-2023 XGI Developers"
copyright = "Copyright (C) 2021-2024 XGI Developers"
release = "0.8.5"

# -- General configuration ---------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -192,4 +192,4 @@ License
This project is licensed under the `BSD 3-Clause License
<https://github.com/xgi-org/xgi/blob/main/LICENSE.md>`_.

Copyright (C) 2021-2023 XGI Developers
Copyright (C) 2021-2024 XGI Developers
20 changes: 19 additions & 1 deletion docs/source/using-xgi.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Projects using XGI
******************

XGI has been used in a variety of published work and other software.
XGI has been used in a variety of published work and other software. This is a list of projects that use XGI in substantive ways.

Articles are listed by year and then alphabetically by the last name of the first author (and title if necessary).

Expand All @@ -22,6 +22,11 @@ Nicholas W. Landry, Jean-Gabriel Young, and Nicole Eikmeier, "The simpliciality
:bdg-link-primary-line:`Paper <https://doi.org/10.1140/epjds/s13688-024-00458-1>`
:bdg-link-primary-line:`Code <https://github.com/nwlandry/the-simpliciality-of-higher-order-networks>`

Leonie Neuhäuser, Michael Scholkemper, Francesco Tudisco, and Michael T. Schaub, "Learning the effective order of a hypergraph dynamical system", *Science Advances* **10**,eadh4053 (2024).

:bdg-link-primary-line:`Paper <https://doi.org/10.1126/sciadv.adh4053>`
:bdg-link-primary-line:`Code <https://git.rwth-aachen.de/netsci/publication-2023-learning-the-effective-order-of-a-hypergraph-dynamical-system>`

2023
----

Expand Down Expand Up @@ -62,6 +67,11 @@ Gonzalo Contreras-Aso, Regino Criado, and Miguel Romance, "Beyond directed hyper
:bdg-link-primary-line:`Paper <https://arxiv.org/abs/2403.11825>`
:bdg-link-primary-line:`Code <https://github.com/goznalo-git/DirectedHyperCentrality>`

Robin Delabays, Giulia De Pasquale, Florian Dörfler, Yuanzhao Zhang, "Hypergraph reconstruction from dynamics", arXiv:2402.00078 (2024).

:bdg-link-primary-line:`Paper <https://arxiv.org/abs/2402.00078>`
:bdg-link-primary-line:`Code <https://github.com/TaylorBasedHypergraphInference/THIS>`

Maxime Lucas, Luca Gallo, Arsham Ghavasieh, Federico Battiston, and Manlio De Domenico, "Functional reducibility of higher-order networks", arXiv:2404.08547 (2024).

:bdg-link-primary-line:`Paper <https://arxiv.org/abs/2404.08547>`
Expand All @@ -88,6 +98,14 @@ Yuanzhao Zhang, Per Sebastian Skardal, Federico Battiston, Giovanni Petri, Maxim
Theses
======

2024
----

Yifei (Bell) Luo, "Efficient sampling of configuration model random hypergraphs", (2024).

2023
----

Leonie Neuhäuser, "Modelling the effect of groups on network structure and dynamics", (2023).

:bdg-link-primary-line:`Thesis <https://doi.org/10.18154/RWTH-2023-08686>`
Expand Down
2 changes: 1 addition & 1 deletion long_description.rst
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,4 @@ License
-------
Released under the 3-Clause BSD license (see the `license file <https://github.com/xgi-org/xgi/blob/main/LICENSE.md>`_)

Copyright (C) 2021-2023 XGI Developers
Copyright (C) 2021-2024 XGI Developers
2 changes: 1 addition & 1 deletion requirements/developer.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
black[jupyter]==22.3.0
black[jupyter]>=24.3
pre-commit>=2.12
isort==5.10.1
pylint>=2.10
Expand Down
32 changes: 18 additions & 14 deletions xgi/algorithms/connected.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,20 +188,6 @@ def node_connected_component(H, n):
raise XGIError("Specified node is not in the hypergraph!")


def _plain_bfs(H, source):
"""A fast BFS node generator"""
seen = set()
nextlevel = {source}
while nextlevel:
thislevel = nextlevel
nextlevel = set()
for v in thislevel:
if v not in seen:
seen.add(v)
nextlevel.update(H.nodes.neighbors(v))
return seen


def largest_connected_hypergraph(H, in_place=False):
"""
A function to find the largest connected hypergraph from a data set.
Expand Down Expand Up @@ -242,3 +228,21 @@ def largest_connected_hypergraph(H, in_place=False):
return subhypergraph(H, nodes=connected_nodes).copy()
else:
H.remove_nodes_from(set(H.nodes).difference(connected_nodes))


def _plain_bfs(H, source):
"""A fast BFS node generator

Source:
https://networkx.org/documentation/stable/_modules/networkx/algorithms/components/connected.html
"""
seen = set()
nextlevel = {source}
while nextlevel:
thislevel = nextlevel
nextlevel = set()
for v in thislevel:
if v not in seen:
seen.add(v)
nextlevel.update(H.nodes.neighbors(v))
return seen
Loading