pysal / spaghetti

SPAtial GrapHs: nETworks, Topology, & Inference
http://pysal.org/spaghetti/
BSD 3-Clause "New" or "Revised" License
260 stars 69 forks source link

local docs build "failure" #731

Closed jGaboardi closed 1 year ago

jGaboardi commented 1 year ago

The last time the build_docs.yaml action was run prior to these failures was in 2023-01 with the output being the current docs site --> spaghetti==1.7.2. Here we can see that the spaghetti.Network class^1 and {savenetwork,loadnetwork} methods^2 API references are fully generated without error. However, starting from #726 I have not been able to get the docs to build properly locally, specifically having trouble with the parts just mentioned. What I am seeing locally is no spaghetti.Network API reference being produced[^3] and the {savenetwork,loadnetwork} methods not being generated[^4] with a warning from autosummary being thrown^5.

It may or may not be related to setuptools_scm, sphinx, or something else entirely. Been trying to debug it for several weeks, but still seem to be no closer. The last time docs build proper we were still on versioneer, now we have switched to setuptools_scm=7.1.0 FWIW. I have seen this problem locally with sphinx={6.1.3, 6.2.1, 7.0.1}. It's probably something simple that I'm overlooking, but at this point I'm confounded.

Any set of eyes or an idea to look into would be super appreciated. @martinfleis, @weikang9009, @knaaptime, @gegen07

[^3]: Screenshot 2023-06-18 at 6 21 47 PM [^4]: Screenshot 2023-06-18 at 6 22 21 PM

  ```
  /PATH/spaghetti/docs/api.rst:35: WARNING: autosummary: failed to import spaghetti.Network.savenetwork.
  Possible hints:
  * AttributeError: module 'spaghetti.Network' has no attribute 'savenetwork'
  * ModuleNotFoundError: No module named 'spaghetti.spaghetti'
  * ModuleNotFoundError: No module named 'spaghetti.Network.savenetwork'; 'spaghetti.Network' is not a package
  * ImportError: 
  * AttributeError: module 'spaghetti' has no attribute 'spaghetti'
  /PATH/spaghetti/docs/api.rst:35: WARNING: autosummary: failed to import spaghetti.Network.loadnetwork.
  Possible hints:
  * AttributeError: module 'spaghetti' has no attribute 'spaghetti'
  * ModuleNotFoundError: No module named 'spaghetti.spaghetti'
  * ModuleNotFoundError: No module named 'spaghetti.Network.loadnetwork'; 'spaghetti.Network' is not a package
  * ImportError: 
  * AttributeError: module 'spaghetti.Network' has no attribute 'loadnetwork'
  ```
martinfleis commented 1 year ago

It is related to a version of Python. It works if you have 3.9 in the same environment, it fails under 3.11. Not sure what has changed though.

jGaboardi commented 1 year ago

It is related to a version of Python. It works if you have 3.9 in the same environment, it fails under 3.11. Not sure what has changed though.

Oh wow... Where would we report this?

martinfleis commented 1 year ago

I am not certain it is a bug, on Python side. It may be some behaviour change we need to adapt to.

jGaboardi commented 1 year ago

Closing for now with viable solution in #733. Can revisit and open later if needed.

jGaboardi commented 9 months ago

xref: https://github.com/mcmtroffaes/sphinxcontrib-bibtex/issues/284