Skip to content
This repository has been archived by the owner on Jul 22, 2019. It is now read-only.

Commit

Permalink
global: initial package separation
Browse files Browse the repository at this point in the history
Signed-off-by: Lars Holm Nielsen <lars.holm.nielsen@cern.ch>
  • Loading branch information
lnielsen committed Aug 3, 2015
1 parent 84dc10c commit adb220d
Show file tree
Hide file tree
Showing 57 changed files with 1,965 additions and 224 deletions.
24 changes: 24 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
##
## This file is part of Flask-AppFactory
## Copyright (C) 2014 CERN.
##
## Flask-AppFactory is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License as
## published by the Free Software Foundation; either version 2 of the
## License, or (at your option) any later version.
##
## Flask-AppFactory is distributed in the hope that it will be useful, but
## WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
## General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with Flask-AppFactory; if not, write to the Free Software Foundation,
## Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
##
## In applying this licence, CERN does not waive the privileges and immunities
## granted to it by virtue of its status as an Intergovernmental Organization
## or submit itself to any jurisdiction.

[run]
source = flask_appfactory
5 changes: 5 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.git
*.pyc
__pycache__/
.tox
.cache
31 changes: 31 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
root = true

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

# Python files
[*.py]
indent_size = 4
# isort plugin configuration
multi_line_output = 2
default_section = THIRDPARTY

# RST files (used by sphinx)
[*.rst]
indent_size = 4

# CSS, HTML, JS, JSON, YML
[*.{css,html,js,json,yml}]
indent_size = 2

# Matches the exact files either package.json or .travis.yml
[{package.json,.travis.yml}]
indent_size = 2

# Dockerfile
[Dockerfile]
indent_size = 4
57 changes: 57 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]

# C extensions
*.so

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

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

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

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

# Translations
*.mo
*.pot

# Django stuff:
*.log

# Sphinx documentation
docs/_build/

# PyBuilder
target/
53 changes: 53 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# This file is part of Flask-AppFactory
# Copyright (C) 2015 CERN.
#
# Flask-AppFactory is free software; you can redistribute it and/or
# modify it under the terms of the Revised BSD License; see LICENSE
# file for more details.

sudo: false

language: python

python:
- "2.7"
- "3.3"
- "3.4"

env:
- REQUIREMENTS=devel
- REQUIREMENTS=latest
- REQUIREMENTS=lowest

cache:
- pip

install:
# Install test dependencies
- "travis_retry pip install coveralls pep257 Sphinx"
- "travis_retry pip install pytest pytest-pep8 pytest-cov pytest-cache"
- "travis_retry pip install -r requirements.${REQUIREMENTS}.txt"
- "travis_retry pip install -e ."

script:
- pep257 flask_appfactory
- "sphinx-build -qnNW docs docs/_build/html"
- python setup.py test
- "sphinx-build -qnNW -b doctest docs docs/_build/doctest"

after_success:
- coveralls

notifications:
email: false

deploy:
provider: pypi
user: lnielsen
password:
secure: cKcrzBcAPn5pQqhJAX+ct5L7dNDL3Y4NKt+KksWfag5YN2SCTkAEcm0JvKxP4pURG0AOXqqWjY1ydvj7XkafEOWq4lKjtJy/Eb1ZY8dO5RJOQ1fjICvtVxcW/6qQKz5TESd6CafXis0E3kmqrRAHWnFZATEhA0KnnvoCoGByZUOn9gg527dA8tv4MatY9xYQGOuryKWq/KKgD92Z9EhwwzB+26naXlpI6GQiMoxJA5br4Idc9Y5uHbJVGSxTWkQYbXo8GmYatwGmswPfJXZqJt37K8yLdYTCZku7FQ/mBNrj1OQutQh40MX72Zd3o5GEHswFLKvRcPjX4jA6kjBcGKC/Lxn2oDCKA8HhLpCUwQlhuZpXvp2Ghq8df7ZIZvsuO/KOVAske7e0L0uGcs244jY00uTFtK9X/Xtj72tBD4On/GeWXOgRW6tlwo6NsJOdR1HjiR6F3xX62IUJBXGE5obmbNTF+XciWTiY1aTKlSSRbu+M0q6jD+1DFl0ttuvdh9zMctdDkCJMqncEU5z9sDX6U08iahdHF70eCL6dRvl5aD6flbVMVOXt7z3WZPqWzLDIOCuy1JjgMyO2l++AB4lhSCdxEaOjGlLIyIBLfLnsDMtqrKavNszq4h01qlh3tiQNW9KXxXuxCTx4lr5YdQ/y6P5mhSoQBNfpZpVuRr4=
distributions: "sdist bdist_wheel"
on:
tags: true
python: "2.7"
condition: $REQUIREMENTS = latest
16 changes: 16 additions & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Authors
=======

Contact us at `info@invenio-software.org <mailto:info@invenio-software.org>`_

* Lars Holm Nielsen <lars.holm.nielsen@cern.ch>
* Jiri Kuncar <jiri.kuncar@cern.ch>
* Tibor Simko <tibor.simko@cern.ch>
* Yoan Blanc <yoan.blanc@cern.ch>
* Marco Neumann <marco@crepererum.net>
* Esteban J. G. Gabancho <esteban.gabancho@cern.ch>
* Samuele Kaplun <samuele.kaplun@cern.ch>
* Konstantinos Ntemagkos <konstantinos.ntemagkos@cern.ch>
* Jan Aage Lavik <jan.age.lavik@cern.ch>
* Ivan Masár <helix84@centrum.sk>
* Adrian Tudor Panescu <adrian.tudor.panescu@cern.ch>
6 changes: 6 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Changes
=======

Version 0.1.0 (released 2015-07-31)

- Initial public release.
26 changes: 26 additions & 0 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
Contributing
============

Bug reports, feature requests, and other contributions are welcome.
If you find a demonstrable problem that is caused by the code of this
library, please:

1. Search for `already reported problems
<https://github.com/inveniosoftware/flask-appfactory/issues>`_.
2. Check if the issue has been fixed or is still reproducible on the
latest `master` branch.
3. Create an issue with **a test case**.

If you create a feature branch, you can run the tests to ensure everything is
operating correctly:

.. code-block:: console
$ ./run-tests.sh
You can also test your feature branch using Docker:

.. code-block:: console
$ docker-compose build
$ docker-compose run --rm web /code/run-tests.sh
35 changes: 35 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# This file is part of Flask-AppFactory
# Copyright (C) 2015 CERN.
#
# Flask-AppFactory is free software; you can redistribute it and/or modify it under
# the terms of the Revised BSD License; see LICENSE file for more details.

# Use Python-2.7:
FROM python:2.7

# Install some prerequisites ahead of `setup.py` in order to profit
# from the docker build cache:
RUN pip install coveralls \
ipython \
pep257 \
pytest \
pytest-pep8 \
pytest-cache \
pytest-cov \
Sphinx

# Add sources to `code` and work there:
WORKDIR /code
ADD . /code

# Install flask-appfactory:
RUN pip install -e .

# Run container as user `flask-appfactory` with UID `1000`, which should match
# current host user in most situations:
RUN adduser --uid 1000 --disabled-password --gecos '' flaskappfactory && \
chown -R flaskappfactory:flaskappfactory /code

# Run test suite instead of starting the application:
USER flaskappfactory
CMD ["python", "setup.py", "test"]
38 changes: 38 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
Flask-AppFactory is free software; you can redistribute it and/or modify it
under the terms of the Revised BSD License quoted below.

Copyright (C) 2015 CERN.

All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.

* Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.

In applying this license, CERN does not waive the privileges and immunities
granted to it by virtue of its status as an Intergovernmental Organization or
submit itself to any jurisdiction.
16 changes: 16 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# -*- coding: utf-8 -*-
#
# This file is part of Flask-AppFactory
# Copyright (C) 2015 CERN.
#
# Flask-AppFactory is free software; you can redistribute it and/or
# modify it under the terms of the Revised BSD License; see LICENSE
# file for more details.

include LICENSE AUTHORS CHANGES README.rst
include .coveragerc run-tests.sh
include docs/*.rst docs/*.py docs/Makefile
include tests/*.py
include examples/*.py
recursive-include docs/_themes *.py *.css *.css_t *.conf *.html README
recursive-include docs/_templates *.html
41 changes: 41 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
==================
Flask-AppFactory
==================

.. image:: https://travis-ci.org/inveniosoftware/flask-appfactory.svg?branch=master
:target: https://travis-ci.org/inveniosoftware/flask-appfactory
.. image:: https://coveralls.io/repos/inveniosoftware/flask-appfactory/badge.svg?branch=master
:target: https://coveralls.io/r/inveniosoftware/flask-appfactory
.. image:: https://pypip.in/v/flask-appfactory/badge.svg
:target: https://crate.io/packages/flask-appfactory/
.. image:: https://pypip.in/d/flask-appfactory/badge.svg
:target: https://crate.io/packages/flask-appfactory/

Flask-AppFactory is an dynamic application loader.

It allows you to build reusable modules that can be easily be assembled into
full Flask applications using this loader. Each reusable module can provide
default configuration, blueprints and command line interface.

Installation
============
Flask-AppFactory is on PyPI so all you need is: ::

pip install Flask-AppFactory

Documentation
=============
Documentation is available at <http://flask-appfactory.readthedocs.org> or can be build using Sphinx: ::

pip install Sphinx
python setup.py build_sphinx

Testing
=======
Running the tests are as simple as: ::

python setup.py test

or (to also show test coverage) ::

./run-tests.sh
34 changes: 34 additions & 0 deletions RELEASE-NOTES.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
=========================
Flask-AppFactory v0.1.0
=========================

Flask-AppFactory v0.1.0 was released on July 31, 2015.

About
-----

Flask-AppFactory is an application loader which assembles an Flask
applications from individually released modules based on configuration.

Installation
------------

$ pip install flask-appfactory

Documentation
-------------

http://flask-appfactory.readthedocs.org/en/v0.1.0

Homepage
--------

https://github.com/inveniosoftware/flask-appfactory

Happy hacking and thanks for flying Flask-AppFactory.

| Invenio Development Team
| Email: info@invenio-software.org
| Twitter: http://twitter.com/inveniosoftware
| GitHub: http://github.com/inveniosoftware
| URL: http://invenio-software.org
Loading

0 comments on commit adb220d

Please sign in to comment.