mirror of
https://github.com/cmur2/python-veml6070.git
synced 2024-12-21 14:54:23 +01:00
module: add Makefile for development commands
This commit is contained in:
parent
1b3fc8f2df
commit
ded2908236
@ -13,5 +13,5 @@ install:
|
||||
- poetry install
|
||||
|
||||
script:
|
||||
- poetry run pylint veml6070
|
||||
- poetry run pytest
|
||||
- make lint
|
||||
- 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 veml6070
|
||||
|
||||
.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}'
|
@ -21,6 +21,10 @@ In September 2019 it was discovered (and fixed) that:
|
||||
- previously the sensor was never shutdown between measurements which wastes power but still takes measurements successfully
|
||||
- the UVA light intensity was calculated wrongly (too high) for `rset != RSET_240K` due to wrong compensation: higher `rset` leads to higher sampling time leads to higher absolute ADC step counts which *should* lead to every ADC step indicating a smaller amount of `W/(m*m)` of UVA power and a higher precision of the final UVA power but it wrongly behaved the opposite way. The `integration_time` worked correctly all the time.
|
||||
|
||||
## Develop
|
||||
|
||||
Run `make help` to find out about the available development commands.
|
||||
|
||||
## License
|
||||
|
||||
Python files in this repository are released under the [MIT license](LICENSE).
|
||||
|
Loading…
Reference in New Issue
Block a user