3-manifolds / SnapPy

SnapPy is a package for studying the topology and geometry of 3-manifolds, with a focus on hyperbolic structures. It is based on the SnapPea kernel written by Jeff Weeks.
https://snappy.computop.org/
84 stars 39 forks source link

a little set of pycodestyle-suggested details (all E711 and some others) #53

Closed fchapoton closed 2 years ago

fchapoton commented 2 years ago

E711 comparison to None

fchapoton commented 2 years ago

I am not sure whether failures when building wheels are related to my cosmetic changes.

NathanDunfield commented 2 years ago

I am not sure whether failures when building wheels are related to my cosmetic changes.

Based on the log files, it is you changes to to perm4.py:_make_opposite_dict that are the problem:

2022-04-10T09:21:36.0369100Z   Traceback (most recent call last):
2022-04-10T09:21:36.0383470Z     File "/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/cibw-run-36uw55rl/cp36-macosx_x86_64/build/venv/lib/python3.6/site-packages/sphinx/config.py", line 332, in eval_config_file
2022-04-10T09:21:36.0383940Z       exec(code, namespace)
2022-04-10T09:21:36.0384280Z     File "/Users/runner/work/SnapPy/SnapPy/doc_src/conf.py", line 43, in <module>
2022-04-10T09:21:36.0384550Z       import snappy
2022-04-10T09:21:36.0385130Z     File "/Users/runner/work/SnapPy/SnapPy/build/lib.macosx-10.9-x86_64-3.6/snappy/__init__.py", line 7, in <module>
2022-04-10T09:21:36.0385530Z       from .SnapPy import (AbelianGroup, HolonomyGroup, FundamentalGroup,
2022-04-10T09:21:36.0385900Z     File "cython/core/basic.pyx", line 43, in init SnapPy
2022-04-10T09:21:36.0386470Z     File "/Users/runner/work/SnapPy/SnapPy/build/lib.macosx-10.9-x86_64-3.6/snappy/snap/__init__.py", line 3, in <module>
2022-04-10T09:21:36.0386880Z       from .polished_reps import polished_holonomy
2022-04-10T09:21:36.0387450Z     File "/Users/runner/work/SnapPy/SnapPy/build/lib.macosx-10.9-x86_64-3.6/snappy/snap/polished_reps.py", line 14, in <module>
2022-04-10T09:21:36.0387810Z       from .fundamental_polyhedron import *
2022-04-10T09:21:36.0388380Z     File "/Users/runner/work/SnapPy/SnapPy/build/lib.macosx-10.9-x86_64-3.6/snappy/snap/fundamental_polyhedron.py", line 2, in <module>
2022-04-10T09:21:36.0388730Z       from .kernel_structures import *
2022-04-10T09:21:36.0389280Z     File "/Users/runner/work/SnapPy/SnapPy/build/lib.macosx-10.9-x86_64-3.6/snappy/snap/kernel_structures.py", line 2, in <module>
2022-04-10T09:21:36.0389610Z       from .t3mlite import simplex
2022-04-10T09:21:36.0390410Z     File "/Users/runner/work/SnapPy/SnapPy/build/lib.macosx-10.9-x86_64-3.6/snappy/snap/t3mlite/__init__.py", line 1, in <module>
2022-04-10T09:21:36.0390810Z       from .mcomplex import *
2022-04-10T09:21:36.0391380Z     File "/Users/runner/work/SnapPy/SnapPy/build/lib.macosx-10.9-x86_64-3.6/snappy/snap/t3mlite/mcomplex.py", line 11, in <module>
2022-04-10T09:21:36.0391720Z       from .tetrahedron import Tetrahedron
2022-04-10T09:21:36.0392290Z     File "/Users/runner/work/SnapPy/SnapPy/build/lib.macosx-10.9-x86_64-3.6/snappy/snap/t3mlite/tetrahedron.py", line 10, in <module>
2022-04-10T09:21:36.0392630Z       from .perm4 import Perm4, inv
2022-04-10T09:21:36.0393170Z     File "/Users/runner/work/SnapPy/SnapPy/build/lib.macosx-10.9-x86_64-3.6/snappy/snap/t3mlite/perm4.py", line 25, in <module>
2022-04-10T09:21:36.0393500Z       opposite = _make_opp_dict()
2022-04-10T09:21:36.0394050Z     File "/Users/runner/work/SnapPy/SnapPy/build/lib.macosx-10.9-x86_64-3.6/snappy/snap/t3mlite/perm4.py", line 15, in _make_opp_dict
2022-04-10T09:21:36.0394790Z       for k in dic:
2022-04-10T09:21:36.0395050Z   RuntimeError: dictionary changed size during iteration
NathanDunfield commented 2 years ago

Looks like the reason the CI passed in the sage-test actions is that said actions have a bug that means they always test the master branch, even for pull requests like this. So those positive tests meant nothing. I'll have to fix that.

Also, it's pretty confusing why this would have worked on your own machine since it seems to be failing to even import snappy. How much testing are you doing before submitting these pull requests?

fchapoton commented 2 years ago

I usually do not test on my own machine. Doing mostly cosmetic and simple changes, I was hoping that the continuous integration would catch any possible issue.

fchapoton commented 2 years ago

should be good now, hopefuly ?