Skip to content

Commit

Permalink
API and Documentation Overhaul (#101)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
vivekjoshy committed Jul 21, 2023
1 parent 366af29 commit 3f925f2
Show file tree
Hide file tree
Showing 465 changed files with 14,658 additions and 27,411 deletions.
151 changes: 68 additions & 83 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
@@ -1,85 +1,70 @@
{
"projectName": "openskill.py",
"projectOwner": "OpenDebates",
"repoType": "github",
"repoHost": "https://github.com",
"files": [
"CONTRIBUTORS.md"
],
"imageSize": 100,
"commit": false,
"contributorsPerLine": 7,
"contributorsSortAlphabetically": false,
"badgeTemplate": "![GitHub contributors (via allcontributors.org)](https://img.shields.io/github/all-contributors/OpenDebates/openskill.py?label=Contributors)",
"linkToUsage": true,
"skipCi": true,
"contributors": [
{
"login": "vivekjoshy",
"name": "Vivek Joshy",
"avatar_url": "https://avatars.githubusercontent.com/u/8206808?v=4",
"profile": "https://github.com/vivekjoshy",
"contributions": [
"code",
"test",
"review",
"research",
"projectManagement",
"question",
"maintenance",
"doc",
"design",
"data"
]
},
{
"login": "CalColson",
"name": "Calvin P. Colson",
"avatar_url": "https://avatars.githubusercontent.com/u/14209384?v=4",
"profile": "https://github.com/CalColson",
"contributions": [
"doc"
]
},
{
"login": "philihp",
"name": "‮Philihp Busby",
"avatar_url": "https://avatars.githubusercontent.com/u/1247668?v=4",
"profile": "https://philihp.com/",
"contributions": [
"code",
"test",
"research",
"data"
]
},
{
"login": "martinazapletalova",
"name": "Martina Zapletalová",
"avatar_url": "https://avatars.githubusercontent.com/u/91736322?v=4",
"profile": "https://github.com/martinazapletalova",
"contributions": [
"bug"
]
},
{
"login": "Erotemic",
"name": "Jon Crall",
"avatar_url": "https://avatars.githubusercontent.com/u/3186211?v=4",
"profile": "https://erotemic.wordpress.com/",
"contributions": [
"code"
]
},
{
"login": "bstummer",
"name": "bstummer",
"avatar_url": "https://avatars.githubusercontent.com/u/52933850?v=4",
"profile": "https://github.com/bstummer",
"contributions": [
"doc"
]
}
],
"commitConvention": "angular"
"projectName": "openskill.py",
"projectOwner": "OpenDebates",
"repoType": "github",
"repoHost": "https://github.com",
"files": ["CONTRIBUTORS.md"],
"imageSize": 100,
"commit": false,
"contributorsPerLine": 7,
"contributorsSortAlphabetically": false,
"badgeTemplate": "![GitHub contributors (via allcontributors.org)](https://img.shields.io/github/all-contributors/OpenDebates/openskill.py?label=Contributors)",
"linkToUsage": true,
"skipCi": true,
"contributors": [
{
"login": "vivekjoshy",
"name": "Vivek Joshy",
"avatar_url": "https://avatars.githubusercontent.com/u/8206808?v=4",
"profile": "https://github.com/vivekjoshy",
"contributions": [
"code",
"test",
"review",
"research",
"projectManagement",
"question",
"maintenance",
"doc",
"design",
"data",
],
},
{
"login": "CalColson",
"name": "Calvin P. Colson",
"avatar_url": "https://avatars.githubusercontent.com/u/14209384?v=4",
"profile": "https://github.com/CalColson",
"contributions": ["doc"],
},
{
"login": "philihp",
"name": "‮Philihp Busby",
"avatar_url": "https://avatars.githubusercontent.com/u/1247668?v=4",
"profile": "https://philihp.com/",
"contributions": ["code", "test", "research", "data"],
},
{
"login": "martinazapletalova",
"name": "Martina Zapletalová",
"avatar_url": "https://avatars.githubusercontent.com/u/91736322?v=4",
"profile": "https://github.com/martinazapletalova",
"contributions": ["bug"],
},
{
"login": "Erotemic",
"name": "Jon Crall",
"avatar_url": "https://avatars.githubusercontent.com/u/3186211?v=4",
"profile": "https://erotemic.wordpress.com/",
"contributions": ["code"],
},
{
"login": "bstummer",
"name": "bstummer",
"avatar_url": "https://avatars.githubusercontent.com/u/52933850?v=4",
"profile": "https://github.com/bstummer",
"contributions": ["doc"],
},
],
"commitConvention": "angular",
}
6 changes: 3 additions & 3 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
[bumpversion]
current_version = 4.0.0
current_version = 5.0.0
commit = False
tag = False
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\-(?P<release>[a-z]+)\.(?P<build>\d+))?
serialize =
serialize =
{major}.{minor}.{patch}-{release}.{build}
{major}.{minor}.{patch}

[bumpversion:part:release]
optional_value = gamma
values =
values =
alpha
beta
gamma
Expand Down
9 changes: 0 additions & 9 deletions .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,3 @@ precision = 2
omit = *migrations*
exclude_lines =
pragma: no cover

def __repr__
if self\.debug

raise AssertionError
raise NotImplementedError

if 0:
if __name__ == .__main__.:
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
github: OpenDebates
open_collective: openskill
19 changes: 19 additions & 0 deletions .github/workflows/draft-pdf.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
on: [push]

jobs:
paper:
runs-on: ubuntu-latest
name: Paper Draft
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build draft PDF
uses: openjournals/openjournals-draft-action@master
with:
journal: joss
paper-path: paper/paper.md
- name: Upload
uses: actions/upload-artifact@v1
with:
name: paper
path: paper/paper.pdf
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -130,3 +130,6 @@ dmypy.json

# IDEA Folder
.idea/

# PDM
/.pdm-build/
4 changes: 2 additions & 2 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ version: 2
build:
os: ubuntu-20.04
tools:
python: "3.10"
python: "3.11"

# Build documentation in the docs/ directory with Sphinx
sphinx:
Expand All @@ -20,4 +20,4 @@ python:
install:
- method: pip
path: .
- requirements: docs/requirements.txt
- requirements: docs/doc_requires.txt
23 changes: 23 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,29 @@ This file is updated every release since v1.0.0 with the use of towncrier from t

.. towncrier release notes start
Openskill 5.0.0 (2023-07-21)
============================

Breaking Changes
----------------

- 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>`_)


Features
--------

- Add PEP-517 and PEP-518 compliance. (`#82 <https://github.com/OpenDebates/openskill.py/issues/82>`_)
- Everything is strictly type hinted to let you use your IDE's autocomplete features. (`#101 <https://github.com/OpenDebates/openskill.py/issues/101>`_)


Documentation Improvements
--------------------------

- All functions, methods and classes have docstrings now. There are also LaTeX equations in
docstrings when necessary. (`#101 <https://github.com/OpenDebates/openskill.py/issues/101>`_)


Openskill 4.0.0 (2022-12-11)
============================

Expand Down
30 changes: 30 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
cff-version: 1.2.0
title: 'OpenSkill: Multiplayer Rating System. No Friction.'
message: >-
If you use this software, please cite it using the
metadata from this file.
type: software
authors:
- given-names: Vivek
family-names: Joshy
email: vivek@opendebates.net
orcid: 'https://orcid.org/0000-0003-2443-8827'
identifiers:
- type: doi
value: 10.5281/zenodo.7806692
description: Zenodo
repository-code: 'https://github.com/OpenDebates/openskill.py'
url: 'https://openskill.me'
abstract: >-
A faster and open license asymmetric multi-team,
multiplayer rating system comparable to TrueSkill.
keywords:
- elo
- rating
- python
- ranking
- trueskill
- statistics
- matchmaking
- multiplayer
license: MIT
72 changes: 72 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# Contributing

## Style Guide

All pull requests to the python source must follow [PEP
8](https://www.python.org/dev/peps/pep-0008/) conventions.

All methods and functions must be in snake_case and not camelCase. All
code must also be formatted with `black` and it's default settings.

## Documentation

You must document any and all objects, modules, packages and namespaces you define.
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.

## Tests

You are responsible for writing tests for any code you contribute. We use
[pytest](https://docs.pytest.org/en/stable/) for testing. Once you've written
your tests, you should run tox to ensure that your tests pass on all supported
python versions.

## Towncrier

To aid with the generation of `CHANGELOG.rst` as well as the releases
changelog we use towncrier.

You will need to install towncrier and openskill.py from source before
making changelog additions. You can learn about how to install the package
for contribution in the [documentation](https://openskill.me/en/stable/installation.html).

For every pull request made to this project, there should be a short
explanation of the change under changes/ with the following format:
`{pull_request_number}.{type}.rst`,

Possible types are:

- breaking: Signifying a backwards incompatible change.
- feature: Signifying a new feature.
- bugfix: Signifying a bugfix.
- doc: Signifying a documentation improvement.
- deprecation: Signifying a deprecation or removal of public API.

For changes that do not fall under any of the above cases, please
specify the lack of the changelog in the pull request description so
that a maintainer can skip the job that checks for newly added
fragments.

Best way to create the fragments is to run towncrier create
`{pull_request_number}.{type}.rst` after creating the pull request, edit
the created file and committing the changes.

Multiple fragment types can be created per pull request if it covers
multiple areas.

## Pull Requests

We follow [Github Flow](https://guides.github.com/introduction/flow/) as
our workflow when creating pull requests. It is a neater and easier way
to manage changes. You are also responsible for writing tests(where
applicable) if you are contributing to a core module. If we see an area
of code that requires tests, then we will not accept the PR until you
write a test for that area of code. Tests ensure long term stability.

Also note that there are CI checks in place. If any automated tests
fail, please rework and resubmit your PR.

## Credit Yourself

Remember to follow this
[guide](https://allcontributors.org/docs/en/bot/usage) to add yourself
to the list of [contributors](https://github.com/OpenDebates/openskill.py/blob/main/CONTRIBUTORS.md).
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2020 Open Debates Project
Copyright (c) 2023 Vivek Joshy

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down

0 comments on commit 3f925f2

Please sign in to comment.