[fedocal] master: Add a contact email to each calendar (bb65d08)
by Pierre-YvesChibon
Repository : http://git.fedorahosted.org/cgit/fedocal.git
On branch : master
>---------------------------------------------------------------
commit bb65d08caacfe8ce934e578608d9a7d3fb471ad7
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Wed Nov 14 15:02:19 2012 +0100
Add a contact email to each calendar
From now on each calendar must have a contact email. This can be either
someone or a mailing list (recommanded).
This includes a database change.
>---------------------------------------------------------------
.../versions/45d83da297e8_add_calendar_contact.py | 25 ++++++++++++++
doc/usage.rst | 5 +++
fedocal/__init__.py | 13 ++++---
fedocal/fedocallib/model.py | 4 ++-
fedocal/forms.py | 2 +
fedocal/templates/add_calendar.html | 1 +
fedocal/tests/test_calendar.py | 36 ++++++++++++++------
fedocal/tests/test_fedocallib.py | 7 +++-
8 files changed, 74 insertions(+), 19 deletions(-)
diff --git a/alembic/versions/45d83da297e8_add_calendar_contact.py b/alembic/versions/45d83da297e8_add_calendar_contact.py
new file mode 100644
index 0000000..e8d156a
--- /dev/null
+++ b/alembic/versions/45d83da297e8_add_calendar_contact.py
@@ -0,0 +1,25 @@
+"""Add calendar contact field
+
+Revision ID: 45d83da297e8
+Revises: 2c5c36431061
+Create Date: 2012-11-14 14:30:07.352865
+
+"""
+
+# revision identifiers, used by Alembic.
+revision = '45d83da297e8'
+down_revision = '2c5c36431061'
+
+from alembic import op
+import sqlalchemy as sa
+
+
+def upgrade():
+ """ Add the calendar_contact field to the calendar table. """
+ op.add_column('calendars', sa.Column('calendar_contact', sa.String(80)))
+
+
+def downgrade():
+ """ Remove the calendar_contact field to the calendar table. """
+ op.drop_column('calendars', 'calendar_contact')
+
diff --git a/doc/usage.rst b/doc/usage.rst
index ce96040..f3af99e 100644
--- a/doc/usage.rst
+++ b/doc/usage.rst
@@ -41,6 +41,11 @@ The form to will ask for:
- ``calendar name``: the name of the calendar as used in the link and as title
for this calendar.
+- ``calendar contact``: an address email that will be publish as contact point
+ for this calendar. This is not linked to :ref:`reminders` but it is more
+ aimed at providing an email to people wanted to obtain information about a
+ specific calendar.
+
- ``calendar description``: a short description of what the calendar is used for.
This description will also show up on the page of the calendar and should
thus not be too long.
diff --git a/fedocal/__init__.py b/fedocal/__init__.py
index 418ad51..6095285 100644
--- a/fedocal/__init__.py
+++ b/fedocal/__init__.py
@@ -261,11 +261,14 @@ def add_calendar():
# pylint: disable=E1101
if form.validate_on_submit():
calendarobj = Calendar(
- form.calendar_name.data,
- form.calendar_description.data,
- form.calendar_manager_groups.data,
- bool(form.calendar_multiple_meetings.data),
- bool(form.calendar_regional_meetings.data),
+ calendar_name=form.calendar_name.data,
+ calendar_contact=form.calendar_contact.data,
+ calendar_description=form.calendar_description.data,
+ calendar_manager_group=form.calendar_manager_groups.data,
+ calendar_multiple_meetings=bool(
+ form.calendar_multiple_meetings.data),
+ calendar_regional_meetings=bool(
+ form.calendar_regional_meetings.data),
)
try:
calendarobj.save(SESSION)
diff --git a/fedocal/fedocallib/model.py b/fedocal/fedocallib/model.py
index e78826b..bb89928 100644
--- a/fedocal/fedocallib/model.py
+++ b/fedocal/fedocallib/model.py
@@ -66,17 +66,19 @@ class Calendar(BASE):
__tablename__ = 'calendars'
calendar_name = Column(String(80), primary_key=True)
+ calendar_contact = Column(String(80))
calendar_description = Column(String(500))
calendar_manager_group = Column(String(100)) # 3 groups (3*32)
calendar_multiple_meetings = Column(Boolean, default=False)
calendar_regional_meetings = Column(Boolean, default=False)
# pylint: disable=R0913
- def __init__(self, calendar_name, calendar_description,
+ def __init__(self, calendar_name, calendar_contact, calendar_description,
calendar_manager_group, calendar_multiple_meetings=False,
calendar_regional_meetings=False):
""" Constructor instanciating the defaults values. """
self.calendar_name = calendar_name
+ self.calendar_contact = calendar_contact
self.calendar_description = calendar_description
self.calendar_manager_group = calendar_manager_group
self.calendar_multiple_meetings = calendar_multiple_meetings
diff --git a/fedocal/forms.py b/fedocal/forms.py
index 91a2b00..d9a0321 100644
--- a/fedocal/forms.py
+++ b/fedocal/forms.py
@@ -33,6 +33,8 @@ class AddCalendarForm(wtf.Form):
""" Form used to create a new calendar. """
calendar_name = wtf.TextField('Calendar',
[wtf.validators.Required()])
+ calendar_contact = wtf.TextField('Contact email',
+ [wtf.validators.Required()])
calendar_description = wtf.TextField('Description')
calendar_manager_groups = wtf.TextField('Manager groups')
calendar_multiple_meetings = wtf.BooleanField(
diff --git a/fedocal/templates/add_calendar.html b/fedocal/templates/add_calendar.html
index 00f6da3..d449752 100644
--- a/fedocal/templates/add_calendar.html
+++ b/fedocal/templates/add_calendar.html
@@ -14,6 +14,7 @@
<form action="" method="post">
{{ render_field(form.calendar_name) }}
+ {{ render_field(form.calendar_contact) }}
{{ render_field(form.calendar_description) }}
{{ render_field(form.calendar_manager_groups) }}
{{ render_field(form.calendar_multiple_meetings) }}
diff --git a/fedocal/tests/test_calendar.py b/fedocal/tests/test_calendar.py
index f0868a1..eee73ed 100644
--- a/fedocal/tests/test_calendar.py
+++ b/fedocal/tests/test_calendar.py
@@ -46,29 +46,43 @@ class Calendartests(Modeltests):
def test_init_calendar(self):
""" Test the Calendar init function. """
- obj = model.Calendar('test_calendar', 'This is a test calendar',
- 'fi-apprentice', False)
+ obj = model.Calendar(
+ calendar_name='test_calendar',
+ calendar_contact='test(a)example.com',
+ calendar_description='This is a test calendar',
+ calendar_manager_group='fi-apprentice',
+ calendar_multiple_meetings=False)
obj.save(self.session)
self.session.commit()
self.assertNotEqual(obj, None)
- obj = model.Calendar('test_calendar2',
- 'This is another test calendar',
- 'packager', True)
+ obj = model.Calendar(
+ calendar_name='test_calendar2',
+ calendar_contact='test2(a)example.com',
+ calendar_description='This is another test calendar',
+ calendar_manager_group='packager',
+ calendar_multiple_meetings=True)
obj.save(self.session)
self.session.commit()
self.assertNotEqual(obj, None)
- obj = model.Calendar('test_calendar3',
- 'This is the third test calendar',
- 'packager', True)
+ obj = model.Calendar(
+ calendar_name='test_calendar3',
+ calendar_contact='test3(a)example.com',
+ calendar_description='This is the third test calendar',
+ calendar_manager_group='packager',
+ calendar_multiple_meetings=True)
obj.save(self.session)
self.session.commit()
self.assertNotEqual(obj, None)
- obj = model.Calendar('test_calendar4',
- 'This is yet another test calendar',
- 'packager', True, True)
+ obj = model.Calendar(
+ calendar_name='test_calendar4',
+ calendar_contact='test4(a)example.com',
+ calendar_description='This is yet another test calendar',
+ calendar_manager_group='packager',
+ calendar_multiple_meetings=True,
+ calendar_regional_meetings=True)
obj.save(self.session)
self.session.commit()
self.assertNotEqual(obj, None)
diff --git a/fedocal/tests/test_fedocallib.py b/fedocal/tests/test_fedocallib.py
index 380e9be..0fb97b7 100644
--- a/fedocal/tests/test_fedocallib.py
+++ b/fedocal/tests/test_fedocallib.py
@@ -441,8 +441,11 @@ class Fedocallibtests(Modeltests):
self.assertFalse(fedocallib.is_user_managing_in_calendar(
self.session, 'test_calendar', user))
- calendar = model.Calendar('test_calendar30',
- 'This is a test calendar30', '')
+ calendar = model.Calendar(
+ calendar_name='test_calendar30',
+ calendar_contact='test30(a)example.com',
+ calendar_description='This is a test calendar30',
+ calendar_manager_group='')
calendar.save(self.session)
self.session.commit()
10 years, 10 months
[fedocal] master: Add some documentation on how to create meetings (cf71630)
by pingou@fedorahosted.org
Repository : http://git.fedorahosted.org/cgit/fedocal.git
On branch : master
>---------------------------------------------------------------
commit cf71630b6cbded99f47dcde7150bdc46ee3fc694
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Wed Nov 14 12:03:33 2012 +0100
Add some documentation on how to create meetings
>---------------------------------------------------------------
doc/usage.rst | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 58 insertions(+), 0 deletions(-)
diff --git a/doc/usage.rst b/doc/usage.rst
index bcd6454..ce96040 100644
--- a/doc/usage.rst
+++ b/doc/usage.rst
@@ -72,6 +72,62 @@ The form to will ask for:
Create meeting
--------------
+After logging in with your `FAS account
+<https://admin.fedoraproject.org/accounts/>`_ you can create a meeting in one
+of the available calendar.
+
+
+When creating a meeting you will have to fill the form asking for:
+
+- ``meeting name``: this is the name of the meeting has presented in main
+ calendar as well as by email.
+
+- ``meetin date``: the date at which the meeting will occur. If you use a
+ browser with javascript enable you will have a pop-up enabling to choose
+ the date in a calendar. Otherwise, you will have to provide the date using
+ the format: ``yyyy-mm-dd``.
+
+- ``meeting start time``: the time at which the meeting starts. At the moment
+ you are only proposed with full hour times, we are working on allowing the
+ half-hours.
+
+- ``meeting start time``: the time at which the meeting stops. At the moment
+ you are only proposed with full hour times, we are working on allowing the
+ half-hours.
+
+- ``co-manager``: by default the person creating the meeting is the manager of
+ the meeting. However, sometime you want to allow someone else to manage
+ the meeting as well. This field allows you to provide a comma separated
+ list of people you trust to manage the meeting with you.
+
+- ``meeting information``: this is a free-text field containing as much
+ information as you wish about the meeting.
+
+- ``meeting region``: when the calendar supports it, you may associate your
+ meeting with a world region (APAC, EMEA, LATAM, NA)
+
+- ``meeting frequency``: for recursive meetings, you can set here the recursion
+ frequency (7 days or 14 days).
+
+- ``meeting recursion ends``: you may want to specify when the recursivity for
+ this meeting should end (for example at the next election). If left empty a
+ default end date will be used (in this case: 2025-12-31)
+
+- ``remdind when``: you may want to set a reminder for your meeting this field
+ allows you to specify when this reminder should be sent: 12 hours before, 24
+ hours before, 48 hours before or 7 days before the start of the meeting.
+
+
+ See the :ref:`reminders` section below for more information about the
+ reminders.
+
+- ``remind who``: this field allows you to specify the email addresses to which
+ the reminder should be sent. Each email addresses should be separated by a
+ coma.
+
+ See the :ref:`reminders` section below for more information about the
+ reminders.
+
Edit meeting
------------
@@ -121,6 +177,8 @@ This iCal is read-only and can be found at::
http://<url to fedocal>/ical/<calendar name>/
+.. _reminders:
+
Reminders
---------
10 years, 10 months
[fedocal] master: Add some documentation about the reminders (fefc2cd)
by Pierre-YvesChibon
Repository : http://git.fedorahosted.org/cgit/fedocal.git
On branch : master
>---------------------------------------------------------------
commit fefc2cd38211233bc1337e23acdcff0bf4988e1b
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Wed Nov 14 10:52:22 2012 +0100
Add some documentation about the reminders
>---------------------------------------------------------------
doc/usage.rst | 32 ++++++++++++++++++++++++++++++++
1 files changed, 32 insertions(+), 0 deletions(-)
diff --git a/doc/usage.rst b/doc/usage.rst
index 087d77a..bcd6454 100644
--- a/doc/usage.rst
+++ b/doc/usage.rst
@@ -124,5 +124,37 @@ This iCal is read-only and can be found at::
Reminders
---------
+When creating a meeting you can set the option to send a reminder. You will be
+asked for:
+
+- ``when`` to send the reminder
+- ``who`` to send the reminder to
+
+The reminder is sent in the name of the person who created the meeting.
+
+.. note:: when sending the reminder to a mailing-list, make sure that the
+ person that created the meeting is registered to the list in order
+ for the reminder to be allowed.
+
+The reminder will be formated as such:
+
+subject:
+
+::
+
+ [Fedocal] Reminder meeting : <meeting name>
+
+
+content:
+
+::
+
+ Dear all,
+
+ You are kindly invited to the meeting :
+ <meeting name> on <meetin date> from <starting time> to <ending time>
+
+ The meeting will be about:
+ <meeting description>
10 years, 10 months
[fedocal] master: Fix formating for the git workflow example (a827ba5)
by Pierre-YvesChibon
Repository : http://git.fedorahosted.org/cgit/fedocal.git
On branch : master
>---------------------------------------------------------------
commit a827ba5ac32053fe1e1ea61ea0ae0ae54dc8f845
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Wed Nov 14 10:19:06 2012 +0100
Fix formating for the git workflow example
>---------------------------------------------------------------
doc/development.rst | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/doc/development.rst b/doc/development.rst
index 56e8b5a..6c33ee6 100644
--- a/doc/development.rst
+++ b/doc/development.rst
@@ -74,6 +74,8 @@ you need and when you are done, send the patch either by email or via the trac.
The workflow would therefore be something like:
+::
+
git branch <my_shiny_feature>
git checkout <my_shiny_feature>
<work>
10 years, 10 months
[fedocal] master: A bit of formating and a small reformulation in the doc (0505cc3)
by pingou@fedorahosted.org
Repository : http://git.fedorahosted.org/cgit/fedocal.git
On branch : master
>---------------------------------------------------------------
commit 0505cc3ac926d4d29fdd7663ecbc985d9cde5d7f
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Tue Nov 13 18:55:12 2012 +0100
A bit of formating and a small reformulation in the doc
>---------------------------------------------------------------
doc/usage.rst | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/doc/usage.rst b/doc/usage.rst
index 6e8912a..087d77a 100644
--- a/doc/usage.rst
+++ b/doc/usage.rst
@@ -40,21 +40,25 @@ The form to will ask for:
- ``calendar name``: the name of the calendar as used in the link and as title
for this calendar.
+
- ``calendar description``: a short description of what the calendar is used for.
This description will also show up on the page of the calendar and should
thus not be too long.
+
- ``calendar managers group``: the name of the
`FAS <https://admin.fedoraproject.org/accounts/>`_
group to which people should belong that will manage the calendar
(ie: create meetings).
+
- ``multiple meetings``: by default a calendar does not allow someone to create
a meeting or an event on a specific date if there is already something
planned at that time that day. By turning on this option, the calendar will
become less strict and allow multiple meetings at the same time on the same
day. This option should remain off for calendars handling for example IRC
meetings. It should be turned on for calendar handling for example
- Ambassadors events can occur on the same day at different locations in the
- world.
+ Ambassadors events where mutiple events can occur on the same day at
+ different locations in the world.
+
- ``region meetings``: by default, you can not associate a meeting with a region,
by turning on this option you can. This allows to "tag" a meeting or an event
as concerning a specfic region and thus allows someone to check out only
10 years, 10 months
[fedocal] master: Some minor grammar fixes. (6187d69)
by pingou@fedorahosted.org
Repository : http://git.fedorahosted.org/cgit/fedocal.git
On branch : master
>---------------------------------------------------------------
commit 6187d69ddee9b057c182d9ec170efce6639525a7
Author: Ralph Bean <rbean(a)redhat.com>
Date: Tue Nov 13 12:47:34 2012 -0500
Some minor grammar fixes.
>---------------------------------------------------------------
doc/index.rst | 12 ++++++------
doc/usage.rst | 19 ++++++++++---------
2 files changed, 16 insertions(+), 15 deletions(-)
diff --git a/doc/index.rst b/doc/index.rst
index 0db22bd..25e4ac3 100644
--- a/doc/index.rst
+++ b/doc/index.rst
@@ -6,8 +6,8 @@ Fedocal is a web based calendar application for Fedora.
A number of groups in Fedora are using a calendar to coordinate their work,
and at the moment the only tool at their disposition is the
-`wiki <http://fedoraproject.org/wiki>`_ with all the challenge of formatting
-properly tables in the mediawiki syntax.
+`wiki <http://fedoraproject.org/wiki>`_ with all the challenge of properly
+formatting tables in the mediawiki syntax.
This project aims at providing a single place where these different calendars
@@ -18,10 +18,10 @@ the `fedora-meeting irc calendar
which are either hardly maintained or plain un-readable.
-Additionnaly, a number of groups are sending reminders for their meeting, this
-is true for the regional ambassadors, the board, or the infrastructure meetings
-this application aims at automating this process in order to take this task off
-the shoulders of fellow contributors.
+Additionally, a number of groups are sending reminders for their meeting, this
+is true for the regional ambassadors, the board, and the infrastructure
+meetings. This application aims at automating this process in order to take
+this task off the shoulders of fellow contributors.
Resources:
diff --git a/doc/usage.rst b/doc/usage.rst
index 062749b..6e8912a 100644
--- a/doc/usage.rst
+++ b/doc/usage.rst
@@ -4,9 +4,10 @@ Usage
Users
-----
-Fedocal has basically two levels for the users
-- administrators
-- users
+Fedocal has basically two levels for the users:
+
+ - administrators
+ - users
Administrators
~~~~~~~~~~~~~~
@@ -31,11 +32,11 @@ every contributor should sign to contribute to Fedora.
Create calendar
---------------
-After loging in, if you are in the administrator group, you will see an
+After logging in, if you are in the administrator group, you will see an
``Admin`` entry in the left menu containing a link to ``Create calendar``.
Use this link to create a calendar.
-The form to fill ask for:
+The form to will ask for:
- ``calendar name``: the name of the calendar as used in the link and as title
for this calendar.
@@ -44,15 +45,15 @@ The form to fill ask for:
thus not be too long.
- ``calendar managers group``: the name of the
`FAS <https://admin.fedoraproject.org/accounts/>`_
- group to which should belong people that will manage the calendar
+ group to which people should belong that will manage the calendar
(ie: create meetings).
- ``multiple meetings``: by default a calendar does not allow someone to create
a meeting or an event on a specific date if there is already something
planned at that time that day. By turning on this option, the calendar will
become less strict and allow multiple meetings at the same time on the same
- day. This option should remain off for calendar handling for example IRC
- meetings, while it should be turned off for calendar handling for example
- Ambassadors events which can occurs the same day at different location in the
+ day. This option should remain off for calendars handling for example IRC
+ meetings. It should be turned on for calendar handling for example
+ Ambassadors events can occur on the same day at different locations in the
world.
- ``region meetings``: by default, you can not associate a meeting with a region,
by turning on this option you can. This allows to "tag" a meeting or an event
10 years, 10 months
[fedocal] master: Fix the test_fedocallib add_meeting tests (44f1824)
by Pierre-YvesChibon
Repository : http://git.fedorahosted.org/cgit/fedocal.git
On branch : master
>---------------------------------------------------------------
commit 44f182481d6c388cb78770e81ba8b0c44d229ed7
Author: Pierre-Yves Chibon <pingou(a)pingoured.fr>
Date: Tue Nov 13 18:11:18 2012 +0100
Fix the test_fedocallib add_meeting tests
It raises an InvalidMeeting error not an AttributeError but only
when the date is enough in the past to not be in the future.
TODAY refers to the Tuesday of the current week, if the tests are
ran on a Monday, then TODAY is actually in the future and the tests
does not raise a InvalidMeeting but an AttributeError in this case
(pretty much like the first test in this method).
By changing the date to TODAY - 4 days, we are sure that we are
trying to add a meeting in the past (last week), so the output
of the test should be always consistent.
>---------------------------------------------------------------
fedocal/tests/test_fedocallib.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/fedocal/tests/test_fedocallib.py b/fedocal/tests/test_fedocallib.py
index 1157edc..380e9be 100644
--- a/fedocal/tests/test_fedocallib.py
+++ b/fedocal/tests/test_fedocallib.py
@@ -645,9 +645,9 @@ class Fedocallibtests(Modeltests):
None, None,
None, None)
- self.assertRaises(AttributeError, fedocallib.add_meeting,
+ self.assertRaises(InvalidMeeting, fedocallib.add_meeting,
self.session, calendarobj, fasuser,
- None, TODAY - timedelta(days=1),
+ None, TODAY - timedelta(days=4),
9, 10, None,
None, None, None,
None, None,
10 years, 10 months