Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python 2.7 tests are failing #55

Merged
merged 78 commits into from
Mar 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
9226dea
#53: Changed CHANGELOG and CONTRIBUTING to markdown
hkage Mar 12, 2024
2e59508
#53: Added splitted Python 2 and 3 requirements
hkage Mar 12, 2024
a8e0e53
#53: Added changelog entry
hkage Mar 12, 2024
5eba64b
#53: Updated the workflows
hkage Mar 12, 2024
968cb5a
#53: Removed obsolete Python version
hkage Mar 12, 2024
812453e
#55: Fixed the test workflow
hkage Mar 14, 2024
90c1630
#55: Fixed the Github links for the contributing page
hkage Mar 14, 2024
fdbe485
#53: Use the python 3.12 slim image
hkage Mar 14, 2024
351375c
#53: Updated the changelog
hkage Mar 14, 2024
28ca811
#53: Updated the dev requirements
hkage Mar 14, 2024
022f92b
#53: Updated the dev requirements
hkage Mar 14, 2024
9c5c27a
#53: Changed the coverage job
hkage Mar 14, 2024
a858ea3
#53: Re-added obsolete Python 3 versions
hkage Mar 14, 2024
5e522ab
#53: Fixed the test job
hkage Mar 14, 2024
fad690c
#53: Pinned attrs for Python 3.4/3.5
hkage Mar 14, 2024
6c96429
#53: Pinned attrs for Python 3.4/3.5
hkage Mar 14, 2024
e4a73c1
#53: Pinned attrs for Python 3.4/3.5
hkage Mar 14, 2024
ac3947d
#53: Updated requirements
hkage Mar 14, 2024
64671fd
#53: Simplified requirements
hkage Mar 14, 2024
b83ea1d
#53: Updated requirements
hkage Mar 14, 2024
ec65f3c
#53: Updated requirements
hkage Mar 14, 2024
2216065
#53: Updated requirements
hkage Mar 14, 2024
be4b4a5
#53: Updated tox requirements
hkage Mar 14, 2024
413dc2f
#53: Updated tox requirements
hkage Mar 14, 2024
0db301d
#53: Updated tox requirements
hkage Mar 14, 2024
7e17dd3
#53: Updated tox requirements
hkage Mar 14, 2024
ce5620e
#53: Updated tox requirements
hkage Mar 14, 2024
657f1b0
#53: Updated tox requirements
hkage Mar 14, 2024
6fb567d
#53: Updated tox requirements
hkage Mar 14, 2024
a20f1bc
#53: Updated tox requirements
hkage Mar 14, 2024
1053d42
#53: Removed Python 3.4 support
hkage Mar 14, 2024
a40ef63
#53: Fixed tox requirements
hkage Mar 14, 2024
9eedf32
#53: Fixed tox requirements
hkage Mar 14, 2024
de1a69e
#53: Fixed tox requirements
hkage Mar 14, 2024
8054c8b
#53: Updated Sphinx doc generation
hkage Mar 14, 2024
ce9ba83
#53: Updated tox requirements
hkage Mar 14, 2024
9564f14
#53: Updated tox requirements
hkage Mar 14, 2024
1dc6800
#53: Fixed the test workflow
hkage Mar 14, 2024
0e4899f
#53: Added test for PyPI publish via trusted publisher
hkage Mar 14, 2024
c2f17a3
#53: Added test for PyPI publish via trusted publisher
hkage Mar 14, 2024
0531551
#53: Added test for PyPI publish via trusted publisher
hkage Mar 14, 2024
7cd107b
#53: Added test for PyPI publish via trusted publisher
hkage Mar 14, 2024
635922a
#53: Added test for PyPI publish via trusted publisher
hkage Mar 14, 2024
74abdd0
#53: Added test workflow
hkage Mar 14, 2024
68b2d49
#53: Added test workflow
hkage Mar 14, 2024
a9e40a6
#53: Added test workflow
hkage Mar 14, 2024
94fbbe8
#53: Added test workflow
hkage Mar 14, 2024
d5cc13e
#53: Updated publish workflow
hkage Mar 14, 2024
f1da014
#53: Updated publish workflow
hkage Mar 14, 2024
6d1474e
#53: Removed test workflow
hkage Mar 14, 2024
a875626
#53: Removed the new publish workflow changes
hkage Mar 14, 2024
37bb118
#53: Removed the new publish workflow changes
hkage Mar 14, 2024
f77553f
#53: Updated the changelog
hkage Mar 14, 2024
a6441b3
#53: Updated checkout action to v4
hkage Mar 15, 2024
5314471
#53: Skip installing the default dependencies from the setup.py
hkage Mar 15, 2024
751a44a
#53: Added missing pgcopy test dependency
hkage Mar 15, 2024
8f4eddf
#53: Added missing tqdm requirement
hkage Mar 15, 2024
b918801
#53: Fixed the pyyaml dependency for the tox.ini
hkage Mar 15, 2024
a4cd418
#53: Fixed the pgcopy requirement for tox
hkage Mar 15, 2024
636244a
#53: Fixed the pgcopy requirement for tox
hkage Mar 15, 2024
f7dba50
#53: Fixed the psycopg2 requirement
hkage Mar 15, 2024
0a69a2d
#53: Try to install psycopg2 instead of the binary
hkage Mar 15, 2024
5868814
#53: Fixed the psycopg2 requirement
hkage Mar 15, 2024
154a3f4
#53: Fixed the psycopg2 requirement
hkage Mar 15, 2024
ffb3e7f
#53: Merge with development
hkage Mar 18, 2024
5631e25
#53: Update Python header files
hkage Mar 18, 2024
bcaeef0
#53: Force install
hkage Mar 18, 2024
88b4d3c
#53: Fixed typo
hkage Mar 18, 2024
7d74252
#53: Install psycopg2 requirements for Python 2 and 3
hkage Mar 18, 2024
77fb5ac
#53: Use Codecov for the coverage report
hkage Mar 18, 2024
e4ace25
#53: Updated pytest versions
hkage Mar 18, 2024
be46c07
#53: Updated pytest versions
hkage Mar 18, 2024
90ef262
#53: Updated pytest versions
hkage Mar 18, 2024
ae347cb
#53: Updated pytest versions
hkage Mar 18, 2024
0718ee3
#53: Updated six version
hkage Mar 18, 2024
96efcd5
#53: Updated the badge URLs
hkage Mar 18, 2024
7aeaded
#53: Updated the README
hkage Mar 18, 2024
af369a9
#53: Updated the README
hkage Mar 18, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 42 additions & 34 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,49 +3,57 @@ name: Test
on: [push]

jobs:
linting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox
- name: Lint
run: tox -e flake8
tests:
needs: linting
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10']
env:
PYTHON: ${{ matrix.python-version }}
image:
- 'python:2.7-buster'
- 'python:3.6-bullseye'
- 'python:3.7-bookworm'
- 'python:3.8-bookworm'
- 'python:3.9-bookworm'
- 'python:3.10-bookworm'
- 'python:3.11-bookworm'
- 'python:3.12-bookworm'
container:
image: ${{ matrix.image }}
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
id: setup-python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
- name: Set environment variables
run: |
python -m pip install --upgrade pip
pip install --use-pep517 tox "coverage<5"
- name: Run tests
echo "PYTHON=$(echo '${{ matrix.image }}' | sed -r 's/^python:([0-9]+)\.([0-9]+).*$/\1.\2/g')" >> $GITHUB_ENV
echo "TOXFACTOR=$(echo '${{ matrix.image }}' | sed -r 's/^python:([0-9]+)\.([0-9]+).*$/py\1\2/g')" >> $GITHUB_ENV
- name: Install psycopg2 requirements
run: |
export TOXENV=$(echo "py${{ matrix.python-version }}" | sed 's/\.//g')
tox -- -p no:warnings
apt update
apt-get -y install python-dev
if: matrix.image == 'python:2.7-buster'
- name: Install psycopg2 requirements
run: |
apt update
apt-get -y install python3-dev
if: matrix.image != 'python:2.7-buster'
- name: Install importlib-metadata for older Python versions
run: pip install "importlib-metadata<3"
if: >-
matrix.image == 'python:2.7-buster' ||
matrix.image == 'python:3.6-bullseye' ||
matrix.image == 'python:3.7-bookworm'
- name: Install test utilities
run: pip install "tox<4" tox-factor "coverage<5"
- name: Lint with flake8
run: tox -e flake8
if: matrix.image == 'python:3.12-bookworm'
- name: Test via tox
run: tox -- -p no:warnings
- name: Generate coverage report
run: coverage html
run: coverage xml
if: ${{ success() }}
- name: Upload coverage data
uses: actions/upload-artifact@v3
- name: Upload coverage report
uses: codecov/codecov-action@v4
with:
name: coverage
path: htmlcov
if-no-files-found: ignore
files: coverage.xml
flags: unittests
token: ${{ secrets.CODECOV_TOKEN }}
if: ${{ success() }}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,11 @@ coverage.xml

# Sphinx documentation
docs/_build/
docs/_api

# PyBuilder
target/

# IDEs
.idea/
.vscode/
.vscode/
116 changes: 116 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
# Changelog

## Development

* [#53 Python 2.7 tests are failing](https://github.com/rheinwerk-verlag/pganonymize/issues/53)
* Dropped Python 3.6, 3.7 support
* Split development requirements for Python 2 and 3
* Use markdown for the changelog and contributing docs
* [#56 Add Trusted Publisher Management workflow](https://github.com/rheinwerk-verlag/pganonymize/issues/56)

## 0.11.0 (2024-02-29)

* [#52 Add update_json provider](https://github.com/rheinwerk-verlag/pganonymize/pull/52) ([bobslee](https://github.com/bobslee))

## 0.10.0 (2022-11-29)

* [#49 Configure psycopg2 to support UUID objects](https://github.com/rheinwerk-verlag/pganonymize/pull/49)
* [#48 Add support for localized "Faker" data](https://github.com/rheinwerk-verlag/pganonymize/pull/48)

## 0.9.0 (2022-11-23)

* [#46 Broken Python 2.7 compatibility](https://github.com/rheinwerk-verlag/pganonymize/pull/46)
* [#45 Add partial masked provider](https://github.com/rheinwerk-verlag/pganonymize/pull/45) ([Tilley](https://github.com/Tilley/))
* [#44 Pass kwargs through to faker functions from schema](https://github.com/rheinwerk-verlag/pganonymize/pull/44)([Tilley](https://github.com/Tilley>))

## 0.8.0 (2022-03-15)

* [#39 Renamed project to "pganonymize"](https://github.com/rheinwerk-verlag/pganonymize/issues/39)
* [#38 Allow environment variables in schema definition](https://github.com/rheinwerk-verlag/pganonymize/pull/38) ([nurikk](https://github.com/nurikk))

## 0.7.0 (2021-11-30)

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

## 0.6.1 (2021-07-13)

* Added missing dependencies for the `setup.py`

## 0.6.0 (2021-07-13)

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

## 0.5.0 (2021-06-30)

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

## 0.4.1 (2021-05-27)

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

## 0.4.0 (2021-05-05)

* [#18 Specify (SQL WHERE) search_condition, to filter the table for rows to be anonymized](https://github.com/rheinwerk-verlag/pganonymize/pull/18) (`bobslee <https://github.com/bobslee>`_)
* [#17 Fix anonymizing error if there is a JSONB column in a table](https://github.com/rheinwerk-verlag/pganonymize/pull/17) ([koptelovav](https://github.com/koptelovav))

## 0.3.3 (2021-04-16)

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

## 0.3.2 (2021-01-25)

* [#15 Fix for exclude bug](https://github.com/rheinwerk-verlag/pganonymize/pull/15) ([abhinavvaidya90](https://github.com/abhinavvaidya90))

## 0.3.1 (2020-12-04)

* [#13 Fixed a syntax error if no truncated tables are defined](https://github.com/rheinwerk-verlag/pganonymize/pull/13) ([ray-man](https://github.com/ray-man))

## 0.3.0 (2020-02-11)

* Use [`python-poetry`](https://github.com/python-poetry/poetry) for requirements management
* Added commandline argument to list all available providers (#4)
* Added commandline argument to create a dump file (#5)
* Execute table truncation in one statement to avoid foreign key constraint errors (thanks to [W1ldPo1nter](https://github.com/W1ldPo1nter))

## 0.2.4 (2020-01-03)

* Fixed several issues with the usage of ``dict.keys`` and Python 3

## 0.2.3 (2020-01-02)

* Fixed the wrong cStringIO import for Python 3
* Removed Travis-CI file in favor of the Github actions

## 0.2.2 (2020-01-02)

* Hide the progressbar completely if verbose is set to ``False``
* Restructured the requirement files and added flake8 to Travis CI

## 0.2.1 (2019-12-20)

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

## 0.2.0 (2019-12-20)

* Added provider classes
* Added new providers:
* choice - returns a random list element
* mask - replaces the original value with a static sign

## 0.1.1 (2019-12-18)

Changed setup.py

## 0.1.0 (2019-12-16)

Initial release of the prototype
135 changes: 0 additions & 135 deletions CHANGELOG.rst

This file was deleted.

Loading
Loading