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

Use poetry for packaging #198

Closed
wants to merge 19 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 6 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[flake8]
exclude =
.tox,
.git,
__pycache__,
docs/source/conf.py
12 changes: 6 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,24 +22,24 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install poetry
run: pipx install poetry
- name: Setup python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install
run: |
pip install -e .
pip install -r "test_requirements.txt"
pip --version
poetry install --with=dev --without=docs
- name: Run tests with unittest
run: |
coverage run --branch -m unittest discover -v -t . haas
poetry run coverage run --branch -m unittest discover -v -t . haas
- name: Run tests with haas
run: |
python -m haas haas
poetry run python -m haas haas
- name: Print coverage report
run: |
coverage report
poetry run coverage report

lint:
runs-on: ubuntu-latest
Expand Down
72 changes: 0 additions & 72 deletions .travis.yml

This file was deleted.

6 changes: 6 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
Changes since version 0.9.0
===========================

Packaging
---------

* Replace ``setup.py`` and setuptools with ``pyproject.toml`` and
poetry (#198).


Version 0.9.0
=============
Expand Down
5 changes: 0 additions & 5 deletions MANIFEST.in

This file was deleted.

1 change: 0 additions & 1 deletion appveyor-cache.txt

This file was deleted.

43 changes: 0 additions & 43 deletions appveyor.yml

This file was deleted.

8 changes: 0 additions & 8 deletions build.sh

This file was deleted.

3 changes: 0 additions & 3 deletions cp33-tox-requirements.txt

This file was deleted.

6 changes: 0 additions & 6 deletions dev_requirements.txt

This file was deleted.

7 changes: 2 additions & 5 deletions haas/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,10 @@
# of the 3-clause BSD license. See the LICENSE.txt file for details.
from __future__ import absolute_import, unicode_literals

try:
from haas._version import version as __version__
except ImportError: # pragma: no cover
__version__ = 'notset'

import logging

__version__ = 'notset'


class NullHandler(logging.Handler): # pragma: no cover
def emit(self, record):
Expand Down
68 changes: 68 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
[tool.poetry]
name = "haas"
version = "0.0.0"
description = "Extensible Python Test Runner"
authors = ["Simon Jagoe <[email protected]>"]
license = "BSD"
readme = "README.rst"
repository = "https://github.com/scalative/haas"
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Operating System :: MacOS",
"Operating System :: Microsoft :: Windows",
"Operating System :: OS Independent",
"Operating System :: POSIX",
"Operating System :: Unix",
"Topic :: Software Development",
"Topic :: Software Development :: Testing",
]
include = [
{ path = "docs", format = "sdist" },
{ path = "*.rst", format = "sdist" },
{ path = "*requirements.txt", format = "sdist" },
{ path = "tox.ini", format = "sdist" },
]

[tool.poetry.scripts]
haas = "haas.main:main"

[tool.poetry.plugins."haas.hooks.environment"]
coverage = "haas.plugins.coverage:Coverage"

[tool.poetry.plugins."haas.discovery"]
default = "haas.plugins.discoverer:Discoverer"

[tool.poetry.plugins."haas.runner"]
default = "haas.plugins.runner:BaseTestRunner"
parallel = "haas.plugins.parallel_runner:ParallelTestRunner"

[tool.poetry.plugins."haas.result.handler"]
default = "haas.plugins.result_handler:StandardTestResultHandler"
quiet = "haas.plugins.result_handler:QuietTestResultHandler"
verbose = "haas.plugins.result_handler:VerboseTestResultHandler"
timing = "haas.plugins.result_handler:TimingResultHandler"

[tool.poetry.dependencies]
python = "^3.7"
statistics = ">= 1.0"
stevedore = ">= 3.5.2"

[tool.poetry.group.dev.dependencies]
coverage = ">= 7.0.0"
testfixtures = ">= 7.0.0"

[tool.poetry.group.docs.dependencies]
refactordoc = ">= 0.3.1"
sphinx = ">= 5.3.0"
sphinx-rtd-theme = ">= 2.0.0"

[build-system]
requires = ["poetry-core >= 1.0.0", "poetry-dynamic-versioning >= 1.0.0, < 2.0.0"]
build-backend = "poetry_dynamic_versioning.backend"

[tool.poetry-dynamic-versioning]
enable = true

[tool.poetry-dynamic-versioning.substitution]
1 change: 0 additions & 1 deletion setup.cfg

This file was deleted.

Loading