tudat-team / tudat-space

An introduction and guide to tudat-space.
https://tudat-space.readthedocs.io
14 stars 17 forks source link

Refactoring of source file tree to resemble the tudat-space headers. #94

Closed sbcowan closed 1 year ago

sbcowan commented 1 year ago

This pull request (initiated by issue #80) has no significant content changes. It consists of some extensive source filename refactoring to resemble the tudat-space headers more closely. Navigating through the source code with the website side-by-side is now significantly easier.

A few notes:

  1. I don't know if this is a known thing, but with more substantial refactoring, test builds had a peculiar bug: When navigating to certain files on tudat-space, other toc elements on tudat-space would not show up. I solved this by rebuilding using the -E option to activate a full rebuild, rather than a partial one.
  2. There is a 'secret menu' in tudat-space, where some files (two_body_dynamics.rst for example) don't show up anywhere in the build, but can be found when using the search function. Is something meant to be done with this file (I refer to this later)?
  3. For future development of the tudat-space website (and any other documentation website), there should be a system for creating new documentation, namely by creating new files, as opposed to updating existing files but change its contents. The latter saves time in the short term, but is less clear the longer this is done.
  4. Jupyterlab notebooks refer to file names on the tudat-space website, as opposed to referencing within the rst source. This means that there can be a discrepancy between the file names that are referenced in the jupyterlab notebooks (they generally reference the 'latest' version) and recently changed filenames, until the changes have been published to the designated reference point of the jupyterlab notebook.
  5. Last but not least, I think, if everyone agrees, that I should perform another similar refactor. However this regards both the directory tree in the source code as well as the toc as it is visible on tudat-space, so further discussion is needed. A number of things are still jumbled around, and structured somewhat chaotically:
    • Files like ephemerides.rst, two_body_dynamics.rst, and auto_processing.rst are 'ghost' files, they exist, some have content, others don't, but they are not used. This unnecessarily clutters the source code tree. I think that WIP files should be kept on separate branches or on local versions of tudat-space (clones/forks), and that old files should be moved when overshadowed, albeit to a deprecated/ directory.
    • Some elements on tudat-space (available_models.rst, for example) are in a subdirectory of a file, but in the source code they exist in the same list as the parent file. This also adds to a unstructured file tree, but it is a more fundamental change to the structure, which is why I wanted feedback first.
    • Similarly, the acceleration_models directory is a directory of files that all exist in translational, yet the directory is on the same level as the dynamics_types directory (which is where translational.rst is in). Idem, less clear structure.

Sorry in advance for the many file changes, it was unavoidable ;)

DominicDirkx commented 1 year ago

Hi Sean, thanks for initiatingn and addressing this. Looks good! To go into your points:

  1. Thanks for pointing this out, I'd noticed this in the past as well. Could you open an issue for adding this to the developer docs?
  2. These are largely (all?) outdated files that will no longer be used and have been superseded by other files. '
  3. See point 1 :)
  4. I don't quite follow, but it sounds like something that should be addressed. Could you give an example of what you mean exactly? For instance, what does 'refer to file names' mean exactly; from where is the reference you're referring to made? Between where and where can the discrepancy occur?
  5. Referring to your three bullet points:
    • Good idea. After collecting all these files, we can go through them to see which (if any) have any content worth saving
    • Good point, this should be re-arranged in the file structure, this would not have any impact on the ToC, or would it?
    • Idem
sbcowan commented 1 year ago

Jupyterlab notebooks refer to file names on the tudat-space website, as opposed to referencing within the rst source. This means that there can be a discrepancy between the file names that are referenced in the jupyterlab notebooks (they generally reference the 'latest' version) and recently changed filenames, until the changes have been published to the designated reference point of the jupyterlab notebook.

I don't quite follow, but it sounds like something that should be addressed. Could you give an example of what you mean exactly? For instance, what does 'refer to file names' mean exactly; from where is the reference you're referring to made? Between where and where can the discrepancy occur?

In the keplerian_satellite_orbit.ipynb example application, a cell refers to the Available Environment Models page on tudat-space. It does so by referencing a tudat-space URL, rather than referencing the page with :ref:`environment_model_overview`. If the Available Environment Models filename changes, then the Jupyterlab link doesn't automatically update, resulting in a dead link. I realize that the jupyter notebook cannot reference that way as it is built differently, so this means that the refactoring has to be thorough enough to change those links.

Files like ephemerides.rst, two_body_dynamics.rst, and auto_processing.rst are 'ghost' files, they exist, some have content, others don't, but they are not used. This unnecessarily clutters the source code tree. I think that WIP files should be kept on separate branches or on local versions of tudat-space (clones/forks), and that old files should be moved when overshadowed, albeit to a deprecated/ directory.

Good idea. After collecting all these files, we can go through them to see which (if any) have any content worth saving

Sounds good, I'll make a list for next week Friday.

  • Some elements on tudat-space (available_models.rst, for example) are in a subdirectory of a file, but in the source code they exist in the same list as the parent file. This also adds to a unstructured file tree, but it is a more fundamental change to the structure, which is why I wanted feedback first.
  • Similarly, the acceleration_models directory is a directory of files that all exist in translational, yet the directory is on the same level as the dynamics_types directory (which is where translational.rst is in). Idem, less clear structure.

Good point, this should be re-arranged in the file structure, this would not have any impact on the ToC, or would it?

No it wouldn't. I'll add these changes to the next refactor pull-request.