-
Notifications
You must be signed in to change notification settings - Fork 2
New version #60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
New version #60
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
bf08f14
ci: setup pre-commit
sbrugman b292f11
build: migrate to pyproject.toml
sbrugman c8c27d2
ci: move from appveyor to GitHub Actions
sbrugman d6b73ca
chore: update gitignore
sbrugman 0169614
feat: checks for __main__ and modernize
sbrugman 4c63742
test: for __main__ and refactor
sbrugman 2d62fbe
docs: update contribution guide
sbrugman 06b17e6
Bump node version for renovate config validator to 16 (#62)
xuhdev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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,55 @@ | ||
| name: CI | ||
|
|
||
| on: [ push, pull_request ] | ||
|
|
||
| jobs: | ||
| lint: | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| python-version: [ "3.9" ] | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| - name: Set up Python ${{ matrix.python-version }} | ||
| uses: actions/setup-python@v4 | ||
| with: | ||
| python-version: ${{ matrix.python-version }} | ||
| - uses: actions/cache@v3 | ||
| name: Configure pip caching | ||
| with: | ||
| path: ~/.cache/pip | ||
| key: ${{ runner.os }}-pip-${{ hashFiles('**/pyproject.toml') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-pip- | ||
| - name: Install dependencies | ||
| run: | | ||
| pip install -e '.[dev]' | ||
| - name: Run lint | ||
| run: | | ||
| pre-commit run --all-files --show-diff-on-failure | ||
|
|
||
| test: | ||
| strategy: | ||
| matrix: | ||
| python-version: [ "3.7", "3.8", "3.9", "3.10", "3.11" ] | ||
| os: [ ubuntu-latest, macos-latest, windows-latest ] | ||
| runs-on: ${{ matrix.os }} | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| - name: Set up Python ${{ matrix.python-version }} | ||
| uses: actions/setup-python@v4 | ||
| with: | ||
| python-version: ${{ matrix.python-version }} | ||
| - uses: actions/cache@v3 | ||
| name: Configure pip caching | ||
| with: | ||
| path: ~/.cache/pip | ||
| key: ${{ runner.os }}-pip-${{ hashFiles('**/pyproject.toml') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-pip- | ||
| - name: Install dependencies | ||
| run: | | ||
| pip install -e '.[dev]' | ||
| - name: Run tests | ||
| run: | | ||
| pytest |
This file contains hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -5,4 +5,4 @@ __pycache__/ | |
| *.egg-info | ||
| /build | ||
| /dist | ||
| /flake8_executable/_version.py | ||
| /tests/.pytest_cache/ | ||
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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,41 @@ | ||
| repos: | ||
sbrugman marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| - repo: https://github.com/PyCQA/flake8 | ||
| rev: 6.0.0 | ||
| hooks: | ||
| - id: flake8 | ||
| additional_dependencies: | ||
| - flake8-executable | ||
| - bandit | ||
| - flake8-bugbear | ||
| - flake8-comprehensions | ||
| - flake8-simplify | ||
| args: [ "--max-line-length", "120" ] | ||
| exclude: "tests/to-be-tested/" | ||
| - repo: https://github.com/pre-commit/mirrors-mypy | ||
| rev: 'v0.991' | ||
| hooks: | ||
| - id: mypy | ||
| args: ["--disallow-untyped-defs", "--show-error-codes"] | ||
| exclude: "tests/" | ||
| - repo: https://github.com/psf/black | ||
| rev: 22.12.0 | ||
| hooks: | ||
| - id: black | ||
| exclude: "tests/to-be-tested/" | ||
| - repo: https://github.com/pycqa/isort | ||
| rev: 5.11.4 | ||
| hooks: | ||
| - id: isort | ||
| args: [ "--profile", "black", "-w", "88" ] | ||
| exclude: "tests/to-be-tested/" | ||
| - repo: https://github.com/asottile/yesqa | ||
| rev: v1.4.0 | ||
| hooks: | ||
| - id: yesqa | ||
| exclude: "tests/to-be-tested/" | ||
| - repo: https://github.com/asottile/pyupgrade | ||
| rev: v3.3.1 | ||
| hooks: | ||
| - id: pyupgrade | ||
| args: [ "--py37-plus" ] | ||
| exclude: "tests/to-be-tested/" | ||
This file contains hidden or 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 |
|---|---|---|
| @@ -1,18 +1,14 @@ | ||
| # Contributing | ||
|
|
||
| To start developing, first create a virtual environment. Inside the virtual environment, install all development | ||
| dependencies: | ||
|
|
||
| pip install -U -r requirements-dev.txt | ||
|
|
||
| Alternatively, install `tox` first. Then, let tox create the virtual environment for you: | ||
|
|
||
| pip install -U --user tox | ||
| tox -e dev | ||
| . .tox/dev/bin/activate # activate the virtual environment | ||
| pip install -U .[dev] | ||
|
|
||
| To run lint: | ||
|
|
||
| tox -e lint | ||
| pre-commit run --all-files | ||
|
|
||
| To run runtime tests: | ||
|
|
||
| tox --skip-missing-interpreters | ||
| pytest |
This file contains hidden or 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.