Skip to content

Commit

Permalink
updated package scaffolding
Browse files Browse the repository at this point in the history
  • Loading branch information
xrotwang committed Mar 21, 2024
1 parent 8faaffe commit c0134b3
Show file tree
Hide file tree
Showing 7 changed files with 104 additions and 90 deletions.
12 changes: 3 additions & 9 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7, 3.8, 3.9, "3.10"]
python-version: [3.8, 3.9, "3.10", "3.11"]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand All @@ -27,9 +27,3 @@ jobs:
- name: Test with pytest
run: |
pytest
- name: "Convert coverage"
run: "python -m coverage xml"
- name: "Upload coverage to Codecov"
uses: "codecov/codecov-action@v1"
with:
fail_ci_if_error: true
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# clld-audio-plugin

[![Build Status](https://github.com/clld/clld-audio-plugin/workflows/tests/badge.svg)](https://github.com/clld/clld-audio-plugin/actions?query=workflow%3Atests)
[![codecov](https://codecov.io/gh/clld/clld-audio-plugin/branch/main/graph/badge.svg)](https://codecov.io/gh/clld/clld-audio-plugin)
[![PyPI](https://img.shields.io/pypi/v/clld-audio-plugin.svg)](https://pypi.org/project/clld-audio-plugin)

A plugin for the [`clld`](https://pypi.org/project/clld) package.
Expand Down
51 changes: 28 additions & 23 deletions RELEASING.md
Original file line number Diff line number Diff line change
@@ -1,41 +1,46 @@
Releasing clld-audio-plugin
===========================

- PEP8
```shell
flake8 src
```

- Do platform test via tox (making sure statement coverage is at 100%):
```
tox -r
```
```shell
tox -r
```

- Change setup.py version to the new version number.

- Bump version number:
```
git commit -a -m"<VERSION>"
```
```
git commit -a -m"<VERSION>"
```

- Create a release tag:
```
git tag -a v<VERSION> -m"release <VERSION>"
```
```
git tag -a v<VERSION> -m"release <VERSION>"
```

- Release to PyPI:
```
python setup.py clean --all
rm dist/*
python setup.py sdist bdist_wheel
twine upload dist/*
```
```
python setup.py clean --all
rm dist/*
python -m build -n
twine upload dist/*
```

- Push to github:
```
git push origin
git push --tags
```
```shell
git push origin
git push --tags
```

- Append `.dev0` to the version number in `setup.py` for the new development cycle.

- Commit/push the version change:
```shell
git commit -a -m "bump version for development"
git push origin
```
```shell
git commit -a -m "bump version for development"
git push origin
```
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[build-system]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"

76 changes: 67 additions & 9 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,27 +1,85 @@
[metadata]
name = clld-audio-plugin
version = 1.0.1.dev0
license_file = LICENSE
author = Robert Forkel
author_email = [email protected]
classifiers =
Development Status :: 2 - Pre-Alpha
Intended Audience :: Science/Research
License :: OSI Approved :: Apache Software License
Natural Language :: English
Programming Language :: Python :: 3
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Programming Language :: Python :: 3.12
description = Render linked audio files in clld apps.
long_description = file: README.md
long_description_content_type = text/markdown
project_urls =
Bug Tracker = https://github.com/clld/clld-audio-plugin/issues
url = https://github.com/clld/clld-audio-plugin

[options]
zip_safe = False
include_package_data = True
packages = find:
package_dir =
=src
install_requires =
clld>=7
sqlalchemy
zope.interface

[options.extras_require]
dev =
flake8
twine
wheel
build
test =
pytest
pytest-mock
pytest-cov
tox
webtest

[options.packages.find]
include = clld_audio_plugin
where = src

[bdist_wheel]
universal = 1

[easy_install]
zip_ok = false

[tool:pytest]
addopts = --cov
testpaths = tests
filterwarnings =
ignore::sqlalchemy.exc.RemovedIn20Warning

[tox:tox]
envlist = py38, py39, py310, py311, py312
isolated_build = true
skip_missing_interpreter = true

[testenv]
deps = .[test]
commands = pytest {posargs}

[flake8]
ignore = E711,E712,D100,D101,D103,D102,D301
max-line-length = 100
exclude = .tox

[tool:pytest]
minversion = 5
testpaths = tests
addopts =
--cov

[coverage:run]
source =
clld_audio_plugin
tests

[coverage:report]
show_missing = true

[easy_install]
zip_ok = false
43 changes: 2 additions & 41 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,42 +1,3 @@
from setuptools import setup, find_packages
from setuptools import setup

setup(
name='clld-audio-plugin',
version='1.0.1.dev0',
description='clld-audio-plugin',
classifiers=[
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Framework :: Pyramid",
"Topic :: Internet :: WWW/HTTP",
"Topic :: Internet :: WWW/HTTP :: WSGI :: Application",
],
author='Robert Forkel',
author_email='[email protected]',
url='https://github.com/clld/clld-audio-plugin',
keywords='web pyramid pylons',
packages=find_packages(where="src"),
package_dir={"": "src"},
include_package_data=True,
zip_safe=False,
install_requires=[
'clld>=7',
'sqlalchemy',
'zope.interface',
],
extras_require={
'dev': ['flake8', 'wheel', 'twine'],
'test': [
'pytest>=5',
'pytest-mock',
'coverage>=4.2',
'pytest-cov',
'webtest',
],
},
license="Apache 2.0",
)
setup()
7 changes: 0 additions & 7 deletions tox.ini

This file was deleted.

0 comments on commit c0134b3

Please sign in to comment.