Skip to content

Commit 26dbcbd

Browse files
Nicorettitkilias
andauthored
Added command to generate and update GitHub workflows
Fixes #61 * Add importlib_resources for compatibility with python versions < 3.9 * Add workflow command: `tbx workflow` * Add Documentation * Update dependencies * Update change log --------- Co-authored-by: Torsten Kilias <[email protected]>
1 parent 93257a2 commit 26dbcbd

File tree

30 files changed

+1007
-634
lines changed

30 files changed

+1007
-634
lines changed

doc/changelog.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,16 @@
66
Unreleased
77
==========
88

9+
✨ Added
10+
--------
11+
12+
* Added first version of the tbx cli tool with support for managing github workflows
13+
14+
🔧 Changed
15+
----------
16+
917
* Changed autogenerated comment in version.py for better clarity
18+
* Updated dependencies
1019

1120
.. _changelog-0.4.0:
1221

doc/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
:hidden:
66

77
user_guide/user_guide
8+
tools
89
api
910
developer_guide/developer_guide
1011
changelog

doc/tools.rst

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
💻 Tools
2+
========
3+
4+
tbx
5+
---
6+
The :code:`tbx` is the main entry point for all of the toolbox specific tooling.
7+
8+
.. code-block:: shell
9+
10+
$ tbx --help
11+
12+
Usage: tbx [OPTIONS] COMMAND [ARGS]...
13+
14+
╭─ Options ───────────────────────────────────────────────────────────────────────────╮
15+
│ --install-completion Install completion for the current shell. │
16+
│ --show-completion Show completion for the current shell, to copy it or │
17+
│ customize the installation. │
18+
│ --help Show this message and exit. │
19+
╰─────────────────────────────────────────────────────────────────────────────────────╯
20+
╭─ Commands ──────────────────────────────────────────────────────────────────────────╮
21+
│ workflow │
22+
╰─────────────────────────────────────────────────────────────────────────────────────╯
23+
24+
workflow
25+
++++++++
26+
The workflow command helps to install and maintain GitHub workflows provided by the toolbox.
27+
28+
.. code-block:: shell
29+
30+
$ tbx workflow --help
31+
32+
Usage: tbx workflow [OPTIONS] COMMAND [ARGS]...
33+
34+
╭─ Options ───────────────────────────────────────────────────────────────────────────╮
35+
│ --help Show this message and exit. │
36+
╰─────────────────────────────────────────────────────────────────────────────────────╯
37+
╭─ Commands ──────────────────────────────────────────────────────────────────────────╮
38+
│ diff Diff a specific workflow against the installed one. │
39+
│ install Installs the requested workflow into the target directory. │
40+
│ list List all available workflows. │
41+
│ show Shows a specific workflow. │
42+
│ update Similar to install but checks for existing workflows and shows diff │
43+
╰─────────────────────────────────────────────────────────────────────────────────────╯
44+
45+
46+
47+
48+

doc/user_guide/workflows.rst

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,14 @@ It should be available to the repository either as Organization-, Repository- or
4242
2. Add the standard workflows to your project
4343
+++++++++++++++++++++++++++++++++++++++++++++
4444

45+
.. code-block:: shell
46+
47+
tbox workflow install all
48+
4549
.. warning::
4650

47-
When you use the configurations bellow you should replace *@main* *ref* with a *ref* which is pointing
48-
to the toolbox version you are using. E.g. if you are using toolbox version *0.1.0* replace
49-
all references to *@main* with references to *@0.1.0*.
51+
If you already have various workflows you may want to run the
52+
:code:`update` instead of the :code:`install` command.
5053

5154
CI Workflow
5255
___________
@@ -57,7 +60,7 @@ ___________
5760
To enable this workflow, add a file with the name *ci.yml* in your *.github/workflows* folder
5861
and add the following content:
5962

60-
.. literalinclude:: ../../exasol/toolbox/templates/.github/workflows/ci.yml
63+
.. literalinclude:: ../../exasol/toolbox/templates/github/workflows/ci.yml
6164
:language: yaml
6265

6366
CI/CD Workflow
@@ -73,7 +76,7 @@ ______________
7376
To enable this workflow, add a file with the name *ci-cd.yml* in your *.github/workflows* folder
7477
and add the following content:
7578

76-
.. literalinclude:: ../../exasol/toolbox/templates/.github/workflows/ci-cd.yml
79+
.. literalinclude:: ../../exasol/toolbox/templates/github/workflows/ci-cd.yml
7780
:language: yaml
7881

7982
PR-Merge Workflow
@@ -85,5 +88,5 @@ _________________
8588
To enable this workflow, add a file with the name *pr-merge.yml* in your *.github/workflows* folder
8689
and add the following content:
8790

88-
.. literalinclude:: ../../exasol/toolbox/templates/.github/workflows/pr-merge.yml
91+
.. literalinclude:: ../../exasol/toolbox/templates/github/workflows/pr-merge.yml
8992
:language: yaml

exasol/toolbox/nox/tasks.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,6 @@ def _type_check(session: Session, files: Iterable[str]) -> None:
108108
"poetry",
109109
"run",
110110
"mypy",
111-
"--strict",
112111
"--explicit-package-bases",
113112
"--namespace-packages",
114113
"--show-error-codes",

exasol/toolbox/templates/.github/ISSUE_TEMPLATE/bug.md renamed to exasol/toolbox/templates/github/ISSUE_TEMPLATE/bug.md

File renamed without changes.

exasol/toolbox/templates/.github/ISSUE_TEMPLATE/documentation.md renamed to exasol/toolbox/templates/github/ISSUE_TEMPLATE/documentation.md

File renamed without changes.

exasol/toolbox/templates/.github/ISSUE_TEMPLATE/feature.md renamed to exasol/toolbox/templates/github/ISSUE_TEMPLATE/feature.md

File renamed without changes.

exasol/toolbox/templates/.github/ISSUE_TEMPLATE/refactoring.md renamed to exasol/toolbox/templates/github/ISSUE_TEMPLATE/refactoring.md

File renamed without changes.

exasol/toolbox/templates/.github/ISSUE_TEMPLATE/security.md renamed to exasol/toolbox/templates/github/ISSUE_TEMPLATE/security.md

File renamed without changes.

0 commit comments

Comments
 (0)