Rename 'arbiter' module to 'yaml2ical'
We'll need to upload this module to PyPI in order to properly integrate with the OpenStack Infrastructure. Unfortunately, there is already a module there going by the 'arbiter' name. This switches the module name to 'yaml2ical', which is not sounding nice, but at least is functionally correct. The git repository itself shall be renamed once this is merged. Change-Id: I896bcbe7be8c6a017015b428c6ff0d39a4974a04
This commit is contained in:
parent
d7dd95ae0f
commit
15d58bbb6d
33
README.rst
33
README.rst
@ -1,13 +1,22 @@
|
|||||||
Gerrit-Powered-Agenda
|
=========
|
||||||
=====================
|
yaml2ical
|
||||||
|
=========
|
||||||
|
|
||||||
This project aims to provide an easier way to manage OpenStack team meetings.
|
This tool converts a series of meeting descriptions in YAML format into one
|
||||||
|
or several .ics files suitable for calendaring. It checks for scheduling
|
||||||
|
conflicts in specific locations.
|
||||||
|
|
||||||
|
Rationale
|
||||||
|
=========
|
||||||
|
|
||||||
|
yaml2ical aims to provide an easier way to manage OpenStack team meetings.
|
||||||
Currently, each team's meeting time and agenda are listed at:
|
Currently, each team's meeting time and agenda are listed at:
|
||||||
|
|
||||||
https://wiki.openstack.org/wiki/Meetings
|
https://wiki.openstack.org/wiki/Meetings
|
||||||
|
|
||||||
This project replaces each meeting with well-defined YAML files.
|
This project allows to replace each meeting with well-defined YAML files,
|
||||||
|
which can be code-reviewed, then continuously-integrated into .ics files for
|
||||||
|
general consumption.
|
||||||
|
|
||||||
Getting Started
|
Getting Started
|
||||||
===============
|
===============
|
||||||
@ -46,8 +55,8 @@ section below.
|
|||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
$ git clone https://github.com/openstack-infra/gerrit-powered-agenda.git
|
$ git clone https://github.com/openstack-infra/yaml2ical.git
|
||||||
$ cd /opt/stack/gerrit-powered-agenda/arbiter/
|
$ cd yaml2ical/yaml2ical
|
||||||
|
|
||||||
|
|
||||||
The following are a few scenarios:
|
The following are a few scenarios:
|
||||||
@ -56,8 +65,8 @@ Generate .ics files locally from existing yaml meeting files:
|
|||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
$ python convert.py -y /opt/stack/gerrit-powered-agenda/meetings/ \
|
$ python convert.py -y ../meetings/ \
|
||||||
-i /opt/stack/gerrit-powered-agenda/icals/
|
-i ../icals/
|
||||||
|
|
||||||
The generated .ics files are not tracked in this git repository,
|
The generated .ics files are not tracked in this git repository,
|
||||||
but they are available locally to import into your calendar. Note,
|
but they are available locally to import into your calendar. Note,
|
||||||
@ -65,7 +74,7 @@ to remove stale .ics files, use the ``--force`` argument:
|
|||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
gerrit-powered-agenda/icals$ ls
|
yaml2ical/icals$ ls
|
||||||
Barbican Meeting-b58d78a4.ics
|
Barbican Meeting-b58d78a4.ics
|
||||||
Ceilometer Team Meeting-9ed7b5b4.ics
|
Ceilometer Team Meeting-9ed7b5b4.ics
|
||||||
Chef Cookbook Meeting-2418b331.ics
|
Chef Cookbook Meeting-2418b331.ics
|
||||||
@ -74,10 +83,10 @@ With each .ics file looking something similar to:
|
|||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
gerrit-powered-agenda/icals$ cat Barbican\ Meeting-b58d78a4.ics
|
yaml2ical/icals$ cat Barbican\ Meeting-b58d78a4.ics
|
||||||
BEGIN:VCALENDAR
|
BEGIN:VCALENDAR
|
||||||
VERSION:2.0
|
VERSION:2.0
|
||||||
PRODID:-//OpenStack//Gerrit-Powered Meeting Agendas//EN
|
PRODID:-//yaml2ical agendas//EN
|
||||||
BEGIN:VEVENT
|
BEGIN:VEVENT
|
||||||
SUMMARY:Barbican Meeting (openstack-meeting-alt)
|
SUMMARY:Barbican Meeting (openstack-meeting-alt)
|
||||||
DTSTART;VALUE=DATE-TIME:20141006T200000Z
|
DTSTART;VALUE=DATE-TIME:20141006T200000Z
|
||||||
|
16
setup.cfg
16
setup.cfg
@ -1,21 +1,23 @@
|
|||||||
[metadata]
|
[metadata]
|
||||||
name = arbiter
|
name = yaml2ical
|
||||||
summary = Automates process for testing and publishing changes to OpenStack meetings using existing OpenStack project infrastructure.
|
summary = Convert YAML meeting descriptions into iCalendar files
|
||||||
description-file =
|
description-file =
|
||||||
README.rst
|
README.rst
|
||||||
author = NDSU IBM Capstone Group
|
author = NDSU IBM Capstone Group & OpenStack Infrastructure Team
|
||||||
author-email = joshua.tan@ndsu.edu
|
author-email = openstack-infra@lists.openstack.org
|
||||||
home-page = https://github.com/openstack-infra/gerrit-powered-agenda
|
home-page = http://ci.openstack.org/
|
||||||
classifier =
|
classifier =
|
||||||
Intended Audience :: OpenStack Community
|
Intended Audience :: Information Technology
|
||||||
|
Intended Audience :: System Administrators
|
||||||
License :: OSI Approved :: Apache Software License
|
License :: OSI Approved :: Apache Software License
|
||||||
Operating System :: POSIX :: Linux
|
Operating System :: POSIX :: Linux
|
||||||
Programming Language :: Python
|
Programming Language :: Python
|
||||||
Programming Language :: Python :: 3.3
|
Programming Language :: Python :: 3.3
|
||||||
|
Programming Language :: Python :: 3.4
|
||||||
|
|
||||||
[global]
|
[global]
|
||||||
setup-hooks =
|
setup-hooks =
|
||||||
pbr.hooks.setup_hook
|
pbr.hooks.setup_hook
|
||||||
|
|
||||||
[files]
|
[files]
|
||||||
packages = arbiter
|
packages = yaml2ical
|
||||||
|
2
tox.ini
2
tox.ini
@ -16,7 +16,7 @@ commands = {posargs}
|
|||||||
|
|
||||||
[testenv:mkical]
|
[testenv:mkical]
|
||||||
commands = mkdir -p ical
|
commands = mkdir -p ical
|
||||||
python arbiter/convert.py -i ./ical -c
|
python yaml2ical/convert.py -i ./ical -c
|
||||||
|
|
||||||
[flake8]
|
[flake8]
|
||||||
show-source = True
|
show-source = True
|
||||||
|
@ -16,4 +16,4 @@ import pbr.version
|
|||||||
|
|
||||||
|
|
||||||
__version__ = pbr.version.VersionInfo(
|
__version__ = pbr.version.VersionInfo(
|
||||||
'arbiter').version_string()
|
'yaml2ical').version_string()
|
@ -14,7 +14,7 @@ import argparse
|
|||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
|
|
||||||
from arbiter import utils
|
from yaml2ical import utils
|
||||||
|
|
||||||
|
|
||||||
# logging settings
|
# logging settings
|
@ -18,16 +18,16 @@ import icalendar
|
|||||||
import pytz
|
import pytz
|
||||||
import yaml
|
import yaml
|
||||||
|
|
||||||
from arbiter import const
|
from yaml2ical import const
|
||||||
from arbiter import schedule
|
from yaml2ical import schedule
|
||||||
|
|
||||||
|
|
||||||
class GerritPoweredCalendar(icalendar.Calendar):
|
class Yaml2IcalCalendar(icalendar.Calendar):
|
||||||
"""A calendar in ics format."""
|
"""A calendar in ics format."""
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super(GerritPoweredCalendar, self).__init__()
|
super(Yaml2IcalCalendar, self).__init__()
|
||||||
self.add('prodid', '-//OpenStack//Gerrit-Powered Meeting Agendas//EN')
|
self.add('prodid', '-//yaml2ical agendas//EN')
|
||||||
self.add('version', '2.0')
|
self.add('version', '2.0')
|
||||||
|
|
||||||
def write_to_disk(self, filename):
|
def write_to_disk(self, filename):
|
@ -13,8 +13,8 @@
|
|||||||
import datetime
|
import datetime
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
from arbiter import meeting
|
from yaml2ical import meeting
|
||||||
from arbiter.tests import sample_data
|
from yaml2ical.tests import sample_data
|
||||||
|
|
||||||
|
|
||||||
class MeetingTestCase(unittest.TestCase):
|
class MeetingTestCase(unittest.TestCase):
|
@ -12,9 +12,9 @@
|
|||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
from arbiter import meeting
|
from yaml2ical import meeting
|
||||||
from arbiter.tests import sample_data
|
from yaml2ical.tests import sample_data
|
||||||
from arbiter import utils
|
from yaml2ical import utils
|
||||||
|
|
||||||
|
|
||||||
class UtilsTestCase(unittest.TestCase):
|
class UtilsTestCase(unittest.TestCase):
|
@ -13,7 +13,7 @@
|
|||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
|
|
||||||
from arbiter import meeting
|
from yaml2ical import meeting
|
||||||
|
|
||||||
"""Utility functions."""
|
"""Utility functions."""
|
||||||
|
|
||||||
@ -86,14 +86,14 @@ def convert_yaml_to_ical(yaml_dir, outputdir=None, outputfile=None):
|
|||||||
# convert meetings to a list of ical
|
# convert meetings to a list of ical
|
||||||
if outputdir:
|
if outputdir:
|
||||||
for m in meetings:
|
for m in meetings:
|
||||||
cal = meeting.GerritPoweredCalendar()
|
cal = meeting.Yaml2IcalCalendar()
|
||||||
m.add_to_calendar(cal)
|
m.add_to_calendar(cal)
|
||||||
filename = os.path.basename(m._filename).split('.')[0] + '.ics'
|
filename = os.path.basename(m._filename).split('.')[0] + '.ics'
|
||||||
cal.write_to_disk(os.path.join(outputdir, filename))
|
cal.write_to_disk(os.path.join(outputdir, filename))
|
||||||
|
|
||||||
# convert meetings into a single ical
|
# convert meetings into a single ical
|
||||||
if outputfile:
|
if outputfile:
|
||||||
cal = meeting.GerritPoweredCalendar()
|
cal = meeting.Yaml2IcalCalendar()
|
||||||
for m in meetings:
|
for m in meetings:
|
||||||
m.add_to_calendar(cal)
|
m.add_to_calendar(cal)
|
||||||
cal.write_to_disk(outputfile)
|
cal.write_to_disk(outputfile)
|
Loading…
Reference in New Issue
Block a user