From e551a4f026c1522ba4045cfb1799d050bdb072bc Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Fri, 8 Apr 2016 04:43:08 -0700 Subject: rough draft for wiki2, replace setup.py with pip. See #2104. --- docs/tutorials/wiki2/installation.rst | 206 ++++++++++++++++++++++++---------- 1 file changed, 148 insertions(+), 58 deletions(-) (limited to 'docs/tutorials/wiki2/installation.rst') diff --git a/docs/tutorials/wiki2/installation.rst b/docs/tutorials/wiki2/installation.rst index b263ccbd9..ca7b8ae8a 100644 --- a/docs/tutorials/wiki2/installation.rst +++ b/docs/tutorials/wiki2/installation.rst @@ -72,8 +72,8 @@ Python 3.5: c:\> c:\Python35\Scripts\virtualenv %VENV% -Upgrade pip in the virtual environment --------------------------------------- +Upgrade ``pip`` in the virtual environment +------------------------------------------ On UNIX ^^^^^^^ @@ -187,16 +187,15 @@ On Windows and the project into directories that do not contain spaces in their paths. - .. _installing_project_in_dev_mode: Installing the project in development mode ------------------------------------------ In order to do development on the project easily, you must "register" the -project as a development egg in your workspace using the ``setup.py develop`` +project as a development egg in your workspace using the ``pip install -e .`` command. In order to do so, change directory to the ``tutorial`` directory that -you created in :ref:`sql_making_a_project`, and run the ``setup.py develop`` +you created in :ref:`sql_making_a_project`, and run the ``pip install -e .`` command using the virtualenv Python interpreter. On UNIX @@ -215,25 +214,130 @@ On Windows c:\pyramidtut> cd tutorial c:\pyramidtut\tutorial> %VENV%\Scripts\pip install -e . -The console will show ``setup.py`` checking for packages and installing missing -packages. Success executing this command will show a line like the following:: +The console will show ``pip`` checking for packages and installing missing +packages. Success executing this command will show a line like the following: + +.. code-block:: bash + + Successfully installed Chameleon-2.24 Mako-1.0.4 MarkupSafe-0.23 \ + Pygments-2.1.3 SQLAlchemy-1.0.12 pyramid-chameleon-0.3 \ + pyramid-debugtoolbar-2.4.2 pyramid-mako-1.0.2 pyramid-tm-0.12.1 \ + transaction-1.4.4 tutorial waitress-0.8.10 zope.sqlalchemy-0.7.6 + + +.. _install-testing-requirements: + +Install testing requirements +---------------------------- + +In order to run tests, we need to install the testing requirements, which means +we need to edit our ``setup.py``: + +.. .. literalinclude:: src/installation/setup.py + :language: py + :linenos: + :emphasize-lines: 23-30,50-52 + +.. code-block:: python + :linenos: + :emphasize-lines: 23-29,49-51 + + import os + + from setuptools import setup, find_packages + + here = os.path.abspath(os.path.dirname(__file__)) + with open(os.path.join(here, 'README.txt')) as f: + README = f.read() + with open(os.path.join(here, 'CHANGES.txt')) as f: + CHANGES = f.read() + + requires = [ + 'pyramid', + 'pyramid_jinja2', + 'pyramid_debugtoolbar', + 'pyramid_tm', + 'SQLAlchemy', + 'transaction', + 'zope.sqlalchemy', + 'waitress', + ] + + tests_require = [ + 'WebTest >= 1.3.1', # py3 compat + ] + + testing_extras = tests_require + [ + 'pytest', # includes virtualenv + 'pytest-cov', + ] + + setup(name='tutorial', + version='0.0', + description='tutorial', + long_description=README + '\n\n' + CHANGES, + classifiers=[ + "Programming Language :: Python", + "Framework :: Pyramid", + "Topic :: Internet :: WWW/HTTP", + "Topic :: Internet :: WWW/HTTP :: WSGI :: Application", + ], + author='', + author_email='', + url='', + keywords='web wsgi bfg pylons pyramid', + packages=find_packages(), + include_package_data=True, + zip_safe=False, + test_suite='tutorial', + extras_require={ + 'testing': testing_extras, + }, + tests_require=tests_require, + install_requires=requires, + entry_points="""\ + [paste.app_factory] + main = tutorial:main + [console_scripts] + initialize_tutorial_db = tutorial.scripts.initializedb:main + """, + ) + +Only the emphasized lines need to be edited. + +Next install the testing requirements. + +On UNIX +^^^^^^^ + +.. code-block:: bash + + $ $VENV/bin/pip install -e ".[testing]" + +On Windows +^^^^^^^^^^ + +.. code-block:: ps1con + + c:\pyramidtut\tutorial> %VENV%\Scripts\pip install -e ".[testing]" - Finished processing dependencies for tutorial==0.0 .. _sql_running_tests: Run the tests ------------- -After you've installed the project in development mode, you may run the tests -for the project. +After you've installed the project in development mode as well as the testing +requirements, you may run the tests for the project. On UNIX ^^^^^^^ .. code-block:: bash - $ $VENV/bin/python setup.py test -q + $ $VENV/bin/py.test tutorial/tests.py -q + +.. TODO remove comments .. py.test? See https://github.com/Pylons/pyramid/issues/2104#issuecomment-155852046 @@ -242,79 +346,65 @@ On Windows .. code-block:: ps1con - c:\pyramidtut\tutorial> %VENV%\Scripts\python setup.py test -q + c:\pyramidtut\tutorial> %VENV%\Scripts\py.test tutorial\tests.py -q .. py.test? See https://github.com/Pylons/pyramid/issues/2104#issuecomment-155852046 -For a successful test run, you should see output that ends like this:: +For a successful test run, you should see output that ends like this: + +.. code-block:: bash .. - ---------------------------------------------------------------------- - Ran 2 tests in 0.053s + 2 passed in 0.44 seconds - OK Expose test coverage information -------------------------------- -You can run the ``nosetests`` command to see test coverage information. This -runs the tests in the same way that ``setup.py test`` does, but provides -additional "coverage" information, exposing which lines of your project are -covered by the tests. +You can run the ``py.test`` command to see test coverage information. This +runs the tests in the same way that ``py.test`` does, but provides additional +"coverage" information, exposing which lines of your project are covered by the +tests. -To get this functionality working, we'll need to install the ``nose`` and -``coverage`` packages into our ``virtualenv``: +We've already installed the ``pytest-cov`` package into our ``virtualenv``, so +we can run the tests with coverage. On UNIX ^^^^^^^ .. code-block:: bash - $ $VENV/bin/easy_install nose coverage + $ $VENV/bin/py.test --cov=tutorial tutorial/tests.py On Windows ^^^^^^^^^^ .. code-block:: ps1con - c:\pyramidtut\tutorial> %VENV%\Scripts\easy_install nose coverage - -Once ``nose`` and ``coverage`` are installed, we can run the tests with -coverage. - -On UNIX -^^^^^^^ - -.. code-block:: bash - - $ $VENV/bin/nosetests --cover-package=tutorial --cover-erase --with-coverage - -On Windows -^^^^^^^^^^ - -.. code-block:: ps1con - - c:\pyramidtut\tutorial> %VENV%\Scripts\nosetests --cover-package=tutorial \ - --cover-erase --with-coverage + c:\pyramidtut\tutorial> %VENV%\Scripts\py.test --cov=tutorial tutorial\tests.py If successful, you will see output something like this:: - .. - Name Stmts Miss Cover Missing - ---------------------------------------------------------- - tutorial.py 8 6 25% 7-12 - tutorial/models.py 22 0 100% - tutorial/models/meta.py 5 0 100% - tutorial/models/mymodel.py 8 0 100% - tutorial/scripts.py 0 0 100% - tutorial/views.py 0 0 100% - tutorial/views/default.py 12 0 100% - ---------------------------------------------------------- - TOTAL 55 6 89% - ---------------------------------------------------------------------- - Ran 2 tests in 0.579s - - OK +======================== test session starts ======================== +platform Python 3.5.1, pytest-2.9.1, py-1.4.31, pluggy-0.3.1 +rootdir: /Users/stevepiercy/projects/pyramidtut/tutorial, inifile: +plugins: cov-2.2.1 +collected 2 items + +tutorial/tests.py .. +------------------ coverage: platform Python 3.5.1 ------------------ +Name Stmts Miss Cover +------------------------------------------------------ +tutorial/__init__.py 13 9 31% +tutorial/models.py 12 0 100% +tutorial/scripts/__init__.py 0 0 100% +tutorial/scripts/initializedb.py 24 24 0% +tutorial/tests.py 39 0 100% +tutorial/views.py 11 0 100% +------------------------------------------------------ +TOTAL 99 33 67% + +===================== 2 passed in 0.57 seconds ====================== Our package doesn't quite have 100% test coverage. -- cgit v1.2.3 From 25c809968d16fbaa07f667713fd35d64d34de877 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Fri, 8 Apr 2016 04:46:45 -0700 Subject: fix syntax highlighting --- docs/tutorials/wiki2/installation.rst | 46 ++++++++++++++++++----------------- 1 file changed, 24 insertions(+), 22 deletions(-) (limited to 'docs/tutorials/wiki2/installation.rst') diff --git a/docs/tutorials/wiki2/installation.rst b/docs/tutorials/wiki2/installation.rst index ca7b8ae8a..d6745e758 100644 --- a/docs/tutorials/wiki2/installation.rst +++ b/docs/tutorials/wiki2/installation.rst @@ -383,28 +383,30 @@ On Windows c:\pyramidtut\tutorial> %VENV%\Scripts\py.test --cov=tutorial tutorial\tests.py -If successful, you will see output something like this:: - -======================== test session starts ======================== -platform Python 3.5.1, pytest-2.9.1, py-1.4.31, pluggy-0.3.1 -rootdir: /Users/stevepiercy/projects/pyramidtut/tutorial, inifile: -plugins: cov-2.2.1 -collected 2 items - -tutorial/tests.py .. ------------------- coverage: platform Python 3.5.1 ------------------ -Name Stmts Miss Cover ------------------------------------------------------- -tutorial/__init__.py 13 9 31% -tutorial/models.py 12 0 100% -tutorial/scripts/__init__.py 0 0 100% -tutorial/scripts/initializedb.py 24 24 0% -tutorial/tests.py 39 0 100% -tutorial/views.py 11 0 100% ------------------------------------------------------- -TOTAL 99 33 67% - -===================== 2 passed in 0.57 seconds ====================== +If successful, you will see output something like this: + +.. code-block:: bash + + ======================== test session starts ======================== + platform Python 3.5.1, pytest-2.9.1, py-1.4.31, pluggy-0.3.1 + rootdir: /Users/stevepiercy/projects/pyramidtut/tutorial, inifile: + plugins: cov-2.2.1 + collected 2 items + + tutorial/tests.py .. + ------------------ coverage: platform Python 3.5.1 ------------------ + Name Stmts Miss Cover + ------------------------------------------------------ + tutorial/__init__.py 13 9 31% + tutorial/models.py 12 0 100% + tutorial/scripts/__init__.py 0 0 100% + tutorial/scripts/initializedb.py 24 24 0% + tutorial/tests.py 39 0 100% + tutorial/views.py 11 0 100% + ------------------------------------------------------ + TOTAL 99 33 67% + + ===================== 2 passed in 0.57 seconds ====================== Our package doesn't quite have 100% test coverage. -- cgit v1.2.3 From aa51dcc629028fda64ee83340d9b3981be7fbb29 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Fri, 8 Apr 2016 05:14:31 -0700 Subject: use `--cov-report=term-missing` --- docs/tutorials/wiki2/installation.rst | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'docs/tutorials/wiki2/installation.rst') diff --git a/docs/tutorials/wiki2/installation.rst b/docs/tutorials/wiki2/installation.rst index d6745e758..70c77f57f 100644 --- a/docs/tutorials/wiki2/installation.rst +++ b/docs/tutorials/wiki2/installation.rst @@ -374,14 +374,15 @@ On UNIX .. code-block:: bash - $ $VENV/bin/py.test --cov=tutorial tutorial/tests.py + $ $VENV/bin/py.test --cov=tutorial --cov-report=term-missing tutorial/tests.py On Windows ^^^^^^^^^^ .. code-block:: ps1con - c:\pyramidtut\tutorial> %VENV%\Scripts\py.test --cov=tutorial tutorial\tests.py + c:\pyramidtut\tutorial> %VENV%\Scripts\py.test --cov=tutorial \ + --cov-report=term-missing tutorial\tests.py If successful, you will see output something like this: @@ -395,15 +396,15 @@ If successful, you will see output something like this: tutorial/tests.py .. ------------------ coverage: platform Python 3.5.1 ------------------ - Name Stmts Miss Cover - ------------------------------------------------------ - tutorial/__init__.py 13 9 31% + Name Stmts Miss Cover Missing + ---------------------------------------------------------------- + tutorial/__init__.py 13 9 31% 13-21 tutorial/models.py 12 0 100% tutorial/scripts/__init__.py 0 0 100% - tutorial/scripts/initializedb.py 24 24 0% + tutorial/scripts/initializedb.py 24 24 0% 1-40 tutorial/tests.py 39 0 100% tutorial/views.py 11 0 100% - ------------------------------------------------------ + ---------------------------------------------------------------- TOTAL 99 33 67% ===================== 2 passed in 0.57 seconds ====================== -- cgit v1.2.3 From c239c4a68b41dab9d3f4477ea7de6431ec7548dd Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Fri, 8 Apr 2016 12:50:10 -0700 Subject: simplify test dependencies per https://github.com/Pylons/pyramid/pull/2442/files/aa51dcc629028fda64ee83340d9b3981be7fbb29#r59052781 --- docs/tutorials/wiki2/installation.rst | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'docs/tutorials/wiki2/installation.rst') diff --git a/docs/tutorials/wiki2/installation.rst b/docs/tutorials/wiki2/installation.rst index 70c77f57f..221b62ece 100644 --- a/docs/tutorials/wiki2/installation.rst +++ b/docs/tutorials/wiki2/installation.rst @@ -263,11 +263,8 @@ we need to edit our ``setup.py``: 'waitress', ] - tests_require = [ + testing_extras = [ 'WebTest >= 1.3.1', # py3 compat - ] - - testing_extras = tests_require + [ 'pytest', # includes virtualenv 'pytest-cov', ] @@ -293,7 +290,6 @@ we need to edit our ``setup.py``: extras_require={ 'testing': testing_extras, }, - tests_require=tests_require, install_requires=requires, entry_points="""\ [paste.app_factory] -- cgit v1.2.3 From 3c0d2ead8e7b54ac2a3b31e3589b676b2cc97a53 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Fri, 8 Apr 2016 12:52:07 -0700 Subject: adjust line numbers for emphasis --- docs/tutorials/wiki2/installation.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/tutorials/wiki2/installation.rst') diff --git a/docs/tutorials/wiki2/installation.rst b/docs/tutorials/wiki2/installation.rst index 221b62ece..2ea0c8339 100644 --- a/docs/tutorials/wiki2/installation.rst +++ b/docs/tutorials/wiki2/installation.rst @@ -240,7 +240,7 @@ we need to edit our ``setup.py``: .. code-block:: python :linenos: - :emphasize-lines: 23-29,49-51 + :emphasize-lines: 22-26,46-48 import os -- cgit v1.2.3 From 9b61be1feebe26c4943232997ccbdecfb2272cc7 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Fri, 8 Apr 2016 13:36:01 -0700 Subject: removed test_suite line. ping @mmerickel @bertjwregeer --- docs/tutorials/wiki2/installation.rst | 1 - 1 file changed, 1 deletion(-) (limited to 'docs/tutorials/wiki2/installation.rst') diff --git a/docs/tutorials/wiki2/installation.rst b/docs/tutorials/wiki2/installation.rst index 2ea0c8339..bd52b8f7a 100644 --- a/docs/tutorials/wiki2/installation.rst +++ b/docs/tutorials/wiki2/installation.rst @@ -286,7 +286,6 @@ we need to edit our ``setup.py``: packages=find_packages(), include_package_data=True, zip_safe=False, - test_suite='tutorial', extras_require={ 'testing': testing_extras, }, -- cgit v1.2.3 From d8be5a579541ebf48fdb0ee613b87e06222fa9ca Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Sat, 9 Apr 2016 01:00:41 -0700 Subject: - use literalinclude for setup.py source - strip comments - update py.test output using recently updated scaffold from master branch - remove duplicate bullet points --- docs/tutorials/wiki2/installation.rst | 145 ++++++++++------------------------ 1 file changed, 42 insertions(+), 103 deletions(-) (limited to 'docs/tutorials/wiki2/installation.rst') diff --git a/docs/tutorials/wiki2/installation.rst b/docs/tutorials/wiki2/installation.rst index bd52b8f7a..a592029cd 100644 --- a/docs/tutorials/wiki2/installation.rst +++ b/docs/tutorials/wiki2/installation.rst @@ -230,77 +230,22 @@ packages. Success executing this command will show a line like the following: Install testing requirements ---------------------------- -In order to run tests, we need to install the testing requirements, which means -we need to edit our ``setup.py``: +In order to run tests, we need to install the testing requirements. This is +done through our project's ``setup.py`` file, in the ``testing_extras`` and +``extras_requires`` stanzas, and by issuing the command below for your +operating system. -.. .. literalinclude:: src/installation/setup.py - :language: py +.. literalinclude:: src/installation/setup.py + :language: python :linenos: - :emphasize-lines: 23-30,50-52 + :lineno-start: 22 + :lines: 22-26 -.. code-block:: python +.. literalinclude:: src/installation/setup.py + :language: python :linenos: - :emphasize-lines: 22-26,46-48 - - import os - - from setuptools import setup, find_packages - - here = os.path.abspath(os.path.dirname(__file__)) - with open(os.path.join(here, 'README.txt')) as f: - README = f.read() - with open(os.path.join(here, 'CHANGES.txt')) as f: - CHANGES = f.read() - - requires = [ - 'pyramid', - 'pyramid_jinja2', - 'pyramid_debugtoolbar', - 'pyramid_tm', - 'SQLAlchemy', - 'transaction', - 'zope.sqlalchemy', - 'waitress', - ] - - testing_extras = [ - 'WebTest >= 1.3.1', # py3 compat - 'pytest', # includes virtualenv - 'pytest-cov', - ] - - setup(name='tutorial', - version='0.0', - description='tutorial', - long_description=README + '\n\n' + CHANGES, - classifiers=[ - "Programming Language :: Python", - "Framework :: Pyramid", - "Topic :: Internet :: WWW/HTTP", - "Topic :: Internet :: WWW/HTTP :: WSGI :: Application", - ], - author='', - author_email='', - url='', - keywords='web wsgi bfg pylons pyramid', - packages=find_packages(), - include_package_data=True, - zip_safe=False, - extras_require={ - 'testing': testing_extras, - }, - install_requires=requires, - entry_points="""\ - [paste.app_factory] - main = tutorial:main - [console_scripts] - initialize_tutorial_db = tutorial.scripts.initializedb:main - """, - ) - -Only the emphasized lines need to be edited. - -Next install the testing requirements. + :lineno-start: 45 + :lines: 45-47 On UNIX ^^^^^^^ @@ -332,10 +277,6 @@ On UNIX $ $VENV/bin/py.test tutorial/tests.py -q -.. TODO remove comments - -.. py.test? See https://github.com/Pylons/pyramid/issues/2104#issuecomment-155852046 - On Windows ^^^^^^^^^^ @@ -343,8 +284,6 @@ On Windows c:\pyramidtut\tutorial> %VENV%\Scripts\py.test tutorial\tests.py -q -.. py.test? See https://github.com/Pylons/pyramid/issues/2104#issuecomment-155852046 - For a successful test run, you should see output that ends like this: .. code-block:: bash @@ -393,14 +332,19 @@ If successful, you will see output something like this: ------------------ coverage: platform Python 3.5.1 ------------------ Name Stmts Miss Cover Missing ---------------------------------------------------------------- - tutorial/__init__.py 13 9 31% 13-21 - tutorial/models.py 12 0 100% + tutorial/__init__.py 8 6 25% 7-12 + tutorial/models/__init__.py 22 0 100% + tutorial/models/meta.py 5 0 100% + tutorial/models/mymodel.py 8 0 100% + tutorial/routes.py 3 3 0% 1-3 tutorial/scripts/__init__.py 0 0 100% - tutorial/scripts/initializedb.py 24 24 0% 1-40 + tutorial/scripts/initializedb.py 26 26 0% 1-45 tutorial/tests.py 39 0 100% - tutorial/views.py 11 0 100% + tutorial/views/__init__.py 0 0 100% + tutorial/views/default.py 12 0 100% + tutorial/views/notfound.py 4 4 0% 1-7 ---------------------------------------------------------------- - TOTAL 99 33 67% + TOTAL 127 39 69% ===================== 2 passed in 0.57 seconds ====================== @@ -446,15 +390,17 @@ On Windows c:\pyramidtut\tutorial> %VENV%\Scripts\initialize_tutorial_db development.ini -The output to your console should be something like this:: +The output to your console should be something like this: - 2016-02-21 23:57:41,793 INFO [sqlalchemy.engine.base.Engine:1192][MainThread] SELECT CAST('test plain returns' AS VARCHAR(60)) AS anon_1 - 2016-02-21 23:57:41,793 INFO [sqlalchemy.engine.base.Engine:1193][MainThread] () - 2016-02-21 23:57:41,794 INFO [sqlalchemy.engine.base.Engine:1192][MainThread] SELECT CAST('test unicode returns' AS VARCHAR(60)) AS anon_1 - 2016-02-21 23:57:41,794 INFO [sqlalchemy.engine.base.Engine:1193][MainThread] () - 2016-02-21 23:57:41,796 INFO [sqlalchemy.engine.base.Engine:1097][MainThread] PRAGMA table_info("models") - 2016-02-21 23:57:41,796 INFO [sqlalchemy.engine.base.Engine:1100][MainThread] () - 2016-02-21 23:57:41,798 INFO [sqlalchemy.engine.base.Engine:1097][MainThread] +.. code-block:: bash + + 2016-04-09 00:53:37,801 INFO [sqlalchemy.engine.base.Engine:1192][MainThread] SELECT CAST('test plain returns' AS VARCHAR(60)) AS anon_1 + 2016-04-09 00:53:37,801 INFO [sqlalchemy.engine.base.Engine:1193][MainThread] () + 2016-04-09 00:53:37,802 INFO [sqlalchemy.engine.base.Engine:1192][MainThread] SELECT CAST('test unicode returns' AS VARCHAR(60)) AS anon_1 + 2016-04-09 00:53:37,802 INFO [sqlalchemy.engine.base.Engine:1193][MainThread] () + 2016-04-09 00:53:37,802 INFO [sqlalchemy.engine.base.Engine:1097][MainThread] PRAGMA table_info("models") + 2016-04-09 00:53:37,803 INFO [sqlalchemy.engine.base.Engine:1100][MainThread] () + 2016-04-09 00:53:37,803 INFO [sqlalchemy.engine.base.Engine:1097][MainThread] CREATE TABLE models ( id INTEGER NOT NULL, name TEXT, @@ -463,15 +409,15 @@ The output to your console should be something like this:: ) - 2016-02-21 23:57:41,798 INFO [sqlalchemy.engine.base.Engine:1100][MainThread] () - 2016-02-21 23:57:41,798 INFO [sqlalchemy.engine.base.Engine:686][MainThread] COMMIT - 2016-02-21 23:57:41,799 INFO [sqlalchemy.engine.base.Engine:1097][MainThread] CREATE UNIQUE INDEX my_index ON models (name) - 2016-02-21 23:57:41,799 INFO [sqlalchemy.engine.base.Engine:1100][MainThread] () - 2016-02-21 23:57:41,799 INFO [sqlalchemy.engine.base.Engine:686][MainThread] COMMIT - 2016-02-21 23:57:41,801 INFO [sqlalchemy.engine.base.Engine:646][MainThread] BEGIN (implicit) - 2016-02-21 23:57:41,802 INFO [sqlalchemy.engine.base.Engine:1097][MainThread] INSERT INTO models (name, value) VALUES (?, ?) - 2016-02-21 23:57:41,802 INFO [sqlalchemy.engine.base.Engine:1100][MainThread] ('one', 1) - 2016-02-21 23:57:41,821 INFO [sqlalchemy.engine.base.Engine:686][MainThread] COMMIT + 2016-04-09 00:53:37,803 INFO [sqlalchemy.engine.base.Engine:1100][MainThread] () + 2016-04-09 00:53:37,804 INFO [sqlalchemy.engine.base.Engine:686][MainThread] COMMIT + 2016-04-09 00:53:37,805 INFO [sqlalchemy.engine.base.Engine:1097][MainThread] CREATE UNIQUE INDEX my_index ON models (name) + 2016-04-09 00:53:37,805 INFO [sqlalchemy.engine.base.Engine:1100][MainThread] () + 2016-04-09 00:53:37,806 INFO [sqlalchemy.engine.base.Engine:686][MainThread] COMMIT + 2016-04-09 00:53:37,807 INFO [sqlalchemy.engine.base.Engine:646][MainThread] BEGIN (implicit) + 2016-04-09 00:53:37,808 INFO [sqlalchemy.engine.base.Engine:1097][MainThread] INSERT INTO models (name, value) VALUES (?, ?) + 2016-04-09 00:53:37,808 INFO [sqlalchemy.engine.base.Engine:1100][MainThread] ('one', 1) + 2016-04-09 00:53:37,809 INFO [sqlalchemy.engine.base.Engine:686][MainThread] COMMIT Success! You should now have a ``tutorial.sqlite`` file in your current working directory. This is an SQLite database with a single table defined in it @@ -534,16 +480,9 @@ assumptions: - You are willing to use :term:`URL dispatch` to map URLs to code. -- You want to use zope.sqlalchemy_, pyramid_tm_ and the transaction_ package +- You want to use zope.sqlalchemy_, pyramid_tm_, and the transaction_ packages to scope sessions to requests. -- You want to use pyramid_jinja2_ to render your templates. - Different templating engines can be used but we had to choose one to - make the tutorial. See :ref:`available_template_system_bindings` for some - options. -- You want to use zope.sqlalchemy_, pyramid_tm_ and the transaction_ package to - scope sessions to requests. - - You want to use pyramid_jinja2_ to render your templates. Different templating engines can be used, but we had to choose one to make this tutorial. See :ref:`available_template_system_bindings` for some options. -- cgit v1.2.3