Skip to content

Commit 8935db8

Browse files
authored
#219 update project template configuration (#220)
* #219: Updated project template configuration * Updated install instruction in README * Updated file .gitignore * Use double quotes in file pyproject.toml * Create directory for workflows before installing templates * Added python_version_min and pypi_package_name
1 parent bf64028 commit 8935db8

File tree

10 files changed

+28
-10
lines changed

10 files changed

+28
-10
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,6 @@ nosetests.xml
5353
.project
5454
.pydevproject
5555
.vscode/settings.json
56+
57+
# Emacs
58+
TAGS

doc/changes/unreleased.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,7 @@
66
## 🔩 Internal
77
* Update depdency constraints
88
* Relock dependencies
9+
10+
## Refactorings
11+
12+
* #219: Updated project template configuration

doc/github_actions/security_issues.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Example Usage
2626
2727
steps:
2828
- name: SCM Checkout
29-
uses: actions/checkout@v4
29+
uses: actions/checkout@v3
3030
3131
- name: Report Security Issues
3232
uses: exasol/python-toolbox/.github/actions/[email protected]

doc/user_guide/getting_started.rst

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,22 @@ Create a New Project with Exasol-Toolbox Support
2020

2121
To establish a new project with toolbox support, you need to have `Cookiecutter <https://www.cookiecutter.io>`_ installed.
2222

23-
**TL;DR:**
23+
**TL;DR:**
2424
:code:`pipx install cookiecutter`
2525

2626

2727
**1. Create a new project**
2828

29+
Cookiecutter will create the project within the current directory. So if you
30+
usually checkout all your GitHub repos in ``~/git`` you could use ``cd ~/git``
31+
before calling cookiecutter.
32+
2933
Use the following command to create a new project:
3034

3135
.. code-block:: shell
3236
33-
cookiecutter https://github.com/exasol/python-toolbox.git --directory project-template
37+
cookiecutter https://github.com/exasol/python-toolbox.git \
38+
--directory project-template
3439
3540
**2. Follow the interactive project setup prompt**
3641

@@ -154,7 +159,7 @@ forward and you just can use the example *noxfile.py* bellow.
154159

155160
For additional information on resolving this issue, please :ref:`refer to <faq_no_module_noxconfig>`.
156161

157-
162+
158163

159164
6. Setup the pre-commit hooks
160165
+++++++++++++++++++++++++++++

exasol/toolbox/tools/workflow.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ def install_workflow(
5656
5757
Attention: If there is an existing workflow with the same name it will be overwritten!
5858
"""
59+
dest.mkdir(parents=True)
5960
template.install_template(
6061
template=workflow, dest=dest, pkg=PKG, template_type=TEMPLATE_TYPE
6162
)

project-template/cookiecutter.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@
22
"project_name": "Yet Another Project",
33
"repo_name": "{{cookiecutter.project_name | lower | replace(' ', '-')}}",
44
"package_name": "{{cookiecutter.repo_name | replace('-', '_')}}",
5+
"pypi_package_name": "exasol-{{cookiecutter.repo_name}}",
56
"description": "",
67
"autor_full_name": "",
78
"autor_email": "",
8-
"error_tags": "",
9+
"project_short_tag": "",
10+
"python_version_min": "3.9",
911
"license_year": "{% now 'utc', '%Y' %}",
1012
"__repo_name_slug": "{{cookiecutter.package_name}}",
1113
"__package_name_slug": "{{cookiecutter.package_name}}",

project-template/{{cookiecutter.repo_name}}/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,3 +140,6 @@ doc/api
140140
.build_output
141141
.html-documentation
142142
itde/
143+
144+
# Emacs
145+
TAGS

project-template/{{cookiecutter.repo_name}}/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
## 💾 Installation
3030

3131
```shell
32-
pip install {{cookiecutter.package_name}}
32+
pip install {{cookiecutter.pypipackage_name}}
3333
```
3434

3535
## 📚 Documentation
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
error-tags:
2-
{{cookiecutter.error_tags}}:
2+
{{cookiecutter.project_short_tag}}:
33
highest-index: 0

project-template/{{cookiecutter.repo_name}}/pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ requires = [
55
build-backend = "poetry.core.masonry.api"
66

77
[tool.poetry]
8-
name = "exasol-{{cookiecutter.repo_name}}"
8+
name = "{{cookiecutter.pypi_package_name}}"
99
packages = [
1010
{include = "exasol"},
1111
]
@@ -18,15 +18,15 @@ authors = [
1818
"{{cookiecutter.autor_full_name}} <{{cookiecutter.autor_email}}>"
1919
]
2020

21-
readme = 'README.md'
21+
readme = "README.md"
2222

2323
repository = "https://github.com/exasol/{{cookiecutter.repo_name}}"
2424
homepage = "https://github.com/exasol/{{cookiecutter.repo_name}}"
2525

2626
keywords = ['exasol', '{{cookiecutter.package_name}}']
2727

2828
[tool.poetry.dependencies]
29-
python = ">=3.9,<4.0"
29+
python = ">={{python_version_min}},<4.0"
3030

3131
[tool.poetry.group.dev.dependencies]
3232
exasol-toolbox = ">=0.12.0"

0 commit comments

Comments
 (0)