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

Start building for newer versions #1

Merged
merged 7 commits into from
Jun 15, 2023
Merged
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
49 changes: 0 additions & 49 deletions .github/workflows/build.yml

This file was deleted.

134 changes: 134 additions & 0 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
name: CI

on:
push:
branches: ["master"]
pull_request:
branches: ["master"]
release:
types: [created]
branches:
- 'master'
workflow_dispatch:

env:
FORCE_COLOR: "1" # Make tools pretty.
PIP_DISABLE_PIP_VERSION_CHECK: "1"
PIP_NO_PYTHON_VERSION_WARNING: "1"
PYTHON_LATEST: "3.11"

# For re-actors/checkout-python-sdist
sdist-artifact: python-package-distributions

jobs:

build-sdist:
name: 📦 Build the source distribution
runs-on: ubuntu-latest
# if: github.event_name == 'release' && github.event.action == 'created'
steps:
- name: Checkout project
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_LATEST }}
cache: pip
- run: python -m pip install build
name: Install core libraries for build and install
- name: Build artifacts
run: python -m build
- name: Upload built artifacts for testing
uses: actions/upload-artifact@v3
with:
name: ${{ env.sdist-artifact }}
# NOTE: Exact expected file names are specified here
# NOTE: as a safety measure — if anything weird ends
# NOTE: up being in this dir or not all dists will be
# NOTE: produced, this will fail the workflow.
path: dist/${{ env.sdist-name }}
retention-days: 15

test-pytest:
name: Tests on ${{ matrix.python-version }}
needs: build-sdist
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.experimental }}
strategy:
fail-fast: false
matrix:
python-version:
- "3.7"
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "pypy3.9"
reactor:
- "select"
- "epoll"
experimental: [ false ]
# include:
# - python-version: "~3.12.0-0"
# experimental: true
steps:
- name: Checkout the source code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: |
setup.cfg
requirements-dev.txt
- name: Install dependencies
run: |
sudo apt install -y libzmq3-dev
pip install .[dev]
- name: Test with reactor ${{ matrix.reactor }}
env:
REACTOR: ${{ matrix.reactor }}
run: |
trial --reactor=${{ matrix.reactor }} txzmq
- name: Lint
run: |
pycodestyle --repeat txzmq
pyflakes txzmq
- name: Integration
run: |
python examples/integration_test.py

check: # This job does nothing and is only used for the branch protection
name: ✅ Ensure the required checks passing
if: always()
needs:
- build-sdist
- test-pytest
runs-on: ubuntu-latest
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}

publish: # Run only on creating release for new tag
name: 📦 Publish to PyPI
runs-on: ubuntu-latest
needs: check
environment: pypi
if: github.event_name == 'release' && github.event.action == 'created'
steps:
- name: Download the sdist artifact
uses: actions/download-artifact@v3
with:
name: ${{ env.sdist-artifact }}
path: dist
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
1 change: 1 addition & 0 deletions AUTHORS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@
* David J. Felix
* Vsevolod Novikov
* Tim Tisdall
* William Barnhart <williambbarnhart@gmail.com>
1 change: 0 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
include LICENSE.txt
include README.rst
include AUTHORS.txt
include VERSION
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ clean:
find ./ -name "*.pyo" -exec rm {} \;

env:
$(VIRTUALENV) --no-site-packages env/
env/bin/pip install -r requirements.txt --use-mirrors
$(VIRTUALENV) env/
env/bin/pip install -r requirements-dev.txt

env-clean: clean env

Expand Down
12 changes: 7 additions & 5 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
Twisted bindings for 0MQ
========================

.. image:: https://coveralls.io/repos/smira/txZMQ/badge.png
:target: https://coveralls.io/r/smira/txZMQ

.. image:: https://badge.fury.io/py/txZMQ.svg
:target: https://badge.fury.io/py/txZMQ
![python versions](https://img.shields.io/pypi/pyversions/txZMQ-ng.svg)
![version](https://img.shields.io/pypi/v/txZMQ-ng)
![license](https://img.shields.io/pypi/l/txZMQ-ng)
![downloads](https://img.shields.io/pypi/dw/txZMQ-ng)

Introduction
------------

This is a fork of the original project at https://github.com/smira/txZMQ,
since it is no longer maintained.

txZMQ allows to integrate easily `ØMQ <http://zeromq.org>`_ sockets into
Twisted event loop (reactor).

Expand Down
1 change: 0 additions & 1 deletion VERSION

This file was deleted.

16 changes: 16 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[build-system]
requires = ["setuptools>=45", "setuptools_scm[toml]>=6.2"]
build-backend = "setuptools.build_meta"

[tool.setuptools_scm]
# enables setuptools_scm to provide the dynamic version

[tool.black]
line-length = 88

[tool.isort]
profile = "black"
line_length = 88

[tool.mypy]
ignore_missing_imports = true
44 changes: 0 additions & 44 deletions python-txzmq.spec

This file was deleted.

1 change: 1 addition & 0 deletions requirements.txt → requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ pycodestyle
Sphinx
coverage
coveralls
virtualenv
26 changes: 26 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
[metadata]
name = txZMQ-ng
author = Andrey Smirnov
author_email = me@smira.ru
maintainer = William Barnhart
maintainer_email = williambbarnhart@gmail.com
description = Twisted bindings for ZeroMQ
long_description = file: README.rst
classifiers =
Programming Language :: Python
Programming Language :: Python :: 2
Programming Language :: Python :: 3
Development Status :: 5 - Production/Stable
Intended Audience :: Developers
Natural Language :: English
License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)
Topic :: Software Development :: Libraries
download_url = https://pypi.org/project/txZMQ-ng/

[options]
install_requires =
Twisted>=10.0
pyzmq>=13

[options.extras_require]
dev = file: requirements-dev.txt
25 changes: 0 additions & 25 deletions setup.py

This file was deleted.