clan-cli: dev-shell, build, tab completion, formatting, linting, unit tests #11
Labels
No Label
backups
blog
bootstrapping
bug
changes-requested
cli
documentation
duplicate
enhancement
facts
help wanted
invalid
Inventory
low_prio
manager
modules
needs-review
networking
packaging
question
secrets
template
test
tooling
user-testing
vm
wontfix
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: clan/clan-core#11
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "cli"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
checks.clan
packages.clan
clan-admin.py
->clan_admin.py
so it can be loaded as a module@lassulus For now I broke your design idea of implementing sub commands via Popen, not because I'm against it, but simply because this made it simpler to set up a proper python project with dev shell and tests. Also I'm not sure if the tab completion would integrate as nicely otherwise.
We could add this mechanism back as soon as we actually have a non-python implementation of some command. Would that be ok with you?
@ -0,0 +3,4 @@
import clan_admin
def test_make_parser():
I would also add typing to tests because than refactoring becomes easier.
@ -0,0 +19,4 @@
)
def edit(args: argparse.Namespace) -> None: # pragma: no cover
Is
no cover
for pytest-coverage?Yes, currently it's set to require 100% coverage. You can then exclude functions from the coverage report via this comment. I thought, requiring tests for newly added functions is a better default than not requiring them.
@ -0,0 +15,4 @@
"init",
"-t",
"git+https://git.clan.lol/clan/clan-core#clan-template",
]
This should have a
check=True
or handle the exit code in a different way.@ -0,0 +67,4 @@
"git",
"-C",
args.folder,
] + args.git_args
Same here.
1cfd48ffdc
toe4fbb08f91
dfa83ac9c3
to3ab90e6785