Skip to content

Commit d2fb3bd

Browse files
committed
Merge branch 'development'
2 parents 50b3df3 + 0ff4684 commit d2fb3bd

File tree

10 files changed

+533
-1722
lines changed

10 files changed

+533
-1722
lines changed

.github/workflows/python_test.yml

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,38 +3,55 @@ name: Test
33
on: [push, pull_request]
44

55
jobs:
6-
6+
77
testing:
8+
89
runs-on: ubuntu-latest
10+
911
strategy:
1012
max-parallel: 4
1113
matrix:
1214
python-version: [2.7, 3.5, 3.6, 3.7, 3.8]
1315

1416
steps:
15-
- uses: actions/checkout@v1
17+
- uses: actions/checkout@v2
18+
1619
- name: Set up Python ${{ matrix.python-version }}
17-
uses: actions/setup-python@v1
20+
uses: actions/setup-python@v2
1821
with:
1922
python-version: ${{ matrix.python-version }}
20-
- name: Install and set up Poetry
23+
24+
- name: Install poetry
25+
run: |
26+
curl -fsS -o get-poetry.py https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py
27+
python get-poetry.py -y
28+
29+
- name: Configure poetry
2130
run: |
22-
python get-poetry.py --preview -y
2331
source $HOME/.poetry/env
2432
poetry config virtualenvs.in-project true
33+
2534
- name: Set up cache
2635
uses: actions/cache@v1
36+
id: cache
2737
with:
28-
path: .venv
29-
key: ${{ runner.os }}-venv-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }}
38+
path: .venv
39+
key: venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('**/poetry.lock') }}
40+
41+
- name: Ensure cache is healthy
42+
if: steps.cache.outputs.cache-hit == 'true'
43+
run: poetry run pip --version >/dev/null 2>&1 || rm -rf .venv
44+
3045
- name: Install dependencies
3146
run: |
3247
source $HOME/.poetry/env
3348
poetry install
49+
3450
- name: Test with pytest
3551
run: |
3652
source $HOME/.poetry/env
3753
poetry run pytest -q tests
54+
3855
- name: Lint with flake8
3956
run: |
4057
source $HOME/.poetry/env

.isort.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[settings]
22
line_length=120
3-
multi_line_output=4
3+
multi_line_output=0

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## Development
44

5+
## 0.3.1 (2020-12-04)
6+
7+
* [#13](https://github.com/rheinwerk-verlag/postgresql-anonymizer/pull/13>): Fixed a syntax error if no truncated tables are defined ([ray-man](https://github.com/ray-man>))
8+
59
## 0.3.0 (2020-02-11)
610

711
* Use [python-poetry](https://github.com/python-poetry/poetry) for requirements management

README.rst

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@ Features
3535
| ``ip`` | 157.50.1.20 | ``set`` | 127.0.0.1 |
3636
+----------------+----------------------+-----------------------+----------------------------------+
3737

38-
See the documentation (https://python-postgresql-anonymizer.readthedocs.io/en/latest/) for a more
39-
detailed description of the provided anonymization methods.
38+
See the `documentation`_ for a more detailed description of the provided anonymization methods.
4039

4140
Installation
4241
------------
@@ -71,6 +70,10 @@ Usage
7170
--dump-file DUMP_FILE
7271
Create a database dump file with the given name
7372

73+
Despite the database connection values, you will have to define a YAML schema file, that includes
74+
all anonymization rules for that database. Take a look at the `schema documentation`_ or the
75+
`YAML sample schema`_.
76+
7477
Example call::
7578

7679
$ pganonymize --schema=myschema.yml \
@@ -83,9 +86,9 @@ Example call::
8386
Database dump
8487
~~~~~~~~~~~~~
8588

86-
With the ``--dump-file`` argument it is possible to create a database dump file after anonymizing the database.
87-
Please note, that the ``pg_dump`` command from the ``postgresql-client-common`` library is necessary to create
88-
the dump file for t he connected database, e.g. under Linux::
89+
With the ``--dump-file`` argument it is possible to create a dump file after anonymizing the database. Please note,
90+
that the ``pg_dump`` command from the ``postgresql-client-common`` library is necessary to create the dump file for the
91+
database, e.g. under Linux::
8992

9093
sudo apt-get install postgresql-client-common
9194

@@ -119,7 +122,7 @@ Now you can install all requirements and activate the virtualenv::
119122
Docker
120123
------
121124

122-
If you want to run the anonymizher within a Docker container you first have to build the image::
125+
If you want to run the anonymizer within a Docker container you first have to build the image::
123126

124127
$ docker build -t pganonymizer .
125128

@@ -137,7 +140,9 @@ After that you can pass a schema file to the container, using Docker volumes, an
137140
-v
138141

139142

140-
.. _Faker: https://faker.readthedocs.io/en/master/providers.html
143+
.. _documentation: https://python-postgresql-anonymizer.readthedocs.io/en/latest/
144+
.. _schema documentation: https://python-postgresql-anonymizer.readthedocs.io/en/latest/schema.html
145+
.. _YAML sample schema: https://github.com/rheinwerk-verlag/postgresql-anonymizer/blob/master/sample_schema.yml
141146

142147
.. |license| image:: https://img.shields.io/badge/license-MIT-green.svg
143148
:target: https://github.com/rheinwerk-verlag/postgresql-anonymizer/blob/master/LICENSE.rst

0 commit comments

Comments
 (0)