Repository navigation
feat(cli): add init and config show - #8
Merged
Merged
Conversation
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.
Summary
Adds the first step of the local workflow, a project:
miniops initcreates one andminiops config showprints its configuration.miniops.tomlis validated with pydantic, which becomes a runtime dependency.miniops initwritesminiops.tomlin the current directory. The project is named after the directory unless--nameis given. It refuses a directory that is already a project or lies inside one, so a project cannot be nested by accident.initalso adds.miniops/to.gitignore, so the local state (database, artifacts) cannot be committed by mistake. The file is appended to as bytes: existing lines keep their line endings (LF or CRLF) and an existing.miniopsentry is not duplicated.miniops config showprints the root, name and default target of the project that the current directory belongs to. The project is found in the directory or the nearest parent.config/project.py: pydantic models forminiops.toml. An unknown key is an error, because it is almost always a typo, and errors name the file, the key and the problem (newConfigError).default_targetaccepts onlylocal, the one target that exists so far.python -m miniopsnow runminiops.cli:main, which turns aMiniopsErrorintoError: ...on stderr with exit code 1 instead of a traceback.pydantic>=2.5.3.uv.lockmoves typer from 0.28.0 to 0.29.1: it was held back only because 0.29 depends on pydantic.typer>=0.27inpyproject.tomlis unchanged.Checklist
feat(registry): ...)CHANGELOG.mdupdated under "Unreleased"