Skip to content

Commit 59bb9dd

Browse files
committed
chore: configure semantic release
2 parents 331083e + c98fb1b commit 59bb9dd

14 files changed

+210
-114
lines changed

.bumpversion.cfg

-7
This file was deleted.

.commitlintrc.js

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = {extends: ['@commitlint/config-conventional']}
+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Test and release
2+
3+
on: push
4+
jobs:
5+
6+
test:
7+
name: Test
8+
runs-on: ubuntu-latest
9+
10+
strategy:
11+
matrix:
12+
python-version: [3.6, 3.7, 3.8]
13+
14+
steps:
15+
- uses: actions/checkout@v2
16+
- uses: actions/setup-python@v2
17+
with:
18+
python-version: ${{ matrix.python-version }}
19+
- name: Install test dependencies
20+
run: |
21+
sudo apt-get install --force-yes freeglut3-dev
22+
python -m pip install --upgrade pip
23+
pip install '.[tests]'
24+
- name: Run test suite
25+
uses: GabrielBB/[email protected]
26+
with:
27+
run: |
28+
pytest tests --cov glooey
29+
- name: Report test coverage
30+
env:
31+
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_TOKEN }}
32+
run: |
33+
coveralls
34+
35+
release:
36+
name: Release to PyPI
37+
runs-on: ubuntu-latest
38+
if: github.ref == 'refs/heads/master'
39+
needs: [test]
40+
41+
steps:
42+
- uses: actions/checkout@v2
43+
with:
44+
# Make sure the whole repository history is present, so that
45+
# python-semantic-release can decide if a new release is needed.
46+
fetch-depth: 0
47+
48+
- uses: relekang/python-semantic-release@master
49+
with:
50+
github_token: ${{ secrets.GITHUB_TOKEN }}
51+
pypi_token: ${{ secrets.PYPI_TOKEN }}

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# Project-specific
12
/sandbox
23
TODO.txt
34

.readthedocs.yml

+12-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
1+
# Read the Docs configuration file
2+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
3+
4+
# Required
15
version: 2
26

7+
# How to install the project. We need to specify to use `pip`, because
8+
# otherwise RTD may try to directly execute `setup.py`, which doesn't exist.
39
python:
4-
version: 3.6
5-
install:
6-
- method: pip
7-
path: .
8-
extra_requirements:
9-
- docs
10+
version: 3.6
11+
install:
12+
- method: pip
13+
path: .
14+
extra_requirements:
15+
- docs

.travis.yml

-14
This file was deleted.

MANIFEST.in

-9
This file was deleted.

README.rst

+4-6
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ and powerful enough to support even the most complicated games.
2525
:target: https://pypi.python.org/pypi/glooey
2626
.. image:: https://img.shields.io/pypi/pyversions/glooey.svg
2727
:target: https://pypi.python.org/pypi/glooey
28-
.. image:: https://img.shields.io/travis/kxgames/glooey.svg
29-
:target: https://travis-ci.org/kxgames/glooey
30-
.. image:: https://readthedocs.org/projects/glooey/badge/?version=latest
31-
:target: http://glooey.readthedocs.io/en/latest/
28+
.. image:: https://img.shields.io/github/workflow/status/kxgames/glooey/Test%20and%20release/master
29+
:target: https://github.com/kxgames/glooey/actions
30+
.. image:: https://img.shields.io/readthedocs/glooey.svg
31+
:target: https://glooey.readthedocs.io/en/latest/?badge=latest
3232

3333
A quick example
3434
===============
@@ -138,5 +138,3 @@ but here's a quick example to give a feel for what it looks like in action::
138138
# Run pyglet's event loop as usual.
139139
140140
pyglet.app.run()
141-
142-

docs/Makefile

+7-8
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,6 @@ html:
2626
@echo
2727
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
2828

29-
clean:
30-
rm -rf $(BUILDDIR)/*
31-
rm -rf api
32-
3329
help:
3430
@echo "Please use \`make <target>' where <target> is one of"
3531
@echo " html to make standalone HTML files"
@@ -55,6 +51,9 @@ help:
5551
@echo " linkcheck to check all external links for integrity"
5652
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
5753

54+
clean:
55+
rm -rf $(BUILDDIR)/*
56+
5857
dirhtml:
5958
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
6059
@echo
@@ -86,17 +85,17 @@ qthelp:
8685
@echo
8786
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
8887
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
89-
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/cookiecutterproject_name.qhcp"
88+
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/Glooey.qhcp"
9089
@echo "To view the help file:"
91-
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/cookiecutterproject_name.qhc"
90+
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/Glooey.qhc"
9291

9392
devhelp:
9493
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
9594
@echo
9695
@echo "Build finished."
9796
@echo "To view the help file:"
98-
@echo "# mkdir -p $$HOME/.local/share/devhelp/cookiecutterproject_name"
99-
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/cookiecutterproject_name"
97+
@echo "# mkdir -p $$HOME/.local/share/devhelp/Glooey"
98+
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/Glooey"
10099
@echo "# devhelp"
101100

102101
epub:

docs/_templates/autosummary/class.rst

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{{ fullname }}
2+
{{ underline }}
3+
4+
.. currentmodule:: {{ module }}
5+
6+
.. autoclass:: {{ objname }}
7+
:members:
8+
:undoc-members:
9+
:private-members:
10+
:show-inheritance:
11+
:special-members:
12+
13+
.. autoclasstoc::
+68
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
{{ fullname | escape | underline }}
2+
3+
.. For some reason, the default template (as of sphinx 3.1.1) doesn't include
4+
the :toctree: setting for the autosummary directives. If this is ever
5+
changed, I can get rid of this custom template.
6+
7+
.. automodule:: {{ fullname }}
8+
9+
{% block classes %}
10+
{% if classes %}
11+
.. rubric:: {{ _('Classes') }}
12+
13+
.. autosummary::
14+
:toctree: .
15+
{% for item in classes %}
16+
{{ item }}
17+
{%- endfor %}
18+
{% endif %}
19+
{% endblock %}
20+
21+
{% block functions %}
22+
{% if functions %}
23+
.. rubric:: {{ _('Functions') }}
24+
25+
.. autosummary::
26+
:toctree: .
27+
{% for item in functions %}
28+
{{ item }}
29+
{%- endfor %}
30+
{% endif %}
31+
{% endblock %}
32+
33+
{% block attributes %}
34+
{% if attributes %}
35+
.. rubric:: Data Attributes
36+
37+
.. autosummary::
38+
:toctree: .
39+
{% for item in attributes %}
40+
{{ item }}
41+
{%- endfor %}
42+
{% endif %}
43+
{% endblock %}
44+
45+
{% block exceptions %}
46+
{% if exceptions %}
47+
.. rubric:: {{ _('Exceptions') }}
48+
49+
.. autosummary::
50+
:toctree: .
51+
{% for item in exceptions %}
52+
{{ item }}
53+
{%- endfor %}
54+
{% endif %}
55+
{% endblock %}
56+
57+
{% block modules %}
58+
{% if modules %}
59+
.. rubric:: Modules
60+
61+
.. autosummary::
62+
:toctree: .
63+
:recursive:
64+
{% for item in modules %}
65+
{{ item }}
66+
{%- endfor %}
67+
{% endif %}
68+
{% endblock %}

glooey/__init__.py

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
#!/usr/bin/env python3
22

3+
"""
4+
An object-oriented GUI library for pyglet.
5+
"""
6+
37
__version__ = '0.3.0'
48

59
from .widget import *

pyproject.toml

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
[build-system]
2+
requires = ["flit"]
3+
build-backend = "flit.buildapi"
4+
5+
[tool.flit.metadata]
6+
module = "glooey"
7+
author = "Kale Kundert"
8+
author-email = "[email protected]"
9+
home-page = 'https://github.com/kxgames/glooey'
10+
description-file = 'README.rst'
11+
requires-python = "~=3.6"
12+
requires = [
13+
'pyglet',
14+
'more_itertools',
15+
'vecrec',
16+
'autoprop',
17+
'pyyaml',
18+
]
19+
classifiers = [
20+
'Programming Language :: Python :: 3',
21+
'Topic :: Games/Entertainment',
22+
'Topic :: Software Development :: User Interfaces',
23+
'Topic :: Software Development :: Libraries',
24+
'License :: OSI Approved :: MIT License',
25+
'Intended Audience :: Developers',
26+
]
27+
28+
[tool.flit.metadata.requires-extra]
29+
tests = [
30+
'pytest',
31+
'pytest-cov',
32+
'coveralls',
33+
]
34+
docs = [
35+
'sphinx>=3.1',
36+
'sphinx_rtd_theme',
37+
'autoclasstoc',
38+
]
39+
40+
[tool.flit.metadata.urls]
41+
'Documentation' = 'https://glooey.readthedocs.io/en/latest/'
42+
'Version Control' = 'https://github.com/kxgames/glooey'
43+
'Bug Tracker' = 'https://github.com/kxgames/glooey/issues'
44+
'Continuous Integration' = 'https://github.com/kxgames/glooey/actions'
45+
'Test Coverage' = 'https://coveralls.io/github/kxgames/glooey'
46+
47+
[tool.semantic_release]
48+
version_variable = 'glooey/__init__.py:__version__'
49+
build_command = 'python -m pip install flit && flit build'

setup.py

-64
This file was deleted.

0 commit comments

Comments
 (0)