Skip to content

Commit

Permalink
Merge pull request #15 from akaihola/release-1.0.0
Browse files Browse the repository at this point in the history
Release 1.0.0
  • Loading branch information
akaihola authored Sep 12, 2021
2 parents 6794f2f + d112012 commit 3626fa2
Show file tree
Hide file tree
Showing 6 changed files with 105 additions and 19 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: build

on:
push:
branches:
- master
pull_request:
branches:
- master


jobs:
build:

runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: [3.7, 3.8, 3.9]

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: >
pip install -e '.[test]'
- name: Test with pytest
run: >
pytest
- name: Check formatting and linting with Darker
run: >
darker
--diff
--check
--revision=origin/master...
--isort
--lint=pylint
--lint=flake8
.
- name: Do static type checking with Mypy
run: >
mypy .
10 changes: 0 additions & 10 deletions .travis.yml

This file was deleted.

38 changes: 38 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
Upcoming
========


1.0.0 / 2021-09-11
===================

Added
-----

- Type hints
- Contributors list
- Install instructions in the README file
- Support only Python 3.7 and later
- Flush last line in ``pg_dump_splitsort.py``
- ``pg_split_schema_dump.py`` for splitting a schema-only dump into multiple SQL files


0.9.1 / 2015-03-10
==================

Added
-----

Document ``pg_incremental_backup.py`` in the README file


0.9 / 2015-03-10
================

Added
-----

- The ``pg_incremental_backup.py`` script with remote repository URL as an optional
command line argument
- The New (3-clause) BSD license
- Unit tests, a ``setup.py`` script and a README file with a usage example
- ``pg_dump_splitsort.py`` for sorting and splitting ``pg_dump`` output
4 changes: 1 addition & 3 deletions pgtricks/pg_dump_splitsort.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
#!/usr/bin/env python

import functools
import io
import os
import re
from typing import Tuple, Union, cast, Pattern, Match, Optional, List, IO, Any

import sys
from typing import IO, List, Match, Optional, Pattern, Tuple, Union, cast

COPY_RE = re.compile(r'COPY .*? \(.*?\) FROM stdin;\n$')

Expand Down
13 changes: 8 additions & 5 deletions pgtricks/tests/test_pg_split_schema_dump.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
"""Tests for :mod:`pgtricks.pg_split_schema_dump`"""

import os
import warnings
from textwrap import dedent

Expand Down Expand Up @@ -134,10 +137,10 @@ def test_split_sql_file_unrecognized_content(tmpdir):
'public.table2.TABLE',
}
assert len(caught_warnings) == 1
cw = str(caught_warnings[0].message).replace(str(tmpdir), '')
assert cw == dedent(
'''\
Can't identify the following SQL chunk in /test.sql:
caught_warnings_text = str(caught_warnings[0].message).replace(str(tmpdir), "")
assert caught_warnings_text == dedent(
f"""\
Can't identify the following SQL chunk in {os.sep}test.sql:
=============================================================================
Expand All @@ -146,5 +149,5 @@ def test_split_sql_file_unrecognized_content(tmpdir):
--
(information for the unidentified content goes here)
============================================================================='''
============================================================================="""
)
11 changes: 10 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = pgtricks
version = 0.9.2.dev
version = 1.0.0
author = Antti Kaihola
author_email = [email protected]
license = BSD
Expand All @@ -16,6 +16,7 @@ classifiers =
Operating System :: OS Independent
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Topic :: Database
Topic :: System :: Archiving :: Backup
keywords =
Expand All @@ -41,5 +42,13 @@ console_scripts =

[options.extras_require]
test =
darker[isort]
flake8
mypy
pylint
pytest
pytest-mypy

[flake8]
max-line-length = 88
extend-ignore = E203

0 comments on commit 3626fa2

Please sign in to comment.