Skip to content

Commit

Permalink
Merge pull request #11 from wuunder/improve/rename-map-functions
Browse files Browse the repository at this point in the history
Rename map functions, upgrade packages and add stringify_ and atomize_keys helper in Maps
  • Loading branch information
dkln authored Oct 24, 2024
2 parents 5e827f7 + 706bac7 commit 91d6929
Show file tree
Hide file tree
Showing 10 changed files with 357 additions and 195 deletions.
3 changes: 2 additions & 1 deletion .dialyzer_ignore.exs
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
[{"lib/wuunder_utils/maps.ex", :contract_supertype},
{"lib/wuunder_utils/strings.ex", :contract_supertype},]
{"lib/wuunder_utils/strings.ex", :contract_supertype},
{"lib/wuunder_utils/numbers.ex", :contract_supertype}]
25 changes: 15 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
name: Test and build

on:
push:
branches: ["main"]
pull_request:
branches:
- master
branches: ["main"]

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
Expand Down Expand Up @@ -35,8 +43,8 @@ jobs:
restore-keys: ${{ runner.os }}-mixv2-

- name: Setup deps
run: |
mix deps.get
run: |
mix deps.get
mix deps.unlock --check-unused
- name: Compile
Expand All @@ -46,14 +54,11 @@ jobs:
run: mix format --check-formatted

- name: Run Tests
run: mix coveralls.github --warnings-as-errors
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: mix test

- name: Cleanup
run: mix clean


dialyzer:
name: "Run Dialyzer"
runs-on: ubuntu-latest
Expand Down Expand Up @@ -110,8 +115,8 @@ jobs:
priv/plts
- name: Setup deps
run: |
mix deps.get
run: |
mix deps.get
mix deps.unlock --check-unused
- name: Compile
Expand Down
4 changes: 2 additions & 2 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
elixir 1.17.2-otp-27
erlang 27.0.1
elixir 1.17.3-otp-27
erlang 27.1
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Changelog

## v0.9 (2024-10-24)

### Backwards incompatible changes

* Renamed `WuunderUtils.Maps.delete_field` to `WuunderUtils.Maps.delete`
* Renamed `WuunderUtils.Maps.delete_field_in` to `WuunderUtils.Maps.deep_delete`
* Renamed `WuunderUtils.Maps.get_field` to `WuunderUtils.Maps.get`
* Renamed `WuunderUtils.Maps.get_field_in` to `WuunderUtils.Maps.deep_get`
* Renamed `WuunderUtils.Maps.get_fields_in` to `WuunderUtils.Maps.deep_get_values`
* Renamed `WuunderUtils.Maps.put_field` to `WuunderUtils.Maps.put`
* Renamed `WuunderUtils.Maps.put_field_in` to `WuunderUtils.Maps.deep_put`
* Renamed `WuunderUtils.Maps.has_only_atom_keys?` to `WuunderUtils.Maps.only_atom_keys?`
* Renamed `WuunderUtils.Maps.alias_fields` to `WuunderUtils.Maps.rename_keys`
* Renamed `WuunderUtils.Maps.map_all` to `WuunderUtils.Maps.map`

### Enhancements

* Added `strinigy_keys` helper in `WuunderUtils.Maps`
* Added `atomize_keys` helper in `WuunderUtils.Maps`
9 changes: 9 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
MIT License

Copyright (c) 2024 Wuunder

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

Contains a set of modules that makes Elixir development more fun and productive.

![Build status](https://github.com/wuunder/wuunder_utils/actions/workflows/ci.yml/badge.svg)
[![Hex.pm](https://img.shields.io/hexpm/v/wuunder_utils.svg)](https://hex.pm/packages/wuunder_utils)

## Installation

If [available in Hex](https://hex.pm/docs/publish), the package can be installed
Expand All @@ -10,12 +13,11 @@ by adding `wuunder_utils` to your list of dependencies in `mix.exs`:
```elixir
def deps do
[
{:wuunder_utils, "~> 0.1.0"}
{:wuunder_utils, "~> 0.9.0"}
]
end
```

Documentation can be generated with [ExDoc](https://github.com/elixir-lang/ex_doc)
and published on [HexDocs](https://hexdocs.pm). Once published, the docs can
be found at <https://hexdocs.pm/wuunder_utils>.

Loading

0 comments on commit 91d6929

Please sign in to comment.