Skip to content

Commit

Permalink
Bring pinax-wiki up to latest standards
Browse files Browse the repository at this point in the history
  • Loading branch information
paltman committed Nov 30, 2015
1 parent 677142e commit 4b4930d
Show file tree
Hide file tree
Showing 33 changed files with 298 additions and 316 deletions.
9 changes: 6 additions & 3 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
[run]
source = wiki
omit = wiki/tests/*
branch = 1
source = pinax
omit = pinax/wiki/conf.py,pinax/wiki/tests/*,pinax/wiki/admin.py,pinax/wiki/migrations/*
branch = true

[report]
omit = pinax/wiki/conf.py,pinax/wiki/tests/*,pinax/wiki/admin.py,pinax/wiki/migrations/*
51 changes: 43 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,45 @@
build
dist
.coverage
.tox
MANIFEST
*.pyc
*.egg-info
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]

# C extensions
*.so

# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
eggs/
lib/
lib64/
parts/
sdist/
var/
*.egg-info/
.installed.cfg
*.egg
docs/_build/
*.eggs

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.cache
nosetests.xml
coverage.xml

# Translations
*.mo
*.pot

# Django stuff:
*.log

# Sphinx documentation
docs/_build/
37 changes: 22 additions & 15 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,28 @@
language: python
sudo: false
python:
- 2.7
- "2.7"
- "3.2"
- "3.3"
- "3.4"
- "3.5"
env:
- DJANGO=https://github.com/django/django/tarball/master
- DJANGO=Django==1.6.5
- DJANGO=1.7
- DJANGO=1.8
- DJANGO=1.9
matrix:
exclude:
- python: "3.2"
env: DJANGO=1.9
- python: "3.3"
env: DJANGO=1.9
- python: "3.5"
env: DJANGO=1.7
install:
- pip install $DJANGO flake8 coverage coveralls
- pip install -e .
- pip install tox coveralls
script:
- flake8 --max-line-length=125 --max-complexity=10 --statistics --benchmark wiki
- coverage run setup.py test
- coverage report
after_success: coveralls
- tox -e py${TRAVIS_PYTHON_VERSION//[.]/}-$DJANGO
after_success:
- coveralls
notifications:
irc:
channels:
- "chat.freenode.net#pinax"
on_success: change
on_failure: change
use_notice: true
slack: pinax:TMipYjcCCRxrKQFXk8I9cHLS
130 changes: 0 additions & 130 deletions docs/Makefile

This file was deleted.

7 changes: 0 additions & 7 deletions docs/changelog.rst

This file was deleted.

37 changes: 0 additions & 37 deletions docs/conf.py

This file was deleted.

15 changes: 0 additions & 15 deletions docs/index.rst

This file was deleted.

24 changes: 0 additions & 24 deletions docs/installation.rst

This file was deleted.

47 changes: 47 additions & 0 deletions makemigrations.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#!/usr/bin/env python
import os
import sys

import django

from django.conf import settings


DEFAULT_SETTINGS = dict(
INSTALLED_APPS=[
"django.contrib.auth",
"django.contrib.contenttypes",
"django.contrib.sites",
"wiki",
"wiki.tests"
],
DATABASES={
"default": {
"ENGINE": "django.db.backends.sqlite3",
"NAME": ":memory:",
}
},
SITE_ID=1,
ROOT_URLCONF="wiki.tests.urls",
SECRET_KEY="notasecret",
)


def run(*args):
if not settings.configured:
settings.configure(**DEFAULT_SETTINGS)

django.setup()

parent = os.path.dirname(os.path.abspath(__file__))
sys.path.insert(0, parent)

django.core.management.call_command(
"makemigrations",
"pinax_wiki",
*args
)


if __name__ == "__main__":
run(*sys.argv[1:])
2 changes: 2 additions & 0 deletions pinax/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from pkgutil import extend_path
__path__ = extend_path(__path__, __name__) # noqa
5 changes: 5 additions & 0 deletions pinax/wiki/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import pkg_resources


default_app_config = "pinax.wiki.apps.AppConfig"
__version__ = pkg_resources.get_distribution("pinax-wiki").version
14 changes: 14 additions & 0 deletions pinax/wiki/apps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import importlib

from django.apps import AppConfig as BaseAppConfig
from django.utils.translation import ugettext_lazy as _


class AppConfig(BaseAppConfig):

name = "pinax.wiki"
label = "pinax_wiki"
verbose_name = _("Pinax Wiki")

def ready(self):
importlib.import_module("pinax.wiki.receivers")

0 comments on commit 4b4930d

Please sign in to comment.