5 Commits 818dcf2d0a ... d3df88c1a8

Author SHA1 Message Date
  Fabian Peter Hammerle d3df88c1a8 setup.py: added changelog url 7 months ago
  Fabian Peter Hammerle d14bf46717 readme: remove test commands (see .github/workflows/python.yml instead) 7 months ago
  Fabian Peter Hammerle a9d6f43cd1 ci: enable mypy 7 months ago
  Fabian Peter Hammerle 01af2e2f59 added comment regarding line breaks 7 months ago
  Fabian Peter Hammerle b630dacf78 readme: added line regarding pre-existing files 7 months ago
5 changed files with 12 additions and 12 deletions
  1. 1 0
      .github/workflows/python.yml
  2. 2 11
      README.md
  3. 3 0
      ical2vdir/__init__.py
  4. 2 0
      mypy.ini
  5. 4 1
      setup.py

+ 1 - 0
.github/workflows/python.yml

@@ -37,6 +37,7 @@ jobs:
     # > tests/resources/__init__.py:1:0: F0010: error while code parsing: Unable to load file tests/resources/__init__.py:
     # > [Errno 2] No such file or directory: 'tests/resources/__init__.py' (parse-error)
     - run: pipenv run pylint --disable=missing-requirement --disable=parse-error tests/*
+    - run: pipenv run mypy ical2vdir tests
     - run: pipenv run pytest --cov=ical2vdir --cov-report=term-missing --cov-fail-under=100
     - run: pipenv run black --check .
     # >=1.9.0 to detect branch name

+ 2 - 11
README.md

@@ -10,6 +10,8 @@ Convert / split single [iCalendar](https://en.wikipedia.org/wiki/ICalendar)
 `.ics` file into a
 [vdir](https://vdirsyncer.readthedocs.io/en/stable/vdir.html) directory.
 
+Pre-existing files will be updated or left unchanged.
+
 Compatible with [khal](https://github.com/pimutils/khal).
 
 ## Setup
@@ -35,14 +37,3 @@ Remove files from output directory that are not available in input:
 ```sh
 $ ical2vdir < input.ics --output-dir /some/path --delete
 ```
-
-### Run Tests
-
-```sh
-$ git clone https://github.com/fphammerle/ical2vdir.git
-$ cd ical2vdir
-$ pipenv sync --dev
-$ pipenv run pylint ical2vdir
-$ pipenv run mypy ical2vdir
-$ pipenv run pytest --cov=ical2vdir --cov-report=term-missing --cov-fail-under=100
-```

+ 3 - 0
ical2vdir/__init__.py

@@ -93,6 +93,9 @@ def _write_event(event: icalendar.cal.Event, path: pathlib.Path):
         prefix="ical2vdir-", suffix=_VDIR_EVENT_FILE_EXTENSION
     )
     try:
+        # > Content lines are delimited by a line break,
+        # > which is a CRLF sequence [...]
+        # https://tools.ietf.org/html/rfc5545#section-3.1
         os.write(temp_fd, event.to_ical())
         os.close(temp_fd)
         os.rename(temp_path, path)

+ 2 - 0
mypy.ini

@@ -0,0 +1,2 @@
+[mypy]
+ignore_missing_imports = True

+ 4 - 1
setup.py

@@ -19,6 +19,8 @@ import pathlib
 
 import setuptools
 
+_REPO_URL = "https://github.com/fphammerle/ical2vdir"
+
 setuptools.setup(
     name="ical2vdir",
     use_scm_version=True,
@@ -28,7 +30,8 @@ setuptools.setup(
     long_description_content_type="text/markdown",
     author="Fabian Peter Hammerle",
     author_email="fabian@hammerle.me",
-    url="https://github.com/fphammerle/ical2vdir",
+    url=_REPO_URL,
+    project_urls={"Changelog": _REPO_URL + "/blob/master/CHANGELOG.md"},
     license="GPLv3+",
     keywords=["calendar", "event", "iCal", "iCalendar", "ics", "split", "sync", "vdir"],
     classifiers=[