Skip to content

Commit 5a87770

Browse files
feat(install): install.sh for global dev tools
1 parent ff97317 commit 5a87770

10 files changed

Lines changed: 339 additions & 323 deletions

File tree

.copier-answers.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
_commit: v0.7.0-1-g5d7bf35
1+
_commit: v0.7.1-1-gbc10e10
22
_src_path: .
33
attestations_enabled: true
44
author_email: helmuthva@gmail.com

CONTRIBUTING.md

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,31 +5,16 @@ Thank you for considering contributing to OE Python Template!
55

66
## Setup
77

8-
Install dependencies and tools required for development:
8+
Install or update tools required for development:
99

1010
```shell
11-
if [[ "$OSTYPE" == "linux-gnu"* ]]; then # Install Linux specifics
12-
sudo apt-get update -y && sudo apt-get install curl -y # https://curl.se/
13-
fi
14-
if ! command -v brew &> /dev/null; then # https://brew.sh/
15-
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
16-
brew update # Update Homebrew bundles
17-
fi
18-
which uv &> /dev/null || brew install uv # https://docs.astral.sh/uv/
19-
which git &> /dev/null || brew install git # https://git-scm.com/
20-
which gpg &> /dev/null || brew install gnupg # https://gnupg.org/
21-
which pinact &> /dev/null || brew install pinact # https://github.com/suzuki-shunsuke/pinact
22-
which jq &> /dev/null || brew install jq # https://jqlang.org/
23-
which libxml2 &> /dev/null || brew install libxml2 # https://en.wikipedia.org/wiki/Libxml2
24-
which act &> /dev/null || brew install act # https://nektosact.com/
25-
which pinact &> /dev/null || brew install pinact # https://github.com/suzuki-shunsuke/pinact
26-
if [[ "$OSTYPE" == "darwin"* ]]; then # Install macOS specifics
27-
which pinentry-mac &> /dev/null || brew install gnupg # https://github.com/GPGTools/pinentry
28-
fi
29-
uv tool install copier # https://copier.readthedocs.io/en/stable/
11+
# Install Homebrew, uv package manager, copier and further dev tools
12+
curl -LsSf https://raw.githubusercontent.com/helmut-hoffer-von-ankershoffen/oe-python-template/HEAD/install.sh | sh
3013
```
3114

32-
Clone this GitHub repository via ```git clone git@github.com:helmut-hoffer-von-ankershoffen/oe-python-template.git``` and change into the directory of your local OE Python Template repository: ```cd oe-python-template```
15+
[Create a fork](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template/fork) and clone your fork using ```git clone URL_OF_YOUR_CLONE```. Then change into the directory of your local OE Python Template repository with ```cd oe-python-template```.
16+
17+
If you are one of the committers of https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template you can directly clone via ```git clone git@github.com:helmut-hoffer-von-ankershoffen/oe-python-template.git``` and ```cd oe-python-template```.
3318

3419

3520
## Directory Layout

README.md

Lines changed: 10 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -93,48 +93,32 @@ Explore [here](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-templ
9393

9494
## Generate a new project
9595

96-
This template is designed to be used with the [copier](https://copier.readthedocs.io/en/stable/) project generator. It allows you to create a new project based on this template and customize it according to your needs.
97-
To generate a new project, follow these steps:
96+
To generate, build and release a fully functioning project in a few minutes, follow these 5 steps:
9897

99-
**Step 1**: Install homebrew, uv package manager amd further tools. Copy the following code into your terminal and execute it.
98+
**Step 1**: Execute the following command to install or update tooling.
10099
```shell
101-
if [[ "$OSTYPE" == "linux-gnu"* ]]; then # Install Linux specifics
102-
sudo apt-get update -y && sudo apt-get install curl -y # https://curl.se/
103-
fi
104-
if ! command -v brew &> /dev/null; then # https://brew.sh/
105-
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
106-
brew update # Update Homebrew bundles
107-
fi
108-
which uv &> /dev/null || brew install uv # https://docs.astral.sh/uv/
109-
which git &> /dev/null || brew install git # https://git-scm.com/
110-
which gpg &> /dev/null || brew install gnupg # https://gnupg.org/
111-
which pinact &> /dev/null || brew install pinact # https://github.com/suzuki-shunsuke/pinact
112-
which jq &> /dev/null || brew install jq # https://jqlang.org/
113-
which libxml2 &> /dev/null || brew install libxml2 # https://en.wikipedia.org/wiki/Libxml2
114-
which act &> /dev/null || brew install act # https://nektosact.com/
115-
which pinact &> /dev/null || brew install pinact # https://github.com/suzuki-shunsuke/pinact
116-
if [[ "$OSTYPE" == "darwin"* ]]; then # Install macOS specifics
117-
which pinentry-mac &> /dev/null || brew install gnupg # https://github.com/GPGTools/pinentry
118-
fi
119-
uv tool install copier # https://copier.readthedocs.io/en/stable/
100+
# Install Homebrew, uv package manager, copier and further dev tools
101+
curl -LsSf https://raw.githubusercontent.com/helmut-hoffer-von-ankershoffen/oe-python-template/HEAD/install.sh | sh
120102
```
121103

122104
**Step 2**: [Create a repository on GitHub](https://docs.github.com/en/repositories/creating-and-managing-repositories/creating-a-new-repository), clone to your local machine, and change into it's directory.
123105

124-
**Step 3**: Generate the project. Copy
106+
**Step 3**: Execute the following command to generate a new project based on this template.
125107
```shell
126-
# ensure to stand in a git repository before executing the next command
108+
# Ensure to stand in a git repository before executing the next command
127109
copier copy --trust gh:helmut-hoffer-von-ankershoffen/oe-python-template .
128110
```
129111

130-
**Step 4**: Perform initial commit and push. Copy the following code into your terminal and execute it.
112+
**Step 4**: Execute the following commands to push your initial commit to GitHub.
131113
```shell
132114
git add .
133115
git commit -m "chore: Initial commit"
134116
git push
135117
```
136118

137-
Visit your GitHub repository and check the Actions tab. The CI workflow should already be running! The workflow will fail at the SonarQube step, as this external service is not yet configured for our new repository.
119+
Check the [Actions tab](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template/actions) of your GitHub repository: The CI/CD workflow of your project is already running!
120+
121+
The workflow will fail at the SonarQube step, as this external service is not yet configured for our new repository. We will configure SonarQube and other services in the next step!
138122

139123
Notes:
140124
1. Check out [this manual](https://docs.github.com/en/authentication/managing-commit-signature-verification/telling-git-about-your-signing-key) on how to set up signed commits

docs/partials/README_main.md

Lines changed: 10 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -51,48 +51,32 @@ Explore [here](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-templ
5151

5252
## Generate a new project
5353

54-
This template is designed to be used with the [copier](https://copier.readthedocs.io/en/stable/) project generator. It allows you to create a new project based on this template and customize it according to your needs.
55-
To generate a new project, follow these steps:
54+
To generate, build and release a fully functioning project in a few minutes, follow these 5 steps:
5655

57-
**Step 1**: Install homebrew, uv package manager amd further tools. Copy the following code into your terminal and execute it.
56+
**Step 1**: Execute the following command to install or update tooling.
5857
```shell
59-
if [[ "$OSTYPE" == "linux-gnu"* ]]; then # Install Linux specifics
60-
sudo apt-get update -y && sudo apt-get install curl -y # https://curl.se/
61-
fi
62-
if ! command -v brew &> /dev/null; then # https://brew.sh/
63-
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
64-
brew update # Update Homebrew bundles
65-
fi
66-
which uv &> /dev/null || brew install uv # https://docs.astral.sh/uv/
67-
which git &> /dev/null || brew install git # https://git-scm.com/
68-
which gpg &> /dev/null || brew install gnupg # https://gnupg.org/
69-
which pinact &> /dev/null || brew install pinact # https://github.com/suzuki-shunsuke/pinact
70-
which jq &> /dev/null || brew install jq # https://jqlang.org/
71-
which libxml2 &> /dev/null || brew install libxml2 # https://en.wikipedia.org/wiki/Libxml2
72-
which act &> /dev/null || brew install act # https://nektosact.com/
73-
which pinact &> /dev/null || brew install pinact # https://github.com/suzuki-shunsuke/pinact
74-
if [[ "$OSTYPE" == "darwin"* ]]; then # Install macOS specifics
75-
which pinentry-mac &> /dev/null || brew install gnupg # https://github.com/GPGTools/pinentry
76-
fi
77-
uv tool install copier # https://copier.readthedocs.io/en/stable/
58+
# Install Homebrew, uv package manager, copier and further dev tools
59+
curl -LsSf https://raw.githubusercontent.com/helmut-hoffer-von-ankershoffen/oe-python-template/HEAD/install.sh | sh
7860
```
7961

8062
**Step 2**: [Create a repository on GitHub](https://docs.github.com/en/repositories/creating-and-managing-repositories/creating-a-new-repository), clone to your local machine, and change into it's directory.
8163

82-
**Step 3**: Generate the project. Copy
64+
**Step 3**: Execute the following command to generate a new project based on this template.
8365
```shell
84-
# ensure to stand in a git repository before executing the next command
66+
# Ensure to stand in a git repository before executing the next command
8567
copier copy --trust gh:helmut-hoffer-von-ankershoffen/oe-python-template .
8668
```
8769

88-
**Step 4**: Perform initial commit and push. Copy the following code into your terminal and execute it.
70+
**Step 4**: Execute the following commands to push your initial commit to GitHub.
8971
```shell
9072
git add .
9173
git commit -m "chore: Initial commit"
9274
git push
9375
```
9476

95-
Visit your GitHub repository and check the Actions tab. The CI workflow should already be running! The workflow will fail at the SonarQube step, as this external service is not yet configured for our new repository.
77+
Check the [Actions tab](https://github.com/helmut-hoffer-von-ankershoffen/oe-python-template/actions) of your GitHub repository: The CI/CD workflow of your project is already running!
78+
79+
The workflow will fail at the SonarQube step, as this external service is not yet configured for our new repository. We will configure SonarQube and other services in the next step!
9680

9781
Notes:
9882
1. Check out [this manual](https://docs.github.com/en/authentication/managing-commit-signature-verification/telling-git-about-your-signing-key) on how to set up signed commits

docs/source/_static/openapi_v1.yaml

Lines changed: 30 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,10 @@ openapi: 3.1.0
9090
paths:
9191
/echo/{text}:
9292
get:
93-
description: "Echo back the provided text.\n\nArgs:\n text (str): The text\
94-
\ to echo.\n\nReturns:\n Echo: The echo.\n\nRaises:\n 422 Unprocessable\
93+
description: "Echo back the provided text.\n\nArgs:\n text (str): The
94+
text\
95+
\ to echo.\n\nReturns:\n Echo: The echo.\n\nRaises:\n 422
96+
Unprocessable\
9597
\ Entity: If text is not provided or empty."
9698
operationId: echo_echo__text__get
9799
parameters:
@@ -119,12 +121,18 @@ paths:
119121
- Basics
120122
/health:
121123
get:
122-
description: "Check the health of the service.\n\nThis endpoint returns the\
123-
\ health status of the service.\nThe health status can be either UP or DOWN.\n\
124-
If the service is healthy, the status will be UP.\nIf the service is unhealthy,\
125-
\ the status will be DOWN and a reason will be provided.\nThe response will\
126-
\ have a 200 OK status code if the service is healthy,\nand a 500 Internal\
127-
\ Server Error status code if the service is unhealthy.\n\nReturns:\n Health:\
124+
description: "Check the health of the service.\n\nThis endpoint returns
125+
the\
126+
\ health status of the service.\nThe health status can be either UP or
127+
DOWN.\n\
128+
If the service is healthy, the status will be UP.\nIf the service is
129+
unhealthy,\
130+
\ the status will be DOWN and a reason will be provided.\nThe response
131+
will\
132+
\ have a 200 OK status code if the service is healthy,\nand a 500
133+
Internal\
134+
\ Server Error status code if the service is unhealthy.\n\nReturns:\n
135+
Health:\
128136
\ The health status of the service."
129137
operationId: health_health_get
130138
responses:
@@ -139,12 +147,18 @@ paths:
139147
- Observability
140148
/healthz:
141149
get:
142-
description: "Check the health of the service.\n\nThis endpoint returns the\
143-
\ health status of the service.\nThe health status can be either UP or DOWN.\n\
144-
If the service is healthy, the status will be UP.\nIf the service is unhealthy,\
145-
\ the status will be DOWN and a reason will be provided.\nThe response will\
146-
\ have a 200 OK status code if the service is healthy,\nand a 500 Internal\
147-
\ Server Error status code if the service is unhealthy.\n\nReturns:\n Health:\
150+
description: "Check the health of the service.\n\nThis endpoint returns
151+
the\
152+
\ health status of the service.\nThe health status can be either UP or
153+
DOWN.\n\
154+
If the service is healthy, the status will be UP.\nIf the service is
155+
unhealthy,\
156+
\ the status will be DOWN and a reason will be provided.\nThe response
157+
will\
158+
\ have a 200 OK status code if the service is healthy,\nand a 500
159+
Internal\
160+
\ Server Error status code if the service is unhealthy.\n\nReturns:\n
161+
Health:\
148162
\ The health status of the service."
149163
operationId: health_healthz_get
150164
responses:
@@ -159,7 +173,8 @@ paths:
159173
- Observability
160174
/hello-world:
161175
get:
162-
description: "Return a hello world message.\n\nReturns:\n _HelloWorldResponse:\
176+
description: "Return a hello world message.\n\nReturns:\n
177+
_HelloWorldResponse:\
163178
\ A response containing the hello world message."
164179
operationId: hello_world_hello_world_get
165180
responses:

0 commit comments

Comments
 (0)