Skip to content

Commit

Permalink
Merge branch 'master' into bugfix/teardown_exceptions
Browse files Browse the repository at this point in the history
* master: (133 commits)
  Prepare 0.63.0b0
  Distribute type data (PEP 561) (darrenburns#283)
  Type check `ward.testing` (darrenburns#282)
  [pre-commit.ci] pre-commit autoupdate (darrenburns#280)
  Add pretty output for all comparison failures (darrenburns#256)
  Update conf.py
  Update pyproject.toml
  Make sure raises raises assertion error when no exception is raised (darrenburns#281)
  [pre-commit.ci] pre-commit autoupdate (darrenburns#275)
  Fix mypy error
  Prepare 0.62.0b0
  Update writing_tests.rst
  Allow subclasses of specified exception class to pass raises assertion (darrenburns#279)
  Type check `ward.expect`, `ward._fixtures` and `ward._terminal` (darrenburns#274)
  Only require `poetry-core` as build system (darrenburns#277)
  Prepare 0.61.1b0
  Allow Click 7 (darrenburns#272)
  Type check `ward._config` (darrenburns#269)
  Correct plural, singular forms darrenburns#244 (darrenburns#258)
  Prepare 0.61.0b0
  Switch from `toml` to `tomli` for TOML v1 compat (darrenburns#267)
  Introduce mypy (gradually) (darrenburns#265)
  Don't update the lockfile with 'make prep' (darrenburns#266)
  Let Poetry automatically update license and py version classifiers (darrenburns#260)
  Prepare 0.60.1b0
  Fix broken command  (darrenburns#257)
  fix typo (darrenburns#255)
  Prepare 0.60.0b0
  Update live output gif for docs
  Add info on `live` output mode to docs
  Print pretty failure messages for `in` and `not in` (darrenburns#242)
  Add `live` progress style and refactor output and progress styles (darrenburns#233)
  only get test source once (darrenburns#249)
  [pre-commit.ci] pre-commit autoupdate (darrenburns#248)
  pygments dependency removed - no longer required
  Update build.yml
  Update README.md
  Prepare 0.59.0b0
  Use Rich for displaying diffs in errors (darrenburns#235)
  Prepare 0.58.0b0
  Several bug fixes (darrenburns#241)
  combine build and pullrequest workflows (darrenburns#236)
  Add Python 3.10 Beta support to CI (darrenburns#230)
  Update CONTRIBUTING.md
  Prepare 0.57.2b0
  Remove comment from build pipeline
  Bump snok/install-poetry from 1.1.1 to 1.1.6 (darrenburns#232)
  add dependabot.yml for gha version bumps (darrenburns#231)
  Add pre-commit (darrenburns#222)
  fix linter errors (darrenburns#217)
  ...
  • Loading branch information
mkuyper committed Aug 19, 2021
2 parents 1aba678 + 7a36eed commit f272c39
Show file tree
Hide file tree
Showing 107 changed files with 6,924 additions and 2,319 deletions.
151 changes: 0 additions & 151 deletions .all-contributorsrc

This file was deleted.

2 changes: 1 addition & 1 deletion .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,4 @@ available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.ht
[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq
https://www.contributor-covenant.org/faq
19 changes: 11 additions & 8 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,30 @@ Contributions to Ward are encouraged and very welcome!

Contributions can come in many forms: documentation enhancements, features, bug fixes, creating issues, and participating in the community.

If you're interested in helping out, you might find some inspiration in [Issues](https://github.com/darrenburns/ward/issues). If you have an idea, but don't see it there, don't hesitate to create a new issue.
If you're interested in helping out, you might find some inspiration in [Issues](https://github.com/darrenburns/ward/issues) or [Discussions](https://github.com/darrenburns/ward/discussions). If you have an idea, but don't see it there, don't hesitate to open a new discussion.

Before submitting a pull request, please make sure the enhancement or bugfix you've made has been discussed.
Before submitting a pull request, please make sure the enhancement or bugfix you've made has been discussed.

This will ensure no work is duplicated, and that a general approach has been agreed.

Please also take time to review the [Code of Conduct](https://github.com/darrenburns/ward/blob/master/.github/CODE_OF_CONDUCT.md). Anyone who violates the code of conduct may be barred from contributing.

## Local development setup

To get started with developing Ward, you'll need to [install Poetry](https://python-poetry.org/docs/#installation). Run `poetry install` to have
Poetry create a virtualenv for you and install everything you need into it. Any development commands
you need from this point on can be found in the Makefile. e.g. `make test` to run the tests, `make format` to format
your code, `make prep` to do both of those things (run this before creating a PR).
To get started with developing Ward, you'll need to [install Poetry](https://python-poetry.org/docs/#installation).
Then run `make setup` from the repository root to create a virtual environment for Ward's development dependencies and install the [pre-commit hooks](https://pre-commit.com/).
Any development commands you need from this point on can be also be found in the Makefile.
For example,
`make test` to run the tests,
`make format` to format your code,
`make prep` to do both of those things (run this before creating a PR).


## Pull request guidelines

* Let us know before you start working on something! Someone else may already have started working on the same thing.
* Prepare your code for review with `make prep` (this will format and run tests)
* Prepare your code for review with `make prep` (this will run formatters and linters, and then run the test suite).
* Ensure `README.md` is updated if necessary.
* Tests written cover new code, and running `ward` results in a pass.
* Tests written cover new code, and running `make test` results in a pass.

If something is missing from this guide (it probably is), please let me know by creating an issue or a pull request.
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: 2

updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
67 changes: 36 additions & 31 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,44 +3,49 @@ name: Build
on:
push:
branches:
- master
- release/*
- master
- release/*
pull_request:

jobs:
test:
name: Testing on Python ${{ matrix.python-version }} and ${{ matrix.os }}
name: Python ${{ matrix.python-version }}, ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
max-parallel: 9
fail-fast: false
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
python-version: [3.6, 3.7, 3.8]
os: [ ubuntu-latest, macOS-latest, windows-latest ]
python-version: [ 3.6, 3.7, 3.8, 3.9, 3.10.0-beta.1 ]
defaults:
run:
shell: bash

steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- uses: dschep/install-poetry-action@v1.3
with:
version: 1.0.3
create_virtualenvs: true
- name: Run tests with Ward
run: |
poetry install
poetry run coverage run -m ward
poetry run coverage xml -i
- name: Upload coverage report to codecov
run: |
bash <(curl -s https://codecov.io/bash) -f coverage.xml
shell: bash

# TODO: Update to use the Makefile and actually enforce this.
# - name: Lint with flake8 (CONFIG OUTDATED)
# run: |
# # stop the build if there are Python syntax errors or undefined names
# python3.7 -m poetry run flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
# python3.7 -m poetry run flake8 . --count --exit-zero --max-complexity=10 --max-line-length=120 --statistics

- uses: actions/checkout@v2

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

- uses: snok/install-poetry@v1.1.6
with:
virtualenvs-create: true

- name: Install dependencies
run: |
poetry config experimental.new-installer false
poetry config virtualenvs.in-project true
poetry install --no-interaction
- name: Run tests with Ward
run: |
poetry run coverage run -m ward
poetry run coverage xml -i
- name: Upload coverage report to codecov
run: |
bash <(curl -s https://codecov.io/bash) -f coverage.xml
shell: bash
34 changes: 0 additions & 34 deletions .github/workflows/pullrequest.yml

This file was deleted.

9 changes: 4 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,11 @@ jobs:
name: Build and publish to PyPI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-python@v1
- uses: dschep/install-poetry-action@v1.3
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: snok/install-poetry@v1.1.6
with:
version: 1.0.3
create_virtualenvs: true
virtualenvs-create: true
- name: Publish to PyPI
run: |
poetry publish --build --username __token__ --password ${{ secrets.pypi_api_token }}
Expand Down
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,8 @@ share/
.idea/
.vscode/
codealike.json
.python-version

# coverage
.coverage
htmlcov/

0 comments on commit f272c39

Please sign in to comment.