Skip to content

Commit

Permalink
Merge branch 'master' into fix-526
Browse files Browse the repository at this point in the history
  • Loading branch information
jacadzaca authored Sep 1, 2023
2 parents 4317714 + 8fb3353 commit 9a23fa1
Show file tree
Hide file tree
Showing 7 changed files with 69 additions and 30 deletions.
22 changes: 10 additions & 12 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,25 +23,23 @@ jobs:
- ["3.10", "py310"]
- ["pypy-3.9", "pypy3"]
- ["3.10", "docs"]
- ["3.10", "plone"]
- ["3.11.0-rc.1", "py311"]
- ["3.11", "py311"]

runs-on: ubuntu-latest
name: ${{ matrix.config[1] }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.config[0] }}
- name: Pip cache
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ matrix.config[0] }}-${{ hashFiles('setup.*', 'tox.ini') }}
restore-keys: |
${{ runner.os }}-pip-${{ matrix.config[0] }}-
${{ runner.os }}-pip-
# for caching, see
# https://github.com/actions/setup-python/blob/main/docs/advanced-usage.md#caching-packages
cache: 'pip'
cache-dependency-path: |
setup.*
tox.ini
requirements*.txt
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down
7 changes: 5 additions & 2 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,12 @@ sphinx:
# Optionally build your docs in additional formats such as PDF and ePub
formats: all

# Optionally set the version of Python and requirements required to build your docs
build:
os: ubuntu-22.04
tools:
python: "3.11"

python:
version: 3.7
install:
- requirements: requirements_docs.txt
- method: pip
Expand Down
4 changes: 4 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ Minor changes:
Ref: #550
Fixes: #526
[jacadzaca]
- Update build configuration to build readthedocs. #538
- No longer run the ``plone.app.event`` tests.
- Move pip caching into Python setup action.
- Check that issue #165 can be closed.

Breaking changes:

Expand Down
13 changes: 12 additions & 1 deletion docs/maintenance.rst
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ However, only people with ``PyPI environment access for GitHub Actions`` can app

9. If the release is approved by a maintainer. It will be pushed to `PyPI`_.
If that happens, notify the issues that were fixed about this release.
10. Copy this to the start of ``CHANGES.rst`` and create a new commit with this on the ``master`` branch::
10. Copy this to the start of ``CHANGES.rst``::

5.0.2 (unreleased)
------------------
Expand All @@ -127,7 +127,18 @@ However, only people with ``PyPI environment access for GitHub Actions`` can app
Bug fixes:
- ...

11. Push the new CHANGELOG so it is used for future changes.

.. code-block:: bash
git checkout master
git pull
git add CHANGES.rst
git commit -m"Add new CHANGELOG section for future release
See https://icalendar.readthedocs.io/en/latest/maintenance.html#new-releases"
git push upstream master # could be origin or whatever reference
Links
-----
Expand Down
28 changes: 28 additions & 0 deletions src/icalendar/tests/calendars/issue_165_missing_event.ics
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
BEGIN:VCALENDAR
METHOD:REQUEST
PRODID:Microsoft CDO for Microsoft Exchange
VERSION:2.0
BEGIN:VTIMEZONE
TZID:GMT +0100 (Standard) / GMT +0200 (Daylight)
BEGIN:STANDARD
DTSTART:16010101T030000
TZOFFSETFROM:+0200
TZOFFSETTO:+0100
RRULE:FREQ=YEARLY;WKST=MO;INTERVAL=1;BYMONTH=10;BYDAY=-1SU
END:STANDARD
BEGIN:DAYLIGHT
DTSTART:16010101T020000
TZOFFSETFROM:+0100
TZOFFSETTO:+0200
RRULE:FREQ=YEARLY;WKST=MO;INTERVAL=1;BYMONTH=3;BYDAY=-1SU
END:DAYLIGHT
END:VTIMEZONE
BEGIN:VEVENT
DTSTAMP:20150703T071009Z
DTSTART;TZID="GMT +0100 (Standard) / GMT +0200 (Daylight)":20150703T100000
SUMMARY:Sprint 25 Daily Standup
DTEND;TZID="GMT +0100 (Standard) / GMT +0200 (Daylight)":20150703T103000
RRULE:FREQ=DAILY;UNTIL=20150722T080000Z;INTERVAL=1;BYDAY=MO, TU, WE, TH, FR
;WKST=SU
END:VEVENT
END:VCALENDAR
9 changes: 9 additions & 0 deletions src/icalendar/tests/test_issue_165_missing_event.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
'''Issue #165 - Problem parsing a file with event recurring on weekdays
https://github.com/collective/icalendar/issues/165
'''
from icalendar import Calendar

def test_issue_165_missing_event(calendars):
events = list(calendars.issue_165_missing_event.walk('VEVENT'))
assert len(events) == 1, "There was an event missing from the parsed events' list."
16 changes: 1 addition & 15 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# to run for a specific environment, use ``tox -e ENVNAME``
[tox]
envlist = py37,py38,py39,py310,pypy3,docs,plone
envlist = py37,py38,py39,py310,py311,pypy3,docs
# Note: the 'docs' env creates a 'build' directory which may interfere in strange ways
# with the other environments. You might see this when you run the tests in parallel.
# See https://github.com/collective/icalendar/pull/359#issuecomment-1214150269
Expand All @@ -23,17 +23,3 @@ changedir = docs
allowlist_externals = make
commands =
make html

[testenv:plone]
usedevelop = False
install = False
python = 3.10
commands_pre =
# Install Plone and explicitly the single package that uses icalendar, plus the test runner.
pip install Plone plone.app.event[test] zope.testrunner -c https://dist.plone.org/release/6.0-dev/constraints.txt
# Install the dev version of the package, mostly so we can safely point to the path with the tests.
pip install -e "git+https://github.com/plone/plone.app.event.git\#egg=plone.app.event"
# icalendar is pinned in the constraints, but we want the current dev version.
pip install -e {toxinidir}
commands =
zope-testrunner --test-path={envdir}/src/plone-app-event {posargs:-vc}

0 comments on commit 9a23fa1

Please sign in to comment.