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

v0.1.7 release #7

Merged
merged 4 commits into from
Jan 18, 2024
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
30 changes: 15 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@ permissions:
jobs:
deps:
name: Dependencies
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
env:
MIX_ENV: test
strategy:
matrix:
include:
- pair:
elixir: 1.12.3
otp: 24.3.4
elixir: 1.15.7
otp: 25.3
- pair:
elixir: 1.14.3
otp: 25.3.2
elixir: 1.16.0
otp: 26.0
lint: lint
steps:
- uses: styfle/[email protected]
Expand Down Expand Up @@ -61,18 +61,18 @@ jobs:
static_code_analysis:
name: Static Code Analysis
needs: deps
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
env:
MIX_ENV: test
strategy:
matrix:
include:
- pair:
elixir: 1.12.3
otp: 24.3.4
elixir: 1.15.7
otp: 25.3
- pair:
elixir: 1.14.3
otp: 25.3.2
elixir: 1.16.0
otp: 26.0
lint: lint
steps:
- uses: styfle/[email protected]
Expand Down Expand Up @@ -111,19 +111,19 @@ jobs:

unit_tests:
needs: deps
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
env:
MIX_ENV: test
strategy:
fail-fast: false
matrix:
include:
- pair:
elixir: 1.12.3
otp: 24.3.4
elixir: 1.15.7
otp: 25.3
- pair:
elixir: 1.14.3
otp: 25.3.2
elixir: 1.16.0
otp: 26.0
lint: lint
steps:
- uses: styfle/[email protected]
Expand Down
26 changes: 20 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,47 +1,61 @@
# Changelog

## v0.1.7

### Added

- add Livebook notebok for basic usage

## v0.1.6

### Fixed

- Standardize on the return value of `force_altitude` to be consistent with [bmp280](https://github.com/elixir-sensors/bmp280). (was: `{:ok, number}`, now: `:ok`)

## v0.1.5

### Breaking changes

- sensor type `:bmp388` is now changed to `:bmp380` to be consistent with other sensor types

### Added

- support for BMP 2 sensors namely:
- `:bmp180`
- `:bmp280`
- `:bme280`
- `:bme680`

### Improved

- [ci] update CI
- [test] re-write test using experimental [circuit_sim](https://github.com/elixir-circuits/circuits_sim)

## v0.1.4

### Improved
* Support both v0 and v1 of `circuits_i2c`

- Support both v0 and v1 of `circuits_i2c`

## v0.1.3

### Improved
* Simplify I2C-related code
* Improve type spec and refactor

- Simplify I2C-related code
- Improve type spec and refactor

## v0.1.2

### Fixed
* Remove default gen server name (previously defaulted to `__MODULE__`)

- Remove default gen server name (previously defaulted to `__MODULE__`)

## v0.1.1

### Improved
* Log helpful message on init
* Link to the BME388 data sheet in the Hexdoc

- Log helpful message on init
- Link to the BME388 data sheet in the Hexdoc

## v0.1.0

Expand Down
43 changes: 19 additions & 24 deletions mix.exs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
defmodule BMP3XX.MixProject do
use Mix.Project

@version "0.1.6"
@description "Use Bosch environment sensors in Elixir"
@version "0.1.7"
@source_url "https://github.com/mnishiguchi/bmp3xx"

def project do
Expand All @@ -12,19 +11,16 @@ defmodule BMP3XX.MixProject do
elixir: "~> 1.11",
elixirc_paths: elixirc_paths(Mix.env()),
start_permanent: Mix.env() == :prod,
deps: deps(Mix.env()),
deps: deps(),
dialyzer: dialyzer(),
docs: docs(),
package: package(),
description: @description,
dialyzer: [
flags: [:missing_return, :extra_return, :unmatched_returns, :error_handling, :underspecs]
],
description: description(),
preferred_cli_env: %{
docs: :docs,
"hex.publish": :docs,
"hex.build": :docs
},
aliases: aliases()
}
]
end

Expand All @@ -35,26 +31,31 @@ defmodule BMP3XX.MixProject do
]
end

# Run "mix help deps" to learn about dependencies.
defp deps(env) when env in [:test, :dev] do
[
{:circuits_i2c, github: "elixir-circuits/circuits_i2c", branch: "v2.0", override: true},
{:circuits_sim, github: "elixir-circuits/circuits_sim"},
{:credo, "~> 1.7", runtime: false},
{:dialyxir, "~> 1.3", runtime: false}
]
defp description do
"Use Bosch environment sensors in Elixir"
end

defp deps(_env) do
# Run "mix help deps" to learn about dependencies.
defp deps do
[
{:circuits_i2c, "~> 2.0 or ~> 1.0 or ~> 0.3"},
{:circuits_sim, github: "elixir-circuits/circuits_sim"},
{:credo, "~> 1.7", only: [:dev, :test], runtime: false},
{:credo_binary_patterns, "~> 0.2.2", only: [:dev, :test], runtime: false},
{:dialyxir, "~> 1.3", only: [:dev, :test], runtime: false},
{:ex_doc, "~> 0.29", only: :docs, runtime: false}
]
end

defp elixirc_paths(env) when env in [:test, :dev], do: ["lib", "test/support"]
defp elixirc_paths(_env), do: ["lib"]

defp dialyzer do
[
flags: [:extra_return, :unmatched_returns, :error_handling, :underspecs]
]
end

defp package do
%{
files: [
Expand Down Expand Up @@ -88,10 +89,4 @@ defmodule BMP3XX.MixProject do
skip_undefined_reference_warnings_on: ["CHANGELOG.md"]
]
end

defp aliases do
[
lint: ["format", "deps.unlock --unused", "hex.outdated", "credo", "dialyzer"]
]
end
end
27 changes: 17 additions & 10 deletions mix.lock
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
%{
"bunt": {:hex, :bunt, "0.2.1", "e2d4792f7bc0ced7583ab54922808919518d0e57ee162901a16a1b6664ef3b14", [:mix], [], "hexpm", "a330bfb4245239787b15005e66ae6845c9cd524a288f0d141c148b02603777a5"},
"bunt": {:hex, :bunt, "1.0.0", "081c2c665f086849e6d57900292b3a161727ab40431219529f13c4ddcf3e7a44", [:mix], [], "hexpm", "dc5f86aa08a5f6fa6b8096f0735c4e76d54ae5c9fa2c143e5a1fc7c1cd9bb6b5"},
"cerlc": {:hex, :cerlc, "0.2.1", "cfe0880aa049ebcca079ca49578055aa48e7f2e9ed8ae08bd1f919d59015d03f", [:rebar3], [], "hexpm", "37f0d74a4277dcbaf64c7c47e9953dcc8060d26d86bb466ab2a86928e0181a7d"},
"circuits_gpio": {:git, "https://github.com/elixir-circuits/circuits_gpio.git", "86c304aa517dbf8bdcf1ed20d35ff12d84f468b6", [branch: "v2.0"]},
"circuits_i2c": {:git, "https://github.com/elixir-circuits/circuits_i2c.git", "f75eef88e525245fb1aae3c48ad36811a6e2c0bb", [branch: "v2.0"]},
"circuits_sim": {:git, "https://github.com/elixir-circuits/circuits_sim.git", "0459132ddd952e005837bd75c7c8dc2d3c89bbc3", []},
"circuits_spi": {:git, "https://github.com/elixir-circuits/circuits_spi.git", "d67b46e09627ee4653698128341ce8c6bf466344", [branch: "v2.0"]},
"credo": {:hex, :credo, "1.7.0", "6119bee47272e85995598ee04f2ebbed3e947678dee048d10b5feca139435f75", [:mix], [{:bunt, "~> 0.2.1", [hex: :bunt, repo: "hexpm", optional: false]}, {:file_system, "~> 0.2.8", [hex: :file_system, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "6839fcf63d1f0d1c0f450abc8564a57c43d644077ab96f2934563e68b8a769d7"},
"dialyxir": {:hex, :dialyxir, "1.3.0", "fd1672f0922b7648ff9ce7b1b26fcf0ef56dda964a459892ad15f6b4410b5284", [:mix], [{:erlex, ">= 0.2.6", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "00b2a4bcd6aa8db9dcb0b38c1225b7277dca9bc370b6438715667071a304696f"},
"elixir_make": {:hex, :elixir_make, "0.7.6", "67716309dc5d43e16b5abbd00c01b8df6a0c2ab54a8f595468035a50189f9169", [:mix], [{:castore, "~> 0.1 or ~> 1.0", [hex: :castore, repo: "hexpm", optional: true]}], "hexpm", "5a0569756b0f7873a77687800c164cca6dfc03a09418e6fcf853d78991f49940"},
"circuits_gpio": {:hex, :circuits_gpio, "2.0.1", "91019a11aedb574a2d8690e59471ee7bfb5706ff256d67dccfee280c8128a7a4", [:make, :mix], [{:elixir_make, "~> 0.6", [hex: :elixir_make, repo: "hexpm", optional: false]}], "hexpm", "1c09d71d883d82177c5627c97baec7c0f140743b019a75fa10861d740763df99"},
"circuits_i2c": {:hex, :circuits_i2c, "2.0.2", "ed1bac41cca0b777e11e2105c08dc7cad67a221e0d7eec1680a644eba677f9f5", [:make, :mix], [{:elixir_make, "~> 0.6", [hex: :elixir_make, repo: "hexpm", optional: false]}], "hexpm", "b8cf6ef783f9184bf4e45a1a4fa0a72523aa4e3c2fa980f94a45336c92d95178"},
"circuits_sim": {:git, "https://github.com/elixir-circuits/circuits_sim.git", "8561bc01ab616e1fbd70f00a0ec0295fe0ee673e", []},
"circuits_spi": {:hex, :circuits_spi, "2.0.1", "c5e0aa5480e668caba338aa7a5cabd032d0476d2c46782189278145da9b820f4", [:make, :mix], [{:elixir_make, "~> 0.6", [hex: :elixir_make, repo: "hexpm", optional: false]}], "hexpm", "3c95bf7cfabb663d9364bcef341ad5ec42ad44a3a7c1a85beb1e98345497f5ce"},
"credo": {:hex, :credo, "1.7.3", "05bb11eaf2f2b8db370ecaa6a6bda2ec49b2acd5e0418bc106b73b07128c0436", [:mix], [{:bunt, "~> 0.2.1 or ~> 1.0", [hex: :bunt, repo: "hexpm", optional: false]}, {:file_system, "~> 0.2 or ~> 1.0", [hex: :file_system, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "35ea675a094c934c22fb1dca3696f3c31f2728ae6ef5a53b5d648c11180a4535"},
"credo_binary_patterns": {:hex, :credo_binary_patterns, "0.2.3", "0dabadbe3cfd8db14b69ff346c112bfadde9bf65dc7aea19c39743c8d2ed07fa", [:mix], [{:credo, "~> 1.6", [hex: :credo, repo: "hexpm", optional: false]}], "hexpm", "3c333a564ed3e27f5c9f69985a921b88ef90f131bf722d085957cc4b25b7a085"},
"dialyxir": {:hex, :dialyxir, "1.4.3", "edd0124f358f0b9e95bfe53a9fcf806d615d8f838e2202a9f430d59566b6b53b", [:mix], [{:erlex, ">= 0.2.6", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "bf2cfb75cd5c5006bec30141b131663299c661a864ec7fbbc72dfa557487a986"},
"earmark_parser": {:hex, :earmark_parser, "1.4.39", "424642f8335b05bb9eb611aa1564c148a8ee35c9c8a8bba6e129d51a3e3c6769", [:mix], [], "hexpm", "06553a88d1f1846da9ef066b87b57c6f605552cfbe40d20bd8d59cc6bde41944"},
"elixir_make": {:hex, :elixir_make, "0.7.8", "505026f266552ee5aabca0b9f9c229cbb496c689537c9f922f3eb5431157efc7", [:mix], [{:castore, "~> 0.1 or ~> 1.0", [hex: :castore, repo: "hexpm", optional: true]}, {:certifi, "~> 2.0", [hex: :certifi, repo: "hexpm", optional: true]}], "hexpm", "7a71945b913d37ea89b06966e1342c85cfe549b15e6d6d081e8081c493062c07"},
"erlex": {:hex, :erlex, "0.2.6", "c7987d15e899c7a2f34f5420d2a2ea0d659682c06ac607572df55a43753aa12e", [:mix], [], "hexpm", "2ed2e25711feb44d52b17d2780eabf998452f6efda104877a3881c2f8c0c0c75"},
"file_system": {:hex, :file_system, "0.2.10", "fb082005a9cd1711c05b5248710f8826b02d7d1784e7c3451f9c1231d4fc162d", [:mix], [], "hexpm", "41195edbfb562a593726eda3b3e8b103a309b733ad25f3d642ba49696bf715dc"},
"jason": {:hex, :jason, "1.4.0", "e855647bc964a44e2f67df589ccf49105ae039d4179db7f6271dfd3843dc27e6", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "79a3791085b2a0f743ca04cec0f7be26443738779d09302e01318f97bdb82121"},
"ex_doc": {:hex, :ex_doc, "0.31.1", "8a2355ac42b1cc7b2379da9e40243f2670143721dd50748bf6c3b1184dae2089", [:mix], [{:earmark_parser, "~> 1.4.39", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_c, ">= 0.1.1", [hex: :makeup_c, repo: "hexpm", optional: true]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1", [hex: :makeup_erlang, repo: "hexpm", optional: false]}], "hexpm", "3178c3a407c557d8343479e1ff117a96fd31bafe52a039079593fb0524ef61b0"},
"file_system": {:hex, :file_system, "1.0.0", "b689cc7dcee665f774de94b5a832e578bd7963c8e637ef940cd44327db7de2cd", [:mix], [], "hexpm", "6752092d66aec5a10e662aefeed8ddb9531d79db0bc145bb8c40325ca1d8536d"},
"jason": {:hex, :jason, "1.4.1", "af1504e35f629ddcdd6addb3513c3853991f694921b1b9368b0bd32beb9f1b63", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "fbb01ecdfd565b56261302f7e1fcc27c4fb8f32d56eab74db621fc154604a7a1"},
"makeup": {:hex, :makeup, "1.1.1", "fa0bc768698053b2b3869fa8a62616501ff9d11a562f3ce39580d60860c3a55e", [:mix], [{:nimble_parsec, "~> 1.2.2 or ~> 1.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "5dc62fbdd0de44de194898b6710692490be74baa02d9d108bc29f007783b0b48"},
"makeup_elixir": {:hex, :makeup_elixir, "0.16.1", "cc9e3ca312f1cfeccc572b37a09980287e243648108384b97ff2b76e505c3555", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}, {:nimble_parsec, "~> 1.2.3 or ~> 1.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "e127a341ad1b209bd80f7bd1620a15693a9908ed780c3b763bccf7d200c767c6"},
"makeup_erlang": {:hex, :makeup_erlang, "0.1.3", "d684f4bac8690e70b06eb52dad65d26de2eefa44cd19d64a8095e1417df7c8fd", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "b78dc853d2e670ff6390b605d807263bf606da3c82be37f9d7f68635bd886fc9"},
"nimble_parsec": {:hex, :nimble_parsec, "1.4.0", "51f9b613ea62cfa97b25ccc2c1b4216e81df970acd8e16e8d1bdc58fef21370d", [:mix], [], "hexpm", "9c565862810fb383e9838c1dd2d7d2c437b3d13b267414ba6af33e50d2d1cf28"},
}
Loading