Skip to content

Commit c4e58df

Browse files
committed
Test workflow.
1 parent 3b06814 commit c4e58df

3 files changed

Lines changed: 36 additions & 3 deletions

File tree

‎.github/workflows/tests.yaml‎

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: tests
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
tests:
7+
name: ${{ matrix.python-version }}
8+
runs-on: ${{ matrix.os }}
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
os: [ubuntu-latest, windows-latest, macos-latest]
13+
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
14+
steps:
15+
- uses: actions/checkout@v3
16+
- name: Set up Python ${{ matrix.python-version }}
17+
uses: actions/setup-python@v4
18+
with:
19+
python-version: ${{ matrix.python-version }}
20+
- name: Install dependencies
21+
run: |
22+
python -m pip install --upgrade pip
23+
python -m pip install --upgrade hatch
24+
- name: Test
25+
run: hatch run test:test

‎README.md‎

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
A flexible JSONPath engine for Python.
1616

17-
JSONPath is a mini language for extracting objects from data formatted in JavaScript Object Notation, or equivalent Python objects like dictionaries, and lists.
17+
JSONPath is a mini language for extracting objects from data formatted in JavaScript Object Notation, or equivalent Python objects, like dictionaries and lists.
1818

1919
```python
2020
import jsonpath
@@ -73,6 +73,12 @@ or [pip](https://pip.pypa.io/en/stable/getting-started/):
7373
pip install python-jsonpath
7474
```
7575

76+
or [pipx](https://pypa.github.io/pipx/)
77+
78+
```console
79+
pipx install python-jsonpath
80+
```
81+
7682
## API
7783

7884
### jsonpath.findall
@@ -99,7 +105,7 @@ Prepare a path for repeated matching against different data. `jsonpath.findall()
99105

100106
### async
101107

102-
`findall_async()` and `finditer_async` are async equivalents of `findall()` and `finditer()`. They are used by when integrating Python JSONPath with [Python Liquid](https://github.com/jg-rp/liquid) and use Python Liquid's [async protocol](https://jg-rp.github.io/liquid/introduction/async-support).
108+
`findall_async()` and `finditer_async` are async equivalents of `findall()` and `finditer()`. They are used when integrating Python JSONPath with [Python Liquid](https://github.com/jg-rp/liquid) and use Python Liquid's [async protocol](https://jg-rp.github.io/liquid/introduction/async-support).
103109

104110
### Extra filter context
105111

@@ -109,7 +115,7 @@ Use `#` to query extra filter data, similar to how one might use `@` or `$`.
109115

110116
## Syntax
111117

112-
Python JSONPath's default syntax is an opinionated combination of JSONPath features from existing, popular implementations, and much of the [IETF JSONPath draft](https://datatracker.ietf.org/doc/html/draft-ietf-jsonpath-base-11). If you're already familiar with JSONPath syntax, skip to [Notable differences](#notable-differences).
118+
Python JSONPath's default syntax is an opinionated combination of JSONPath features from existing, popular implementations, and much of the [IETF JSONPath draft](https://datatracker.ietf.org/doc/html/draft-ietf-jsonpath-base-11). If you're already familiar with JSONPath syntax, skip to [notable differences](#notable-differences).
113119

114120
TODO: tree analogy / target document
115121
TODO: use "node" terminology
@@ -244,6 +250,7 @@ This is a list of things that you might find in other JSONPath implementation th
244250
- We don't support extension functions of the form `selector.func()`.
245251
- We always return a list of matches from `jsonpath.findall()`, never a scalar value.
246252
- We do not support arithmetic in filter expression.
253+
- Python JSONPath is strictly read only. There are no update "selectors".
247254

248255
And this is a list of areas where we deviate from the [IETF JSONPath draft](https://datatracker.ietf.org/doc/html/draft-ietf-jsonpath-base-11).
249256

‎pyproject.toml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ dependencies = [
4444
"ipython",
4545
"pyyaml",
4646
"types-pyyaml",
47+
"twine",
4748
]
4849

4950
[tool.hatch.envs.default.scripts]

0 commit comments

Comments
 (0)