Skip to content

Commit a9e0a9b

Browse files
authored
Unify indentation in configuration files (#8)
Closes #7
1 parent 54f5c6a commit a9e0a9b

File tree

7 files changed

+135
-128
lines changed

7 files changed

+135
-128
lines changed

.flake8

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
[flake8]
22
filename =
3-
./scripts/*.py,
4-
./src/*.py,
5-
./tests/*.py
3+
./scripts/*.py,
4+
./src/*.py,
5+
./tests/*.py
66
per-file-ignores =
7-
scripts/*: D
8-
tests/*: D
7+
scripts/*: D
8+
tests/*: D
99

1010
# Google docstring convention + D204 & D401
1111
docstring-convention = all
1212
ignore =
13-
D100
14-
D104
15-
D203
16-
D213
17-
D215
18-
D406
19-
D407
20-
D408
21-
D409
22-
D413
23-
U101
13+
D100
14+
D104
15+
D203
16+
D213
17+
D215
18+
D406
19+
D407
20+
D408
21+
D409
22+
D413
23+
U101
2424

2525
max_line_length = 150
2626
unused-arguments-ignore-overload-functions = True

.github/workflows/lint_and_type_checks.yaml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,19 @@ jobs:
1212
python-version: ["3.8", "3.9", "3.10", "3.11"]
1313

1414
steps:
15-
- name: Checkout repository
16-
uses: actions/checkout@v3
15+
- name: Checkout repository
16+
uses: actions/checkout@v3
1717

18-
- name: Set up Python ${{ matrix.python-version }}
19-
uses: actions/setup-python@v4
20-
with:
21-
python-version: ${{ matrix.python-version }}
18+
- name: Set up Python ${{ matrix.python-version }}
19+
uses: actions/setup-python@v4
20+
with:
21+
python-version: ${{ matrix.python-version }}
2222

23-
- name: Install dependencies
24-
run: make install-dev
23+
- name: Install dependencies
24+
run: make install-dev
2525

26-
- name: Run lint
27-
run: make lint
26+
- name: Run lint
27+
run: make lint
2828

29-
- name: Run type checks
30-
run: make type-check
29+
- name: Run type checks
30+
run: make type-check

.github/workflows/pr_toolkit.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
pull_request:
66
branches:
77
- master
8-
types: ['opened', 'reopened', 'synchronize', 'labeled', 'unlabeled', 'edited', 'ready_for_review'] # The first 3 are default.
8+
types: [opened, reopened, synchronize, labeled, unlabeled, edited, ready_for_review] # The first 3 are default.
99

1010
concurrency: # This is to make sure that it's executed only for the most recent changes of PR.
1111
group: ${{ github.ref }}

.github/workflows/release.yaml

Lines changed: 76 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,22 @@ on:
66
branches:
77
- master
88
tags-ignore:
9-
- '**'
9+
- "**"
1010
# A release via GitHub releases will publish a stable version
1111
release:
1212
types: [published]
1313
# Workflow dispatch will publish whatever you choose
1414
workflow_dispatch:
1515
inputs:
1616
release_type:
17-
description: 'Release type'
17+
description: Release type
1818
required: true
1919
type: choice
20-
default: 'alpha'
20+
default: alpha
2121
options:
22-
- 'alpha'
23-
- 'beta'
24-
- 'final'
22+
- alpha
23+
- beta
24+
- final
2525

2626
jobs:
2727
lint_and_type_checks:
@@ -44,73 +44,73 @@ jobs:
4444
url: https://pypi.org/p/apify-shared
4545

4646
steps:
47-
- name: Checkout repository
48-
uses: actions/checkout@v3
49-
50-
- name: Set up Python
51-
uses: actions/setup-python@v4
52-
with:
53-
python-version: 3.8
54-
55-
- name: Install dependencies
56-
run: make install-dev
57-
58-
- # Determine if this is a prerelease or latest release
59-
name: Determine release type
60-
id: get-release-type
61-
run: |
62-
if [ ${{ github.event_name }} = release ]; then
63-
release_type="final"
64-
elif [ ${{ github.event_name }} = push ]; then
65-
release_type="beta"
66-
elif [ ${{ github.event_name }} = workflow_dispatch ]; then
67-
release_type=${{ github.event.inputs.release_type }}
68-
fi
69-
70-
if [ ${release_type} = final ]; then
71-
docker_image_tag="latest"
72-
elif [ ${release_type} = beta ]; then
73-
docker_image_tag="beta"
74-
else
75-
docker_image_tag=""
76-
fi
77-
78-
echo "release_type=${release_type}" >> $GITHUB_OUTPUT
79-
echo "docker_image_tag=${docker_image_tag}" >> $GITHUB_OUTPUT
80-
81-
- # Check whether the released version is listed in CHANGELOG.md
82-
name: Check whether the released version is listed in the changelog
83-
if: steps.get-release-type.outputs.release_type != 'alpha'
84-
run: make check-changelog-entry
85-
86-
- # Check version consistency and increment pre-release version number for prereleases (must be the last step before build)
87-
name: Bump pre-release version
88-
if: steps.get-release-type.outputs.release_type != 'final'
89-
run: python ./scripts/update_version_for_prerelease.py ${{ steps.get-release-type.outputs.release_type }}
90-
91-
- # Build a source distribution and a python3-only wheel
92-
name: Build distribution files
93-
run: make build
94-
95-
- # Check whether the package description will render correctly on PyPI
96-
name: Check package rendering on PyPI
97-
run: make twine-check
98-
99-
- # Publish package to PyPI using their official GitHub action
100-
name: Publish package to PyPI
101-
uses: pypa/gh-action-pypi-publish@release/v1
102-
103-
- # Tag the current commit with the version tag if this is not made from the release event (releases are tagged with the release process)
104-
name: Tag Version
105-
if: github.event_name != 'release'
106-
run: |
107-
git_tag=v`python ./scripts/print_current_package_version.py`
108-
git tag $git_tag
109-
git push origin $git_tag
110-
111-
- # Upload the build artifacts to the release
112-
name: Upload the build artifacts to release
113-
if: github.event_name == 'release'
114-
run: gh release upload ${{ github.ref_name }} dist/*
115-
env:
116-
GH_TOKEN: ${{ github.token }}
47+
- name: Checkout repository
48+
uses: actions/checkout@v3
49+
50+
- name: Set up Python
51+
uses: actions/setup-python@v4
52+
with:
53+
python-version: 3.8
54+
55+
- name: Install dependencies
56+
run: make install-dev
57+
58+
- # Determine if this is a prerelease or latest release
59+
name: Determine release type
60+
id: get-release-type
61+
run: |
62+
if [ ${{ github.event_name }} = release ]; then
63+
release_type="final"
64+
elif [ ${{ github.event_name }} = push ]; then
65+
release_type="beta"
66+
elif [ ${{ github.event_name }} = workflow_dispatch ]; then
67+
release_type=${{ github.event.inputs.release_type }}
68+
fi
69+
70+
if [ ${release_type} = final ]; then
71+
docker_image_tag="latest"
72+
elif [ ${release_type} = beta ]; then
73+
docker_image_tag="beta"
74+
else
75+
docker_image_tag=""
76+
fi
77+
78+
echo "release_type=${release_type}" >> $GITHUB_OUTPUT
79+
echo "docker_image_tag=${docker_image_tag}" >> $GITHUB_OUTPUT
80+
81+
- # Check whether the released version is listed in CHANGELOG.md
82+
name: Check whether the released version is listed in the changelog
83+
if: steps.get-release-type.outputs.release_type != 'alpha'
84+
run: make check-changelog-entry
85+
86+
- # Check version consistency and increment pre-release version number for prereleases (must be the last step before build)
87+
name: Bump pre-release version
88+
if: steps.get-release-type.outputs.release_type != 'final'
89+
run: python ./scripts/update_version_for_prerelease.py ${{ steps.get-release-type.outputs.release_type }}
90+
91+
- # Build a source distribution and a python3-only wheel
92+
name: Build distribution files
93+
run: make build
94+
95+
- # Check whether the package description will render correctly on PyPI
96+
name: Check package rendering on PyPI
97+
run: make twine-check
98+
99+
- # Publish package to PyPI using their official GitHub action
100+
name: Publish package to PyPI
101+
uses: pypa/gh-action-pypi-publish@release/v1
102+
103+
- # Tag the current commit with the version tag if this is not made from the release event (releases are tagged with the release process)
104+
name: Tag Version
105+
if: github.event_name != 'release'
106+
run: |
107+
git_tag=v`python ./scripts/print_current_package_version.py`
108+
git tag $git_tag
109+
git push origin $git_tag
110+
111+
- # Upload the build artifacts to the release
112+
name: Upload the build artifacts to release
113+
if: github.event_name == 'release'
114+
run: gh release upload ${{ github.ref_name }} dist/*
115+
env:
116+
GH_TOKEN: ${{ github.token }}

.pre-commit-config.yaml

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
repos:
2-
- repo: local
3-
hooks:
4-
- id: lint
5-
name: "Lint codebase"
6-
entry: "make lint"
7-
language: system
8-
pass_filenames: false
2+
- repo: local
3+
hooks:
4+
- id: lint
5+
name: Lint codebase
6+
entry: make lint
7+
language: system
8+
pass_filenames: false
99

10-
- id: type-check
11-
name: "Type-check codebase"
12-
entry: "make type-check"
13-
language: system
14-
pass_filenames: false
10+
- id: type-check
11+
name: Type-check codebase
12+
entry: make type-check
13+
language: system
14+
pass_filenames: false
1515

16-
- id: unit-tests
17-
name: "Run unit tests"
18-
entry: "make unit-tests"
19-
language: system
20-
pass_filenames: false
16+
- id: unit-tests
17+
name: Run unit tests
18+
entry: make unit-tests
19+
language: system
20+
pass_filenames: false
2121

22-
- id: check-changelog
23-
name: "Check whether current version is mentioned in changelog"
24-
entry: "make check-changelog-entry"
25-
language: system
26-
pass_filenames: false
22+
- id: check-changelog
23+
name: Check whether current version is mentioned in changelog
24+
entry: make check-changelog-entry
25+
language: system
26+
pass_filenames: false

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Changelog
22

3+
## [1.0.3](../../releases/tag/v1.0.3) - 2023-08-04
4+
5+
### Internal changes
6+
7+
- Versions are 2nd level headings in the changelog.
8+
- Unify indentation in the configuration files.
9+
310
## [1.0.2](../../releases/tag/v1.0.2) - 2023-08-02
411

512
- Added the `ActorEnvVars` enum and new tests.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ license = {text = "Apache Software License"}
1818
name = "apify_shared"
1919
readme = "README.md"
2020
requires-python = ">=3.8"
21-
version = "1.0.2"
21+
version = "1.0.3"
2222

2323
[project.optional-dependencies]
2424
dev = [

0 commit comments

Comments
 (0)