File tree Expand file tree Collapse file tree 4 files changed +26
-16
lines changed
Expand file tree Collapse file tree 4 files changed +26
-16
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1010- Restructure the CLI for avoiding the import race condition
1111- Make the commands easier to rebrand
1212- Add return value to ` ConvertData.check_datasets `
13+ - Fix geopandas ` datetime64 ` conversion issue
14+ - ` CollectionSchemas ` : Make some methods reusable
15+ - Separate CLI creation from ` __init__.py ` files
1316
1417## [ v0.2.1] - 2025-08-25
1518
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ dependencies = [
4343]
4444
4545[project .scripts ]
46- vec = " vecorel_cli:vecorel_cli "
46+ vec = " vecorel_cli.cli.setup:run "
4747
4848[project .urls ]
4949"Homepage" = " https://github.com/vecorel/cli"
Original file line number Diff line number Diff line change 1- from .registry import Registry
2-
3- if __name__ == Registry .src_package or __name__ == "__main__" :
4- import click
5-
6- @click .group ()
7- @click .version_option (version = Registry .get_version (), prog_name = Registry .cli_title )
8- def vecorel_cli ():
9- commands = Registry .get_commands ()
10- for command in commands :
11- click_cmd = command .get_cli_command (command )
12- click_args = command .get_cli_args ().values ()
13- for arg in click_args :
14- click_cmd = arg (click_cmd )
15- vecorel_cli .add_command (click_cmd )
Original file line number Diff line number Diff line change 1+ def setup_cli ():
2+ import click
3+
4+ from ..registry import Registry
5+
6+ @click .group ()
7+ @click .version_option (version = Registry .get_version (), prog_name = Registry .cli_title )
8+ def cli ():
9+ pass
10+
11+ commands = Registry .get_commands ()
12+ for command in commands :
13+ click_cmd = command .get_cli_command (command )
14+ click_args = command .get_cli_args ().values ()
15+ for arg in click_args :
16+ click_cmd = arg (click_cmd )
17+ cli .add_command (click_cmd )
18+
19+ return cli ()
20+
21+
22+ run = setup_cli ()
You can’t perform that action at this time.
0 commit comments