feat: give each example project a __routing__.py - #21
Draft
OmerBaddour wants to merge 1 commit into
Draft
Conversation
PR #17 moved routing into a project __routing__.py. The example projects had none, thus they did not show the feature and `clair validate` had no rules to apply. Each project now holds a routing table with a `dev` entry and a `prod` entry. example_from_init holds the scaffold template, byte for byte, because that project shows the output of `clair init`. The READMEs also named `~/.clair/profiles.yml` and a `--profile` option. Both are gone from the CLI. The READMEs now name `~/.clair/environments.yml` and `--env`. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
PR #17 moved routing into a project
__routing__.py. The example projects had none, thus they did not show the feature, andclair validatehad no rules to apply.What each project gets
Every project in
example_projects/now holds a__routing__.pywith two entries:dev<database>_<CLAIR_USER>prodexample_from_initholds theclair inittemplate, byte for byte, because that project shows the output ofclair init. It went stale when #17 added the routing file to the scaffold.Stale CLI names in the READMEs
The project READMEs named
~/.clair/profiles.ymland a--profileoption. Both are gone from the CLI. The READMEs now name~/.clair/environments.ymland--env.Each README also gets a Routing section: the two entries, the
CLAIR_USERvariable, and theclair validatecommands.The top-level README
The example table omitted
example_4andexample_from_init, and it promised asetup.sqland averify.sqlin each project. No project holds either file — the SQL is in the README of each project. Both statements are now correct.Behaviour changes
None. This PR adds project files and corrects documentation. It changes no code in
src/.Verification
clair validatepasses for all five projects, indevand inprod.clair compileonexample_1withCLAIR_USER=alicewrites toexample_1_database_ALICE. The SOURCE Trouve keeps its logical name.CLAIR_USER,compilestops with the routing error, as designed.uvx ruff checkanduvx ty check --exclude example_notebooksare clean.🤖 Generated with Claude Code