Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Discussion options

Hi, I am just getting started with the Polylith architecture so please excuse me if I got something wrong. So far I really like this design and look forward to working with this structure.

I have spent a lot of today researching and watching your talks and Youtube videos and one thing struck me as a bit odd: the poly cli supports almost every management operation and looks to be quite automation friendly, but if I want to add a brick to a deployment then suddenly I have to manually edit a /projects/project-1/pyproject.toml and then add lines like ../../components/component1, ../../bases/base1 etc.

Am I missing something? I just watched the poly cli youtube video and that was how you did it too there. I was kind of expecting a command like: poly add project1 components/component1 bases/base1 ...

Is this something that would make sense? I am used to using uv so I guess that is where my expectation comes from.

You must be logged in to vote

Currently working on making the poly create project more interactive and automated:
#362

Replies: 3 comments · 5 replies

Comment options

You must be logged in to vote
1 reply
@hamannju
Comment options

Ok. That I have understood. Thank you :)

How do you add the "initial" base(s) to the project right after creation? Those have to be added manually to pyproject.toml?

Comment options

You must be logged in to vote
1 reply
@hamannju
Comment options

I thought about this a bit yesterday. My understanding is mapping a base or multiple bases to a project is an entirely manual operation that will not be done in an automated way. As in, a human will do that.
Then, why not give the options upons creating (or modifying) a project to have some kind of a TUI in the polylith-cli command that lets you pick from a list of bases you already have.

Like:

uv run poly create project --name my-project

Creating new project "my-project"
Base "my-project" of the same name has been automatically added to pyproject.toml
Please select any other bases to be added:
Available bases /
    my-project    [x]
    my-other-base [ ]
    so-many-bases [ ]

Do components get directly added to projects or only through bases via "poly sync"? If it is only via indirection this TUI could already be sufficient.

It essentially seems like a way of managing the pyproject.toml files for projects through the poly cli tool.

Comment options

You must be logged in to vote
3 replies
@hamannju
Comment options

Glad that you like the idea. What I like about the polylith is that it is so clean. I trade a bit of upfront training and an initially steeper learning curve for long-term control and effective code re-use. It just feels natural that the tooling should support an equally clean workflow :)

@DavidVujic
Comment options

Great! I'll start working on a more interactive CLI workflow from your idea. Currently vacationing with the family, so will likely do this in a slower pace than usual 😄

@DavidVujic
Comment options

Currently working on making the poly create project more interactive and automated:
#362

Answer selected by DavidVujic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
🙏
Q&A
Labels
None yet
2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.