diff --git a/.zuul.yaml b/.zuul.yaml new file mode 100644 index 0000000..6de3b87 --- /dev/null +++ b/.zuul.yaml @@ -0,0 +1,3 @@ +- project: + templates: + - openstack-python3-jobs diff --git a/requirements.txt b/requirements.txt index 8d28e40..cf829d8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,3 +2,4 @@ pbr>=1.6 # Apache-2.0 icalendar Jinja2>=2.8 # BSD License (3 clause) PyYAML>=3.1.0 # MIT +extras>=1.0.0 # MIT diff --git a/setup.cfg b/setup.cfg index 115dccf..ea42870 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,20 +1,22 @@ [metadata] name = yaml2ical summary = Convert YAML meeting descriptions into iCalendar files -description-file = +description_file = README.rst author = NDSU IBM Capstone Group & OpenStack Infrastructure Team -author-email = openstack-infra@lists.openstack.org -home-page = http://docs.openstack.org/infra/system-config/ +author_email = openstack-infra@lists.openstack.org +home_page = http://docs.openstack.org/infra/system-config/ +python_requires = >=3.8 classifier = Intended Audience :: Information Technology Intended Audience :: System Administrators License :: OSI Approved :: Apache Software License Operating System :: POSIX :: Linux Programming Language :: Python - Programming Language :: Python :: 3.5 - Programming Language :: Python :: 3.6 - Programming Language :: Python :: 3.7 + Programming Language :: Python :: 3.8 + Programming Language :: Python :: 3.9 + Programming Language :: Python :: 3.10 + Programming Language :: Python :: 3.11 [global] setup-hooks = diff --git a/tox.ini b/tox.ini index 8e48ca0..0e4789d 100644 --- a/tox.ini +++ b/tox.ini @@ -1,24 +1,22 @@ [tox] minversion = 1.6 -envlist = py37,py36,py35,pep8 +envlist = py3,pep8 +ignore_basepython_conflict = True [testenv] -install_command = pip install -U {opts} {packages} +basepython = python3 deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt commands = python setup.py testr --slowest --testr-args='{posargs}' usedevelop = true [testenv:pep8] -basepython = python3 commands = flake8 [testenv:venv] -basepython = python3 commands = {posargs} [testenv:mkical] -basepython = python3 commands = yaml2ical -y meetings/ -i icals/ -f [flake8] diff --git a/yaml2ical/tests/test_meeting.py b/yaml2ical/tests/test_meeting.py index 0314d04..9a2445c 100644 --- a/yaml2ical/tests/test_meeting.py +++ b/yaml2ical/tests/test_meeting.py @@ -183,23 +183,23 @@ class MeetingTestCase(unittest.TestCase): summary = 'OpenStack Subteam 8 Meeting' patterns = [] # The "main" meeting should have an exdate - patterns.append(re.compile(r'.*exdate:\s*20150810T120000', re.I)) + patterns.append(re.compile(r'exdate:20150810T120000Z', re.I)) # The "main" meeting should start on 2015-08-13 - patterns.append(re.compile(r'.*dtstart;.*:20150803T120000Z', re.I)) + patterns.append(re.compile(r'dtstart:20150803T120000Z', re.I)) # The "main" meeting should have a simple summary - patterns.append(re.compile(r'.*summary:\s*%s' % summary, re.I)) + patterns.append(re.compile(r'summary:%s' % summary, re.I)) # The "skipped" meeting should start on 20150806 - patterns.append(re.compile(r'.*dtstart;.*:20150810T120000Z', re.I)) + patterns.append(re.compile(r'dtstart:20150810T120000Z', re.I)) # The "skipped" meeting should say include 'CANCELLED' and the datetime - patterns.append(re.compile(r'.*summary:\s*CANCELLED.*20150810T120000Z', + patterns.append(re.compile(r'summary:CANCELLED.*20150810T120000Z', re.I)) m = meeting.load_meetings(meeting_yaml)[0] cal = ical.Yaml2IcalCalendar() cal.add_meeting(m) - cal_str = str(cal.to_ical()) + cal_str = cal.to_ical().decode('utf-8') self.assertTrue(hasattr(m.schedules[0], 'skip_dates')) for p in patterns: - self.assertNotEqual(None, p.match(cal_str)) + self.assertIsNotNone(p.search(cal_str)) def test_adhoc_meeting(self): meeting_yaml = sample_data.ADHOC_MEETING