Permalink
Browse files

Cleaning up contrib process.

  • Loading branch information...
1 parent b70017e commit 08a7d5c1901b0e056ced543f22b2ebc8e46de270 @miohtama miohtama committed Jun 5, 2016
View
@@ -26,6 +26,13 @@ matrix:
install:
- travis_retry pip install tox
+# For Selenium
+# https://docs.travis-ci.com/user/gui-and-headless-browsers/
+before_script:
+ - "export DISPLAY=:99.0"
+ - "sh -e /etc/init.d/xvfb start"
+ - sleep 3 # give xvfb some time to start
+
script:
- travis_retry tox
View
@@ -0,0 +1,63 @@
+============
+Contributing
+============
+
+.. contents:: :local:
+
+Discuss first
+-------------
+
+For changes open an issue p on Github for discussion preferably before starting any coding. Ask the authors opinion how the issue should be approached as this will make it easier to merge the pull request later.
+
+Unit tests
+----------
+
+All features must be covered by unit tests, so that test coverage stays in 100%.
+
+To run tests::
+
+ pip install tox # System wide installation
+ tox
+
+This will run tests for Python 2.x, Python 3.x, PyPy, functional, coverage, documentation.
+
+Functional tests
+----------------
+
+All features must be covered by functional tests and have example use. To run functional tests only::
+
+ tox -e functional
+
+.. to edit functional tests::
+
+ source .tox/functional/bin/activate
+ cd deformdefom # Checked out by tox functional
+ pserve demo.ini # Start web server
+
+ # Run functional test suite using Chrome
+ WEBDRIVER="chrome" nosetests -x
+
+ # Run functional test suite using Chrome, stop on pdb on exception
+ WEBDRIVER="chrome" nosetests -x --pdb
+
+ # Run one functional test case using Chrome
+ WEBDRIVER="chrome" nosetests -x deformdemo.test:SequenceOfDateInputs
+
+Documentation
+-------------
+
+All features must be documented with code samples in narrative documentation, API documentation or deformdeom.
+
+Changelog
+---------
+
+Update ``CHANGES.txt``.
+
+Update ``CONTRIBUTORS.rst``.
+
+Pull requests
+-------------
+
+Make pull request on github for deform, deformdemo.
+
+
View
@@ -14,7 +14,7 @@ Deform
Deform is a Python HTML form library. You can easily create forms for your application. Deform can do complex forms with JavaScript integration, like nested forms where you need add and remove subform items. Date and time picking widgets and other rich widgets are supported out of the box.
-Deform comes with default `Chameleon templates <https://chameleon.readthedocs.io/en/latest/>`_ for `Bootstrap <http://getbootstrap.com>`_ based widgets. It uses `Colander <https://github.com/Pylons/colander>`_ as for form schema and validation definitions. Deform integrates well with `Pyramid web framework <https://trypyramid.com/>`_ and several other web frameworks.
+Deform comes with default `Chameleon templates <https://chameleon.readthedocs.io/en/latest/>`_ for `Bootstrap <http://getbootstrap.com>`_ based widgets. It uses `Colander <https://github.com/Pylons/colander>`_ as for form schema and validation definitions. Deform integrates well with `Pyramid web framework <https://trypyramid.com/>`_ and several other web frameworks. Peppercorn library is used to convert flat HTML name value mapping form submissions to stream of name value mappings submissions, allowing building complex and nested form structure.
Please see http://docs.pylonsproject.org/projects/deform/en/latest/ for the
documentation.
View
@@ -1,3 +0,0 @@
-# Contributing
-
-See [README.rst](https://github.com/Pylons/deform/blob/master/README.rst).
@@ -1,121 +0,0 @@
-# Translations template for deform.
-# Copyright (C) 2013 ORGANIZATION
-# This file is distributed under the same license as the deform project.
-# FIRST AUTHOR <EMAIL@ADDRESS>, 2013.
-#
-#, fuzzy
-msgid ""
-msgstr ""
-"Project-Id-Version: deform 2.0a2\n"
-"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
-"POT-Creation-Date: 2013-11-16 15:42+0900\n"
-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: LANGUAGE <LL@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=utf-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Generated-By: Babel 1.3\n"
-
-#: deform/schema.py:103
-msgid "${value} is not a dictionary"
-msgstr ""
-
-#: deform/schema.py:110
-msgid "${value} has no ${key} key"
-msgstr ""
-
-#: deform/widget.py:656 deform/widget.py:1662
-msgid "Incomplete date"
-msgstr ""
-
-#: deform/widget.py:659
-msgid "Incomplete time"
-msgstr ""
-
-#: deform/widget.py:1157
-msgid "Fields did not match"
-msgstr ""
-
-#: deform/widget.py:1158
-msgid "Value"
-msgstr ""
-
-#: deform/widget.py:1159
-msgid "Confirm Value"
-msgstr ""
-
-#: deform/widget.py:1216
-msgid "Password did not match confirm"
-msgstr ""
-
-#: deform/widget.py:1373
-msgid "Add ${subitem_title}"
-msgstr ""
-
-#: deform/templates/checked_password.pt:8
-msgid "Password"
-msgstr ""
-
-#: deform/templates/checked_password.pt:18
-msgid "Confirm Password"
-msgstr ""
-
-#: deform/templates/dateparts.pt:10
-msgid "Year"
-msgstr ""
-
-#: deform/templates/dateparts.pt:18
-msgid "Month"
-msgstr ""
-
-#: deform/templates/dateparts.pt:26
-msgid "Day"
-msgstr ""
-
-#: deform/templates/datetimeinput.pt:10
-msgid "Date"
-msgstr ""
-
-#: deform/templates/datetimeinput.pt:17
-msgid "Time"
-msgstr ""
-
-#: deform/templates/form.pt:34
-msgid "There was a problem with your submission"
-msgstr ""
-
-#: deform/templates/mapping.pt:13
-msgid "There was a problem with this section"
-msgstr ""
-
-#. Default: en
-#: deform/templates/richtext.pt:30
-msgid "language-code"
-msgstr ""
-
-#: deform/templates/sequence_item.pt:23
-msgid "Reorder (via drag and drop)"
-msgstr ""
-
-#: deform/templates/sequence_item.pt:28
-msgid "Remove"
-msgstr ""
-
-#: deform/templates/readonly/checkbox.pt:5
-msgid "True"
-msgstr ""
-
-#: deform/templates/readonly/checkbox.pt:9
-msgid "False"
-msgstr ""
-
-#: deform/templates/readonly/checked_password.pt:2
-#: deform/templates/readonly/password.pt:2
-msgid "Password not displayed."
-msgstr ""
-
-#: deform/tests/test_widget.py:1550
-msgid "Yo ${subitem_title}"
-msgstr ""
-
@@ -7,17 +7,16 @@
<input type="${type_name}"
name="date"
value="${cstruct}"
-
+
tal:attributes="class string: ${css_class or ''} form-control hasDatepicker;
style style"
id="${oid}"/>
${field.end_mapping()}
<script type="text/javascript">
deform.addCallback(
- '${oid}',
- function(oid) {
- if (!Modernizr.inputtypes['date'] ||
- "${type_name}" != "date"){
+ '${oid}',
+ function deform_cb(oid) {
+ if (!Modernizr.inputtypes['date'] ||"${type_name}" != "date" || window.forceDateTimePolyfill){
$('#' + oid).pickadate(${options_json});
}
}
@@ -21,15 +21,15 @@
tal:attributes="label item.label">
<option tal:repeat="(value, description) item.options"
tal:attributes="
- selected (multiple and value in list(map(str, cstruct)) or value == list(map(str, cstruct))) and 'selected';
+ selected (multiple and value in list(map(unicode, cstruct)) or value == list(map(unicode, cstruct))) and 'selected';
class css_class;
label field.widget.long_label_generator and description;
value value"
tal:content="field.widget.long_label_generator and field.widget.long_label_generator(item.label, description) or description"/>
</optgroup>
<option tal:condition="not isinstance(item, optgroup_class)"
tal:attributes="
- selected (multiple and item[0] in list(map(str, cstruct)) or item[0] == list(map(str, cstruct))) and 'selected';
+ selected (multiple and item[0] in list(map(unicode, cstruct)) or item[0] == list(map(unicode, cstruct))) and 'selected';
class css_class;
value item[0]">${item[1]}</option>
</tal:loop>
@@ -14,7 +14,7 @@
}
.form-control .select2-choice .select2-arrow {
- border-radius: 0 2px 2px 0;
+ border-radius: 0 2px 2px 0;
}
.form-control.select2-container {
@@ -51,15 +51,15 @@
tal:attributes="label item.label">
<option tal:repeat="(value, description) item.options"
tal:attributes="
- selected (multiple and value in list(map(str, cstruct)) or value == list(map(str, cstruct))) and 'selected';
+ selected (multiple and value in list(map(unicode, cstruct)) or value == list(map(unicode, cstruct))) and 'selected';
class css_class;
label field.widget.long_label_generator and description;
value value"
tal:content="field.widget.long_label_generator and field.widget.long_label_generator(item.label, description) or description"/>
</optgroup>
<option tal:condition="not isinstance(item, optgroup_class)"
tal:attributes="
- selected (multiple and item[0] in list(map(str, cstruct)) or item[0] == list(map(str, cstruct))) and 'selected';
+ selected (multiple and item[0] in list(map(unicode, cstruct)) or item[0] == list(map(unicode, cstruct))) and 'selected';
class css_class;
value item[0]">${item[1]}</option>
</tal:loop>
@@ -18,7 +18,7 @@
'${oid}',
function(oid) {
if (!Modernizr.inputtypes['time'] ||
- "${type_name}" != "time"){
+ "${type_name}" != "time" || window.forceDateTimePolyfill){
$('#' + oid).pickatime(${options_json});
}
}
View
No changes.
Submodule deformdemo added at d4e91b
View
@@ -0,0 +1,16 @@
+Support and Development
+=======================
+
+To report bugs, use the `bug tracker <https://github.com/Pylons/deform/issues>`_.
+
+To submit patches see :ref:`contributing`.
+
+If you've got questions that aren't answered by this documentation, contact the `Pylons-discuss mailing list <http://groups.google.com/group/pylons-discuss>`_ or join the
+
+.. only:: not latex
+
+ `#pyramid IRC channel <irc://irc.freenode.net/#pylons>`_.
+
+.. only:: latex
+
+ #pyramid IRC channel ``irc://irc.freenode.net/#pylons``.
@@ -0,0 +1,3 @@
+.. _contributing:
+
+.. include:: ../CONTRIBUTING.rst
View
@@ -27,10 +27,10 @@ system of choice and a suitable :term:`renderer` is supplied to
.. warning::
- Despite the version number at the top, this documentation has not been
- updated for the 2.X release line of Deform. Most of the documentation
- will still apply, but where it does not, see the :ref:`changelog` for
- an overview of changes between 0.9.9 and this release.
+ Despite the version number at the top, this documentation has not been
+ updated for the 2.X release line of Deform. Most of the documentation
+ will still apply, but where it does not, see the :ref:`changelog` for
+ an overview of changes between 0.9.9 and this release.
Also, please see http://deform2demo.repoze.org .
Topics
@@ -49,6 +49,8 @@ Topics
app.rst
ajax.rst
i18n.rst
+ contributing.rst
+ community.rst
api.rst
interfaces.rst
glossary.rst
@@ -62,35 +64,6 @@ application which demonstrates most of Deform's features. The source code
for this application is also available in the `deform package on GitHub
<https://github.com/Pylons/deform>`_.
-Support and Development
-=======================
-
-To report bugs, use the `bug tracker
-<https://github.com/Pylons/deform/issues>`_.
-
-If you've got questions that aren't answered by this documentation, contact
-the `Pylons-discuss mailing list
-<http://groups.google.com/group/pylons-discuss>`_ or join the
-
-.. only:: not latex
-
- `#pylons IRC channel <irc://irc.freenode.net/#pylons>`_.
-
-.. only:: latex
-
- #pylons IRC channel ``irc://irc.freenode.net/#pylons``.
-
-
-Browse and check out tagged and trunk versions of :mod:`deform` via the
-`deform package on GitHub <https://github.com/Pylons/deform>`_. To check out
-the trunk, use this command::
-
- git clone git://github.com/Pylons/deform.git
-
-To find out how to become a contributor to :mod:`deform`, please see the
-`Pylons Project contributor documentation
-<http://docs.pylonsproject.org/#contributing/>`_.
-
Index and Glossary
==================
View
@@ -1,11 +1,18 @@
#!/usr/bin/env bash
+#
+
+# Say no to errors
+set -e
domain="deform"
py=python
if [[ -f $INS/bin/pyramidpy ]];then
py="$INS/bin/pyramidpy"
fi
-$py setup.py extract_messages
-$py setup.py update_catalog -D $domain
-$py setup.py compile_catalog -D $domain
-# vim:set et sts=4 ts=4 tw=80:
+
+# $py setup.py extract_messages
+# $py setup.py update_catalog -D $domain
+# $py setup.py compile_catalog -D $domain
+pot-create -c lingua.ini deform
+
+
Oops, something went wrong.

0 comments on commit 08a7d5c

Please sign in to comment.