Skip to content

Commit a2db061

Browse files
committed
Merge branch 'development'
2 parents 80d28a9 + 78fbda7 commit a2db061

29 files changed

+251
-93
lines changed

.github/workflows/publish.yml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Release
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
publish:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
- name: Set up Python
13+
uses: actions/setup-python@v2
14+
with:
15+
python-version: '3.x'
16+
- name: Install dependencies
17+
run: |
18+
python -m pip install --upgrade pip
19+
pip install setuptools wheel twine
20+
- name: Build and publish
21+
env:
22+
TWINE_USERNAME: __token__
23+
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
24+
run: |
25+
python setup.py sdist bdist_wheel
26+
twine upload dist/*

.isort.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ line_length=120
33
multi_line_output=0
44
sections=FUTURE,STDLIB,THIRDPARTY,FIRSTPARTY,PGA,LOCALFOLDER
55
default_section=THIRDPARTY
6-
known_pga=pganonymizer
6+
known_pga=pganonymize
77
no_lines_before=LOCALFOLDER
88

CHANGELOG.md

+19-14
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,18 @@
22

33
## Development
44

5+
## 0.8.0 (2022-03-15)
6+
7+
* [#39](https://github.com/rheinwerk-verlag/pganonymize/issues/39): Renamed project to "pganonymize"
8+
* [#38](https://github.com/rheinwerk-verlag/pganonymize/pull/38): Allow environment variables in schema definition ([nurikk](https://github.com/nurikk))
9+
510
## 0.7.0 (2021-11-30)
611

7-
* [#34](https://github.com/rheinwerk-verlag/postgresql-anonymizer/issues/34): Subprocess "run" being used on Python2.7
8-
* [#35](https://github.com/rheinwerk-verlag/postgresql-anonymizer/issues/35): parmap no longer supports Python 2.7
12+
* [#34](https://github.com/rheinwerk-verlag/pganonymize/issues/34): Subprocess "run" being used on Python2.7
13+
* [#35](https://github.com/rheinwerk-verlag/pganonymize/issues/35): parmap no longer supports Python 2.7
914
* Dropped Python 3.5 support
1015
* Pinned libraries Python 2.7
11-
* [#32](https://github.com/rheinwerk-verlag/postgresql-anonymizer/pull/32): Fixed pg_dump arguments ([korsar182](https://github.com/korsar182))
16+
* [#32](https://github.com/rheinwerk-verlag/pganonymize/pull/32): Fixed pg_dump arguments ([korsar182](https://github.com/korsar182))
1217
* Simplified provider registration (no metaclass usage anymore)
1318

1419
## 0.6.1 (2021-07-13)
@@ -17,35 +22,35 @@
1722

1823
## 0.6.0 (2021-07-13)
1924

20-
* [#28](https://github.com/rheinwerk-verlag/postgresql-anonymizer/pull/25): Add json support ([nurikk](https://github.com/nurikk))
21-
* [#27](https://github.com/rheinwerk-verlag/postgresql-anonymizer/pull/25): Better anonymisation ([nurikk](https://github.com/nurikk))
22-
* [#25](https://github.com/rheinwerk-verlag/postgresql-anonymizer/pull/25): Remove column specification for `cursor.copy_from` call ([nurikk](https://github.com/nurikk))
25+
* [#28](https://github.com/rheinwerk-verlag/pganonymize/pull/25): Add json support ([nurikk](https://github.com/nurikk))
26+
* [#27](https://github.com/rheinwerk-verlag/pganonymize/pull/25): Better anonymisation ([nurikk](https://github.com/nurikk))
27+
* [#25](https://github.com/rheinwerk-verlag/pganonymize/pull/25): Remove column specification for `cursor.copy_from` call ([nurikk](https://github.com/nurikk))
2328

2429
## 0.5.0 (2021-06-30)
2530

26-
* [#22](https://github.com/rheinwerk-verlag/postgresql-anonymizer/pull/22): Fix table and column name quotes in `cursor.copy_from` call ([nurikk](https://github.com/nurikk))
27-
* [#23](https://github.com/rheinwerk-verlag/postgresql-anonymizer/pull/23): Allow uniq faker ([nurikk](https://github.com/nurikk))
31+
* [#22](https://github.com/rheinwerk-verlag/pganonymize/pull/22): Fix table and column name quotes in `cursor.copy_from` call ([nurikk](https://github.com/nurikk))
32+
* [#23](https://github.com/rheinwerk-verlag/pganonymize/pull/23): Allow uniq faker ([nurikk](https://github.com/nurikk))
2833

2934
## 0.4.1 (2021-05-27)
3035

31-
* [#19](https://github.com/rheinwerk-verlag/postgresql-anonymizer/pull/19): Make chunk size in the table definition dynamic ([halilkaya](https://github.com/halilkaya))
36+
* [#19](https://github.com/rheinwerk-verlag/pganonymize/pull/19): Make chunk size in the table definition dynamic ([halilkaya](https://github.com/halilkaya))
3237

3338
## 0.4.0 (2021-05-05)
3439

35-
* [#18](https://github.com/rheinwerk-verlag/postgresql-anonymizer/pull/18): Specify (SQL WHERE) search_condition, to filter the table for rows to be anonymized ([bobslee](https://github.com/bobslee))
36-
* [#17](https://github.com/rheinwerk-verlag/postgresql-anonymizer/pull/17): Fix anonymizing error if there is a JSONB column in a table ([koptelovav](https://github.com/koptelovav))
40+
* [#18](https://github.com/rheinwerk-verlag/pganonymize/pull/18): Specify (SQL WHERE) search_condition, to filter the table for rows to be anonymized ([bobslee](https://github.com/bobslee))
41+
* [#17](https://github.com/rheinwerk-verlag/pganonymize/pull/17): Fix anonymizing error if there is a JSONB column in a table ([koptelovav](https://github.com/koptelovav))
3742

3843
## 0.3.3 (2021-04-16)
3944

40-
* [#16](https://github.com/rheinwerk-verlag/postgresql-anonymizer/issues/16): Preserve column and table cases during the copy process
45+
* [#16](https://github.com/rheinwerk-verlag/pganonymize/issues/16): Preserve column and table cases during the copy process
4146

4247
## 0.3.2 (2021-01-25)
4348

44-
* [#15](https://github.com/rheinwerk-verlag/postgresql-anonymizer/pull/15): Fix for exclude bug ([abhinavvaidya90](https://github.com/abhinavvaidya90))
49+
* [#15](https://github.com/rheinwerk-verlag/pganonymize/pull/15): Fix for exclude bug ([abhinavvaidya90](https://github.com/abhinavvaidya90))
4550

4651
## 0.3.1 (2020-12-04)
4752

48-
* [#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))
53+
* [#13](https://github.com/rheinwerk-verlag/pganonymize/pull/13): Fixed a syntax error if no truncated tables are defined ([ray-man](https://github.com/ray-man))
4954

5055
## 0.3.0 (2020-02-11)
5156

MANIFEST.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ include LICENSE.rst
22
include README.rst
33
include CHANGELOG.md
44

5-
recursive-include pganonymizer *.html *.js *.css *.png *.gif*.jpg *.jpeg *.svg *.po
5+
recursive-include pganonymize *.html *.js *.css *.png *.gif*.jpg *.jpeg *.svg *.po

Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
BROWSER ?= xdg-open
2-
PYTHON_PACKAGE = pganonymizer
2+
PYTHON_PACKAGE = pganonymize
33
TESTS_PACKAGE = tests
44

55
.PHONY: clean clean-test clean-pyc clean-build docs help
@@ -61,4 +61,4 @@ test:
6161
@poetry run pytest --cov=poetry --cov-config .coveragerc tests/ -sq
6262

6363
test-all: ## run tests on every Python version with tox
64-
@tox
64+
@tox

README.rst

+9-8
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
PostgreSQL Anonymizer
2-
=====================
1+
pganonymize
2+
===========
33

44
A commandline tool to anonymize PostgreSQL databases for DSGVO/GDPR purposes.
55

6-
It uses a YAML file to define which tables and fields should be anonymized and provides various methods of anonymization. The tool requires a direct PostgreSQL connection to perform the anonymization.
6+
It uses a YAML file to define which tables and fields should be anonymized and provides various methods of
7+
anonymization. The tool requires a direct PostgreSQL connection to perform the anonymization.
78

89
.. class:: no-web no-pdf
910

@@ -136,15 +137,15 @@ If you want to run the anonymizer within a Docker container you first have to bu
136137
137138
.. code-block:: sh
138139
139-
$ docker build -t pganonymizer .
140+
$ docker build -t pganonymize .
140141
141142
After that you can pass a schema file to the container, using Docker volumes, and call the anonymizer:
142143
143144
.. code-block:: sh
144145
145146
$ docker run \
146147
-v <path to your schema>:/schema.yml \
147-
-it pganonymizer \
148+
-it pganonymize \
148149
/usr/local/bin/pganonymize \
149150
--schema=/schema.yml \
150151
--dbname=<database> \
@@ -157,13 +158,13 @@ After that you can pass a schema file to the container, using Docker volumes, an
157158
.. _uuid4: https://www.postgresql.org/docs/current/datatype-uuid.html
158159
.. _documentation: https://python-postgresql-anonymizer.readthedocs.io/en/latest/
159160
.. _schema documentation: https://python-postgresql-anonymizer.readthedocs.io/en/latest/schema.html
160-
.. _YAML sample schema: https://github.com/rheinwerk-verlag/postgresql-anonymizer/blob/master/sample_schema.yml
161+
.. _YAML sample schema: https://github.com/rheinwerk-verlag/pganonymize/blob/master/sample_schema.yml
161162
162163
.. |python| image:: https://img.shields.io/pypi/pyversions/pganonymize
163164
:alt: PyPI - Python Version
164165
165166
.. |license| image:: https://img.shields.io/badge/license-MIT-green.svg
166-
:target: https://github.com/rheinwerk-verlag/postgresql-anonymizer/blob/master/LICENSE.rst
167+
:target: https://github.com/rheinwerk-verlag/pganonymize/blob/master/LICENSE.rst
167168
168169
.. |pypi| image:: https://badge.fury.io/py/pganonymize.svg
169170
:target: https://badge.fury.io/py/pganonymize
@@ -173,7 +174,7 @@ After that you can pass a schema file to the container, using Docker volumes, an
173174
:alt: Download count
174175
175176
.. |build| image:: https://github.com/rheinwerk-verlag/postgresql-anonymizer/workflows/Test/badge.svg
176-
:target: https://github.com/rheinwerk-verlag/postgresql-anonymizer/actions
177+
:target: https://github.com/rheinwerk-verlag/pganonymize/actions
177178
178179
.. |health| image:: https://snyk.io/advisor/python/pganonymize/badge.svg
179180
:target: https://snyk.io/advisor/python/pganonymize

docs/Makefile

+4-4
Original file line numberDiff line numberDiff line change
@@ -85,17 +85,17 @@ qthelp:
8585
@echo
8686
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
8787
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
88-
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/pganonymizer.qhcp"
88+
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/pganonymize.qhcp"
8989
@echo "To view the help file:"
90-
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/pganonymizer.qhc"
90+
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/pganonymize.qhc"
9191

9292
devhelp:
9393
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
9494
@echo
9595
@echo "Build finished."
9696
@echo "To view the help file:"
97-
@echo "# mkdir -p $$HOME/.local/share/devhelp/pganonymizer"
98-
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/pganonymizer"
97+
@echo "# mkdir -p $$HOME/.local/share/devhelp/pganonymize"
98+
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/pganonymize"
9999
@echo "# devhelp"
100100

101101
epub:

docs/api.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ API
44
.. toctree::
55
:maxdepth: 4
66

7-
pganonymizer
7+
pganonymize

docs/conf.py

+11-11
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env python
22
# -*- coding: utf-8 -*-
33
#
4-
# pganonymizer documentation build configuration file
4+
# pganonymize documentation build configuration file
55
#
66
# This file is execfile()d with the current directory set to its
77
# containing dir.
@@ -33,7 +33,7 @@
3333
# exec version.py instead of importing it. Importing may trigger unwanted
3434
# side-effects (if autodoc is used, the pypackage may be imported anyway).
3535
meta = {}
36-
exec(open(os.path.join(project_root, 'pganonymizer', 'version.py')).read(), {}, meta)
36+
exec(open(os.path.join(project_root, 'pganonymize', 'version.py')).read(), {}, meta)
3737

3838
# -- General configuration ---------------------------------------------
3939

@@ -61,7 +61,7 @@
6161
master_doc = 'index'
6262

6363
# General information about the project.
64-
project = u'PostgreSQL Anonymizer'
64+
project = u'pganonymize'
6565
copyright = u'2019, Rheinwerk Verlag GmbH, Henning Kage'
6666

6767
# The version info for the project you're documenting, acts as replacement
@@ -194,7 +194,7 @@
194194
#html_file_suffix = None
195195

196196
# Output file base name for HTML help builder.
197-
htmlhelp_basename = 'pganonymizerdoc'
197+
htmlhelp_basename = 'pganonymizedoc'
198198

199199

200200
# -- Options for LaTeX output ------------------------------------------
@@ -214,8 +214,8 @@
214214
# (source start file, target name, title, author, documentclass
215215
# [howto/manual]).
216216
latex_documents = [
217-
('index', 'pganonymizer.tex',
218-
u'PostgreSQL Anonymizer Documentation',
217+
('index', 'pganonymize.tex',
218+
u'pganonymize Documentation',
219219
u'Henning Kage', 'manual'),
220220
]
221221

@@ -245,8 +245,8 @@
245245
# One entry per manual page. List of tuples
246246
# (source start file, name, description, authors, manual section).
247247
man_pages = [
248-
('index', 'pganonymizer',
249-
u'PostgreSQL Anonymizer Documentation',
248+
('index', 'pganonymize',
249+
u'pganonymize Anonymizer Documentation',
250250
[u'Henning Kage'], 1)
251251
]
252252

@@ -260,10 +260,10 @@
260260
# (source start file, target name, title, author,
261261
# dir menu entry, description, category)
262262
texinfo_documents = [
263-
('index', 'pganonymizer',
264-
u'PostgreSQL Anonymizer Documentation',
263+
('index', 'pganonymize',
264+
u'pganonymize Documentation',
265265
u'Henning Kage',
266-
'pganonymizer',
266+
'pganonymize',
267267
'A cookiecutter template for Rheinwerk Python packages',
268268
'Miscellaneous'),
269269
]

docs/index.rst

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Contents:
1414
deploy
1515
license
1616
changelog
17+
links
1718

1819

1920
Indices and tables

docs/links.rst

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
Links
2+
=====
3+
4+
The following links refer to projects that have a similar purpose of anonymizing a PostgreSQL database. Thanks to the
5+
authors of these projects. Some of them inspired the author of this project, e.g. `pgantomizer`_ for using a human
6+
readable declaration file in YAML.
7+
8+
* `PostgreSQL Anonymizer`_: Anonymization & Data Masking for PostgreSQL
9+
* `pg-anonymizer`_: Dump anonymized PostgreSQL database with a NodeJS CLI
10+
* `pgantomizer`_: Anonymize data in your PostgreSQL dabatase with ease
11+
12+
.. _PostgreSQL Anonymizer: https://gitlab.com/dalibo/postgresql_anonymizer
13+
.. _pg-anonymizer: https://github.com/rap2hpoutre/pg-anonymizer
14+
.. _pgantomizer: https://github.com/asgeirrr/pgantomizer
+14-14
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,53 @@
1-
pganonymizer package
1+
pganonymize package
22
====================
33

44
Submodules
55
----------
66

7-
pganonymizer.cli module
7+
pganonymize.cli module
88
-----------------------
99

10-
.. automodule:: pganonymizer.cli
10+
.. automodule:: pganonymize.cli
1111
:members:
1212
:undoc-members:
1313
:show-inheritance:
1414

15-
pganonymizer.constants module
15+
pganonymize.constants module
1616
-----------------------------
1717

18-
.. automodule:: pganonymizer.constants
18+
.. automodule:: pganonymize.constants
1919
:members:
2020
:undoc-members:
2121
:show-inheritance:
2222

23-
pganonymizer.exceptions module
23+
pganonymize.exceptions module
2424
------------------------------
2525

26-
.. automodule:: pganonymizer.exceptions
26+
.. automodule:: pganonymize.exceptions
2727
:members:
2828
:undoc-members:
2929
:show-inheritance:
3030

31-
pganonymizer.providers module
31+
pganonymize.providers module
3232
-----------------------------
3333

34-
.. automodule:: pganonymizer.providers
34+
.. automodule:: pganonymize.providers
3535
:members:
3636
:undoc-members:
3737
:show-inheritance:
3838

39-
pganonymizer.utils module
39+
pganonymize.utils module
4040
-------------------------
4141

42-
.. automodule:: pganonymizer.utils
42+
.. automodule:: pganonymize.utils
4343
:members:
4444
:undoc-members:
4545
:show-inheritance:
4646

47-
pganonymizer.version module
47+
pganonymize.version module
4848
---------------------------
4949

50-
.. automodule:: pganonymizer.version
50+
.. automodule:: pganonymize.version
5151
:members:
5252
:undoc-members:
5353
:show-inheritance:
@@ -56,7 +56,7 @@ pganonymizer.version module
5656
Module contents
5757
---------------
5858

59-
.. automodule:: pganonymizer
59+
.. automodule:: pganonymize
6060
:members:
6161
:undoc-members:
6262
:show-inheritance:

0 commit comments

Comments
 (0)