Skip to content

Commit

Permalink
Unify indentation in configuration files (#141)
Browse files Browse the repository at this point in the history
Closes #139
  • Loading branch information
vdusek authored Aug 21, 2023
1 parent 0683783 commit 52b211f
Show file tree
Hide file tree
Showing 9 changed files with 157 additions and 157 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/check_docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,19 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.8

- name: Install dependencies
run: make install-dev
- name: Install dependencies
run: make install-dev

- name: Check async docstrings
run: make check-async-docstrings
- name: Check async docstrings
run: make check-async-docstrings

- name: Check docs building
run: make check-docs
- name: Check docs building
run: make check-docs
24 changes: 12 additions & 12 deletions .github/workflows/integration_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,18 @@ jobs:
max-parallel: 1 # no concurrency on this level, to not overshoot the test user limits

steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: make install-dev
- name: Install dependencies
run: make install-dev

- name: Run integration tests
run: make INTEGRATION_TESTS_CONCURRENCY=8 integration-tests
env:
APIFY_TEST_USER_API_TOKEN: ${{ secrets.APIFY_TEST_USER_PYTHON_SDK_API_TOKEN }}
- name: Run integration tests
run: make INTEGRATION_TESTS_CONCURRENCY=8 integration-tests
env:
APIFY_TEST_USER_API_TOKEN: ${{ secrets.APIFY_TEST_USER_PYTHON_SDK_API_TOKEN }}
24 changes: 12 additions & 12 deletions .github/workflows/lint_and_type_checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,19 @@ jobs:
python-version: ["3.8", "3.9", "3.10", "3.11"]

steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: make install-dev
- name: Install dependencies
run: make install-dev

- name: Run lint
run: make lint
- name: Run lint
run: make lint

- name: Run type checks
run: make type-check
- name: Run type checks
run: make type-check
2 changes: 1 addition & 1 deletion .github/workflows/pr_toolkit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
pull_request:
branches:
- master
types: ['opened', 'reopened', 'synchronize', 'labeled', 'unlabeled', 'edited', 'ready_for_review'] # The first 3 are default.
types: [opened, reopened, synchronize, labeled, unlabeled, edited, ready_for_review] # The first 3 are default.

concurrency: # This is to make sure that it's executed only for the most recent changes of PR.
group: ${{ github.ref }}
Expand Down
152 changes: 76 additions & 76 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,22 @@ on:
branches:
- master
tags-ignore:
- '**'
- "**"
# A release via GitHub releases will publish a stable version
release:
types: [published]
# Workflow dispatch will publish whatever you choose
workflow_dispatch:
inputs:
release_type:
description: 'Release type'
description: Release type
required: true
type: choice
default: 'alpha'
default: alpha
options:
- 'alpha'
- 'beta'
- 'final'
- alpha
- beta
- final

jobs:
lint_and_type_checks:
Expand Down Expand Up @@ -53,73 +53,73 @@ jobs:
url: https://pypi.org/p/apify-client

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.8

- name: Install dependencies
run: make install-dev

- # Determine if this is a prerelease or latest release
name: Determine release type
id: get-release-type
run: |
if [ ${{ github.event_name }} = release ]; then
release_type="final"
elif [ ${{ github.event_name }} = push ]; then
release_type="beta"
elif [ ${{ github.event_name }} = workflow_dispatch ]; then
release_type=${{ github.event.inputs.release_type }}
fi
if [ ${release_type} = final ]; then
docker_image_tag="latest"
elif [ ${release_type} = beta ]; then
docker_image_tag="beta"
else
docker_image_tag=""
fi
echo "release_type=${release_type}" >> $GITHUB_OUTPUT
echo "docker_image_tag=${docker_image_tag}" >> $GITHUB_OUTPUT
- # Check whether the released version is listed in CHANGELOG.md
name: Check whether the released version is listed in the changelog
if: steps.get-release-type.outputs.release_type != 'alpha'
run: make check-changelog-entry

- # Check version consistency and increment pre-release version number for prereleases (must be the last step before build)
name: Bump pre-release version
if: steps.get-release-type.outputs.release_type != 'final'
run: python ./scripts/update_version_for_prerelease.py ${{ steps.get-release-type.outputs.release_type }}

- # Build a source distribution and a python3-only wheel
name: Build distribution files
run: make build

- # Check whether the package description will render correctly on PyPI
name: Check package rendering on PyPI
run: make twine-check

- # Publish package to PyPI using their official GitHub action
name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

- # Tag the current commit with the version tag if this is not made from the release event (releases are tagged with the release process)
name: Tag Version
if: github.event_name != 'release'
run: |
git_tag=v`python ./scripts/print_current_package_version.py`
git tag $git_tag
git push origin $git_tag
- # Upload the build artifacts to the release
name: Upload the build artifacts to release
if: github.event_name == 'release'
run: gh release upload ${{ github.ref_name }} dist/*
env:
GH_TOKEN: ${{ github.token }}
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.8

- name: Install dependencies
run: make install-dev

- # Determine if this is a prerelease or latest release
name: Determine release type
id: get-release-type
run: |
if [ ${{ github.event_name }} = release ]; then
release_type="final"
elif [ ${{ github.event_name }} = push ]; then
release_type="beta"
elif [ ${{ github.event_name }} = workflow_dispatch ]; then
release_type=${{ github.event.inputs.release_type }}
fi
if [ ${release_type} = final ]; then
docker_image_tag="latest"
elif [ ${release_type} = beta ]; then
docker_image_tag="beta"
else
docker_image_tag=""
fi
echo "release_type=${release_type}" >> $GITHUB_OUTPUT
echo "docker_image_tag=${docker_image_tag}" >> $GITHUB_OUTPUT
- # Check whether the released version is listed in CHANGELOG.md
name: Check whether the released version is listed in the changelog
if: steps.get-release-type.outputs.release_type != 'alpha'
run: make check-changelog-entry

- # Check version consistency and increment pre-release version number for prereleases (must be the last step before build)
name: Bump pre-release version
if: steps.get-release-type.outputs.release_type != 'final'
run: python ./scripts/update_version_for_prerelease.py ${{ steps.get-release-type.outputs.release_type }}

- # Build a source distribution and a python3-only wheel
name: Build distribution files
run: make build

- # Check whether the package description will render correctly on PyPI
name: Check package rendering on PyPI
run: make twine-check

- # Publish package to PyPI using their official GitHub action
name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

- # Tag the current commit with the version tag if this is not made from the release event (releases are tagged with the release process)
name: Tag Version
if: github.event_name != 'release'
run: |
git_tag=v`python ./scripts/print_current_package_version.py`
git tag $git_tag
git push origin $git_tag
- # Upload the build artifacts to the release
name: Upload the build artifacts to release
if: github.event_name == 'release'
run: gh release upload ${{ github.ref_name }} dist/*
env:
GH_TOKEN: ${{ github.token }}
20 changes: 10 additions & 10 deletions .github/workflows/unit_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ jobs:
runs-on: ${{ matrix.os }}

steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: make install-dev
- name: Install dependencies
run: make install-dev

- name: Run unit tests
run: make unit-tests
- name: Run unit tests
run: make unit-tests
64 changes: 32 additions & 32 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
repos:
- repo: local
hooks:
- id: lint
name: "Lint codebase"
entry: "make lint"
language: system
pass_filenames: false
- repo: local
hooks:
- id: lint
name: Lint codebase
entry: make lint
language: system
pass_filenames: false

- id: check-async-docstrings
name: "Check whether async docstrings are aligned with sync ones"
entry: "make check-async-docstrings"
language: system
pass_filenames: false
- id: check-async-docstrings
name: Check whether async docstrings are aligned with sync ones
entry: make check-async-docstrings
language: system
pass_filenames: false

- id: type-check
name: "Type-check codebase"
entry: "make type-check"
language: system
pass_filenames: false
- id: type-check
name: Type-check codebase
entry: make type-check
language: system
pass_filenames: false

- id: unit-tests
name: "Run unit tests"
entry: "make unit-tests"
language: system
pass_filenames: false
- id: unit-tests
name: Run unit tests
entry: make unit-tests
language: system
pass_filenames: false

- id: check-docs
name: "Check whether docs are up-to-date"
entry: "make check-docs"
language: system
pass_filenames: false
- id: check-docs
name: Check whether docs are up-to-date
entry: make check-docs
language: system
pass_filenames: false

- id: check-changelog
name: "Check whether current version is mentioned in changelog"
entry: "make check-changelog-entry"
language: system
pass_filenames: false
- id: check-changelog
name: Check whether current version is mentioned in changelog
entry: make check-changelog-entry
language: system
pass_filenames: false
2 changes: 1 addition & 1 deletion mypy.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[mypy]
python_version=3.8
python_version = 3.8
files =
docs,
scripts,
Expand Down
2 changes: 1 addition & 1 deletion pytest.ini
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[pytest]
asyncio_mode=auto
asyncio_mode = auto
timeout = 1200

0 comments on commit 52b211f

Please sign in to comment.