Skip to content
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

Replace Makefile with poe tasks in pyproject.yaml #118

Merged
merged 1 commit into from
Jul 25, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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