Skip to content

Commit

Permalink
Refacto: replace click by argparse (#194)
Browse files Browse the repository at this point in the history
Goal: reduce number of dependencies
  • Loading branch information
Guts authored Feb 28, 2023
2 parents c4c3261 + c97fe3b commit 91bb55d
Show file tree
Hide file tree
Showing 15 changed files with 455 additions and 319 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ jobs:
- name: Install project as a package
run: python -m pip install -e .

- name: QDT - Echoing help
run: qdt --version

- name: QDT - Echoing version
run: qdeploy-toolbelt --version

Expand Down
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"sphinx.ext.napoleon",
# 3rd party
"myst_parser",
"sphinx_click",
"sphinx_argparse_cli",
"sphinx_copybutton",
"sphinxext.opengraph",
]
Expand Down Expand Up @@ -133,12 +133,12 @@
myst_enable_extensions = [
"colon_fence",
"deflist",
"dollarmath",
"html_admonition",
"html_image",
# "linkify",
"replacements",
"smartquotes",
"strikethrough",
"substitution",
]

Expand Down
18 changes: 6 additions & 12 deletions docs/usage/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,10 @@

## Main command

```{eval-rst}
.. click:: qgis_deployment_toolbelt.cli:qgis_deployment_toolbelt
:prog: qdeploy-toolbelt
```

---

## Sub-commands

```{eval-rst}
.. click:: qgis_deployment_toolbelt.commands.cli_upgrade:upgrade
:prog: upgrade
```{sphinx_argparse_cli}
:module: qgis_deployment_toolbelt.cli
:hook:
:func: main
:prog: qdeploy-toolbelt
:title: Commands and options
```
2 changes: 1 addition & 1 deletion docs/usage/how_it_works.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# How it works
# How does it works

> TO DOC
Expand Down
2 changes: 1 addition & 1 deletion qgis_deployment_toolbelt/__about__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
__author__ = "Julien Moura (Oslandia), Vincent Bré (Oslandia)"
__copyright__ = "2021 - {0}, {1}".format(date.today().year, __author__)
__email__ = "qgis@oslandia.com"
__executable_name__ = "QGIS_DeploymentCLI.exe"
__executable_name__ = "qgis-deployment-toolbelt"
__package_name__ = "qgis-deployment-toolbelt"
__keywords__ = ["cli, QGIS, deployment, profiles"]
__license__ = "GNU Lesser General Public License v3.0"
Expand Down
Loading

0 comments on commit 91bb55d

Please sign in to comment.