Modernize python versions
The versions listed in setup.cfg are quite old. Also fix the broken unit tests and add the appropriate job template. Depends-on: https://review.opendev.org/c/openstack/project-config/+/909494 Change-Id: Ifca330011b49af8a92bcf222760dd7fe0c873d30
This commit is contained in:
parent
4c4ae58575
commit
3f37303231
3
.zuul.yaml
Normal file
3
.zuul.yaml
Normal file
@ -0,0 +1,3 @@
|
||||
- project:
|
||||
templates:
|
||||
- openstack-python3-jobs
|
@ -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
|
||||
|
14
setup.cfg
14
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 =
|
||||
|
8
tox.ini
8
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]
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user