Skip to content

Commit

Permalink
Tox.ini, requirements and black indentation (#10)
Browse files Browse the repository at this point in the history
* Tox.ini, requirements and black indentation

* wip
  • Loading branch information
adinhodovic committed Dec 24, 2019
1 parent 9ae8b6d commit 4d254b6
Show file tree
Hide file tree
Showing 17 changed files with 712 additions and 124 deletions.
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) 2019 Dani Hodovic
Copyright (c) 2019 Adin Hodovic

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
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
include LICENSE
include README.md
recursive-include wagtail_resume *.html *.png *.gif *js *.css *jpg *jpeg *svg *py
recursive-include wagtail_resume
10 changes: 0 additions & 10 deletions mypy.ini

This file was deleted.

Empty file removed pytest.ini
Empty file.
59 changes: 0 additions & 59 deletions requirements.txt

This file was deleted.

28 changes: 28 additions & 0 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
beautifulsoup4==4.6.0
certifi==2019.11.28
chardet==3.0.4
Django==2.2.9
django-modelcluster==5.0
django-taggit==1.2.0
django-treebeard==4.3
djangorestframework==3.11.0
draftjs-exporter==2.1.7
html5lib==1.0.1
idna==2.8
Pillow==6.2.1
pylint
pytest
pytest-cov
pytest-django
pytest-clarity
pytz==2019.3
requests==2.22.0
six==1.13.0
sqlparse==0.3.0
Unidecode==1.1.1
urllib3==1.25.7
wagtail-metadata==3.0.0
wagtail-markdown==0.5
wagtail==2.7
webencodings==0.5.1
Willow==1.3
1 change: 1 addition & 0 deletions requirements/test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
tox
31 changes: 21 additions & 10 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,24 +1,35 @@
[metadata]
name = wagtail-resume
version = attr: wagtail_resume.__version__
description = Wagtail resumes for developers
description = Wagtail-resume is a reusable Wagtail model for creating a resume.
long_description = file: README.md
long_description_content_type = text/markdown
author = Dani Hodovic
author_email = hodovic.dani@gmail.com
url = https://github.com/danihodovic/wagtail-resume
author = Adin Hodovic
author_email = hodovicadin@gmail.com
url = https://github.com/adinhodovic/wagtail-resume
license = MIT
classifiers =
Development Status :: 3 - Alpha
Framework :: Django :: 2.0
Development Status :: 5 - Production/Stable
Environment :: Web Environment
Framework :: Django
Framework :: Django :: 1.11
Framework :: Django :: 2.1
Framework :: Django :: 2.2
Framework :: Django :: 3.0
Intended Audience :: Developers
License :: OSI Approved :: MIT License
Natural Language :: English
Operating System :: OS Independent
Programming Language :: Python
Programming Language :: Python :: 3
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Topic :: Internet :: WWW/HTTP
Topic :: Internet :: WWW/HTTP :: Dynamic Content
project_urls =
Documentation = https://github.com/danihodovic/wagtail-resume
Source = https://github.com/danihodovic/wagtail-resume
Tracker = https://github.com/danihodovic/wagtail-resume/issues
Documentation = https://github.com/adinhodovic/wagtail-resume
Source = https://github.com/adinhodovic/wagtail-resume
Tracker = https://github.com/adinhodovic/wagtail-resume/issues


[options]
Expand Down
2 changes: 1 addition & 1 deletion tests/management/commands/create_sample_resume.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class Command(BaseCommand):
help = "Creates a sample resume for usage in tests"

def add_arguments(self, parser):
parser.add_argument('sample', nargs='+')
parser.add_argument("sample", nargs="+")

def handle(self, *args, **options):
raise NotImplementedError()
22 changes: 15 additions & 7 deletions tests/migrations/0001_initial.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,26 @@ class Migration(migrations.Migration):
initial = True

dependencies = [
('wagtail_resume', '0001_initial'),
("wagtail_resume", "0001_initial"),
]

operations = [
migrations.CreateModel(
name='CustomResumePage',
name="CustomResumePage",
fields=[
('baseresumepage_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='wagtail_resume.BaseResumePage')),
(
"baseresumepage_ptr",
models.OneToOneField(
auto_created=True,
on_delete=django.db.models.deletion.CASCADE,
parent_link=True,
primary_key=True,
serialize=False,
to="wagtail_resume.BaseResumePage",
),
),
],
options={
'abstract': False,
},
bases=('wagtail_resume.baseresumepage',),
options={"abstract": False,},
bases=("wagtail_resume.baseresumepage",),
),
]
56 changes: 56 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
[tox]
envlist =
build
black
docs
isort
release
py{36,37,38}-django22
py{36,37,38}-django30
py{36,37,38}-djangomaster

[testenv]
deps =
pytest
pytest-clarity
pytest-cov
pytest-django
django22: Django>=2.2<3.0
django30: Django>=3.0<3.1
djangomaster: https://github.com/django/django/archive/master.tar.gz#egg=django
commands =
pytest --cov
setenv =
PYTHONPATH = {toxinidir}:{env:PYTHONPATH:}

[testenv:black]
basepython = python3
skip_install = true
deps = black
commands = black --exclude '.*(migrations)' --target-version=py35 --check --diff .

[testenv:isort]
basepython = python3
skip_install = true
deps = isort
commands = isort --check-only --diff

[testenv:docs]
deps = sphinx
commands = sphinx-build -n -W docs docs/_build

[testenv:build]
basepython = python3
skip_install = true
deps =
wheel
setuptools
commands =
python setup.py -q sdist bdist_wheel

[testenv:release]
deps =
twine
commands =
{[testenv:build]commands}
twine upload -u "__token__" -p {env:PYPI_TOKEN} --skip-existing dist/*
2 changes: 1 addition & 1 deletion wagtail_resume/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@


class WagtailResumeConfig(AppConfig):
name = 'wagtail_resume'
name = "wagtail_resume"

def ready(self):
try:
Expand Down
Loading

0 comments on commit 4d254b6

Please sign in to comment.