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

Convert to pyproject.toml #100

Merged
merged 1 commit into from
Dec 6, 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
1 change: 0 additions & 1 deletion doc/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
cloud_sptheme
fedmsg @ git+https://github.com/fedora-infra/fedmsg.git@develop
mako
3 changes: 1 addition & 2 deletions fedmsg_meta_umb/doc_utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import uuid

import mako.template
import six
import os.path

from fedmsg.tests.test_meta import Unspecified
Expand Down Expand Up @@ -195,7 +194,7 @@ def make_topics_doc(output_dir):

def length(value):
""" Find longest string so we can pad our tables adequately """
if isinstance(value, six.string_types):
if isinstance(value, str):
return len(value)
return len(repr(value))
longest = max([length(value) for value in kwargs.values()])
Expand Down
75 changes: 75 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
[build-system]
requires = [
"setuptools",
]
build-backend = "setuptools.build_meta"

[project]
name = "fedmsg_meta_umb"
version = "0.0.4"
authors = [
{name = "Mike Bonnet", email = "[email protected]"},
]
requires-python = ">=3.12"
dynamic = [
"dependencies",
]
classifiers = [
"Intended Audience :: Developers",
"License :: OSI Approved :: GNU Lesser General Public License v2 or later (LGPLv2+)",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.12",
"Topic :: Software Development :: Libraries :: Python Modules",
]
description = "fedmsg metadata providers for services on Red Hat's Unified Message Bus"
license = {file = "LICENSE", content-type = "text/plain"}
readme = {file = "README.rst", content-type = "text/x-rst"}

[project.entry-points."fedmsg.meta"]
brew = "fedmsg_meta_umb.brew:BrewProcessor"
rpmdiff = "fedmsg_meta_umb.rpmdiff:RPMDiffProcessor"
cips = "fedmsg_meta_umb.cips:CIPSProcessor"
distgit = "fedmsg_meta_umb.distgit:DistGitProcessor"
pub = "fedmsg_meta_umb.pub:PubProcessor"
errata = "fedmsg_meta_umb.errata:ErrataProcessor"
pungi = "fedmsg_meta_umb.pungi:PungiProcessor"
distill = "fedmsg_meta_umb.distill:DistillProcessor"
mbs = "fedmsg_meta_umb.mbs:MBSProcessor"
rhchi = "fedmsg_meta_umb.rhchi:RHCHIProcessor"
robosignatory = "fedmsg_meta_umb.robosignatory:RobosignatoryProcessor"
freshmaker = "fedmsg_meta_umb.freshmaker:FreshmakerProcessor"
odcs = "fedmsg_meta_umb.odcs:ODCSProcessor"
resultsdb = "fedmsg_meta_umb.resultsdb:ResultsDBProcessor"
metaxor = "fedmsg_meta_umb.metaxor:MetaXORProcessor"
greenwave = "fedmsg_meta_umb.greenwave:GreenwaveProcessor"
ci = "fedmsg_meta_umb.ci:CIProcessor"
jira = "fedmsg_meta_umb.jira:JIRAProcessor"
tower = "fedmsg_meta_umb.tower:TowerProcessor"
pnc = "fedmsg_meta_umb.pnc:ProjectNewCastleProcessor"
repotracker = "fedmsg_meta_umb.repotracker:RepotrackerProcessor"
waiverdb = "fedmsg_meta_umb.waiverdb:WaiverDBProcessor"
aqe-jenkins = "fedmsg_meta_umb.aqe_jenkins:AqeJenkinsProcessor"
clair = "fedmsg_meta_umb.clair:ClairProcessor"
snitch = "fedmsg_meta_umb.snitch:SnitchProcessor"
messagebusd = "fedmsg_meta_umb.messagebusd:MessagebusdProcessor"
cts = "fedmsg_meta_umb.cts:CTSProcessor"

[project.urls]
Homepage = "https://github.com/release-engineering/fedmsg_meta_umb"
Repository = "https://github.com/release-engineering/fedmsg_meta_umb.git"

[tool.setuptools]
packages = [
"fedmsg_meta_umb",
"fedmsg_meta_umb.tests",
]
dynamic.dependencies = {file = ["requirements.txt"]}

[tool.coverage]
run.branch = true
run.relative_files = true
run.source = [
"fedmsg_meta_umb",
]
report.show_missing = true
report.skip_empty = true
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fedmsg @ git+https://github.com/fedora-infra/fedmsg.git@develop
5 changes: 0 additions & 5 deletions setup.cfg

This file was deleted.

77 changes: 0 additions & 77 deletions setup.py

This file was deleted.

21 changes: 11 additions & 10 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,31 +1,32 @@
[tox]
isolated_build = true
envlist = flake8,py312,docs
downloadcache = {toxworkdir}/_download/

[testenv]
deps =
-r requirements.txt
coverage
commands =
coverage run -m unittest {posargs}
coverage report

[coverage:run]
branch = true

[coverage:report]
show_missing = true
skip_empty = true

[testenv:flake8]
skip_install = true
deps=
deps =
flake8
commands=
flake8 --version
commands =
flake8

[flake8]
# E302: expected 2 blank lines before class definitions
# W504: line break after binary operator
ignore = E302,W504
max-line-length = 120

[testenv:docs]
deps =
-r requirements.txt
-r doc/requirements.txt
commands =
sphinx-build doc/ htmldocs/
Loading