Skip to content

Commit

Permalink
Replace Makefile with poe tasks in pyproject.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
nat-n committed Jul 12, 2020
1 parent 0ba0692 commit c92506f
Show file tree
Hide file tree
Showing 5 changed files with 550 additions and 70 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Install dependencies
run: poetry install
- name: Run black
run: make check-style
run: poetry run poe check-style

run-tests:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -52,8 +52,8 @@ jobs:
poetry install
- name: Run tests
run: |
make generate
make test
poetry run poe generate
poetry run poe test
build-release:
runs-on: ubuntu-latest
Expand Down
43 changes: 0 additions & 43 deletions Makefile

This file was deleted.

18 changes: 7 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -314,10 +314,9 @@ datetime.datetime(2019, 1, 1, 11, 59, 58, 800000, tzinfo=datetime.timezone.utc)
- [poetry](https://python-poetry.org/docs/#installation)
*Needed to install dependencies in a virtual environment*

- make ([ubuntu](https://www.howtoinstall.me/ubuntu/18-04/make/), [windows](https://stackoverflow.com/questions/32127524/how-to-install-and-use-make-in-windows), [mac](https://osxdaily.com/2014/02/12/install-command-line-tools-mac-os-x/))

*Needed to conveniently run development tasks.*
*Alternatively, manually run the commands defined in the [Makefile](./Makefile)*
- [poethepoet](https://github.com/nat-n/poethepoet) for running development tasks as defined in pyproject.toml
- Can be installed to your host environment via `pip install poethepoet` then executed as simple `poe`
- or run from the poetry venv as `poetry run poe`

### Setup

Expand All @@ -329,16 +328,14 @@ poetry install
poetry shell
```

Run `make help` to see all available development tasks.

### Code style

This project enforces [black](https://github.com/psf/black) python code formatting.

Before committing changes run:

```sh
make format
poe format
```

To avoid merge conflicts later, non-black formatted python code will fail in CI.
Expand Down Expand Up @@ -372,15 +369,15 @@ Here's how to run the tests.

```sh
# Generate assets from sample .proto files required by the tests
make generate
poe generate
# Run the tests
make test
poe test
```

To run tests as they are run in CI (with tox) run:

```sh
make full-test
poe full-test
```

### (Re)compiling Google Well-known Types
Expand All @@ -401,7 +398,6 @@ protoc \
/usr/local/include/google/protobuf/*.proto
```


### TODO

- [x] Fixed length fields
Expand Down
Loading

0 comments on commit c92506f

Please sign in to comment.