[fedocal] master: Disabling Error E1103 from pylint in the flask unit-tests (5f82d6d)
by pingou@fedorahosted.org
Repository : http://git.fedorahosted.org/cgit/fedocal.git
On branch : master
>---------------------------------------------------------------
commit 5f82d6db32e91b31d8648a57653483e0ef3f5cbb
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Mon Nov 12 11:30:18 2012 +0100
Disabling Error E1103 from pylint in the flask unit-tests
pylint seems to not be able to infer the output type from the flask test
client. This leads to a number of false-positive error in the pylint
output. With this commit we remove them.
>---------------------------------------------------------------
fedocal/tests/test_flask.py | 1 +
fedocal/tests/test_flask_api.py | 1 +
2 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/fedocal/tests/test_flask.py b/fedocal/tests/test_flask.py
index 0d2e139..3d49716 100644
--- a/fedocal/tests/test_flask.py
+++ b/fedocal/tests/test_flask.py
@@ -44,6 +44,7 @@ import fedocal.fedocallib as fedocallib
from fedocal.tests import Modeltests, DB_PATH
+# pylint: disable=E1103
class Flasktests(Modeltests):
""" Flask application tests. """
diff --git a/fedocal/tests/test_flask_api.py b/fedocal/tests/test_flask_api.py
index 0f40c0a..6f43542 100644
--- a/fedocal/tests/test_flask_api.py
+++ b/fedocal/tests/test_flask_api.py
@@ -44,6 +44,7 @@ import fedocal.fedocallib as fedocallib
from fedocal.tests import Modeltests, DB_PATH, TODAY
+# pylint: disable=E1103
class FlaskApitests(Modeltests):
""" Flask application API tests. """
10 years, 10 months
[fedocal] master: Fix unit-tests of test_fedocallib (5a78c32)
by pingou@fedorahosted.org
Repository : http://git.fedorahosted.org/cgit/fedocal.git
On branch : master
>---------------------------------------------------------------
commit 5a78c3209444881be05b2368090a4f9b30a10842
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Mon Nov 12 07:53:16 2012 +0100
Fix unit-tests of test_fedocallib
>---------------------------------------------------------------
fedocal/tests/test_fedocallib.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fedocal/tests/test_fedocallib.py b/fedocal/tests/test_fedocallib.py
index 04444d3..1157edc 100644
--- a/fedocal/tests/test_fedocallib.py
+++ b/fedocal/tests/test_fedocallib.py
@@ -645,7 +645,7 @@ class Fedocallibtests(Modeltests):
None, None,
None, None)
- self.assertRaises(InvalidMeeting, fedocallib.add_meeting,
+ self.assertRaises(AttributeError, fedocallib.add_meeting,
self.session, calendarobj, fasuser,
None, TODAY - timedelta(days=1),
9, 10, None,
10 years, 10 months
[fedocal] master: Add utility script to run pylint properly (00da661)
by Pierre-YvesChibon
Repository : http://git.fedorahosted.org/cgit/fedocal.git
On branch : master
>---------------------------------------------------------------
commit 00da6617a5d7efc549ace96f28787cbb7677df13
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Mon Nov 12 06:42:52 2012 +0100
Add utility script to run pylint properly
>---------------------------------------------------------------
run_pylint.sh | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/run_pylint.sh b/run_pylint.sh
new file mode 100755
index 0000000..2da5926
--- /dev/null
+++ b/run_pylint.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+PYTHONPATH=fedocal pylint -f parseable fedocal | tee pylint.out
+
+#pep8 fedocal/*.py fedocal/*/*.py | tee pep8.out
10 years, 10 months
[fedocal] master: Fix tests test_fedocallib (5805ba4)
by pingou@fedorahosted.org
Repository : http://git.fedorahosted.org/cgit/fedocal.git
On branch : master
>---------------------------------------------------------------
commit 5805ba4b5bbe29b4ee20f01409959e3739140bd3
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Sat Nov 10 19:22:02 2012 +0100
Fix tests test_fedocallib
>---------------------------------------------------------------
fedocal/tests/test_fedocallib.py | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/fedocal/tests/test_fedocallib.py b/fedocal/tests/test_fedocallib.py
index 5018632..04444d3 100644
--- a/fedocal/tests/test_fedocallib.py
+++ b/fedocal/tests/test_fedocallib.py
@@ -50,8 +50,7 @@ from fedocallib.exceptions import UserNotAllowed, InvalidMeeting
from tests import Modeltests, TODAY
RESULT_CALENDAR_HTML = '<table class="month">\n'\
-'<tr><th colspan="7" class="month"><a class="button" href="#"><'\
-'</a> November 2012 <a class="button" href="#">></a></th></tr>\n'\
+'<tr><th colspan="7" class="month"> November 2012 </th></tr>\n'\
'<tr><td class="noday"> </td><td class="noday"> </td><td '\
'class="noday"> </td><td class="thu">1</td><td class="fri">2</td>'\
'<td class="sat">3</td><td class="sun">4</td></tr>\n'\
10 years, 10 months
[fedocal] master: Fix unit-test for fedora_calendar (fff88a5)
by Pierre-YvesChibon
Repository : http://git.fedorahosted.org/cgit/fedocal.git
On branch : master
>---------------------------------------------------------------
commit fff88a55aabf0e49c84bb82f740513144eb1f56f
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Sat Nov 10 13:37:14 2012 +0100
Fix unit-test for fedora_calendar
>---------------------------------------------------------------
fedocal/tests/test_fedora_calendar.py | 16 +++++-----------
1 files changed, 5 insertions(+), 11 deletions(-)
diff --git a/fedocal/tests/test_fedora_calendar.py b/fedocal/tests/test_fedora_calendar.py
index 735183e..45cf349 100644
--- a/fedocal/tests/test_fedora_calendar.py
+++ b/fedocal/tests/test_fedora_calendar.py
@@ -76,21 +76,16 @@ class FedocalCalendartests(Modeltests):
today = date.today()
cal = FedocalCalendar(today.year, today.month, today.day)
self.assertEqual(cal.formatmonthname(2012, 4),
- '<tr><th colspan="7" class="month"><a class="button" '\
- 'href="#"><</a> April 2012 <a class="button" href="#">>'\
- '</a></th></tr>')
+ '<tr><th colspan="7" class="month"> April 2012 </th></tr>')
self.assertEqual(cal.formatmonthname(2012, 4, False),
- '<tr><th colspan="7" class="month"><a class="button" '\
- 'href="#"><</a> April <a class="button" href="#">>'\
- '</a></th></tr>')
+ '<tr><th colspan="7" class="month"> April </th></tr>')
def test_formatmonth(self):
""" Test the formatmonth function. """
cal = FedocalCalendar(2012, 1, 10)
self.assertEqual(cal.formatmonth(),
- '<table class="month">\n<tr><th colspan="7" class="month">'\
- '<a class="button" href="#"><</a> January 2012 <a '\
- 'class="button" href="#">></a></th></tr>\n<tr><td '\
+ '<table class="month">\n<tr><th colspan="7" class="month"> '\
+ 'January 2012 </th></tr>\n<tr><td '\
'class="noday"> </td><td class="noday"> '\
'</td><td class="noday"> </td><td class="noday">'\
' </td><td class="noday"> </td><td class="noday">'\
@@ -116,8 +111,7 @@ class FedocalCalendartests(Modeltests):
self.assertEqual(cal.formatmonth(False),
'<table class="month">\n<tr><th colspan="7" class="month">'\
- '<a class="button" href="#"><</a> January <a '\
- 'class="button" href="#">></a></th></tr>\n<tr><td '\
+ ' January </th></tr>\n<tr><td '\
'class="noday"> </td><td class="noday"> '\
'</td><td class="noday"> </td><td class="noday">'\
' </td><td class="noday"> </td><td class="noday">'\
10 years, 10 months
[fedocal] master: The self.calendar_name variable is not always filled (acfea24)
by Pierre-YvesChibon
Repository : http://git.fedorahosted.org/cgit/fedocal.git
On branch : master
>---------------------------------------------------------------
commit acfea24166f4674da58ea07b61b9a56305588c2f
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Sat Nov 10 13:37:02 2012 +0100
The self.calendar_name variable is not always filled
>---------------------------------------------------------------
fedocal/fedocallib/fedora_calendar.py | 32 ++++++++++++++++++--------------
1 files changed, 18 insertions(+), 14 deletions(-)
diff --git a/fedocal/fedocallib/fedora_calendar.py b/fedocal/fedocallib/fedora_calendar.py
index 61e7918..b62b495 100644
--- a/fedocal/fedocallib/fedora_calendar.py
+++ b/fedocal/fedocallib/fedora_calendar.py
@@ -87,25 +87,29 @@ class FedocalCalendar(HTMLCalendar):
prev_month = 12
prev_year = prev_year - 1
- prev_month_lnk = '<a class="button" href="%s"><</a>' % flask.url_for(
- 'calendar_fullday',
- calendar_name=self.calendar_name,
- year=prev_year,
- month=prev_month,
- day=1
- )
+ prev_month_lnk = ''
+ if self.calendar_name:
+ prev_month_lnk = '<a class="button" href="%s"><</a>' % (
+ flask.url_for(
+ 'calendar_fullday',
+ calendar_name=self.calendar_name,
+ year=int(prev_year),
+ month=int(prev_month),
+ day=1))
next_month = self.month
next_year = self.year + next_month / 12
next_month = next_month % 12 + 1
- next_month_lnk = '<a class="button" href="%s">></a>' % flask.url_for(
- 'calendar_fullday',
- calendar_name=self.calendar_name,
- year=next_year,
- month=next_month,
- day=1
- )
+ next_month_lnk = ''
+ if self.calendar_name:
+ next_month_lnk = '<a class="button" href="%s">></a>' % (
+ flask.url_for(
+ 'calendar_fullday',
+ calendar_name=self.calendar_name,
+ year=int(next_year),
+ month=int(next_month),
+ day=1))
return '<tr><th colspan="7" class="month">%s %s %s</th></tr>' % (
prev_month_lnk, string, next_month_lnk)
10 years, 10 months
[fedocal] master: Monthly navigation (11d1410)
by trasher@fedorahosted.org
Repository : http://git.fedorahosted.org/cgit/fedocal.git
On branch : master
>---------------------------------------------------------------
commit 11d1410d55ae55139823dc3afa09dd84141ed53e
Author: Johan Cwiklinski <johan(a)x-tnd.be>
Date: Sat Nov 10 11:01:54 2012 +0100
Monthly navigation
>---------------------------------------------------------------
fedocal/fedocallib/fedora_calendar.py | 29 +++++++++++++++++++++++++++--
1 files changed, 27 insertions(+), 2 deletions(-)
diff --git a/fedocal/fedocallib/fedora_calendar.py b/fedocal/fedocallib/fedora_calendar.py
index 16055ef..61e7918 100644
--- a/fedocal/fedocallib/fedora_calendar.py
+++ b/fedocal/fedocallib/fedora_calendar.py
@@ -80,8 +80,33 @@ class FedocalCalendar(HTMLCalendar):
string = '%s %s' % (month_name[themonth], theyear)
else:
string = '%s' % month_name[themonth]
- prev_month_lnk = '<a class="button" href="#"><</a>'
- next_month_lnk = '<a class="button" href="#">></a>'
+
+ prev_month = self.month - 1
+ prev_year = self.year
+ if prev_month == 0:
+ prev_month = 12
+ prev_year = prev_year - 1
+
+ prev_month_lnk = '<a class="button" href="%s"><</a>' % flask.url_for(
+ 'calendar_fullday',
+ calendar_name=self.calendar_name,
+ year=prev_year,
+ month=prev_month,
+ day=1
+ )
+
+ next_month = self.month
+ next_year = self.year + next_month / 12
+ next_month = next_month % 12 + 1
+
+ next_month_lnk = '<a class="button" href="%s">></a>' % flask.url_for(
+ 'calendar_fullday',
+ calendar_name=self.calendar_name,
+ year=next_year,
+ month=next_month,
+ day=1
+ )
+
return '<tr><th colspan="7" class="month">%s %s %s</th></tr>' % (
prev_month_lnk, string, next_month_lnk)
10 years, 10 months
[fedocal] master: Make "today" a bit more visible (9f288f6)
by trasher@fedorahosted.org
Repository : http://git.fedorahosted.org/cgit/fedocal.git
On branch : master
>---------------------------------------------------------------
commit 9f288f658d5a6ccc834030b7be8dfa09cedd6f15
Author: Johan Cwiklinski <johan(a)x-tnd.be>
Date: Fri Nov 9 21:20:32 2012 +0100
Make "today" a bit more visible
>---------------------------------------------------------------
fedocal/static/fedocal.css | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/fedocal/static/fedocal.css b/fedocal/static/fedocal.css
index 9bb3caa..3f9f875 100644
--- a/fedocal/static/fedocal.css
+++ b/fedocal/static/fedocal.css
@@ -127,16 +127,21 @@ section nav {
padding: 0;
}
+#agenda td.empty {
+ background-color: transparent;
+ border: none;
+}
+
#agenda .time {
border: none;
padding-right: .2em;
text-align: right;
width: 7em;
- vertical-align: top;
}
#agenda .today {
- background-color: rgba(255, 246, 213, .4);
+ background-color: #FFF6D5;
+ vertical-align: middle;
}
.my_meetings .date {
@@ -260,7 +265,7 @@ table.month td.noday {
}
table.month td.today{
- background-color: rgba(255, 246, 213, .8);
+ background-color: #FFF6D5;
border-color: #000;
border-width: 1px;
/* ugly hack to work with table collapsed borders */
10 years, 10 months
[fedocal] master: pep8 run on model and extend a little bit the meeting_manager field (63391fd)
by pingou@fedorahosted.org
Repository : http://git.fedorahosted.org/cgit/fedocal.git
On branch : master
>---------------------------------------------------------------
commit 63391fd7d9e0fecd68fa71773d0629b1962b978f
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Fri Nov 9 18:01:29 2012 +0100
pep8 run on model and extend a little bit the meeting_manager field
>---------------------------------------------------------------
fedocal/fedocallib/model.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/fedocal/fedocallib/model.py b/fedocal/fedocallib/model.py
index acbcf0e..e78826b 100644
--- a/fedocal/fedocallib/model.py
+++ b/fedocal/fedocallib/model.py
@@ -130,7 +130,8 @@ class Meeting(BASE):
calendar_name = Column(String(80), ForeignKey('calendars.calendar_name'),
nullable=False)
calendar = relationship("Calendar")
- meeting_manager = Column(String(160), nullable=False) # 5 person max (32 * 5)
+ # 5 person max (32 * 5) + 5 = 165
+ meeting_manager = Column(String(165), nullable=False)
meeting_date = Column(Date, default=datetime.utcnow().date())
meeting_date_end = Column(Date, default=datetime.utcnow().date())
meeting_time_start = Column(Time, default=datetime.utcnow().time())
10 years, 10 months
[fedocal] master: pep8 run on exceptions (47c7e56)
by pingou@fedorahosted.org
Repository : http://git.fedorahosted.org/cgit/fedocal.git
On branch : master
>---------------------------------------------------------------
commit 47c7e56afd22f211bcad4f7e0a22dab00805ac17
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Fri Nov 9 17:59:14 2012 +0100
pep8 run on exceptions
>---------------------------------------------------------------
fedocal/fedocallib/exceptions.py | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/fedocal/fedocallib/exceptions.py b/fedocal/fedocallib/exceptions.py
index 68587d0..d8cb0b6 100644
--- a/fedocal/fedocallib/exceptions.py
+++ b/fedocal/fedocallib/exceptions.py
@@ -14,6 +14,7 @@ See http://www.gnu.org/copyleft/gpl.html for the full text of the
license.
"""
+
# pylint: disable=R0903
class FedocalException(Exception):
""" Exception thrown when a user is not allowed to perform a specific
10 years, 10 months