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

attempt at listing the available statistics #405

Merged
merged 13 commits into from
Jul 25, 2023

Conversation

thomasrobiglio
Copy link
Collaborator

@thomasrobiglio thomasrobiglio commented Jun 15, 2023

This is an attempt at rendering all the available statistics and making them more discoverable as discussed in the docs part of #188.

@codecov
Copy link

codecov bot commented Jun 15, 2023

Codecov Report

Patch coverage has no change and project coverage change: -0.05 ⚠️

Comparison is base (71d8498) 90.95% compared to head (544f511) 90.90%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #405      +/-   ##
==========================================
- Coverage   90.95%   90.90%   -0.05%     
==========================================
  Files          47       47              
  Lines        3893     3916      +23     
==========================================
+ Hits         3541     3560      +19     
- Misses        352      356       +4     

see 3 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@thomasrobiglio thomasrobiglio marked this pull request as draft June 15, 2023 08:46
@nwlandry
Copy link
Collaborator

This is a really great start!! Thanks so much! Here are my thoughts: what if you combine the admonition box (if that's what it's called) with the listing of the classes below and group them by object type. For example,

Hypergraphs and Simplicial Complexes

Available Stats:
{add your list here of NodeStat and EdgeStat methods}

Corresponding modules/classes:
{NodeStat/EdgeStat etc.}

DiHypergraphs

....

docs/source/api/stats.rst Outdated Show resolved Hide resolved
@thomasrobiglio
Copy link
Collaborator Author

Thanks @nwlandry for the suggestions and the correction! At the moment I am a bit busy with other projects + wrapping up my msc thesis, I think I will be able to finish this next week... maybe after we have discussed about it in person at netsci 😄

@nwlandry
Copy link
Collaborator

nwlandry commented Jul 4, 2023

Of course! No rush and good luck :)

@nwlandry
Copy link
Collaborator

nwlandry commented Jul 4, 2023

I was just commenting because I found the typo when I was making the presentation for netsci.

@thomasrobiglio thomasrobiglio marked this pull request as ready for review July 10, 2023 06:12
@thomasrobiglio thomasrobiglio marked this pull request as draft July 10, 2023 07:33
@thomasrobiglio
Copy link
Collaborator Author

Now it appears like this - we can discuss in person if we like it or we want to explore other possibilities. @nwlandry hopefully this is what you were hinting at.
Screenshot 2023-07-10 alle 16 30 34

@thomasrobiglio thomasrobiglio marked this pull request as ready for review July 10, 2023 14:33
Copy link
Collaborator

@nwlandry nwlandry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two small changes, but I really like what you've done here! Thanks so much!

docs/source/api/stats.rst Outdated Show resolved Hide resolved
docs/source/api/stats.rst Show resolved Hide resolved
@thomasrobiglio
Copy link
Collaborator Author

Thank you @nwlandry. I would also like to have approval by @maximelucas as I was working on this with him last week

Copy link
Collaborator

@leotrs leotrs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks so much. My 2¢: I'd move the "corresponding modules" and "corresponding classes" at the bottom of each section inside the table, as they are only of interest to developers, not to end users, and move the decorators up, for the same reason. The decorators are meant to be user-facing.

docs/source/api/stats.rst Outdated Show resolved Hide resolved
@maximelucas
Copy link
Collaborator

Thanks Thomas, looks great.

To fully fix #188 I would still add two things (but they could be in another PR):

  1. an all_stat() function that would list of all available stats (see this comment)
  2. list available stats when user request one that does not exist. Right now, H.nodes.test() raises AttributeError: Stat 'test' not defined. It would be nice if it could also say something like: "NodeStat must be one of ["degree", ...]"

@thomasrobiglio
Copy link
Collaborator Author

Agreed @maximelucas, I think it would be better to do that in another PR. Does someone knows how to 'unlink' this PR to the issue? so that merging the PR does not close the issue

@maximelucas
Copy link
Collaborator

Does someone knows how to 'unlink' this PR to the issue? so that merging the PR does not close the issue

Not sure but in case we reopen it manually.

@thomasrobiglio thomasrobiglio merged commit ab7d4b6 into xgi-org:main Jul 25, 2023
19 checks passed
tlarock pushed a commit to tlarock/xgi that referenced this pull request Aug 3, 2023
* attempt at listing the available statistics

* fixing previous errors

* Attempt at implementing suggestions by nich

* second attempt at displaying the titles

* another trial

* titles in bold

* update of the panel for dihypergraph stats

* minor fixes

* change the hierarchical structure

* minor change

* moving MultiDi-stats in the right place

* adding decorators to the admonition box

* moving up the decorators
maximelucas added a commit that referenced this pull request Aug 4, 2023
* Added weights option to to_line_graph function.

* Added tests for weighted line graph implementation.

* Added s=2 test.

* Added encapsulation dag code.

* Added encapsulation dag tests.

* Removed unnecessary combinations import.

* Updated docstring.

* included functions from publication (#400)

* feat: added shuffle_hyperedges + tests

* feat: added shuffle_hyperedges + tests

* fix: filenames

* fix: tests

* style: black and isort

* feat: added function node_swap + test

* style: black and isort

* fix: error from python 3.11

* attempt at listing the available statistics (#405)

* attempt at listing the available statistics

* fixing previous errors

* Attempt at implementing suggestions by nich

* second attempt at displaying the titles

* another trial

* titles in bold

* update of the panel for dihypergraph stats

* minor fixes

* change the hierarchical structure

* minor change

* moving MultiDi-stats in the right place

* adding decorators to the admonition box

* moving up the decorators

* up-version

* feat: enforce equal aspect for circular layout #430 (#432)

* feat: enforce equal aspect for circular layout #430

* changed implementation of set_aspect

* Refactor draw module (#435)

* refact: draw module

* style: black and isort

* fix #331 (#438)

* Added the ability for users to access the optional arguments of NetworkX layout functions. (#439)

* Added another test.

* Refactored relations to subset_types. Exposed and documented empirical relations filtering function. Documentation improvements.

* Update xgi/convert/encapsulation_dag.py documentation

Co-authored-by: Maxime Lucas <maximelucas@users.noreply.github.com>

* Fix typo in xgi/convert/encapsulation_dag.py

Co-authored-by: Maxime Lucas <maximelucas@users.noreply.github.com>

* Updates to documentation.

* Minor refactor.

---------

Co-authored-by: Maxime Lucas <maximelucas@users.noreply.github.com>
Co-authored-by: Thomas Robiglio <83019028+thomasrobiglio@users.noreply.github.com>
Co-authored-by: Nicholas Landry <nicholas.landry.91@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants