Skip to content

Commit e669888

Browse files
authored
chore: update project structure to c4f9ca4b
1 parent 76854c0 commit e669888

10 files changed

+62
-30
lines changed

.cruft.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"template": "https://github.com/woltapp/wolt-python-package-cookiecutter",
3-
"commit": "a07c5175a31a9da9951b0c1f87ecdb733020892d",
3+
"commit": "c4f9ca4bd7fa5a1cb36bfceacdba48194de4120c",
44
"checkout": null,
55
"context": {
66
"cookiecutter": {

.github/workflows/cookiecutter.yml

+10-6
Original file line numberDiff line numberDiff line change
@@ -35,18 +35,22 @@ jobs:
3535
- name: Get template versions
3636
id: get_versions
3737
if: steps.changes.outputs.changed == 1
38+
shell: bash
3839
run: |
39-
echo ::set-output name=current_version::$(git show HEAD:.cruft.json | jello -r "_['commit'][:8]")
40-
echo ::set-output name=next_version::$(cat .cruft.json | jello -r "_['commit'][:8]")
40+
CURRENT_VERSION=$(git show HEAD:.cruft.json | jello -r "_['commit'][:8]")
41+
NEXT_VERSION=$(jello -r "_['commit'][:8]" < .cruft.json)
42+
echo ::set-output name="current_version::$CURRENT_VERSION"
43+
echo ::set-output name="next_version::$NEXT_VERSION"
4144
4245
- name: Get changelog
4346
id: get_changelog
4447
if: steps.changes.outputs.changed == 1
48+
shell: bash
4549
run: |
46-
export TEMPLATE=$(cat .cruft.json | jello -r "_['template']")
47-
git clone $TEMPLATE /tmp/template
50+
TEMPLATE=$(jello -r "_['template']" < .cruft.json)
51+
git clone "$TEMPLATE" /tmp/template
4852
cd /tmp/template
49-
body=$((echo "Date;Change;Hash"; git log --pretty=format:"%as;%s;%h" ${{ steps.get_versions.outputs.current_version }}..${{ steps.get_versions.outputs.next_version }}) | tabulate --header --format github -s ';' -)
53+
body=$( (echo "Date;Change;Hash"; git log --pretty=format:"%as;%s;%h" ${{ steps.get_versions.outputs.current_version }}..${{ steps.get_versions.outputs.next_version }}) | tabulate --header --format github -s ';' -)
5054
body=$(cat <<EOF
5155
Changes from $TEMPLATE
5256
@@ -56,7 +60,7 @@ jobs:
5660
body="${body//'%'/'%25'}"
5761
body="${body//$'\n'/'%0A'}"
5862
body="${body//$'\r'/'%0D'}"
59-
echo ::set-output name=changelog::$body
63+
echo ::set-output name="changelog::$body"
6064
6165
# behaviour if PR already exists: https://github.com/marketplace/actions/create-pull-request#action-behaviour
6266
- name: Create Pull Request

.github/workflows/dependencies.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,12 @@ jobs:
1818
id: check_for_outdated_dependencies
1919
run: |
2020
body=$(poetry show -o -n)
21-
echo ::set-output name=body::$body
21+
echo ::set-output name="body::$body"
2222
2323
- name: Format PR message
2424
if: ${{ steps.check_for_outdated_dependencies.outputs.body != 0 }}
2525
id: get_outdated_dependencies
26+
shell: bash
2627
run: |
2728
body=$(poetry show -o -n | sed 's/(!)//' | awk 'BEGIN {print "Package","Used","Update"}; {print $1,$2,$3}' | tabulate --header --format github -)
2829
body=$(cat <<EOF
@@ -34,7 +35,7 @@ jobs:
3435
body="${body//'%'/'%25'}"
3536
body="${body//$'\n'/'%0A'}"
3637
body="${body//$'\r'/'%0D'}"
37-
echo ::set-output name=body::$body
38+
echo ::set-output name="body::$body"
3839
3940
- name: Update outdated packages
4041
if: ${{ steps.check_for_outdated_dependencies.outputs.body != 0 }}

.github/workflows/draft_release.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,22 @@ jobs:
1616
- uses: ./.github/actions/python-poetry-env
1717
- name: Update version
1818
id: updated_version
19+
shell: bash
1920
run: |
2021
poetry version ${{ github.event.inputs.version }}
2122
version=$(poetry version --short)
22-
echo ::set-output name=version::$version
23+
echo ::set-output name="version::$version"
2324
- name: Update changelog
2425
id: changelog
26+
shell: bash
2527
run: |
2628
poetry run kacl-cli release ${{ steps.updated_version.outputs.version }} --modify --auto-link
2729
echo "" >> CHANGELOG.md
2830
body=$(poetry run kacl-cli get ${{ steps.updated_version.outputs.version }})
2931
body="${body//'%'/'%25'}"
3032
body="${body//$'\n'/'%0A'}"
3133
body="${body//$'\r'/'%0D'}"
32-
echo ::set-output name=body::$body
34+
echo ::set-output name="body::$body"
3335
- name: Commit changes
3436
uses: EndBug/add-and-commit@v7
3537
with:

.github/workflows/test.yml

+11
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,17 @@ on:
77
- "**"
88

99
jobs:
10+
actionlint:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
- name: Download actionlint
15+
run: bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)
16+
shell: bash
17+
- name: Check workflow files
18+
run: ./actionlint -color
19+
shell: bash
20+
1021
lint-cruft:
1122
name: Check if automatic project update was successful
1223
runs-on: ubuntu-latest

.pre-commit-config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ repos:
3232
types: [python]
3333
- id: pyupgrade
3434
name: pyupgrade
35-
entry: pyupgrade --py37-plus
35+
entry: poetry run pyupgrade --py37-plus
3636
language: system
3737
types: [python]
3838
- id: mypy

poetry.lock

+29-16
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

poetry.toml

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[virtualenvs]
2+
in-project = true

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ flake8-bugbear = "*"
4343
flake8-builtins = "*"
4444
flake8-comprehensions = "*"
4545
flake8-debugger = "*"
46+
flake8-eradicate = "*"
4647
flake8-logging-format = "*"
47-
flake8-type-checking = "*"
4848
isort = "*"
4949
mkdocstrings = "*"
5050
mkdocs-material = "*"

setup.cfg

-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ classmethod-decorators =
2626

2727
enable-extensions=
2828
G, # flake8-logging-format
29-
TC, TC2, # flake8-type-checking
3029

3130
per-file-ignores =
3231
# star imports in `__init__.py` files are ok

0 commit comments

Comments
 (0)