Skip to content

Commit 4cfb6dd

Browse files
authored
Unify indentation in configuration files (#108)
Closes #107
1 parent 753ef73 commit 4cfb6dd

File tree

9 files changed

+162
-162
lines changed

9 files changed

+162
-162
lines changed

.github/workflows/check_docs.yaml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@ jobs:
99
runs-on: ubuntu-latest
1010

1111
steps:
12-
- name: Checkout repository
13-
uses: actions/checkout@v3
12+
- name: Checkout repository
13+
uses: actions/checkout@v3
1414

15-
- name: Set up Python
16-
uses: actions/setup-python@v4
17-
with:
18-
python-version: 3.8
15+
- name: Set up Python
16+
uses: actions/setup-python@v4
17+
with:
18+
python-version: 3.8
1919

20-
- name: Install dependencies
21-
run: make install-dev
20+
- name: Install dependencies
21+
run: make install-dev
2222

23-
- name: Check docs building
24-
run: make check-docs
23+
- name: Check docs building
24+
run: make check-docs

.github/workflows/integration_tests.yaml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,18 @@ jobs:
2020
max-parallel: 1 # no concurrency on this level, to not overshoot the test user limits
2121

2222
steps:
23-
- name: Checkout repository
24-
uses: actions/checkout@v3
23+
- name: Checkout repository
24+
uses: actions/checkout@v3
2525

26-
- name: Set up Python ${{ matrix.python-version }}
27-
uses: actions/setup-python@v4
28-
with:
29-
python-version: ${{ matrix.python-version }}
26+
- name: Set up Python ${{ matrix.python-version }}
27+
uses: actions/setup-python@v4
28+
with:
29+
python-version: ${{ matrix.python-version }}
3030

31-
- name: Install dependencies
32-
run: make install-dev
31+
- name: Install dependencies
32+
run: make install-dev
3333

34-
- name: Run integration tests
35-
run: make INTEGRATION_TESTS_CONCURRENCY=8 integration-tests
36-
env:
37-
APIFY_TEST_USER_API_TOKEN: ${{ secrets.APIFY_TEST_USER_PYTHON_SDK_API_TOKEN }}
34+
- name: Run integration tests
35+
run: make INTEGRATION_TESTS_CONCURRENCY=8 integration-tests
36+
env:
37+
APIFY_TEST_USER_API_TOKEN: ${{ secrets.APIFY_TEST_USER_PYTHON_SDK_API_TOKEN }}

.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: 88 additions & 88 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:
@@ -43,7 +43,7 @@ jobs:
4343

4444
publish_to_pypi:
4545
name: Publish to PyPI
46-
needs: [lint_and_type_checks, unit_tests, check_docs] # TODO: Add 'integration_tests' back!
46+
needs: [lint_and_type_checks, unit_tests, check_docs] # TODO: Add integration_tests back!
4747
runs-on: ubuntu-latest
4848
permissions:
4949
contents: write
@@ -53,84 +53,84 @@ jobs:
5353
url: https://pypi.org/p/apify
5454

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

.github/workflows/unit_tests.yaml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,16 @@ jobs:
1313
runs-on: ${{ matrix.os }}
1414

1515
steps:
16-
- name: Checkout repository
17-
uses: actions/checkout@v3
16+
- name: Checkout repository
17+
uses: actions/checkout@v3
1818

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

24-
- name: Install dependencies
25-
run: make install-dev
24+
- name: Install dependencies
25+
run: make install-dev
2626

27-
- name: Run unit tests
28-
run: make unit-tests
27+
- name: Run unit tests
28+
run: make unit-tests

.pre-commit-config.yaml

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,32 @@
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-docs
23-
name: "Check whether docs are up-to-date"
24-
entry: "make check-docs"
25-
language: system
26-
pass_filenames: false
22+
- id: check-docs
23+
name: Check whether docs are up-to-date
24+
entry: make check-docs
25+
language: system
26+
pass_filenames: false
2727

28-
- id: check-changelog
29-
name: "Check whether current version is mentioned in changelog"
30-
entry: "make check-changelog-entry"
31-
language: system
32-
pass_filenames: false
28+
- id: check-changelog
29+
name: Check whether current version is mentioned in changelog
30+
entry: make check-changelog-entry
31+
language: system
32+
pass_filenames: false

mypy.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[mypy]
2-
python_version=3.8
2+
python_version = 3.8
33
files =
44
docs,
55
scripts,

0 commit comments

Comments
 (0)