Skip to content

Use python entry points #16

@giovannipizzi

Description

@giovannipizzi

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions