frostming/monas

Use monas to manage a submoduled common mono-repo

Closed this issue · 0 comments

I created a demo repo showing how to use monas to manage a service that has a submoduled common mono-repo.

See here for background on motivation, and an implementation:
https://github.com/AGiantSquid/monas-submodule-demo#monas-submodule-demo

To get monas to find the service, I had to nest the service code into a top level directory. It would be nice if the service could live in the root of the repository. The service would need a pyproject.toml at the root of the project to be a valid package, so the service's pyproject.toml would have to have information relating to the service, as well as the monas configuration information.

Describe the solution you'd like
One solution would be to put the monas configuration into a different file than the pyproeject.toml , so that a pyproeject.toml file could point to a root level package/service. Maybe monas.toml ?

Then, you could give the monas configuration some syntax to indicate that the root is a location to look for projects.

Currently, if you set

packages = [
    "./",
]

monas will find any directories that are in the project root, and then look inside of the directories for projects.

Maybe the packages syntax could use a glob to indicate matching projects rather than a parent directory.
Then,

packages = [
    "./*",
]

would look for directories in the root, but

packages = [
    "./",
]

would indicate that the root itself is a project.