Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use one lean cli root folder per organization #220

Conversation

jhonabreul
Copy link
Collaborator

This changes will make the CLI use the root lean init folder for a single organization:

  • The user will have to run lean init in a single directory for each organization they belong to (and want to use the CLI with):
    • On init, the user has to give the ID or name of the organization to use (or select it interactively).
  • The organization ID is stored in the lean.json file and it will be used by every command that needs it (using the OrganizationManager, if possible).
  • Users using a previous CLI version (no organization-id in the lean.json file) will get a message informing them of the changes and what to do to keep using the CLI.

Note: the check for existence of the organization id the lean config file on every command adds a small overhad of around 6ms, which is acceptable considering that it is expected to be removed in the near future.

@jhonabreul jhonabreul force-pushed the feat-one-lean-cli-root-folder-per-organization branch from a8be77d to ce16a2b Compare November 8, 2022 16:00
@jhonabreul jhonabreul force-pushed the feat-one-lean-cli-root-folder-per-organization branch from ce16a2b to bb2003d Compare November 8, 2022 16:27
Copy link
Member

@Martin-Molinero Martin-Molinero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool! Leaving minor comments

lean/commands/data/download.py Outdated Show resolved Hide resolved
lean/commands/lean.py Outdated Show resolved Hide resolved
lean/components/docker/lean_runner.py Outdated Show resolved Hide resolved
lean/components/util/organization_manager.py Outdated Show resolved Hide resolved
lean/models/click_options.py Show resolved Hide resolved
lean/models/lean_config_configurer.py Show resolved Hide resolved
tests/commands/test_live.py Outdated Show resolved Hide resolved
@jhonabreul jhonabreul changed the title Use onne lean cli root folder per organization Use one lean cli root folder per organization Nov 8, 2022
@jhonabreul jhonabreul force-pushed the feat-one-lean-cli-root-folder-per-organization branch from 2663aed to ed14e80 Compare November 8, 2022 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants