-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor!: require mock name, remove deprecated methods, drop Python …
…3.6 (#151) BREAKING CHANGE: if you do not specify a `cls` or `func` argument to `decoy.mock()`, you must specify a `name` parameter. You can use the following find-and-replace patterns to fix most tests that start failing due to this change: ``` # find ([a-z_]+?)(: .+?)? = decoy.mock\(\) # replace $1$2 = decoy.mock(name="$1") ``` ``` # find ([a-z_]+?)(: .+?)? = decoy.mock\(is_async=(.+?)\) # replace $1$2 = decoy.mock(name="$1", is_async=$3) ```
- Loading branch information
Showing
30 changed files
with
1,205 additions
and
1,187 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: "Set up repository for CI" | ||
description: "Install development dependencies" | ||
|
||
inputs: | ||
python-version: | ||
description: "Python version to install" | ||
default: "3.11" | ||
poetry-version: | ||
description: "Poetry version to install" | ||
default: "1.3.2" | ||
cache: | ||
description: "Cache directory" | ||
default: "${{ runner.temp }}/cache" | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: "Set up Python" | ||
id: setup-python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ inputs.python-version }} | ||
|
||
- name: "Set up dependency cache" | ||
uses: actions/cache@v3 | ||
with: | ||
key: ${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ inputs.poetry-version }}-${{ hashFiles('poetry.lock') }} | ||
path: ${{ inputs.cache }} | ||
|
||
- name: "Set up PATH on POSIX" | ||
if: ${{ runner.os != 'windows'}} | ||
shell: bash | ||
run: echo "${{ inputs.cache }}/tools/bin" >> $GITHUB_PATH | ||
|
||
- name: "Set up PATH on Windows" | ||
if: ${{ runner.os == 'windows'}} | ||
shell: bash | ||
run: echo "${{ inputs.cache }}/tools/Scripts" >> $GITHUB_PATH | ||
|
||
- name: "Check poetry installation" | ||
id: check-poetry | ||
shell: bash | ||
continue-on-error: true | ||
run: poetry --version | ||
|
||
- name: "Install poetry" | ||
shell: bash | ||
if: ${{ steps.check-poetry.outcome == 'failure'}} | ||
run: | | ||
"${{ steps.setup-python.outputs.python-path }}" -m venv "${{ inputs.cache }}/tools" | ||
pip install poetry==${{ inputs.poetry-version }} | ||
- name: "Install development dependencies" | ||
shell: bash | ||
run: | | ||
poetry config cache-dir "${{ inputs.cache }}/poetry" | ||
poetry install --sync |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ site | |
*.egg-info | ||
.python-version | ||
__pycache__ | ||
.cache | ||
.coverage | ||
coverage.xml | ||
htmlcov | ||
.ruff_cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.