ics-query 0.0.1a0__tar.gz → 0.1.dev1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {ics_query-0.0.1a0 → ics_query-0.1.dev1}/.github/ISSUE_TEMPLATE/bug_report.md +2 -8
- ics_query-0.1.dev1/.github/workflows/tests.yml +177 -0
- {ics_query-0.0.1a0 → ics_query-0.1.dev1}/PKG-INFO +443 -39
- ics_query-0.1.dev1/README.md +488 -0
- ics_query-0.1.dev1/conftest.py +15 -0
- ics_query-0.1.dev1/ics-query +1 -0
- ics_query-0.1.dev1/ics-query.cmd +3 -0
- ics_query-0.1.dev1/ics-query.py +5 -0
- ics_query-0.1.dev1/ics_query/__init__.py +27 -0
- ics_query-0.1.dev1/ics_query/__main__.py +20 -0
- {ics_query-0.0.1a0 → ics_query-0.1.dev1}/ics_query/_version.py +2 -2
- ics_query-0.1.dev1/ics_query/cli.py +694 -0
- ics_query-0.1.dev1/ics_query/parse.py +87 -0
- ics_query-0.1.dev1/ics_query/query.py +78 -0
- ics_query-0.1.dev1/ics_query/tests/conftest.py +126 -0
- ics_query-0.1.dev1/ics_query/tests/runs/all --tz Singapore one-event.ics -.run +9 -0
- ics_query-0.1.dev1/ics_query/tests/runs/all three-events.ics -.run +33 -0
- ics_query-0.1.dev1/ics_query/tests/runs/at 2019-03-04 multiple-calendars.ics -.run +20 -0
- ics_query-0.1.dev1/ics_query/tests/runs/at 2019-03-04 one-event-twice.ics -.run +18 -0
- ics_query-0.1.dev1/ics_query/tests/runs/at 2019-03-07 multiple-calendars.ics -.run +11 -0
- ics_query-0.1.dev1/ics_query/tests/runs/at 2024-08-20 Berlin-Los-Angeles.ics -.run +23 -0
- ics_query-0.1.dev1/ics_query/tests/runs/between 20240823 4d recurring-work-events.ics -.run +24 -0
- ics_query-0.1.dev1/ics_query/tests/runs/calendars/Berlin-Los-Angeles.ics +381 -0
- ics_query-0.1.dev1/ics_query/tests/runs/calendars/empty-calendar.ics +7 -0
- ics_query-0.1.dev1/ics_query/tests/runs/calendars/empty-file.ics +0 -0
- ics_query-0.1.dev1/ics_query/tests/runs/calendars/multiple-calendars.ics +71 -0
- ics_query-0.1.dev1/ics_query/tests/runs/calendars/one-event-twice.ics +68 -0
- ics_query-0.1.dev1/ics_query/tests/runs/calendars/one-event-without-timezone.ics +14 -0
- ics_query-0.1.dev1/ics_query/tests/runs/calendars/recurring-work-events.ics +223 -0
- ics_query-0.1.dev1/ics_query/tests/runs/calendars/simple-journal.ics +15 -0
- ics_query-0.1.dev1/ics_query/tests/runs/calendars/simple-todo.ics +15 -0
- ics_query-0.1.dev1/ics_query/tests/runs/calendars/three-events.ics +37 -0
- ics_query-0.1.dev1/ics_query/tests/runs/first -c VJOURNAL -c VEVENT one-event.ics -.run +9 -0
- ics_query-0.1.dev1/ics_query/tests/runs/first -c VJOURNAL one-event.ics -.run +0 -0
- ics_query-0.1.dev1/ics_query/tests/runs/first -c VJOURNAL simple-journal.ics -.run +12 -0
- ics_query-0.1.dev1/ics_query/tests/runs/first -c VTODO -c VJOURNAL simple-todo.ics -.run +10 -0
- ics_query-0.1.dev1/ics_query/tests/runs/first -c VTODO simple-todo.ics -.run +10 -0
- ics_query-0.1.dev1/ics_query/tests/runs/first empty-calendar.ics -.run +0 -0
- ics_query-0.1.dev1/ics_query/tests/runs/first empty-file.ics -.run +0 -0
- ics_query-0.1.dev1/ics_query/tests/runs/first recurring-work-events.ics -.run +12 -0
- ics_query-0.1.dev1/ics_query/tests/test_command_line.py +72 -0
- ics_query-0.1.dev1/ics_query/tests/test_parse_date.py +81 -0
- ics_query-0.1.dev1/ics_query/tests/test_parse_timedelta.py +40 -0
- ics_query-0.1.dev1/ics_query/version.py +49 -0
- {ics_query-0.0.1a0 → ics_query-0.1.dev1}/pyproject.toml +31 -9
- ics_query-0.1.dev1/renovate.json +18 -0
- ics_query-0.1.dev1/tox.ini +49 -0
- ics_query-0.0.1a0/.github/workflows/tests.yml +0 -113
- ics_query-0.0.1a0/README.md +0 -92
- ics_query-0.0.1a0/ics_query/__init__.py +0 -11
- ics_query-0.0.1a0/ics_query/__main__.py +0 -5
- ics_query-0.0.1a0/ics_query/cli.py +0 -92
- ics_query-0.0.1a0/ics_query/parse.py +0 -13
- ics_query-0.0.1a0/ics_query/tests/conftest.py +0 -78
- ics_query-0.0.1a0/ics_query/tests/test_command_line.py +0 -10
- ics_query-0.0.1a0/ics_query/version.py +0 -16
- ics_query-0.0.1a0/tox.ini +0 -20
- {ics_query-0.0.1a0 → ics_query-0.1.dev1}/.github/FUNDING.yml +0 -0
- {ics_query-0.0.1a0 → ics_query-0.1.dev1}/.github/dependabot.yml +0 -0
- {ics_query-0.0.1a0 → ics_query-0.1.dev1}/.gitignore +0 -0
- {ics_query-0.0.1a0 → ics_query-0.1.dev1}/LICENSE +0 -0
- {ics_query-0.0.1a0 → ics_query-0.1.dev1}/ics_query/tests/__init__.py +0 -0
- {ics_query-0.0.1a0 → ics_query-0.1.dev1}/ics_query/tests/runs/at 2019-03-04 one-event.ics -.run +0 -0
- {ics_query-0.0.1a0 → ics_query-0.1.dev1}/ics_query/tests/runs/calendars/one-event.ics +0 -0
|
@@ -27,15 +27,9 @@ assignees: ''
|
|
|
27
27
|
|
|
28
28
|
**Version:**
|
|
29
29
|
<!-- Which Version do you use? -->
|
|
30
|
-
v0.0.1
|
|
31
30
|
|
|
32
|
-
<!-- Sometimes, the problems are in other packages. You can provide an overview
|
|
33
|
-
by running this command and passing the output:
|
|
34
|
-
|
|
35
|
-
pip list
|
|
36
|
-
-->
|
|
37
31
|
```shell
|
|
38
|
-
|
|
32
|
+
$ ics-query --version
|
|
39
33
|
```
|
|
40
34
|
|
|
41
35
|
## Additional context
|
|
@@ -45,5 +39,5 @@ pip list
|
|
|
45
39
|
<!-- If possible, suggest a way of solving this or just let this text down there remain as it is. -->
|
|
46
40
|
|
|
47
41
|
- [ ] add an ICS file in `ics_query/tests/runs/calendars`
|
|
48
|
-
- [ ] add a test in `ics_query/tests/runs
|
|
42
|
+
- [ ] add a test in `ics_query/tests/runs`
|
|
49
43
|
- [ ] fix the bug and ensure the test code passes
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
name: tests
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
tags:
|
|
8
|
+
- v*
|
|
9
|
+
pull_request:
|
|
10
|
+
workflow_dispatch:
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
run-tests:
|
|
14
|
+
strategy:
|
|
15
|
+
matrix:
|
|
16
|
+
config:
|
|
17
|
+
# [Python version, tox env, OS]
|
|
18
|
+
- ["3.9", "py39", "ubuntu-latest"]
|
|
19
|
+
- ["3.10", "py310", "ubuntu-latest"]
|
|
20
|
+
- ["3.11", "py311", "ubuntu-latest"]
|
|
21
|
+
- ["3.12", "py312", "ubuntu-latest"]
|
|
22
|
+
- ["3.9", "ruff", "ubuntu-latest"]
|
|
23
|
+
- ["3.11", "exe", "windows-latest"]
|
|
24
|
+
|
|
25
|
+
runs-on: ${{ matrix.config[2] }}
|
|
26
|
+
name: ${{ matrix.config[1] }}
|
|
27
|
+
steps:
|
|
28
|
+
- uses: actions/checkout@v4
|
|
29
|
+
- name: Set up Python
|
|
30
|
+
uses: actions/setup-python@v5
|
|
31
|
+
with:
|
|
32
|
+
python-version: ${{ matrix.config[0] }}
|
|
33
|
+
- name: Install dependencies
|
|
34
|
+
run: |
|
|
35
|
+
python -m pip install --upgrade pip
|
|
36
|
+
pip install tox
|
|
37
|
+
- name: Test
|
|
38
|
+
run: |
|
|
39
|
+
tox -e ${{ matrix.config[1] }}
|
|
40
|
+
- uses: actions/upload-artifact@v4
|
|
41
|
+
with:
|
|
42
|
+
name: dist-${{ matrix.config[1] }}-${{ matrix.config[2] }} # dist-exe-windows-latest
|
|
43
|
+
path: dist
|
|
44
|
+
if-no-files-found: ignore
|
|
45
|
+
retention-days: 1
|
|
46
|
+
compression-level: 0
|
|
47
|
+
|
|
48
|
+
version:
|
|
49
|
+
name: "Determine a new version"
|
|
50
|
+
if: ${{ startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main' }}
|
|
51
|
+
runs-on: ubuntu-latest
|
|
52
|
+
outputs:
|
|
53
|
+
# see https://docs.github.com/de/actions/writing-workflows/choosing-what-your-workflow-does/accessing-contextual-information-about-workflow-runs#example-usage-of-the-jobs-context
|
|
54
|
+
version: ${{ steps.version.outputs.version }}
|
|
55
|
+
steps:
|
|
56
|
+
- uses: actions/checkout@v4
|
|
57
|
+
|
|
58
|
+
- name: "Get tags"
|
|
59
|
+
uses: actions-ecosystem/action-get-latest-tag@v1
|
|
60
|
+
id: get-latest-tag
|
|
61
|
+
|
|
62
|
+
- name: "Calculate new version"
|
|
63
|
+
uses: actions-ecosystem/action-bump-semver@v1
|
|
64
|
+
id: bump-semver
|
|
65
|
+
with:
|
|
66
|
+
current_version: ${{ steps.get-latest-tag.outputs.tag }}
|
|
67
|
+
level: patch
|
|
68
|
+
|
|
69
|
+
- name: "Determine version to use"
|
|
70
|
+
id: version
|
|
71
|
+
run: |
|
|
72
|
+
if [ "$GITHUB_REF" == "refs/heads/main" ]; then
|
|
73
|
+
TAG="${{ steps.get-latest-tag.outputs.tag }}"
|
|
74
|
+
echo "On branch main. Using new tag version $TAG."
|
|
75
|
+
else
|
|
76
|
+
TAG="${{ steps.bump-semver.outputs.new_version }}"
|
|
77
|
+
echo "On tag $TAG. Using that version."
|
|
78
|
+
fi
|
|
79
|
+
echo "::set-output name=version::$TAG"
|
|
80
|
+
|
|
81
|
+
- name: Publish new tag id possible
|
|
82
|
+
# continue on error: when the tag exists we would like to still work it out
|
|
83
|
+
continue-on-error: true
|
|
84
|
+
uses: actions-ecosystem/action-push-tag@v1
|
|
85
|
+
with:
|
|
86
|
+
tag: ${{ steps.version.outputs.version }}
|
|
87
|
+
message: |
|
|
88
|
+
${{ steps.version.outputs.version }}: automatic release
|
|
89
|
+
PR #${{ github.event.pull_request.number }} ${{ github.event.pull_request.title }}
|
|
90
|
+
|
|
91
|
+
deploy-tag-to-pypi:
|
|
92
|
+
name: Publish Package on PyPI
|
|
93
|
+
# only deploy on tags, see https://stackoverflow.com/a/58478262/1320237
|
|
94
|
+
if: ${{ startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main' }}
|
|
95
|
+
needs:
|
|
96
|
+
- run-tests
|
|
97
|
+
- version
|
|
98
|
+
runs-on: ubuntu-latest
|
|
99
|
+
# This environment stores the TWINE_USERNAME and TWINE_PASSWORD
|
|
100
|
+
# see https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment
|
|
101
|
+
environment:
|
|
102
|
+
name: PyPI
|
|
103
|
+
url: https://pypi.org/project/ics-query/
|
|
104
|
+
# after using the environment, we need to make the secrets available
|
|
105
|
+
# see https://docs.github.com/en/actions/security-guides/encrypted-secrets#example-using-bash
|
|
106
|
+
env:
|
|
107
|
+
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
|
|
108
|
+
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
|
|
109
|
+
steps:
|
|
110
|
+
- uses: actions/checkout@v4
|
|
111
|
+
- name: Set up Python
|
|
112
|
+
uses: actions/setup-python@v5
|
|
113
|
+
with:
|
|
114
|
+
python-version: "3.12"
|
|
115
|
+
- name: Install dependencies
|
|
116
|
+
run: |
|
|
117
|
+
python -m pip install --upgrade pip
|
|
118
|
+
pip install --upgrade wheel twine build
|
|
119
|
+
- name: remove old files
|
|
120
|
+
run: rm -rf dist/*
|
|
121
|
+
- name: build distribution files
|
|
122
|
+
run: python -m build
|
|
123
|
+
- name: deploy to pypi
|
|
124
|
+
run: |
|
|
125
|
+
# You will have to set the variables TWINE_USERNAME and TWINE_PASSWORD
|
|
126
|
+
# You can use a token specific to your project by setting the user name to
|
|
127
|
+
# __token__ and the password to the token given to you by the PyPI project.
|
|
128
|
+
# sources:
|
|
129
|
+
# - https://shambu2k.hashnode.dev/gitlab-to-pypi
|
|
130
|
+
# - http://blog.octomy.org/2020/11/deploying-python-pacakges-to-pypi-using.html?m=1
|
|
131
|
+
# Also, set the tags as protected to allow the secrets to be used.
|
|
132
|
+
# see https://docs.gitlab.com/ee/user/project/protected_tags.html
|
|
133
|
+
if [ -z "$TWINE_USERNAME" ]; then
|
|
134
|
+
echo "WARNING: TWINE_USERNAME not set!"
|
|
135
|
+
fi
|
|
136
|
+
if [ -z "$TWINE_PASSWORD" ]; then
|
|
137
|
+
echo "WARNING: TWINE_PASSWORD not set!"
|
|
138
|
+
fi
|
|
139
|
+
twine check dist/*
|
|
140
|
+
twine upload dist/*
|
|
141
|
+
|
|
142
|
+
# artifact-check:
|
|
143
|
+
# name: artifact check
|
|
144
|
+
# runs-on: ubuntu-latest
|
|
145
|
+
# needs:
|
|
146
|
+
# - run-tests
|
|
147
|
+
# steps:
|
|
148
|
+
# - uses: actions/download-artifact@v4
|
|
149
|
+
# with:
|
|
150
|
+
# pattern: dist-*
|
|
151
|
+
# path: dist
|
|
152
|
+
# - run: ls -R dist
|
|
153
|
+
|
|
154
|
+
github-release:
|
|
155
|
+
name: "Publish GitHub Release"
|
|
156
|
+
# only deploy on tags, see https://stackoverflow.com/a/58478262/1320237
|
|
157
|
+
if: ${{ startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main' }}
|
|
158
|
+
needs:
|
|
159
|
+
- run-tests
|
|
160
|
+
- deploy-tag-to-pypi
|
|
161
|
+
- version
|
|
162
|
+
runs-on: ubuntu-latest
|
|
163
|
+
steps:
|
|
164
|
+
- uses: actions/checkout@v4
|
|
165
|
+
- uses: actions/download-artifact@v4
|
|
166
|
+
with:
|
|
167
|
+
pattern: dist-*
|
|
168
|
+
path: dist
|
|
169
|
+
- run: ls -R dist
|
|
170
|
+
- name: create release
|
|
171
|
+
uses: ncipollo/release-action@v1
|
|
172
|
+
with:
|
|
173
|
+
allowUpdates: true
|
|
174
|
+
body: "For a list of changes, please refer to the [Changelog](https://github.com/niccokunzmann/ics-query#changelog)."
|
|
175
|
+
generateReleaseNotes: false
|
|
176
|
+
artifacts: "dist/dist-exe-windows-latest/ics-query.exe"
|
|
177
|
+
tag: ${{ needs.version.outputs.version }}
|