Skip to content

Commit 350fff8

Browse files
authored
Merge pull request #19 from funnel-io/release-1.1.0
Release 1.1.0
2 parents ebdb4b1 + 370f334 commit 350fff8

File tree

5 files changed

+51
-22
lines changed

5 files changed

+51
-22
lines changed

.github/workflows/test.yml

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
name: test
22

3-
on:
3+
on:
44
push:
5-
workflow_dispatch:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
68

79
jobs:
810
build:
@@ -11,14 +13,23 @@ jobs:
1113
fail-fast: false
1214
matrix:
1315
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
14-
1516
steps:
16-
- uses: actions/checkout@v4
17-
18-
- name: install virtual env
19-
run: |
20-
pip install virtualenv
21-
22-
- name: make test
23-
run: |
24-
make test
17+
- uses: actions/checkout@v4
18+
- name: Set up Python ${{ matrix.python-version }}
19+
uses: actions/setup-python@v5
20+
with:
21+
python-version: ${{ matrix.python-version }}
22+
- name: Install dependencies
23+
run: |
24+
python -m pip install --upgrade pip
25+
python -m pip install flake8 pytest
26+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
27+
- name: Lint with flake8
28+
run: |
29+
# stop the build if there are Python syntax errors or undefined names
30+
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
31+
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
32+
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=100 --statistics
33+
- name: Test with pytest
34+
run: |
35+
PYTHONPATH=src/ pytest --doctest-modules --doctest-continue-on-failure

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2021 Funnel
3+
Copyright (c) 2021-2024 Funnel
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

Makefile

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
1-
setup: venv
1+
PYTHON_VERSION ?= 3.9
22

33
dist: clean-dist venv
44
. venv/bin/activate && python3 -m build .
55

6-
venv: dev-requirements.txt
6+
.PHONY: setup
7+
setup: venv/setup.txt
8+
9+
venv:
710
virtualenv venv --python=${PYTHON_VERSION}
11+
12+
venv/setup.txt: venv dev-requirements.txt
813
. venv/bin/activate && \
914
pip3 install --upgrade pip && \
10-
pip3 install \
11-
--requirement dev-requirements.txt
15+
pip3 install --requirement dev-requirements.txt
16+
touch venv/setup.txt
1217

1318
.PHONY: clean
1419
clean: clean-dist
@@ -21,13 +26,21 @@ clean-dist:
2126
rm -rf dist
2227

2328
.PHONY: test
24-
test: venv
29+
test: setup
2530
@ . venv/bin/activate && PYTHONPATH=src/ pytest -vv -rsx tests/ src/ --cov ./src/json_normalize/ --no-cov-on-fail --cov-report term-missing --doctest-modules --doctest-continue-on-failure
2631
@ . venv/bin/activate && flake8 src --exclude '#*,~*,.#*'
2732
@ . venv/bin/activate && black --check src/ tests/
2833

2934
.PHONY: test-focus
30-
test-focus: venv
35+
test-focus: setup
3136
@ . venv/bin/activate && PYTHONPATH=src/ pytest -vv -m focus -rsx tests/ src/ --cov ./src/json_normalize/ --no-cov-on-fail --cov-report term-missing --doctest-modules --doctest-continue-on-failure
3237
@ . venv/bin/activate && flake8 src --exclude '#*,~*,.#*'
3338
@ . venv/bin/activate && black --check src/ tests/
39+
40+
.PHONY: release
41+
release: test dist
42+
. venv/bin/activate && twine upload dist/*
43+
44+
.PHONY: test-release
45+
test-release: test dist
46+
. venv/bin/activate && twine upload -r testpypi dist/*

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ This package contains a function, json_normalize. It will take a json-like struc
99

1010
Data association will flows up and down inside dicts although in iterables, e.g. lists, data
1111

12+
## Installation
13+
14+
Install the package `json_normalize` version `1.1+` from PyPI.
15+
The recommended `requirements.txt` line is `json_normalize~=1.1`.
16+
1217
## json_normalize.json_normalize
1318

1419
```python

src/json_normalize/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
from .key_joiners import last_node_name
33

44
__all__ = [
5-
json_normalize,
6-
last_node_name,
5+
"json_normalize",
6+
"last_node_name",
77
]
88

9-
__version__ = "1.0.1"
9+
__version__ = "1.1.0"
1010

1111
VERSION = __version__

0 commit comments

Comments
 (0)