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

Add option matlab_short_links #171

Merged
merged 28 commits into from
Apr 28, 2023
Merged

Add option matlab_short_links #171

merged 28 commits into from
Apr 28, 2023

Conversation

joeced
Copy link
Collaborator

@joeced joeced commented Apr 1, 2023

Working on getting more MATLAB like rendering and links.

Rather than target.+package.ClassBar, it will displayed and referenced as package.ClassBar.

Working on getting more MATLAB like rendering and links.

Rather than `target.+package.ClassBar`, it will displayed and referenced
as `package.ClassBar`.
README.rst Outdated
Shorten all class, package and functions to the minimum length. This assumes
that everything is in the path as we would expect it in MATLAB. This should
resemble a more MATLAB-like presentation. Default is ``True``.
*Added in Version 0.17.0.*
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be 0.18.0?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be fixed now.

@rdzman
Copy link
Contributor

rdzman commented Apr 3, 2023

Beautiful! I started working on this at the end of last week, but you got much further much more quickly than me. I'll play around with this a bit more and comment as soon as I have anything. But, assuming this works consistently as intended, I'd vote to release it ASAP, as it's a huge step forward. Thanks!

@joeced
Copy link
Collaborator Author

joeced commented Apr 3, 2023

It's going forward. However, as I learn more, I also discover other issues. For instance, linking to baseclasses which seems to be broken. I'm away from a computer for a week from Wednesday, so there will be limited progress.

First steps towards parsing the entire `base_dir` for MATLAB entities.
All entities are now stored in `MatObject.entities` instead of a dict.
A `MatModule` object represents a directory. It will contain:
* MatModule (directories: regular, package or classfolder)
* MatClass (class m-files)
* MatFunction (function m-files)
* MatScript (script m-files)
* MatApplication (mlapps)
- import_object is so much simpler now.
- `MatModule.safe_getmembers` is now the only place where we
  traverse directories.
- MatClass.__bases__ is so much simpler now.
- All use of "modules" replaced with entities_table.
- Started fixing tests.
reset entities_tables.
@joeced
Copy link
Collaborator Author

joeced commented Apr 24, 2023

A short progress report. It's slow and steady getting closer. I can now render objects in the root folder 🥳

billede

However, I still have a few details to iron out around base class linking.

@rdzman
Copy link
Contributor

rdzman commented Apr 25, 2023

This is great. Thanks. I've been looking at some of this code with a view to starting work on #178. And I agree that you're making that easier.

@joeced joeced marked this pull request as ready for review April 28, 2023 12:15
@joeced
Copy link
Collaborator Author

joeced commented Apr 28, 2023

@rdzman It's almost ready to merge to master. I need to fix tests asserting class rendering.

If a class has nothing to document we added an empty "container",
resulting in: ` ERROR: Content block expected for the "container" directive; none found`

Added `test_docs_automodule` to test recursively listing all members.
@joeced joeced merged commit 81f5f17 into master Apr 28, 2023
@joeced joeced deleted the remove-module-name branch June 15, 2023 06:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants