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

More stable way to generate node documentation links #4727

Merged
merged 3 commits into from
Nov 2, 2022
Merged

Conversation

Durman
Copy link
Collaborator

@Durman Durman commented Oct 28, 2022

Addressed problem description

Node modules categories and node documentation categories are not 100% consistent. So there was magical conditions to translate the modules categories to docs ones. I reconsidered the approach and now categories does not take part in search of node documentations. It's completely based on the module names and it means that all node modules should have uniq names (even if they are in differen folders).

Also, now all nodes implement new method:

def get_doc_link(self, link_type='ONLINE') -> Optional[str]:

This method should be overridden by Sverchok's extensions if they want to use links to node documentations.

New way reviled two nodes which does not have documentation and were not marked as known problems:

  • flip_surface.py
  • ruled_surface.py

Preflight checklist

  • Code changes complete.
  • Code documentation complete.
  • Manual testing done.
  • Unit-tests implemented.
  • Ready for merge.

@Durman
Copy link
Collaborator Author

Durman commented Oct 31, 2022

Since the documentation link is generated inside the node method it's possible to override it for some nodes. For example it can be useful for SNL node to implement a way to show documentation of a loaded script.

@Durman Durman marked this pull request as ready for review October 31, 2022 05:06
@Durman Durman merged commit 74b41a3 into master Nov 2, 2022
@Durman Durman deleted the node_docs branch November 2, 2022 05:46
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.

1 participant