Skip to content

Commit

Permalink
Merge branch 'release/0.2.7'
Browse files Browse the repository at this point in the history
  • Loading branch information
AndydeCleyre committed Oct 15, 2024
2 parents 4e684f6 + dc37b88 commit 9e7a9da
Show file tree
Hide file tree
Showing 32 changed files with 455 additions and 318 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,19 @@ on:
push
jobs:
build:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
steps:

- name: fetch code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: get nox
uses: excitedleigh/setup-nox@v2.1.0
- uses: actions/setup-python@v5
with:
python-version: '3.12'

- run: pipx install nox

- name: render documents
run: nox -s render_readme render_api_docs
Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/fmt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,17 @@ on:
push
jobs:
build:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
steps:

- name: fetch code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: get nox
uses: excitedleigh/setup-nox@v2.1.0
- uses: actions/setup-python@v5
with:
python-version: '3.12'

- run: pipx install nox

- name: format and lint
run: nox -s fmt
Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,17 @@ on:
- '[0-9]+.[0-9]+.[0-9]+'
jobs:
build:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
steps:

- name: fetch code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: get nox
uses: excitedleigh/setup-nox@v2.1.0
- uses: actions/setup-python@v5
with:
python-version: '3.12'

- run: pipx install nox

- name: flit publish
run: nox -s publish
Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/reqs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ on:
- cron: '53 8 * * *'
jobs:
build:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
steps:

- name: fetch code (develop) and zpy submodule
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: develop
submodules: recursive
Expand All @@ -18,8 +18,11 @@ jobs:
env:
DEBIAN_FRONTEND: noninteractive

- name: get nox
uses: excitedleigh/setup-nox@v2.1.0
- uses: actions/setup-python@v5
with:
python-version: '3.12'

- run: pipx install nox

- name: upgrade lockfiles
run: nox -s lock
Expand Down
30 changes: 22 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,18 @@ jobs:

types:

runs-on: ubuntu-22.04
runs-on: ubuntu-latest

steps:

- name: fetch code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: get nox
uses: excitedleigh/setup-nox@v2.1.0
- uses: actions/setup-python@v5
with:
python-version: '3.12'

- run: pipx install nox

- name: run pyright in nox environment
run: nox -s typecheck --force-color
Expand All @@ -23,16 +26,27 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, macos-12, windows-2022]
os: [ubuntu-latest, macos-13, windows-latest]
runs-on: ${{ matrix.os }}

steps:

- name: fetch code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: get nox
uses: excitedleigh/setup-nox@v2.1.0
- uses: actions/setup-python@v5
with:
allow-prereleases: true
python-version: |
3.13
3.12
3.11
3.10
3.9
3.8
3.7
- run: pipx install nox

- name: run ward tests in nox environment
run: nox -s test test_without_toml combine_coverage --force-color
Expand Down
6 changes: 4 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
[submodule ".zpy"]
path = .zpy
url = https://github.com/andydecleyre/zpy
path = .zpy
url = https://github.com/andydecleyre/zpy
branch = master
shallow = true
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1 +1 @@
python 3.12 3.11 3.10 3.9 3.8 3.7
python 3.12 3.13 3.11 3.10 3.9 3.8 3.7
31 changes: 20 additions & 11 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,15 +1,24 @@
This is free and unencumbered software released into the public domain.

DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004

Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>

Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.

DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
of the public at large and to the detriment of our heirs and
successors. We intend this dedication to be an overt act of
relinquishment in perpetuity of all present and future rights to this
software under copyright law.

0. You just DO WHAT THE FUCK YOU WANT TO.
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 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.

For more information, please refer to <http://unlicense.org/>
27 changes: 19 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
[![Generate docs from templates](https://img.shields.io/github/actions/workflow/status/andydecleyre/nestedtextto/doc.yml?branch=develop&label=Make%20Docs&logo=github)](https://andydecleyre.github.io/nestedtextto/moduleIndex.html)
[![Requirements badge](https://img.shields.io/github/actions/workflow/status/andydecleyre/nestedtextto/reqs.yml?branch=develop&label=Bump%20Reqs&logo=github)](https://github.com/AndydeCleyre/nestedtextto/actions/workflows/reqs.yml)

---
<img src="https://github.com/AndydeCleyre/nestedtextto/blob/assets/logo.png?raw=true" alt="logo" width="160" height="160" />

This project was created in appreciation for the design of [NestedText](https://nestedtext.org/),
the readability of [yamlpath](https://github.com/wwkimball/yamlpath) queries,
Expand All @@ -38,6 +38,7 @@ for convenient conversion between NestedText and other formats:
- [What's NestedText?](#whats-nestedtext)
- [How does this translate to formats with more value types?](#how-does-this-translate-to-formats-with-more-value-types)
- [Installation](#installation)
- [Shell Completion](#shell-completion)
- [Usage Docs](#usage-docs)
- [Limitations](#limitations)
- [More Examples](#more-examples)
Expand Down Expand Up @@ -139,22 +140,32 @@ If you don't need TOML support, you can omit the `[toml]` bits below.
Here are some ways to install it:

```console
$ uv tool install 'nt2[toml]' # Install using uv (Python all-around manager)
$ pipx install 'nt2[toml]' # Install using pipx (Python app manager)
$ pipz install 'nt2[toml]' # Install using zpy (Python app and environment manager for Zsh)
$ pip install --user 'nt2[toml]' # Install in your user's environment
$ pip install 'nt2[toml]' # Install in current environment
```

I recommend using [pipx](https://github.com/pypa/pipx)
I recommend using [uv](https://github.com/astral-sh/uv),
[pipx](https://github.com/pypa/pipx),
or `pipz` from [zpy](https://github.com/AndydeCleyre/zpy).

#### Shell Completion

For Zsh completion, add this line to your `.zshrc`, any time after `compinit`:

```zsh
if (( $+functions[compdef] )) && (( $+commands[nt2json] )) compdef _gnu_generic nt2yaml nt2toml nt2json json2nt toml2nt yaml2nt
```
### Usage Docs
<details>
<summary>nt2json</summary>
```
nt2json 0.2.6
nt2json 0.2.7

Read NestedText and output its content as JSON.

Expand Down Expand Up @@ -205,7 +216,7 @@ Switches:
<summary>nt2yaml</summary>
```
nt2yaml 0.2.6
nt2yaml 0.2.7

Read NestedText and output its content as YAML.

Expand Down Expand Up @@ -259,7 +270,7 @@ Switches:
<summary>nt2toml</summary>
```
nt2toml 0.2.6
nt2toml 0.2.7
Read NestedText and output its content as TOML.
Expand Down Expand Up @@ -310,7 +321,7 @@ Switches:
<summary>json2nt</summary>
```
json2nt 0.2.6
json2nt 0.2.7

Read JSON and output its content as NestedText.

Expand Down Expand Up @@ -339,7 +350,7 @@ Switches:
<summary>yaml2nt</summary>
```
yaml2nt 0.2.6
yaml2nt 0.2.7
Read YAML and output its content as NestedText.
Expand Down Expand Up @@ -368,7 +379,7 @@ Switches:
<summary>toml2nt</summary>
```
toml2nt 0.2.6
toml2nt 0.2.7

Read TOML and output its content as NestedText.

Expand Down
Loading

0 comments on commit 9e7a9da

Please sign in to comment.