Skip to content

Commit 3f925f2

Browse files
authored
API and Documentation Overhaul (#101)
* Rewrite Entire API * Add MyPy * Overhaul API and Documentation * Add index.rst files. * Add doc requires to RTD * Add changelog fragments and minor changes. * Add opencollective funding link to repo * Change description * Explicit include for py.typed file
1 parent 366af29 commit 3f925f2

File tree

465 files changed

+14658
-27411
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

465 files changed

+14658
-27411
lines changed

.all-contributorsrc

Lines changed: 68 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -1,85 +1,70 @@
11
{
2-
"projectName": "openskill.py",
3-
"projectOwner": "OpenDebates",
4-
"repoType": "github",
5-
"repoHost": "https://github.com",
6-
"files": [
7-
"CONTRIBUTORS.md"
8-
],
9-
"imageSize": 100,
10-
"commit": false,
11-
"contributorsPerLine": 7,
12-
"contributorsSortAlphabetically": false,
13-
"badgeTemplate": "![GitHub contributors (via allcontributors.org)](https://img.shields.io/github/all-contributors/OpenDebates/openskill.py?label=Contributors)",
14-
"linkToUsage": true,
15-
"skipCi": true,
16-
"contributors": [
17-
{
18-
"login": "vivekjoshy",
19-
"name": "Vivek Joshy",
20-
"avatar_url": "https://avatars.githubusercontent.com/u/8206808?v=4",
21-
"profile": "https://github.com/vivekjoshy",
22-
"contributions": [
23-
"code",
24-
"test",
25-
"review",
26-
"research",
27-
"projectManagement",
28-
"question",
29-
"maintenance",
30-
"doc",
31-
"design",
32-
"data"
33-
]
34-
},
35-
{
36-
"login": "CalColson",
37-
"name": "Calvin P. Colson",
38-
"avatar_url": "https://avatars.githubusercontent.com/u/14209384?v=4",
39-
"profile": "https://github.com/CalColson",
40-
"contributions": [
41-
"doc"
42-
]
43-
},
44-
{
45-
"login": "philihp",
46-
"name": "‮Philihp Busby",
47-
"avatar_url": "https://avatars.githubusercontent.com/u/1247668?v=4",
48-
"profile": "https://philihp.com/",
49-
"contributions": [
50-
"code",
51-
"test",
52-
"research",
53-
"data"
54-
]
55-
},
56-
{
57-
"login": "martinazapletalova",
58-
"name": "Martina Zapletalová",
59-
"avatar_url": "https://avatars.githubusercontent.com/u/91736322?v=4",
60-
"profile": "https://github.com/martinazapletalova",
61-
"contributions": [
62-
"bug"
63-
]
64-
},
65-
{
66-
"login": "Erotemic",
67-
"name": "Jon Crall",
68-
"avatar_url": "https://avatars.githubusercontent.com/u/3186211?v=4",
69-
"profile": "https://erotemic.wordpress.com/",
70-
"contributions": [
71-
"code"
72-
]
73-
},
74-
{
75-
"login": "bstummer",
76-
"name": "bstummer",
77-
"avatar_url": "https://avatars.githubusercontent.com/u/52933850?v=4",
78-
"profile": "https://github.com/bstummer",
79-
"contributions": [
80-
"doc"
81-
]
82-
}
83-
],
84-
"commitConvention": "angular"
2+
"projectName": "openskill.py",
3+
"projectOwner": "OpenDebates",
4+
"repoType": "github",
5+
"repoHost": "https://github.com",
6+
"files": ["CONTRIBUTORS.md"],
7+
"imageSize": 100,
8+
"commit": false,
9+
"contributorsPerLine": 7,
10+
"contributorsSortAlphabetically": false,
11+
"badgeTemplate": "![GitHub contributors (via allcontributors.org)](https://img.shields.io/github/all-contributors/OpenDebates/openskill.py?label=Contributors)",
12+
"linkToUsage": true,
13+
"skipCi": true,
14+
"contributors": [
15+
{
16+
"login": "vivekjoshy",
17+
"name": "Vivek Joshy",
18+
"avatar_url": "https://avatars.githubusercontent.com/u/8206808?v=4",
19+
"profile": "https://github.com/vivekjoshy",
20+
"contributions": [
21+
"code",
22+
"test",
23+
"review",
24+
"research",
25+
"projectManagement",
26+
"question",
27+
"maintenance",
28+
"doc",
29+
"design",
30+
"data",
31+
],
32+
},
33+
{
34+
"login": "CalColson",
35+
"name": "Calvin P. Colson",
36+
"avatar_url": "https://avatars.githubusercontent.com/u/14209384?v=4",
37+
"profile": "https://github.com/CalColson",
38+
"contributions": ["doc"],
39+
},
40+
{
41+
"login": "philihp",
42+
"name": "‮Philihp Busby",
43+
"avatar_url": "https://avatars.githubusercontent.com/u/1247668?v=4",
44+
"profile": "https://philihp.com/",
45+
"contributions": ["code", "test", "research", "data"],
46+
},
47+
{
48+
"login": "martinazapletalova",
49+
"name": "Martina Zapletalová",
50+
"avatar_url": "https://avatars.githubusercontent.com/u/91736322?v=4",
51+
"profile": "https://github.com/martinazapletalova",
52+
"contributions": ["bug"],
53+
},
54+
{
55+
"login": "Erotemic",
56+
"name": "Jon Crall",
57+
"avatar_url": "https://avatars.githubusercontent.com/u/3186211?v=4",
58+
"profile": "https://erotemic.wordpress.com/",
59+
"contributions": ["code"],
60+
},
61+
{
62+
"login": "bstummer",
63+
"name": "bstummer",
64+
"avatar_url": "https://avatars.githubusercontent.com/u/52933850?v=4",
65+
"profile": "https://github.com/bstummer",
66+
"contributions": ["doc"],
67+
},
68+
],
69+
"commitConvention": "angular",
8570
}

.bumpversion.cfg

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
[bumpversion]
2-
current_version = 4.0.0
2+
current_version = 5.0.0
33
commit = False
44
tag = False
55
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\-(?P<release>[a-z]+)\.(?P<build>\d+))?
6-
serialize =
6+
serialize =
77
{major}.{minor}.{patch}-{release}.{build}
88
{major}.{minor}.{patch}
99

1010
[bumpversion:part:release]
1111
optional_value = gamma
12-
values =
12+
values =
1313
alpha
1414
beta
1515
gamma

.coveragerc

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,3 @@ precision = 2
1313
omit = *migrations*
1414
exclude_lines =
1515
pragma: no cover
16-
17-
def __repr__
18-
if self\.debug
19-
20-
raise AssertionError
21-
raise NotImplementedError
22-
23-
if 0:
24-
if __name__ == .__main__.:

.github/FUNDING.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
github: OpenDebates
2+
open_collective: openskill

.github/workflows/draft-pdf.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
on: [push]
2+
3+
jobs:
4+
paper:
5+
runs-on: ubuntu-latest
6+
name: Paper Draft
7+
steps:
8+
- name: Checkout
9+
uses: actions/checkout@v3
10+
- name: Build draft PDF
11+
uses: openjournals/openjournals-draft-action@master
12+
with:
13+
journal: joss
14+
paper-path: paper/paper.md
15+
- name: Upload
16+
uses: actions/upload-artifact@v1
17+
with:
18+
name: paper
19+
path: paper/paper.pdf

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,3 +130,6 @@ dmypy.json
130130

131131
# IDEA Folder
132132
.idea/
133+
134+
# PDM
135+
/.pdm-build/

.readthedocs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ version: 2
99
build:
1010
os: ubuntu-20.04
1111
tools:
12-
python: "3.10"
12+
python: "3.11"
1313

1414
# Build documentation in the docs/ directory with Sphinx
1515
sphinx:
@@ -20,4 +20,4 @@ python:
2020
install:
2121
- method: pip
2222
path: .
23-
- requirements: docs/requirements.txt
23+
- requirements: docs/doc_requires.txt

CHANGELOG.rst

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,29 @@ This file is updated every release since v1.0.0 with the use of towncrier from t
44

55
.. towncrier release notes start
66
7+
Openskill 5.0.0 (2023-07-21)
8+
============================
9+
10+
Breaking Changes
11+
----------------
12+
13+
- All top level functions are now methods that must be called from model once it's been initialized. (`#101 <https://github.com/OpenDebates/openskill.py/issues/101>`_)
14+
15+
16+
Features
17+
--------
18+
19+
- Add PEP-517 and PEP-518 compliance. (`#82 <https://github.com/OpenDebates/openskill.py/issues/82>`_)
20+
- Everything is strictly type hinted to let you use your IDE's autocomplete features. (`#101 <https://github.com/OpenDebates/openskill.py/issues/101>`_)
21+
22+
23+
Documentation Improvements
24+
--------------------------
25+
26+
- All functions, methods and classes have docstrings now. There are also LaTeX equations in
27+
docstrings when necessary. (`#101 <https://github.com/OpenDebates/openskill.py/issues/101>`_)
28+
29+
730
Openskill 4.0.0 (2022-12-11)
831
============================
932

CITATION.cff

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
cff-version: 1.2.0
2+
title: 'OpenSkill: Multiplayer Rating System. No Friction.'
3+
message: >-
4+
If you use this software, please cite it using the
5+
metadata from this file.
6+
type: software
7+
authors:
8+
- given-names: Vivek
9+
family-names: Joshy
10+
email: vivek@opendebates.net
11+
orcid: 'https://orcid.org/0000-0003-2443-8827'
12+
identifiers:
13+
- type: doi
14+
value: 10.5281/zenodo.7806692
15+
description: Zenodo
16+
repository-code: 'https://github.com/OpenDebates/openskill.py'
17+
url: 'https://openskill.me'
18+
abstract: >-
19+
A faster and open license asymmetric multi-team,
20+
multiplayer rating system comparable to TrueSkill.
21+
keywords:
22+
- elo
23+
- rating
24+
- python
25+
- ranking
26+
- trueskill
27+
- statistics
28+
- matchmaking
29+
- multiplayer
30+
license: MIT

CONTRIBUTING.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# Contributing
2+
3+
## Style Guide
4+
5+
All pull requests to the python source must follow [PEP
6+
8](https://www.python.org/dev/peps/pep-0008/) conventions.
7+
8+
All methods and functions must be in snake_case and not camelCase. All
9+
code must also be formatted with `black` and it's default settings.
10+
11+
## Documentation
12+
13+
You must document any and all objects, modules, packages and namespaces you define.
14+
You must use also use the default [sphinx format](https://sphinx-rtd-tutorial.readthedocs.io/en/latest/docstrings.html#the-sphinx-docstring-format) for docstrings.
15+
16+
## Tests
17+
18+
You are responsible for writing tests for any code you contribute. We use
19+
[pytest](https://docs.pytest.org/en/stable/) for testing. Once you've written
20+
your tests, you should run tox to ensure that your tests pass on all supported
21+
python versions.
22+
23+
## Towncrier
24+
25+
To aid with the generation of `CHANGELOG.rst` as well as the releases
26+
changelog we use towncrier.
27+
28+
You will need to install towncrier and openskill.py from source before
29+
making changelog additions. You can learn about how to install the package
30+
for contribution in the [documentation](https://openskill.me/en/stable/installation.html).
31+
32+
For every pull request made to this project, there should be a short
33+
explanation of the change under changes/ with the following format:
34+
`{pull_request_number}.{type}.rst`,
35+
36+
Possible types are:
37+
38+
- breaking: Signifying a backwards incompatible change.
39+
- feature: Signifying a new feature.
40+
- bugfix: Signifying a bugfix.
41+
- doc: Signifying a documentation improvement.
42+
- deprecation: Signifying a deprecation or removal of public API.
43+
44+
For changes that do not fall under any of the above cases, please
45+
specify the lack of the changelog in the pull request description so
46+
that a maintainer can skip the job that checks for newly added
47+
fragments.
48+
49+
Best way to create the fragments is to run towncrier create
50+
`{pull_request_number}.{type}.rst` after creating the pull request, edit
51+
the created file and committing the changes.
52+
53+
Multiple fragment types can be created per pull request if it covers
54+
multiple areas.
55+
56+
## Pull Requests
57+
58+
We follow [Github Flow](https://guides.github.com/introduction/flow/) as
59+
our workflow when creating pull requests. It is a neater and easier way
60+
to manage changes. You are also responsible for writing tests(where
61+
applicable) if you are contributing to a core module. If we see an area
62+
of code that requires tests, then we will not accept the PR until you
63+
write a test for that area of code. Tests ensure long term stability.
64+
65+
Also note that there are CI checks in place. If any automated tests
66+
fail, please rework and resubmit your PR.
67+
68+
## Credit Yourself
69+
70+
Remember to follow this
71+
[guide](https://allcontributors.org/docs/en/bot/usage) to add yourself
72+
to the list of [contributors](https://github.com/OpenDebates/openskill.py/blob/main/CONTRIBUTORS.md).

0 commit comments

Comments
 (0)