Repository navigation
Conversation
moetemp
force-pushed
the
moe/up/python-client-only
branch
from
October 25, 2026 23:49
5380fc8 to
5978db2
Compare
Some services are called only from outside a Workflow, for example a call surface that a Worker serves in process. With the directive, Python generates their models and caller module and no Workflow surface.
moetemp
force-pushed
the
moe/up/python-client-only
branch
from
October 26, 2026 20:56
5978db2 to
da80617
Compare
moetemp
force-pushed
the
moe/up/python-client-resources
branch
from
October 26, 2026 20:56
04274db to
571d3a9
Compare
Owner
Author
|
Closing, since |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed?
This PR adds the
@nexus.client-onlyinterface directive. With--client, the Python target generates only the models andclient.pyof such a service, and no Workflow code.--client, it generates only the models.@nexus.endpoint.Depends on #57 (UPSTREAM-10).
Part of the Brook review series.
Why?
Some services are called only from outside a Workflow, so their Workflow code is dead code that a user can still import by mistake. It's a property of the interface, so it's a directive and not a CLI flag. Brook's
stream-writeris such a service. Only Activities and clients call it, in process through the bridge. No Workflow or server does.How did you test it?
tests/generate_python.rschecks the files that a client-only service generates, and compiler rejection fixtures cover the refused forms.cargo validatepasses andcargo clippyadds no warnings. Fork CI passes.