Skip to content

Commit

Permalink
Make package PEP-517 and PEP-518 compliant. (#82)
Browse files Browse the repository at this point in the history
* Make PEP-517 and PEP-518 compliant.

* Add changelog fragments
  • Loading branch information
vivekjoshy committed Apr 21, 2023
1 parent 1f694d4 commit c3a77ea
Show file tree
Hide file tree
Showing 6 changed files with 74 additions and 68 deletions.
1 change: 1 addition & 0 deletions changes/82.feature.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add PEP-517 and PEP-518 compliance.
1 change: 0 additions & 1 deletion docs/time_decay.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@

# Decay Rating - Assume 365 Days Passed
for match in range(365):

# Only player X's rating has decayed.
if (x.mu < 25 + 3 * 25 / 3) or (x.mu > 25 - 3 * 25 / 3):
x.mu /= mu_precision
Expand Down
72 changes: 72 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,78 @@ python_files = [
]
doctest_optionflags = "NUMBER"

[project]
name = "openskill"
authors = [
{name = "Taven", email = "taven@opendebates.net"},
]
maintainers = [
{name = "Taven", email = "taven@opendebates.net"}
]
description = "A faster, open-license alternative to Microsoft TrueSkill"
readme = "README.md"
requires-python = ">=3.8"
keywords = ["ranking", "trueskill", "bayesian", "statistics", "rating"]
license = {text = "MIT"}
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy"
]
dynamic = ["version"]


[project.optional-dependencies]
docs = [
"Sphinx>=6.1.3",
"furo>=2023.3.27",
"Pygments>=2.15.1",
"myst-parser>=1.0.0",
"sphinxext-opengraph>=0.8.2",
"sphinx-intl>=2.1.0"
]
tests = [
"pytest>=7.3.1",
"pytest-cov>=4.0.0"
]
release = [
"isort>=5.12.0",
"twine>=4.0.2",
"codecov>=2.1.13",
"bump2version>=1.0.1",
"black>=23.3.0",
"towncrier>=22.12.0",
"build>=0.10.0"
]
benchmarks = [
"jsonlines>=3.1.0",
"prompt-toolkit>=3.0.38",
"trueskill>=0.4.5",
"scikit-learn>=1.2.2",
"pandas>=2.0.0"
]

[project.urls]
Documentation = "https://openskill.me/en/stable"
Changelog = "https://github.com/OpenDebates/openskill.py/blob/main/CHANGELOG.rst"
Funding = "https://github.com/sponsors/OpenDebates"
Source = "https://github.com/OpenDebates/openskill.py"
Tracker = "https://github.com/OpenDebates/openskill.py/issues"

[tool.setuptools]
packages = ["openskill"]

[tool.setuptools.dynamic]
version = {attr = "openskill.__version__"}

[build-system]
requires = ["wheel", "setuptools"]
build-backend = "setuptools.build_meta"
65 changes: 0 additions & 65 deletions setup.cfg

This file was deleted.

2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from setuptools import setup

# Metadata defined in setup.cfg
# Metadata defined in pyproject.toml
setup()
1 change: 0 additions & 1 deletion tests/test_rate.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@


def test_rate():

# Accepts a tau term
a = Rating(sigma=3)
b = Rating(sigma=3)
Expand Down

0 comments on commit c3a77ea

Please sign in to comment.