Skip to content

Commit 50b3df3

Browse files
committed
Merge branch 'development'
2 parents 18037c8 + 884e02b commit 50b3df3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+3312
-636
lines changed

.flake8

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[flake8]
2+
max-line-length = 120
3+
ignore = E731,W504
4+
exclude =
5+
dist
6+
docs
7+
setup.py
8+
get-poetry.py
9+
.tox
10+
.git
11+
.eggs
12+
.venv
13+
.vscode
14+
.github

.github/workflows/python_test.yml

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
name: Test
22

3-
on: [push]
3+
on: [push, pull_request]
44

55
jobs:
6-
build:
7-
6+
7+
testing:
88
runs-on: ubuntu-latest
99
strategy:
1010
max-parallel: 4
@@ -17,13 +17,25 @@ jobs:
1717
uses: actions/setup-python@v1
1818
with:
1919
python-version: ${{ matrix.python-version }}
20-
- name: Install dependencies
20+
- name: Install and set up Poetry
2121
run: |
22-
python -m pip install --upgrade pip
23-
pip install -r requirements/test.txt
24-
- name: Lint with flake8
22+
python get-poetry.py --preview -y
23+
source $HOME/.poetry/env
24+
poetry config virtualenvs.in-project true
25+
- name: Set up cache
26+
uses: actions/cache@v1
27+
with:
28+
path: .venv
29+
key: ${{ runner.os }}-venv-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }}
30+
- name: Install dependencies
2531
run: |
26-
make flake8
32+
source $HOME/.poetry/env
33+
poetry install
2734
- name: Test with pytest
2835
run: |
29-
pytest
36+
source $HOME/.poetry/env
37+
poetry run pytest -q tests
38+
- name: Lint with flake8
39+
run: |
40+
source $HOME/.poetry/env
41+
poetry run flake8

.pylintrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[MESSAGES CONTROL]
2+
# disable:
3+
# C0301: "Line too long", because it's already check by flake8
4+
# I0011: "Locally disabling ...", because it was disabled for a reason
5+
disable=C0301,I0011

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
## Development
44

5+
## 0.3.0 (2020-02-11)
6+
7+
* Use [python-poetry](https://github.com/python-poetry/poetry) for requirements management
8+
* Added commandline argument to list all available providers (#4)
9+
* Added commandline argument to create a dump file (#5)
10+
* Execute table truncation in one statement to avoid foreign key constraint errors (thanks to [W1ldPo1nter](https://github.com/W1ldPo1nter))
11+
512
## 0.2.4 (2020-01-03)
613

714
* Fixed several issues with the usage of ``dict.keys`` and Python 3
@@ -19,7 +26,7 @@
1926
## 0.2.1 (2019-12-20)
2027

2128
* Added field based, regular expression excludes (to skip data under certain conditions).
22-
Currently only regular expressions are supported and the exlusion affects the whole row,
29+
Currently only regular expressions are supported and the exclusion affects the whole row,
2330
not just one single column.
2431

2532
## 0.2.0 (2019-12-20)

Dockerfile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
FROM python:3.8.1-slim
2+
3+
LABEL maintainer="[email protected]"
4+
5+
RUN apt-get update -y \
6+
&& apt-get upgrade -y \
7+
&& apt-get install -y libpq-dev python3-pip \
8+
&& pip install -U pip \
9+
&& pip install pganonymize psycopg2-binary \
10+
&& apt-get clean \
11+
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

LICENSE.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1+
License
2+
=======
3+
14
The MIT License
25

3-
Copyright (c) 2019, Rheinwerk Verlag GmbH
6+
Copyright (c) 2019-2020, Rheinwerk Verlag GmbH
47

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

Makefile

Lines changed: 7 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -41,51 +41,9 @@ clean-pyc: ## remove Python file artifacts
4141

4242
clean-test: ## remove test and coverage artifacts
4343
rm -fr .tox/
44-
rm -f .coverage
45-
rm -fr reports/
46-
47-
test: ## run tests quickly with the default Python
48-
python setup.py test
49-
50-
test-all: ## run tests on every Python version with tox
51-
tox
52-
53-
pylint: ## run style checks and static analysis with pylint
54-
@-mkdir -p reports/
55-
@-pylint $(PYTHON_PACKAGE) -r n --msg-template="{path}:{line}: [{msg_id}({symbol}), {obj}] {msg}" > reports/pylint.txt
56-
@echo "See reports/pylint.txt"
57-
@-pylint $(PYTHON_PACKAGE)
5844

5945
flake8: ## run style checks and static analysis with flake8
60-
@-mkdir -p reports/
61-
flake8 $(PYTHON_PACKAGE) $(TESTS_PACKAGE) --format='%(path)s:%(row)d: [%(code)s(%(code)s), ] %(text)s' --output-file=reports/flake8.txt --tee
62-
63-
docstrings: ## check docstring presence and style conventions with pydocstyle
64-
pydocstyle $(PYTHON_PACKAGE)
65-
66-
lint: flake8 docstrings pylint
67-
68-
coverage: ## check code coverage quickly with the default Python
69-
py.test --cov-report html:reports/htmlcov --cov-report xml:reports/coverage.xml
70-
@echo "See reports/htmlcov/index.html"
71-
72-
metrics: ## print code metrics with radon
73-
radon raw -s $(PYTHON_PACKAGE) $(TEST_PACKAGE)
74-
radon cc -s $(PYTHON_PACKAGE) $(TEST_PACKAGE)
75-
radon mi -s $(PYTHON_PACKAGE) $(TEST_PACKAGE)
76-
77-
docs: ## generate Sphinx HTML documentation, including API docs
78-
rm -f docs/$(PYTHON_PACKAGE).rst
79-
rm -f docs/modules.rst
80-
sphinx-apidoc --no-toc -o docs/ $(PYTHON_PACKAGE)
81-
$(MAKE) -C docs clean
82-
$(MAKE) -C docs html
83-
@echo "See docs/_build/html/index.html"
84-
85-
docs-open:
86-
$(BROWSER) docs/_build/html/index.html
87-
88-
docs-all: docs docs-open
46+
@poetry run flake8
8947

9048
release: clean ## package and upload a release
9149
python setup.py sdist upload
@@ -98,3 +56,9 @@ dist: clean ## builds source and wheel package
9856

9957
install: clean ## install the package to the active Python's site-packages
10058
python setup.py install
59+
60+
test:
61+
@poetry run pytest --cov=poetry --cov-config .coveragerc tests/ -sq
62+
63+
test-all: ## run tests on every Python version with tox
64+
@tox

0 commit comments

Comments
 (0)