[PATCH 1/6] Small layout change and add .gitignore and requirements.txt files

Pierre-Yves Chibon pingou at pingoured.fr
Mon Jan 7 20:26:12 UTC 2013


- Small layout change (more pep8 style) on forms.py
- Add a first (small) .gitignore file
- Add a requirements.txt file, handy to keep track of the dependencies
  of the project and while working in virtualenv
---
 .gitignore                    |    1 +
 coprs_frontend/coprs/forms.py |    6 ++++++
 requirements.txt              |    7 +++++++
 3 files changed, 14 insertions(+), 0 deletions(-)
 create mode 100644 .gitignore
 create mode 100644 requirements.txt

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..0d20b64
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+*.pyc
diff --git a/coprs_frontend/coprs/forms.py b/coprs_frontend/coprs/forms.py
index 69e6f69..0010d72 100644
--- a/coprs_frontend/coprs/forms.py
+++ b/coprs_frontend/coprs/forms.py
@@ -33,6 +33,7 @@ class UrlListValidator(object):
 
         return is_url
 
+
 class AllowedArchesValidator(object):
     def __init__(self, message = None):
         if not message:
@@ -45,6 +46,7 @@ class AllowedArchesValidator(object):
             if a not in constants.CHROOTS[form.release.data]:
                 raise wtf.ValidationError(self.message.format(a))
 
+
 class CoprUniqueNameValidator(object):
     def __init__(self, message = None):
         if not message:
@@ -69,6 +71,7 @@ class StringListFilter(object):
         regex = re.compile(r'\s+')
         return regex.sub(lambda x: '\n', result)
 
+
 class CoprForm(wtf.Form):
     # also use id here, to be able to find out whether user is updating a copr
     # if so, we don't want to shout that name already exists
@@ -94,6 +97,7 @@ class CoprForm(wtf.Form):
     def chroots(self):
         return ['{0}-{1}'.format(self.release.data, arch) for arch in self.arches.data ]
 
+
 class BuildForm(wtf.Form):
     pkgs = wtf.TextAreaField('Pkgs',
                              validators = [wtf.Required(), UrlListValidator()],
@@ -105,6 +109,7 @@ class BuildForm(wtf.Form):
                                validators = [wtf.NumberRange(min = constants.MIN_BUILD_TIMEOUT, max = constants.MAX_BUILD_TIMEOUT)],
                                default = constants.DEFAULT_BUILD_TIMEOUT)
 
+
 class PermissionsApplierFormFactory(object):
     @staticmethod
     def create_form_cls(permission = None):
@@ -133,6 +138,7 @@ class PermissionsApplierFormFactory(object):
 
         return F
 
+
 class DynamicPermissionsFormFactory(object):
     """Creates a dynamic form for given set of copr permissions"""
     @staticmethod
diff --git a/requirements.txt b/requirements.txt
new file mode 100644
index 0000000..3b7b12b
--- /dev/null
+++ b/requirements.txt
@@ -0,0 +1,7 @@
+# Used for when working from a virtualenv.
+# Use this file by running "$ pip install -r requirements.txt"
+argparse
+flask-sqlalchemy
+flask-openid
+flask-wtf
+alembic
-- 
1.7.1



More information about the copr-devel mailing list