Skip to content

Commit

Permalink
Fix messy notebook diffs. Merge branch 'main' into add-draw-bipartite
Browse files Browse the repository at this point in the history
  • Loading branch information
nwlandry committed Feb 13, 2024
2 parents 2e34fb3 + 1e746bf commit 41efd3e
Show file tree
Hide file tree
Showing 19 changed files with 283 additions and 39 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/check-urls.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Check URLs

on: [push]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: urls-checker
uses: urlstechie/urlchecker-action@master
with:
# A comma-separated list of file types to cover in the URL checks
file_types: .md,.py,.rst,ipynb

# Choose whether to include file with no URLs in the prints.
print_all: false

# The timeout seconds to provide to requests, defaults to 5 seconds
timeout: 5

# How many times to retry a failed request (each is logged, defaults to 1)
retry_count: 3

# choose if the force pass or not
force_pass : false
41 changes: 41 additions & 0 deletions .github/workflows/publish_xgi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Upload XGI to PyPI

on:
release:
types: [published]
workflow_dispatch:


permissions:
contents: read

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install setuptools
- name: Build package
run: |
python setup.py sdist
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
skip-existing: true
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## v0.8.2
* Added an XGI-DATA page to ReadTheDocs with network statistics [#496](https://github.com/xgi-org/xgi/pull/496) (@nwlandry).
* Added syntax highlighting in the tutorials [#497](https://github.com/xgi-org/xgi/pull/497) (@thomasrobiglio).
* Changed the xgi-data index location to Github to support the move to Zenodo-hosted datasets [#494](https://github.com/xgi-org/xgi/pull/494) (@nwlandry)
* Update the list of publications using XGI [#493](https://github.com/xgi-org/xgi/pull/493) (@nwlandry).

## v0.8.1
* Added the ability to draw a convex hull as an option in `draw_hyperedges` [#491](https://github.com/xgi-org/xgi/pull/491) (@maximelucas).
* Fixed sphinx documentation errors [#487](https://github.com/xgi-org/xgi/pull/487) (@nwlandry).
* Rewrote the `draw_multilayer` function [#486](https://github.com/xgi-org/xgi/pull/486) (@maximelucas).
* Updated the "Projects Using XGI" page [#489](https://github.com/xgi-org/xgi/pull/489) (@nwlandry).
* Added support for Python 3.12 [#488](https://github.com/xgi-org/xgi/pull/488) (@nwlandry).

## v0.8
* Made `IDViews` respect edge insertion order in the `from_view` method [#482](https://github.com/xgi-org/xgi/pull/482) (@nwlandry).
* Fixed issues in drawing functions [#476](https://github.com/xgi-org/xgi/pull/476) (@maximelucas).
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ To get started, take a look at the [tutorials](https://xgi.readthedocs.io/en/sta


## Corresponding Data
A number of higher-order datasets are available in the [XGI-DATA repository](https://gitlab.com/complexgroupinteractions/xgi-data) and can be easily accessed with the `load_xgi_data()` function.
A number of higher-order datasets are available in the [XGI-DATA repository](https://github.com/xgi-org/xgi-data) and can be easily accessed with the `load_xgi_data()` function.


## How to Contribute
Expand Down
28 changes: 28 additions & 0 deletions docs/source/_static/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,31 @@
margin-block-end: 0;
padding-inline-start: 0.5em;
}

table {
font-family: Arial, Helvetica, sans-serif;
border-collapse: collapse;
width: 100%;
}

td, th {
border: 1px solid #ddd;
padding: 8px;
}

td a {
width: 100%;
display: block;
}

table tr:nth-child(even){background-color: #f2f2f2;}

table tr:hover {background-color: #ddd;}

th {
padding-top: 12px;
padding-bottom: 12px;
text-align: left;
background-color: #04AA6D;
color: white;
}
75 changes: 75 additions & 0 deletions docs/source/_static/table.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
async function fetch_JSON_file(url) {
try {
const response = await fetch(url);

if (!response.ok) {
throw new Error(response);
}

const json_data = await response.json();
return json_data;
} catch (error) {
console.error('Error fetching JSON:', error);
}
}

function create_table(json_data) {
const body = document.body;
const section = document.getElementById("network-statistics")
const table = document.createElement('table');
const table_header = document.createElement('thead')
const table_body = document.createElement('tbody')

// Create header row
const header_row = document.createElement('tr');
const headers = ["Dataset", "|V|", "|E|", "|E<sub>unique</sub>|", "s<sub>max</sub>"]
const header_attrs = ["num-nodes", "num-edges", "num-unique-edges", "max-edge-size"]

for (const i in headers) {
const h = document.createElement('th');
h.innerHTML = headers[i];
header_row.appendChild(h)
}
table_header.appendChild(header_row)

// Create data rows
for (const key in json_data) {
const data_row = document.createElement('tr');

// dataset name
const td_name = document.createElement('td');
const url = json_data[key]["url"].split("/files")[0]
td_name.innerHTML = '<a href=' + url + '>' + key + '</a>';
data_row.appendChild(td_name);

for (const i in header_attrs){
const td = document.createElement('td');
const attr = header_attrs[i]
if (json_data[key][attr]) {
td.textContent = json_data[key][attr];
}
else {
td.textContent = "N/A"
}
data_row.appendChild(td);
}
table_body.appendChild(data_row);
}
table.appendChild(table_header)
table.appendChild(table_body)
console.log(table)
section.appendChild(table);
}

function display_table(){
url = 'https://raw.githubusercontent.com/xgi-org/xgi-data/main/index.json';
data = fetch_JSON_file(url)
.then(data => {
// Handle the JSON data
create_table(data);
})
.catch(error => {
// Handle errors
console.error('Error:', error);
});
}
1 change: 1 addition & 0 deletions docs/source/api/linalg/xgi.linalg.laplacian_matrix.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ xgi.linalg.laplacian_matrix
.. rubric:: Functions

.. autofunction:: laplacian
.. autofunction:: multiorder_laplacian
.. autofunction:: normalized_hypergraph_laplacian
2 changes: 1 addition & 1 deletion docs/source/api/tutorials/XGI in 15 minutes.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"source": [
"## Uploading a dataset\n",
"\n",
"In this tutorial we will construct a hypergraph describing real world data! With XGI we provide a companion data repository, [xgi-data](https://gitlab.com/complexgroupinteractions/xgi-data), with which you can easely load several datasets in standard format:"
"In this tutorial we will construct a hypergraph describing real world data! With XGI we provide a companion data repository, [xgi-data](https://github.com/xgi-org/xgi-data), with which you can easely load several datasets in standard format:"
]
},
{
Expand Down
9 changes: 4 additions & 5 deletions docs/source/api/tutorials/case_study_zhang2022.ipynb
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"cells": [
{
"attachments": {},
"cell_type": "markdown",
"id": "417f4911",
"metadata": {},
Expand All @@ -15,9 +14,9 @@
"metadata": {},
"source": [
"Here, using XGI, we reproduce figures 1 and 2 of the paper \n",
"\"Do higher-order interactions promote synchronization?\" \n",
"\"Higher-order interactions shape collective dynamics differently in hypergraphs and simplicial complexes\" \n",
"Yuanzhao Zhang *, Maxime Lucas *, Federico Battiston \n",
"[arXiv:2203.03060](https://doi.org/10.48550/arXiv.2203.03060)"
"[Nature Communications, 14(1), 2023, p.1605](https://doi.org/10.1038/s41467-023-37190-9)"
]
},
{
Expand Down Expand Up @@ -470,7 +469,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3.10.6 ('venv': venv)",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -484,7 +483,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.13"
"version": "3.9.18"
},
"toc": {
"base_numbering": 1,
Expand Down
3 changes: 1 addition & 2 deletions docs/source/api/tutorials/focus_tutorials.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,4 @@
Tutorial 4 - Generative_Models
Tutorial 5 - Plotting
Tutorial 6 - Statistics
Tutorial 7 - Convex hulls hypergraph plotting
Tutorial 8 - Directed Hypergraphs
Tutorial 7 - Directed Hypergraphs
3 changes: 2 additions & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# -- Project information -----------------------------------------------------
project = "XGI"
copyright = "Copyright (C) 2021-2023 XGI Developers"
release = "0.8"
release = "0.8.2"

# -- General configuration ---------------------------------------------------

Expand Down Expand Up @@ -62,6 +62,7 @@
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ["_static"]
html_css_files = ["custom.css"]
html_js_files = ["table.js"]

# If your documentation needs a minimal Sphinx version, state it here.
needs_sphinx = "1.3"
Expand Down
3 changes: 2 additions & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
about
contributors
higher-order
xgi-data
gallery
using-xgi

Expand Down Expand Up @@ -106,7 +107,7 @@ XGI was developed and tested for Python 3.8-3.12 on Mac OS, Windows, and Ubuntu.
Corresponding Data
==================

A number of higher-order datasets are available in the `XGI-DATA repository <https://gitlab.com/complexgroupinteractions/xgi-data>`_ and can be easily accessed with the ``load_xgi_data()`` function.
A number of higher-order datasets are available in the `XGI-DATA repository <https://github.com/xgi-org/xgi-data>`_ and can be easily accessed with the ``load_xgi_data()`` function.


Contributing
Expand Down
36 changes: 25 additions & 11 deletions docs/source/using-xgi.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,30 @@ Published work
2023
----

Gonzalo Contreras-Aso, Regino Criado, Guillermo Vera de Salas, and Jinling Yang, "Detecting communities in higher-order networks by using their derivative graphs", *Chaos, Solitons, and Fractals* **177**, 114200 (2023).

:bdg-link-primary-line:`Paper <https://doi.org/10.1016/j.chaos.2023.114200>`
:bdg-link-primary-line:`Code <https://github.com/LaComarca-Lab/HyperGraph-Communities>`

Nicholas W. Landry and Juan Restrepo, "Opinion disparity in hypergraphs with community structure", *Physical Review E* **108**, 034311 (2023).

:bdg-link-primary-line:`Paper <https://doi.org/10.1103/PhysRevE.108.034311>`
:bdg-link-primary-line:`Github <https://github.com/nwlandry/opinion-disparity-in-hypergraphs>`
:bdg-link-primary-line:`Code <https://github.com/nwlandry/opinion-disparity-in-hypergraphs>`

Timothy LaRock and Renaud Lambiotte, "Encapsulation Structure and Dynamics in Hypergraphs", *Journal of Physics: Complexity* **4**, 045007 (2023).

:bdg-link-primary-line:`Paper <https://doi.org/10.1088/2632-072X/ad0b39>`
:bdg-link-primary-line:`Code <https://github.com/tlarock/encapsulation-dynamics>`

Nicolò Ruggieri, Martina Contisciani, Federico Battiston, and Caterina de Bacco, "Community detection in large hypergraphs", *Science Advances* **9**, eadg9159 (2023).

:bdg-link-primary-line:`Paper <https://doi.org/10.1126/sciadv.adg9159>`
:bdg-link-primary-line:`Github <https://github.com/nickruggeri/Hy-MMSBM>`
:bdg-link-primary-line:`Code <https://github.com/nickruggeri/Hy-MMSBM>`

Yuanzhao Zhang, Maxime Lucas, and Federico Battiston, "Higher-order interactions shape collective dynamics differently in hypergraphs and simplicial complexes", *Nature Communications* **14**, 1605 (2023).

:bdg-link-primary-line:`Paper <http://doi.org/10.1038/s41467-023-37190-9>`
:bdg-link-primary-line:`Github <https://github.com/maximelucas/HOI_shape_sync_differently>`
:bdg-link-primary-line:`Code <https://github.com/maximelucas/HOI_shape_sync_differently>`


Preprints
Expand All @@ -34,34 +44,38 @@ Preprints
2023
----

Gonzalo Contreras-Aso, Cristian Pérez-Corral, and Miguel Romance, "Uplifting edges in higher order networks: spectral centralities for non-uniform hypergraphs", arXiv:2310.20335 (2023).

:bdg-link-primary-line:`Paper <https://arxiv.org/abs/2310.20335>`
:bdg-link-primary-line:`Code <https://github.com/LaComarca-Lab/non-uniform-hypergraphs>`

Iacopo Iacopini, Márton Karsai, and Alain Barrat, "The temporal dynamics of group interactions in higher-order social networks", arXiv:2306.09967 (2023).

:bdg-link-primary-line:`Paper <https://arxiv.org/abs/2306.09967>`

Nicholas W. Landry, Ilya Amburg, Mirah Shi, and Sinan Aksoy, "Filtering higher-order datasets", arXiv:2305.06910 (2023).

:bdg-link-primary-line:`Paper <http://arxiv.org/abs/2305.06910>`
:bdg-link-primary-line:`Github <https://github.com/nwlandry/filtering-higher-order-datasets>`
:bdg-link-primary-line:`Code <https://github.com/nwlandry/filtering-higher-order-datasets>`

Nicholas W. Landry, Jean-Gabriel Young, and Nicole Eikmeier, "The simpliciality of higher-order networks", arXiv:2308.13918 (2023).

:bdg-link-primary-line:`Paper <https://doi.org/10.48550/arXiv.2308.13918>`
:bdg-link-primary-line:`Github <https://github.com/nwlandry/the-simpliciality-of-higher-order-networks>`

Timothy LaRock and Renaud Lambiotte, "Encapsulation Structure and Dynamics in Hypergraphs", arXiv:2307.04613 (2023).

:bdg-link-primary-line:`Paper <https://arxiv.org/abs/2307.04613>`
:bdg-link-primary-line:`Github <https://github.com/tlarock/encapsulation-dynamics>`
:bdg-link-primary-line:`Code <https://github.com/nwlandry/the-simpliciality-of-higher-order-networks>`

Yuanzhao Zhang, Per Sebastian Skardal, Federico Battiston, Giovanni Petri, Maxime Lucas, "Deeper but smaller: Higher-order interactions increase linear stability but shrink basins", arXiv:2309.16581 (2023).

:bdg-link-primary-line:`Paper <https://arxiv.org/abs/2309.16581>`
:bdg-link-primary-line:`Github <https://github.com/maximelucas/basins_and_triangles>`
:bdg-link-primary-line:`Code <https://github.com/maximelucas/basins_and_triangles>`


Theses
======

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>`

Thomas Robiglio, "Higher-order structures in face-to-face interaction networks", (2023).

:bdg-link-primary-line:`Thesis <https://webthesis.biblio.polito.it/27942/>`
Expand Down
Loading

0 comments on commit 41efd3e

Please sign in to comment.