Skip to content

Commit

Permalink
feat(changelog): update for v2.2 release
Browse files Browse the repository at this point in the history
- Update CHANGELOG.md for v2.2 release
- Add new feature: `flatten` argument
- Include bug fixes and test improvements
- Update README.md with clearer instructions
- Simplify docs build command in README.rst
  • Loading branch information
Liu Xue Yan committed Nov 9, 2024
1 parent 83a0be3 commit 7b144ac
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
10 changes: 7 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
# CHANGELOG

## 2.2a1
## 2.2

> 📅 **Date** 2024-9-22
> 📅 **Date** 2024-11-9
- New:

- Add `flatten` argument. See [#46](https://github.com/tanbro/pyyaml-include/issues/46) for detail
- Add a `flatten` argument. See [#46](https://github.com/tanbro/pyyaml-include/issues/46) for detail

- Bug fix:

- fix issue if glob_params is not int. See [#48](https://github.com/tanbro/pyyaml-include/pull/48) for detail

- Test:

- PyPy 3.9 and 3.10 in docker compose based unit-test

- Other update and improvement

## 2.1
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ In version `2.0`, [fsspec][] was introduced. With it, we can even include files
pip install "pyyaml-include"
```

Since we are using [fsspec][] to open including files from v2.0, an installation can be performed like below, if want to open remote files:
Because [fsspec][] was introduced to open the including files since v2.0, an installation can be performed like below, if want to open remote files:

- for files on website:

Expand Down Expand Up @@ -63,7 +63,7 @@ Consider we have such [YAML][] files:

To include `1.yml`, `2.yml` in `0.yml`, we shall:

1. Register a `yaml_include.Constructor` to [PyYAML][]'s loader class, with `!inc` as it's tag:
1. Register a `yaml_include.Constructor` to [PyYAML][]'s loader class, with `!inc`(or any other tags start with `!` character) as it's tag:

```python
import yaml
Expand All @@ -73,14 +73,14 @@ To include `1.yml`, `2.yml` in `0.yml`, we shall:
yaml.add_constructor("!inc", yaml_include.Constructor(base_dir='/your/conf/dir'))
```

1. Write `!inc` tags in `0.yaml`:
1. Use `!inc` tag(s) in `0.yaml`:

```yaml
file1: !inc include.d/1.yml
file2: !inc include.d/2.yml
```

1. Load it
1. Load `0.yaml` in your Python program

```python
with open('0.yml') as f:
Expand All @@ -91,7 +91,7 @@ To include `1.yml`, `2.yml` in `0.yml`, we shall:
we'll get:

```python
{'file1':{'name':'1'},'file2':{'name':'2'}}
{'file1': {'name': '1'}, 'file2': {'name': '2'}}
```

1. (optional) the constructor can be unregistered:
Expand Down
2 changes: 1 addition & 1 deletion docs/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ How to build docs

.. code:: sh
make -C docs/make html
make -C docs html
* Windows:

Expand Down

0 comments on commit 7b144ac

Please sign in to comment.