Repository navigation
Refactor: Moving backend docs from backends.py to backends.rst - #7776
Conversation
|
This sounds promising to me! Thanks @Schefflera-Arboricola -- I think you are right that this module is so large we might find it easier to read and review if it was refactored. A new directory alongside Looking forward to input from @eriknw on this too. What would be a good way to separate it into modules? |
yes, and also the
I think separating out all the helper functions/functionalities from the |
|
Thanks for this! I'm sorry for being slow to the party--I've been afk. I think separating out docs as is currently done in this PR makes a lot of sense. It has gotten quite long. Regarding moving to I think we can break up |
| @@ -13,6 +13,473 @@ variables. | |||
| <https://scientific-python.org/calendars/networkx.ics>`_ is an excellent way | |||
There was a problem hiding this comment.
Note for reviewers
-
copy this
backends.rstfile in the root directory of your local networkx fork(mainbranch) -
then run the following command(in the networkx root directory) to confirm that the documentation has not be changed but just shifted:
diff <(sed -n '16,481p' backends.rst) <(sed -n '2,467p' networkx/utils/backends.py)
There was a problem hiding this comment.
This is pretty slick, thanks for providing these instructions! I just confirmed that documentation has not changed, so this PR is up to date and ready to go in.
And, yes, let's continue the refactor discussion in #7787 👍
dschult
left a comment
There was a problem hiding this comment.
Thanks @Schefflera-Arboricola for this!
I've moved the documentation from
backends.pytobackends.rst, as having ~400-450 lines of docs at the start of the code file felt excessive. I think giving the detailed backend docs their own space improves readability and the overall structure. LMK your thoughts on this change.Additionally, I would like to propose converting
backends.pyinto a sub-package, considering its growing size and complexity. I think this would help us refactor the code more to make it more readable and more organized and hence easier to contribute to and review. Also, if we do go down this route, I'd also suggest moving thatbackendsfolder(sub-package) out ofutils, as I think the whole backends machinery has evolved from an utility to a big component of the project. LMKWYT.Thank you :)