moat-kv-cal 0.1.2__tar.gz → 0.1.3__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.
@@ -0,0 +1,15 @@
1
+ #!/usr/bin/make -f
2
+
3
+ PACKAGE = moat-kv-cal
4
+ MAKEINCL ?= $(shell python3 -mmoat src path)/make/py
5
+
6
+ ifneq ($(wildcard $(MAKEINCL)),)
7
+ include $(MAKEINCL)
8
+ # availabe via http://github.com/smurfix/sourcemgr
9
+
10
+ else
11
+ %:
12
+ @echo "Please fix 'python3 -mmoat src path'."
13
+ @exit 1
14
+ endif
15
+
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: moat-kv-cal
3
- Version: 0.1.2
3
+ Version: 0.1.3
4
4
  Summary: Calendar management for MoaT-KV
5
5
  Author-email: Matthias Urlichs <matthias@urlichs.de>
6
6
  Project-URL: homepage, https://m-o-a-t.org
@@ -13,8 +13,9 @@ Classifier: Topic :: Database
13
13
  Classifier: Topic :: Home Automation
14
14
  Requires-Python: >=3.8
15
15
  Description-Content-Type: text/x-rst
16
+ License-File: LICENSE
16
17
  License-File: LICENSE.txt
17
- Requires-Dist: moat-kv~=0.70.23
18
+ Requires-Dist: moat-kv~=0.70.24
18
19
  Requires-Dist: moat-util~=0.56.4
19
20
  Requires-Dist: aiocaldav
20
21
  Dynamic: license-file
@@ -0,0 +1,39 @@
1
+ [build-system]
2
+ build-backend = "setuptools.build_meta"
3
+ requires = [ "setuptools", "wheel",]
4
+
5
+ [project]
6
+ classifiers = [
7
+ "Development Status :: 4 - Beta",
8
+ "Intended Audience :: Information Technology",
9
+ "Programming Language :: Python :: 3",
10
+ "Topic :: Database",
11
+ "Topic :: Home Automation",
12
+ ]
13
+ dependencies = [
14
+ "moat-kv ~= 0.70.24",
15
+ "moat-util ~= 0.56.4",
16
+ "aiocaldav",
17
+ ]
18
+ version = "0.1.3"
19
+ keywords = [ "MoaT",]
20
+ requires-python = ">=3.8"
21
+ name = "moat-kv-cal"
22
+ description = "Calendar management for MoaT-KV"
23
+ readme = "README.rst"
24
+
25
+ [[project.authors]]
26
+ email = "matthias@urlichs.de"
27
+ name = "Matthias Urlichs"
28
+
29
+ [project.urls]
30
+ homepage = "https://m-o-a-t.org"
31
+ repository = "https://github.com/M-o-a-T/moat"
32
+
33
+ [tool.setuptools]
34
+ [tool.setuptools.packages.find]
35
+ where = ["src"]
36
+
37
+ [tool.setuptools.package-data]
38
+ "*" = ["*.yaml"]
39
+
@@ -7,7 +7,7 @@ from moat.util import P, Path
7
7
  from moat.kv.data import data_get
8
8
  from .model import CalRoot
9
9
  from .util import find_next_alarm
10
- from datetime import datetime, timezone, timedelta
10
+ from datetime import datetime, timedelta, UTC
11
11
  import pytz
12
12
 
13
13
  import anyio
@@ -17,7 +17,7 @@ import logging
17
17
 
18
18
  logger = logging.getLogger(__name__)
19
19
 
20
- utc = timezone.utc
20
+ utc = UTC
21
21
  now = partial(datetime.now, utc)
22
22
 
23
23
 
@@ -114,7 +114,7 @@ async def list_(obj):
114
114
  elif len(p) == 1:
115
115
  return Path("%02x" % p[0])
116
116
  else:
117
- return Path("%02x.%12x" % (p[0], p[1])) + p[2:]
117
+ return Path(f"{p[0]:02x}.{p[1]:12x}") + p[2:]
118
118
 
119
119
  if obj.meta:
120
120
 
@@ -1,6 +1,6 @@
1
1
  from __future__ import annotations
2
2
 
3
- from datetime import datetime, timedelta, timezone, date, time
3
+ from datetime import datetime, timedelta, date, time, UTC
4
4
  from dateutil.rrule import rrulestr
5
5
  from vobject.icalendar import VAlarm, VEvent
6
6
 
@@ -9,7 +9,7 @@ import logging
9
9
  logger = logging.getLogger(__name__)
10
10
 
11
11
 
12
- async def find_next_alarm(calendar, future=10, now=None, zone=timezone.utc) -> Tuple(
12
+ async def find_next_alarm(calendar, future=10, now=None, zone=UTC) -> Tuple(
13
13
  VAlarm,
14
14
  datetime,
15
15
  ):
@@ -31,7 +31,7 @@ async def find_next_alarm(calendar, future=10, now=None, zone=timezone.utc) -> T
31
31
  )
32
32
 
33
33
  if now is None:
34
- now = datetime.now(timezone.utc)
34
+ now = datetime.now(UTC)
35
35
  ev = None
36
36
  ev_v = None
37
37
  ev_t = None
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: moat-kv-cal
3
- Version: 0.1.2
3
+ Version: 0.1.3
4
4
  Summary: Calendar management for MoaT-KV
5
5
  Author-email: Matthias Urlichs <matthias@urlichs.de>
6
6
  Project-URL: homepage, https://m-o-a-t.org
@@ -13,8 +13,9 @@ Classifier: Topic :: Database
13
13
  Classifier: Topic :: Home Automation
14
14
  Requires-Python: >=3.8
15
15
  Description-Content-Type: text/x-rst
16
+ License-File: LICENSE
16
17
  License-File: LICENSE.txt
17
- Requires-Dist: moat-kv~=0.70.23
18
+ Requires-Dist: moat-kv~=0.70.24
18
19
  Requires-Dist: moat-util~=0.56.4
19
20
  Requires-Dist: aiocaldav
20
21
  Dynamic: license-file
@@ -0,0 +1,15 @@
1
+ LICENSE
2
+ LICENSE.txt
3
+ Makefile
4
+ README.rst
5
+ pyproject.toml
6
+ src/moat/kv/cal/__init__.py
7
+ src/moat/kv/cal/_cfg.yaml
8
+ src/moat/kv/cal/_main.py
9
+ src/moat/kv/cal/model.py
10
+ src/moat/kv/cal/util.py
11
+ src/moat_kv_cal.egg-info/PKG-INFO
12
+ src/moat_kv_cal.egg-info/SOURCES.txt
13
+ src/moat_kv_cal.egg-info/dependency_links.txt
14
+ src/moat_kv_cal.egg-info/requires.txt
15
+ src/moat_kv_cal.egg-info/top_level.txt
@@ -1,3 +1,3 @@
1
1
  aiocaldav
2
- moat-kv~=0.70.23
2
+ moat-kv~=0.70.24
3
3
  moat-util~=0.56.4
@@ -1,14 +0,0 @@
1
- LICENSE
2
- LICENSE.txt
3
- README.rst
4
- pyproject.toml
5
- moat/kv/cal/__init__.py
6
- moat/kv/cal/_cfg.yaml
7
- moat/kv/cal/_main.py
8
- moat/kv/cal/model.py
9
- moat/kv/cal/util.py
10
- moat_kv_cal.egg-info/PKG-INFO
11
- moat_kv_cal.egg-info/SOURCES.txt
12
- moat_kv_cal.egg-info/dependency_links.txt
13
- moat_kv_cal.egg-info/requires.txt
14
- moat_kv_cal.egg-info/top_level.txt
@@ -1,97 +0,0 @@
1
- [build-system]
2
- build-backend = "setuptools.build_meta"
3
- requires = [ "setuptools", "wheel",]
4
-
5
- [project]
6
- classifiers = [
7
- "Development Status :: 4 - Beta",
8
- "Intended Audience :: Information Technology",
9
- "Programming Language :: Python :: 3",
10
- "Topic :: Database",
11
- "Topic :: Home Automation",
12
- ]
13
- dependencies = [
14
- "moat-kv ~= 0.70.23",
15
- "moat-util ~= 0.56.4",
16
- "aiocaldav",
17
- ]
18
- version = "0.1.2"
19
- keywords = [ "MoaT",]
20
- requires-python = ">=3.8"
21
- name = "moat-kv-cal"
22
- description = "Calendar management for MoaT-KV"
23
- readme = "README.rst"
24
- license-files = ["LICENSE.txt"]
25
-
26
- [[project.authors]]
27
- email = "matthias@urlichs.de"
28
- name = "Matthias Urlichs"
29
-
30
- [project.urls]
31
- homepage = "https://m-o-a-t.org"
32
- repository = "https://github.com/M-o-a-T/moat"
33
-
34
- [tool.flake8]
35
- max-line-length = 99
36
- ignore = [ "F841", "F401", "E731", "E502", "E402", "E127", "E123", "W503", "E231", "E203", "E501" ]
37
-
38
- [tool.isort]
39
- line_length = 99
40
- multi_line_output = 3
41
- profile = "black"
42
-
43
- [tool.setuptools]
44
- packages = [ "moat.kv.cal",]
45
- [tool.setuptools.package-data]
46
- "*" = ["*.yaml"]
47
-
48
- [tool.setuptools_scm]
49
-
50
- [tool.black]
51
- line-length = 99
52
-
53
- [tool.tox]
54
- legacy_tox_ini = """
55
- [tox]
56
- isolated_build = True
57
- envlist = py310,check
58
-
59
- [testenv]
60
- setenv =
61
- PYTHONPATH = {env:PYTHONPATH}{:}{toxinidir}
62
- deps =
63
- anyio
64
- asyncwebsockets
65
- asyncclick
66
- asyncscope
67
- trio
68
- pytest
69
- commands =
70
- python3 -mpytest tests/
71
-
72
- [testenv:check]
73
- commands =
74
- pylint moat tests
75
- flake8p moat tests
76
- black --check moat tests
77
- deps =
78
- pytest
79
- pylint
80
- black
81
- flake8-pyproject
82
- flake8
83
-
84
- """
85
-
86
- [tool.pytest]
87
- filterwarnings = [
88
- "error",
89
- "ignore:unclosed:ResourceWarning",
90
- ]
91
- addopts = "--verbose"
92
-
93
- [tool.pylint]
94
- [tool.pylint.messages_control]
95
- disable = "wrong-import-order,ungrouped-imports,too-many-nested-blocks,use-dict-literal,unspecified-encoding,too-many-statements,too-many-return-statements,too-many-locals,too-many-instance-attributes,too-many-branches,too-many-arguments,too-few-public-methods,superfluous-parens,no-else-return,no-else-continue,invalid-name,fixme"
96
-
97
- [tool.moat]
File without changes
File without changes
File without changes
File without changes