Giter Site home page Giter Site logo

horus's Introduction

Pylons

Build Status

Pylons is a rapid web application development framework.

Note

Pylons has merged with repoze.bfg, and is now in maintenance-only mode. It's highly recommended that new projects start with the new merged web framework, pyramid.

Install

Read the online Installation instructions.

If you want to install from source you can run the following command:

This will display a message and download setuptools if the module is not already installed. It will then install Pylons and all its dependencies. You may need root privileges to install setuptools.

Testing

To test the source distribution run the following command:

This will install additional dependencies needed for the tests. As above, you may need root privileges.

Documentation

Read the complete Pylons web framework documentation.

Definitive Guide to Pylons is a book about Pylons published by Apress, written by James Gardner, with free HTML rendering.

Generating documentation requires Sphinx:

Then to build the documentation use the commands:

horus's People

Contributors

digitalresistor avatar mmerickel avatar sontek avatar tilgovi avatar timgates42 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

horus's Issues

testing fails due to database not being initialized

In an attempt to package horus, I stumbled upon the test suite failing on many tests, which boils down to a missing database initialization:

================================================= test session starts ==================================================
platform linux2 -- Python 2.7.8, pytest-2.8.2, py-1.4.30, pluggy-0.3.1
rootdir: /home/hp/src/obs/home:frispete:python/python-horus/horus-0.9.15, inifile: pytest.ini
plugins: cov-2.2.0
collected 73 items 

horus/tests/test_init.py FF.
horus/tests/test_integration.py ...F..F
horus/tests/test_interfaces.py ..
horus/tests/test_models.py ...FFFFFFFFFFFFFFFFFF.
horus/tests/test_resources.py F
horus/tests/test_schemas.py ..
horus/tests/test_views.py ..FF...F.FFFF..FF.F...F..FFFFFFFFFFF

======================================================= FAILURES =======================================================
____________________________________________ TestInitCase.test_group_finder ____________________________________________

self = <horus.tests.test_init.TestInitCase testMethod=test_group_finder>

    def test_group_finder(self):
        from horus import groupfinder
        from horus.tests.models import User
        from horus.tests.models import Group

        group = Group(name='foo', description='bar')
        user1 = User(username='sontek', email='[email protected]')
        user1.password = 'foo'
        group.users.append(user1)

        self.session.add(group)
        self.session.add(user1)
>       self.session.flush()

horus/tests/test_init.py:65: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib64/python2.7/site-packages/sqlalchemy/orm/session.py:2004: in flush
    self._flush(objects)
/usr/lib64/python2.7/site-packages/sqlalchemy/orm/session.py:2122: in _flush
    transaction.rollback(_capture_exception=True)
/usr/lib64/python2.7/site-packages/sqlalchemy/util/langhelpers.py:60: in __exit__
    compat.reraise(exc_type, exc_value, exc_tb)
/usr/lib64/python2.7/site-packages/sqlalchemy/orm/session.py:2086: in _flush
    flush_context.execute()
/usr/lib64/python2.7/site-packages/sqlalchemy/orm/unitofwork.py:373: in execute
    rec.execute(self)
/usr/lib64/python2.7/site-packages/sqlalchemy/orm/unitofwork.py:532: in execute
    uow
/usr/lib64/python2.7/site-packages/sqlalchemy/orm/persistence.py:174: in save_obj
    mapper, table, insert)
/usr/lib64/python2.7/site-packages/sqlalchemy/orm/persistence.py:781: in _emit_insert_statements
    execute(statement, params)
/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py:914: in execute
    return meth(self, multiparams, params)
/usr/lib64/python2.7/site-packages/sqlalchemy/sql/elements.py:323: in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py:1010: in _execute_clauseelement
    compiled_sql, distilled_params
/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py:1146: in _execute_context
    context)
/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py:1341: in _handle_dbapi_exception
    exc_info
/usr/lib64/python2.7/site-packages/sqlalchemy/util/compat.py:199: in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb)
/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py:1139: in _execute_context
    context)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <sqlalchemy.dialects.sqlite.pysqlite.SQLiteDialect_pysqlite object at 0x7f354db2fd10>
cursor = <sqlite3.Cursor object at 0x7f354db08d50>, statement = 'INSERT INTO "group" (description, name) VALUES (?, ?)'
parameters = ('bar', 'foo'), context = <sqlalchemy.dialects.sqlite.base.SQLiteExecutionContext object at 0x7f354dc90150>

    def do_execute(self, cursor, statement, parameters, context=None):
>       cursor.execute(statement, parameters)
E       OperationalError: (sqlite3.OperationalError) no such table: group [SQL: u'INSERT INTO "group" (description, name) VALUES (?, ?)'] [parameters: (u'bar', u'foo')]

/usr/lib64/python2.7/site-packages/sqlalchemy/engine/default.py:450: OperationalError

and so on. Applying the patch below fixes this for me.

--- horus-0.9.15/horus/tests/__init__.py~       2014-01-19 03:48:10.000000000 +0100
+++ horus-0.9.15/horus/tests/__init__.py        2016-01-07 16:33:59.505228572 +0100
@@ -35,6 +35,7 @@ class BaseTestCase(unittest.TestCase):
     @classmethod
     def setUpClass(cls):
         cls.engine = engine_from_config(settings, prefix='sqlalchemy.')
+        Base.metadata.create_all(cls.engine)
         cls.Session = sessionmaker()

     def setUp(self):

Questions

  1. I cannot execute the tests because test.ini says "use = egg:horus_demo" but there is no horus_demo in the repository. Are we missing some files in the repository?

  2. Wouldn't it be better for a new project such as this to use my project nine instead of six for Python 2/3 compatibility? The advantage would be that the code would look more like Python 3.
    https://pypi.python.org/pypi/nine

  3. Sending out emails should also be a strategy, it may have several different implementations. One of the implementations, which interests me, is to have a background Celery task sending out emails. Is this idea OK with your project design? Should the documentation mention it?

  4. Have you heard of Persona?
    https://developer.mozilla.org/en-US/Persona/Why_Persona
    Do we like it?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.