Replies: 1 comment
-
The Polylith Architecture lets developers choose where to start: by coding and adding bricks, or by creating a project and setting up the infrastructure. I think the automation for step 2 would be cool thing for sure! Since the One goal I have is to keep the tool as simple as possible and the command options few (I have failed at that part in some of the commands). But there's always the option of adding custom/domain specific scripts (I think |
Beta Was this translation helpful? Give feedback.
-
Hey, so I was playing around with polylith some more today. I had an idea, but first I wondered if this is a common use-case.
Firstly, I consider 'projects' to be my deployable units. For example, in my polylith I have a FastAPI base, and also a worker function component which I plan to have run on a daily schedule. So here, I have two potential projects, and each has a single 'root'. I'll call these 'root bricks'.
So my first question is, typically are 'projects' always focused around such 'root bricks' (even though that root brick will pull functions in from other 'bricks')?
If so, then when it comes to creating projects, I think it would make sense to have an automation built around this.
Currently:
Whenever I create a project, I:
poly create project --name="<whatever>"
poly sync
, so all the other bricks are calculated and added to pyproject.tomlI think we could automate step 2 by adding an arg to the
poly create project
command. For example:uv run poly create project --root base/namespace/my_fast_api_app
or
uv run poly create project --root component/namespace/my_worker_function
This would automatically add the following to the pyproject.toml
[tool.polylith.bricks]
, e.g.:Beta Was this translation helpful? Give feedback.
All reactions