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

Use python entry points #16

Open
giovannipizzi opened this issue May 18, 2020 · 0 comments
Open

Use python entry points #16

giovannipizzi opened this issue May 18, 2020 · 0 comments

Comments

@giovannipizzi
Copy link
Contributor

A suggestion for better modularity, in the future (to be tested to see if it makes things easier)

Now we suggest people to push their implementation in a compute/ subfolder, so essentially we are injecting code in the tools-barebone package.

We should probably consider the following instead (this will be for v2.0, though):

  • move all code, including the website with templates etc, inside the pypi package tools-barebone (now it only contains very minor files), so one can just install everything with pip
  • instead of checking for the blueprint in the compute/__init__.py file, define an entrypoint that should have a given name (say tools-barebone.compute) and point to a flask.Blueprint, and load it from there. Suggest client tools to release as python applications.

In this way, installing tools barebone is a pip install, and extending a tool also just requires to push the repository into the tools-barebone base image, and just doing pip install, rather than moving files in the correct locations.

This might also have the advantages of easier testing without docker (if we want to support this), and less risk that the python pip package gets out of sync with the files in the Docker container if people just pip install a new version from pypi without updating the files.

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

1 participant