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

Document how xontrib modules are registered and loaded through setuptools #4

Open
goodboy opened this issue Apr 20, 2023 · 2 comments

Comments

@goodboy
Copy link

goodboy commented Apr 20, 2023

I think it would be super helpful to have some comments inside your example setup.py script which (briefly) explain how xontrib module registration works in terms of what xonsh will do to load such registered modules.

So for example here you could document what and (ideally how) modules under xontrib/ are processed and made available in some env to xontrib load <module_name>

@anki-code
Copy link
Owner

anki-code commented Apr 21, 2023

setup.py is python setup script and it will be replaced by pyproject soon.

xontrib is just python package. When you install a xonrtib you just add a package files to python package xontrib/ and the command xontrib load some_xontrib is similar with just import xontrib.some_xontrib.

@goodboy
Copy link
Author

goodboy commented Apr 22, 2023

@anki-code another thing that might be nice is documenting when you should add _load_xcontrib() to a .xsh file

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

No branches or pull requests

2 participants