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

Set a user functions path #162

Closed
DougRzz opened this issue Dec 23, 2018 · 3 comments
Closed

Set a user functions path #162

DougRzz opened this issue Dec 23, 2018 · 3 comments

Comments

@DougRzz
Copy link
Contributor

DougRzz commented Dec 23, 2018

I would like the users of my Vaex based app to be able to create their own NumPy/Pandas type functions similar to functions.py. To enable this, I would like to be able to specify a list of paths which contain these additional functions.

Maybe the api could be something like this:

vaex.userFunctionPaths = [r'C:\Dougs\vaexFunctions\DougsFunctions.py',  r'X:\team\functions\extraFunctions.py']
@maartenbreddels
Copy link
Member

I guess you mean something that runs when you import vaex?
It does currently https://github.com/vaexio/vaex/blob/master/packages/vaex-core/vaex/__init__.py#L550
But it's a bit of a leftover artifact, but does it suit your needs?

@DougRzz
Copy link
Contributor Author

DougRzz commented Dec 24, 2018

Something similar to that would work maybe. I would like the user to be able to write and save their own functions and then add them to the expression_namespace without having to modify functions.py in the Vaex code base.

@DougRzz
Copy link
Contributor Author

DougRzz commented Mar 19, 2019

This PR fulfils this issue.
#188
:)

@DougRzz DougRzz closed this as completed Mar 19, 2019
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