Skip to content

Commit

Permalink
modernize CI setup
Browse files Browse the repository at this point in the history
- use GitHub Actions for CI
- use pre-commit (black, flake8, pyupgrade)
- add support for Python 3.9
  • Loading branch information
jugmac00 committed Jan 20, 2021
1 parent 701ed3b commit 21918f2
Show file tree
Hide file tree
Showing 11 changed files with 60 additions and 246 deletions.
11 changes: 10 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
repos:
- repo: https://github.com/psf/black
rev: stable
rev: 20.8b1
hooks:
- id: black
- repo: https://gitlab.com/pycqa/flake8
rev: "3.8.4"
hooks:
- id: flake8
- repo: https://github.com/asottile/pyupgrade
rev: v2.7.4
hooks:
- id: pyupgrade
args: [--py36-plus]
27 changes: 0 additions & 27 deletions .travis.yml

This file was deleted.

2 changes: 2 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ CHANGES

- Make Python 3.6 the minimal version

- Use GitHub Actions for CI.

0.8 (2016-12-28)
================

Expand Down
2 changes: 2 additions & 0 deletions CREDITS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@ CREDITS

* Denis Krienbühl (bug reports)

* Jürgen Gmach (CI)

* Special thanks to CONTACT software.
23 changes: 14 additions & 9 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
.. image:: https://github.com/morepath/more.transaction/workflows/CI/badge.svg?branch=master
:target: https://github.com/morepath/more.transaction/actions?workflow=CI
:alt: CI Status

.. image:: https://coveralls.io/repos/github/morepath/more.transaction/badge.svg?branch=master
:target: https://coveralls.io/github/morepath/more.transaction?branch=master

.. image:: https://img.shields.io/pypi/v/more.transaction.svg
:target: https://pypi.org/project/more.transaction/

.. image:: https://img.shields.io/pypi/pyversions/more.transaction.svg
:target: https://pypi.org/project/more.transaction/


more.transaction: SQLAlchemy and ZODB integration for Morepath
==============================================================

Expand All @@ -9,12 +23,3 @@ See https://github.com/morepath/morepath_sqlalchemy for a demo.
.. _transaction: https://pypi.python.org/pypi/transaction

.. _Morepath: http://morepath.readthedocs.org

Build Status
------------

.. image:: https://travis-ci.com/morepath/more.transaction.svg?branch=master
:target: https://travis-ci.com/morepath/more.transaction

.. image:: https://coveralls.io/repos/morepath/more.transaction/badge.svg?branch=master
:target: https://coveralls.io/r/morepath/more.transaction?branch=master
170 changes: 0 additions & 170 deletions bootstrap.py

This file was deleted.

4 changes: 2 additions & 2 deletions more/transaction/tests/test_default_commit_veto.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def test_it_true_x_tm_anythingelse():
assert callFUT(response)


class DummyRequest(object):
class DummyRequest:
path_info = "/"

def __init__(self):
Expand All @@ -71,7 +71,7 @@ def make_body_seekable(self):
self.made_seekable += 1


class DummyResponse(object):
class DummyResponse:
def __init__(self, status="200 OK", headers=None):
self.status = status
if headers is None:
Expand Down
20 changes: 10 additions & 10 deletions more/transaction/tests/test_transaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class TestApp(TransactionApp):
attempts = 0

@TestApp.path("/{type}/{id}")
class Document(object):
class Document:
def __init__(self, type, id):
self.type = type
self.id = id
Expand Down Expand Up @@ -43,7 +43,7 @@ class TestApp(TransactionApp):
attempts = 0

@TestApp.path("/foo/bar")
class Foo(object):
class Foo:
pass

@TestApp.view(model=Foo)
Expand All @@ -59,7 +59,7 @@ def view_foo(self, request):
# if the unconsumed path is reset wrongly, it'll accidentally pick
# up this model instead of Foo
@TestApp.path("/bar/foo")
class Bar(object):
class Bar:
pass

@TestApp.view(model=Bar)
Expand Down Expand Up @@ -88,7 +88,7 @@ def mount_testapp():
return TestApp()

@TestApp.path("/sub")
class Foo(object):
class Foo:
pass

@TestApp.view(model=Foo)
Expand Down Expand Up @@ -329,18 +329,18 @@ def handler(request):
assert txn.committed


class DummySettingsSectionContainer(object):
class DummySettingsSectionContainer:
def __init__(self):
self.transaction = DummyTransactionSettingSection()


class DummyTransactionSettingSection(object):
class DummyTransactionSettingSection:
def __init__(self):
self.attempts = 1
self.commit_veto = None


class DummyApp(object):
class DummyApp:
def __init__(self):
self.settings = DummySettingsSectionContainer()

Expand Down Expand Up @@ -372,7 +372,7 @@ def get(self):
return self

def setUser(self, name, path="/"):
self.username = "%s:%s" % (path, name)
self.username = f"{path}:{name}"

def isDoomed(self):
return self.doomed
Expand All @@ -393,7 +393,7 @@ def note(self, value):
self._note = value


class DummyRequest(object):
class DummyRequest:
path = "/"
identity = morepath.NO_IDENTITY

Expand All @@ -412,7 +412,7 @@ def path_info(self):
return self.path


class DummyResponse(object):
class DummyResponse:
def __init__(self, status="200 OK", headers=None):
self.status = status
if headers is None:
Expand Down
16 changes: 0 additions & 16 deletions pyproject.toml

This file was deleted.

Loading

0 comments on commit 21918f2

Please sign in to comment.