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 submodule for entry point functionality #844

Closed
wants to merge 3 commits into from

Conversation

ap--
Copy link
Collaborator

@ap-- ap-- commented Sep 5, 2024

Hello Lamins,

This PR adds an _entry_points submodule with a call_registered_entry_points function, which can then be used in lamindb as well as lamin-cli to provide a hook that other packages can use to do additional setup that might be required for lamindb to function correctly within their custom infrastructure.

usage example xref: laminlabs/lamin-cli#68

Cheers,
Andreas 😃

@falexwolf
Copy link
Member

falexwolf commented Sep 5, 2024

Thanks, Andreas! I'll fix the CI runs here:

What test shall we add for this?

@ap--
Copy link
Collaborator Author

ap-- commented Sep 5, 2024

Good question, since the test will at the end rely on lamindb, lamin-cli and lamindb-setup it would be great if you could advise where I should add tests ideally.

In every dependency? or only in lamindb?

@falexwolf
Copy link
Member

I get how it works for CLI calls.

call_registered_entry_points("lamin-cli.setup", module_globals=globals())

I'll read up in the original issue for how it would be called for lamindb.

Would you want this to be automatically called upon importing lamindb?

@falexwolf
Copy link
Member

Regarding tests: Tests pass on the main branch. 🤔 - It must be related to the fact that you made the PR with different hidden policies or settings that they're now failing. 🤔

@ap--
Copy link
Collaborator Author

ap-- commented Sep 5, 2024

Hmm, could be that it's related to me not being part of your org. Have you ever had external contributors?

@falexwolf
Copy link
Member

Hmm, could be that it's related to me not being part of your org. Have you ever had external contributors?

Yes, we did. 🤔 -- I'll investigate, and get this to work, don't worry.

@falexwolf
Copy link
Member

Regarding the general layout, I'm responding in the original issue.

@falexwolf
Copy link
Member

Ok, tests fail because the secrets aren't passed on because you made your PR from a fork and there doesn't seem to be a setting to enable it:

image

I'll make you a collaborator with write access, then you don't need to make forks anymore.

@ap--
Copy link
Collaborator Author

ap-- commented Sep 5, 2024

perfect. I'll add tests and will reopen from a branch in laminlabs/lamindb-setup

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