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

TeX in docstrings causes DeprecationWarning. #128

Closed
drj11 opened this issue Dec 6, 2023 · 1 comment
Closed

TeX in docstrings causes DeprecationWarning. #128

drj11 opened this issue Dec 6, 2023 · 1 comment
Assignees
Labels

Comments

@drj11
Copy link

drj11 commented Dec 6, 2023

Describe the bug

On Python 3.11 when i import hypernetx i get a few warnings:

>>> import hypernetx as hnx
/Users/drj/prj/HyperNetX/hypernetx/algorithms/homology_mod2.py:1: DeprecationWarning: invalid escape sequence '\{'
  """
/Users/drj/prj/HyperNetX/hypernetx/algorithms/homology_mod2.py:544: DeprecationWarning: invalid escape sequence '\m'
  """
/Users/drj/prj/HyperNetX/hypernetx/algorithms/homology_mod2.py:737: DeprecationWarning: invalid escape sequence '\{'
  """
/Users/drj/prj/HyperNetX/hypernetx/algorithms/laplacians_clustering.py:42: DeprecationWarning: invalid escape sequence '\g'
  """

These are causes by the TeX code appearing inside Python docstrings. Probably the simplest approach would be to make the docstrings raw by changing """ to r""" at the beginning of the affected docstrings [edit: as has been done in s_centrality_measures.py for example].

In addition the affected docstring in laplacians_clustering.py looks like it needs some dollar signs, but i am not familiar with your post-processing documentation tools.

Whilst i found this during my review for JOSS, i do not require it to be fixed for acceptance.

Environment (please complete the following information):

  • macOS Darwin 20.6.0
  • Python 3.11.4 (main, Jun 20 2023, 16:52:35) [Clang 13.0.0 (clang-1300.0.29.30)] on darwin
@bonicim bonicim added the joss label Dec 6, 2023
@bonicim bonicim self-assigned this Dec 8, 2023
@bonicim
Copy link
Collaborator

bonicim commented Dec 8, 2023

Fixed in v2.1.3.

@bonicim bonicim closed this as completed Dec 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants