-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
146 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: Test and release | ||
|
||
# Fires on all incoming commits | ||
on: [push] | ||
|
||
jobs: | ||
|
||
# Test | ||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python: [3.8] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v1 | ||
with: | ||
python-version: ${{ matrix.python }} | ||
- name: Install dependencies | ||
run: pip install tox tox-gh-actions | ||
- name: Run tests | ||
run: tox --parallel | ||
env: | ||
TOX_PARALLEL_NO_SPINNER: 1 | ||
|
||
# Create a new semantic release | ||
release: | ||
needs: test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v1 | ||
with: | ||
python-version: 3.8 | ||
- uses: cycjimmy/semantic-release-action@v2 | ||
with: | ||
semantic_version: 17 | ||
extra_plugins: | | ||
@semantic-release/exec@5 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
TWINE_USERNAME: __token__ | ||
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"branches": [ | ||
"+([0-9])?(.{+([0-9]),x}).x", | ||
"stable", | ||
{"name": "alpha", "prerelease": true}, | ||
{"name": "beta", "prerelease": true}, | ||
{"name": "rc", "prerelease": true} | ||
], | ||
"plugins": [ | ||
"@semantic-release/commit-analyzer", | ||
"@semantic-release/release-notes-generator", | ||
"@semantic-release/github", | ||
["@semantic-release/exec", { | ||
"verifyConditionsCmd": "python -m pip install -U pip setuptools wheel twine", | ||
"prepareCmd": "sed -i 's/0.0.dev0/${nextRelease.version}/' grappelli_safe/__init__.py", | ||
"publishCmd": "python setup.py sdist bdist_wheel && twine upload dist/*" | ||
}] | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,31 @@ | ||
.. image:: https://img.shields.io/pypi/v/grappelli-safe.svg | ||
.. image:: https://img.shields.io/pypi/pyversions/grappelli-safe.svg | ||
.. image:: https://github.com/stephenmcd/grappelli-safe/workflows/Test%20and%20release/badge.svg | ||
|
||
Overview | ||
======== | ||
|
||
grappelli_safe is a permanent fork of | ||
`Grappelli admin skin <http://code.google.com/p/django-grappelli/>`_ for | ||
`Django <http://www.djangoproject.com/>`_, to be referenced as a | ||
grappelli_safe is a permanent fork of | ||
`Grappelli admin skin <https://code.google.com/p/django-grappelli/>`_ for | ||
`Django <https://www.djangoproject.com/>`_, to be referenced as a | ||
dependency for the `Mezzanine CMS for Django <http://mezzanine.jupo.org/>`_. | ||
|
||
At the time of grappelli_safe's creation, Grappelli was incorrectly | ||
packaged on `PyPI <http://pypi.python.org/pypi>`_, and had also dropped | ||
compatibility with Django 1.1 -- grappelli_safe was therefore created to | ||
At the time of grappelli_safe's creation, Grappelli was incorrectly | ||
packaged on `PyPI <https://pypi.python.org/pypi>`_, and had also dropped | ||
compatibility with Django 1.1 -- grappelli_safe was therefore created to | ||
address these specific issues. | ||
|
||
For further details, see | ||
For further details, see | ||
`Why are Grappelli and Filebrowser Forked? <http://mezzanine.jupo.org/docs/frequently-asked-questions.html#grappelli-filebrowser-forks>`_. | ||
|
||
Development | ||
=========== | ||
|
||
After cloning the repository, install the package with the extra testing requirements and run ``tox``. This will ensure you are running the tests the same way as our CI server: | ||
|
||
.. code-block:: bash | ||
pip install -e ".[testing]" | ||
tox # Use the --parallel option to run tests in parallel (faster) | ||
You might get some ``InterpreterNotFound`` errors due to not having all Python versions available in your system. That's okay as long as you're able to successfully run the test suite for at least one Python version. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
VERSION = '2.0' | ||
__version__ = "0.0.dev0" # Do not edit, managed by semantic-release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,57 @@ | ||
[wheel] | ||
[metadata] | ||
name = grappelli_safe | ||
version = attr: grappelli_safe.__version__ | ||
description = A snapshot of the grappelli_2 branch of django-grappelli, packaged as a dependency for the Mezzanine CMS for Django. | ||
long_description = file: README.rst | ||
long_description_content_type = text/x-rst | ||
author = Patrick Kranzlmueller, Axel Swoboda (vonautomatisch) | ||
author_email = [email protected] | ||
maintainer = Stephen McDonald | ||
maintainer_email = [email protected] | ||
url = http://github.com/stephenmcd/grappelli-safe | ||
license_file = LICENSE | ||
classifiers = | ||
Programming Language :: Python | ||
Programming Language :: Python :: 3 | ||
Programming Language :: Python :: 3.6 | ||
Programming Language :: Python :: 3.7 | ||
Programming Language :: Python :: 3.8 | ||
|
||
[options] | ||
python_requires = >=3.6, <3.9 | ||
packages = find: | ||
include_package_data = true | ||
|
||
[options.extras_require] | ||
testing = | ||
tox >= 3, <4 | ||
|
||
# Building | ||
|
||
[bdist_wheel] | ||
universal = 1 | ||
|
||
# Testing | ||
|
||
[tox:tox] | ||
envlist = | ||
package | ||
|
||
[testenv:package] | ||
# Check package integrity and compatibility with PyPI | ||
allowlist_externals = | ||
rm | ||
deps = | ||
twine | ||
check-manifest | ||
skip_install = true | ||
commands = | ||
python setup.py -q sdist | ||
twine check dist/* | ||
rm -rf dist | ||
check-manifest --ignore-bad-ideas '*.mo' {toxinidir} | ||
|
||
[gh-actions] | ||
# Connect GitHub Action matrices with tox envs | ||
python = | ||
3.8: package |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,3 @@ | ||
from setuptools import setup | ||
|
||
from setuptools import setup, find_packages | ||
|
||
setup( | ||
name="grappelli_safe", | ||
version="0.5.2", | ||
description="A snapshot of the grappelli_2 branch of django-grappelli, " | ||
"packaged as a dependency for the Mezzanine CMS for Django.", | ||
long_description=open("README.rst").read(), | ||
license="BSD 3-clause", | ||
author="Patrick Kranzlmueller, Axel Swoboda (vonautomatisch)", | ||
author_email="[email protected]", | ||
maintainer="Stephen McDonald", | ||
maintainer_email="[email protected]", | ||
url="http://github.com/stephenmcd/grappelli-safe/", | ||
packages=find_packages(), | ||
include_package_data=True, | ||
zip_safe=False, | ||
classifiers=[ | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: 3.5", | ||
"Programming Language :: Python :: 3.8", | ||
], | ||
) | ||
setup() |