Skip to content

Commit

Permalink
Update project structure for 1.8 release (#124)
Browse files Browse the repository at this point in the history
* Redesign project structure according to cookiecutter-djangopackage

* Fix compatibility with Django 2.0 on example project and tests

* Bump version, update docs, prepare for 1.8.0 release

* Update AUTHORS and HISTORY

* Update travis.yml
  • Loading branch information
dekoza committed Jul 5, 2018
1 parent e838815 commit ce9a76a
Show file tree
Hide file tree
Showing 105 changed files with 2,009 additions and 587 deletions.
31 changes: 6 additions & 25 deletions .coveragerc
@@ -1,30 +1,11 @@

[run]
omit =
*/python?.?/*
*/site-packages/nose/*
*mock*
*migrations*
*test*
*settings/*
*/urls*
branch = true

[report]
omit =
*site-packages*
*tests*
*.tox*
show_missing = True
exclude_lines =
import
pragma: no cover
@staticmethod
if six.PY3
raise AssertionError
raise NotImplementedError
raise ImproperlyConfigured
logger.debug
log.debug
omit =
*/python?.?/*
*/site-packages/nose/*
*mock*
*migrations*
*test*
*settings/*
*/urls*
23 changes: 23 additions & 0 deletions .editorconfig
@@ -0,0 +1,23 @@
# http://editorconfig.org

root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.{py,rst,ini}]
indent_style = space
indent_size = 4

[*.{html,css,scss,json,yml}]
indent_style = space
indent_size = 2

[*.md]
trim_trailing_whitespace = false

[Makefile]
indent_style = tab
16 changes: 16 additions & 0 deletions .github/ISSUE_TEMPLATE.md
@@ -0,0 +1,16 @@
* django-getpaid version:
* Django version:
* Python version:
* Operating System:

### Description

Describe what you were trying to get done.
Tell us what happened, what went wrong, and what you expected to happen.

### What I Did

```
Paste the command(s) you ran and the output.
If there was a crash, please include the traceback here.
```
28 changes: 23 additions & 5 deletions .gitignore 100755 → 100644
@@ -1,4 +1,8 @@
*.py[co]
*.py[cod]
__pycache__

# C extensions
*.so

# Packages
*.egg
Expand All @@ -12,18 +16,32 @@ var
sdist
develop-eggs
.installed.cfg
lib
lib64

# Installer logs
pip-log.txt

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

#Translations
# *.mo
# Translations
*.mo

#Mr Developer
# Mr Developer
.mr.developer.cfg
.project
.pydevproject

# Pycharm/Intellij
.idea

# Complexity
output/*.html
output/*/index.html

.idea/*
# Sphinx
docs/_build
46 changes: 28 additions & 18 deletions .travis.yml
@@ -1,20 +1,30 @@
# Config file for automatic testing at travis-ci.org

language: python
python:
- "2.7"
- "3.5"
- "3.6"
env:
- DJANGO_VERSION=1.8.18 # LTS supported until April 2018
- DJANGO_VERSION=1.10.7 # supported until December 2017
- DJANGO_VERSION=1.11.1 # LTS supported until April 2020
# command to install dependencies
install:
- "pip install -q -e .[przelewy24,payu,moip,paymill]"
- "pip install -q -r getpaid_test_project/requirements.txt"
- "pip install -q Django==$DJANGO_VERSION"
- "pip install coveralls"
# command to run tests
script:
"cd getpaid_test_project && python manage.py test --settings=getpaid_test_project.settings_test"

matrix:
include:
- python: 2.7
env: TOX_ENV=py27-django-111
- python: 3.4
env: TOX_ENV=py34-django-111
- python: 3.4
env: TOX_ENV=py34-django-20
- python: 3.5
env: TOX_ENV=py35-django-111
- python: 3.5
env: TOX_ENV=py35-django-20
- python: 3.6
env: TOX_ENV=py36-django-111
- python: 3.6
env: TOX_ENV=py36-django-20
fast_finish: true

# command to install dependencies, e.g. pip install -r requirements.txt --use-mirrors
install: pip install -r requirements_test.txt

# command to run tests using coverage, e.g. python setup.py test
script: tox -e $TOX_ENV

after_success:
coveralls
- codecov -e TOX_ENV
25 changes: 25 additions & 0 deletions AUTHORS.rst
@@ -0,0 +1,25 @@
=======
Credits
=======

Original Author
---------------

* Krzysztof Dorosz <cypreess@gmail.com>

Development Lead
----------------

* Dominik Kozaczko <dominik@kozaczko.info>

Contributors
------------

Please see https://github.com/cypreess/django-getpaid/graphs/contributors

Sponsors
--------

Many thanks to Sunscrapers_ for sponsoring development since version 1.8
.. _Sunscrapers: http://sunscrapers.com/

112 changes: 112 additions & 0 deletions CONTRIBUTING.rst
@@ -0,0 +1,112 @@
============
Contributing
============

Contributions are welcome, and they are greatly appreciated! Every
little bit helps, and credit will always be given.

You can contribute in many ways:

Types of Contributions
----------------------

Report Bugs
~~~~~~~~~~~

Report bugs at https://github.com/cypreess/django-getpaid/issues.

If you are reporting a bug, please include:

* Your operating system name and version.
* Any details about your local setup that might be helpful in troubleshooting.
* Detailed steps to reproduce the bug.

Fix Bugs
~~~~~~~~

Look through the GitHub issues for bugs. Anything tagged with "bug"
is open to whoever wants to implement it.

Implement Features
~~~~~~~~~~~~~~~~~~

Look through the GitHub issues for features. Anything tagged with "feature"
is open to whoever wants to implement it.

Write Documentation
~~~~~~~~~~~~~~~~~~~

django-getpaid could always use more documentation, whether as part of the
official django-getpaid docs, in docstrings, or even on the web in blog posts,
articles, and such.

Submit Feedback
~~~~~~~~~~~~~~~

The best way to send feedback is to file an issue at https://github.com/cypreess/django-getpaid/issues.

If you are proposing a feature:

* Explain in detail how it would work.
* Keep the scope as narrow as possible, to make it easier to implement.
* Remember that this is a volunteer-driven project, and that contributions
are welcome :)

Get Started!
------------

Ready to contribute? Here's how to set up `django-getpaid` for local development.

1. Fork the `django-getpaid` repo on GitHub.
2. Clone your fork locally::

$ git clone git@github.com:your_name_here/django-getpaid.git

3. Install your local copy into a virtualenv. Assuming you have virtualenvwrapper installed, this is how you set up your fork for local development::

$ mkvirtualenv django-getpaid
$ cd django-getpaid/
$ python setup.py develop

4. Create a branch for local development::

$ git checkout -b name-of-your-bugfix-or-feature

Now you can make your changes locally.

5. When you're done making changes, check that your changes pass flake8 and the
tests, including testing other Python versions with tox::

$ flake8 getpaid tests
$ python setup.py test
$ tox

To get flake8 and tox, just pip install them into your virtualenv.

6. Commit your changes and push your branch to GitHub::

$ git add .
$ git commit -m "Your detailed description of your changes."
$ git push origin name-of-your-bugfix-or-feature

7. Submit a pull request through the GitHub website.

Pull Request Guidelines
-----------------------

Before you submit a pull request, check that it meets these guidelines:

1. The pull request should include tests.
2. If the pull request adds functionality, the docs should be updated. Put
your new functionality into a function with a docstring, and add the
feature to the list in README.rst.
3. The pull request should work for Python 2.6, 2.7, and 3.3, and for PyPy. Check
https://travis-ci.org/cypreess/django-getpaid/pull_requests
and make sure that the tests pass for all supported Python versions.

Tips
----

To run a subset of tests::

$ python -m unittest tests.test_getpaid
16 changes: 14 additions & 2 deletions CHANGES → HISTORY.rst
@@ -1,9 +1,21 @@
django-getpaid changes
======================
.. :changelog:
History
=======

(master branch - current development)
-------------------------------------



Version 1.8.0 (2018-07-04)
--------------------------

* Updated project structure thanks to cookiecutter-djangopackage
* Dropped support for Django < 1.11
* Provide support for Django 2.0


Version 1.7.5
-------------
* Fixed przelewy24 params (py3 support)
Expand Down
15 changes: 15 additions & 0 deletions LICENSE
@@ -0,0 +1,15 @@

MIT License

Copyright (c) 2012-2018, Krzysztof Dorosz
Copyright (c) 2018 Sunscrapers

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.




10 changes: 5 additions & 5 deletions MANIFEST.in
@@ -1,6 +1,6 @@
include CHANGES
include AUTHORS.rst
include CONTRIBUTING.rst
include HISTORY.rst
include LICENSE
include README.rst
include *.txt
recursive-include getpaid/backends *.png *.html
graft getpaid/locale
graft getpaid/templates
recursive-include getpaid *.html *.png *.gif *js *.css *jpg *jpeg *svg *py
20 changes: 0 additions & 20 deletions MIT-LICENSE.txt

This file was deleted.

0 comments on commit ce9a76a

Please sign in to comment.