mirror of
https://github.com/cmur2/python-bme280.git
synced 2024-12-21 16:54:22 +01:00
module: add Makefile for development commands
This commit is contained in:
parent
e36c38d950
commit
346ea6c0de
@ -13,5 +13,5 @@ install:
|
|||||||
- poetry install
|
- poetry install
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- poetry run pylint bme280
|
- make lint
|
||||||
- poetry run pytest
|
- make test
|
||||||
|
24
Makefile
Normal file
24
Makefile
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
|
||||||
|
# https://tech.davis-hansson.com/p/make/
|
||||||
|
SHELL := bash
|
||||||
|
.ONESHELL:
|
||||||
|
.SHELLFLAGS := -eu -o pipefail -c
|
||||||
|
.DELETE_ON_ERROR:
|
||||||
|
.DEFAULT_GOAL := all
|
||||||
|
MAKEFLAGS += --warn-undefined-variables
|
||||||
|
MAKEFLAGS += --no-builtin-rules
|
||||||
|
|
||||||
|
.PHONY: all
|
||||||
|
all: lint test ## Run lint and test (default goal)
|
||||||
|
|
||||||
|
.PHONY: lint
|
||||||
|
lint: ## Lint all source code
|
||||||
|
poetry run pylint bme280
|
||||||
|
|
||||||
|
.PHONY: test
|
||||||
|
test: ## Run all tests
|
||||||
|
poetry run pytest
|
||||||
|
|
||||||
|
.PHONY: help
|
||||||
|
help: ## Print this help text
|
||||||
|
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-15s\033[0m %s\n", $$1, $$2}'
|
@ -16,6 +16,10 @@ Consult the data sheet and see [demo.py](demo.py) for clues how to use this libr
|
|||||||
|
|
||||||
Not all functions of the chip are supported since I focused on the *forced mode* but data readout and parameter setting should work in *normal mode*, too. Please send pull requests for improvements and bug fixes!
|
Not all functions of the chip are supported since I focused on the *forced mode* but data readout and parameter setting should work in *normal mode*, too. Please send pull requests for improvements and bug fixes!
|
||||||
|
|
||||||
|
## Develop
|
||||||
|
|
||||||
|
Run `make help` to find out about the available development commands.
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
Python files in this repository are released under the [MIT license](LICENSE) except those parts from other sources which are indicated where appropriate in the files.
|
Python files in this repository are released under the [MIT license](LICENSE) except those parts from other sources which are indicated where appropriate in the files.
|
||||||
|
Loading…
Reference in New Issue
Block a user