From f64dfc83300a352c5fe65e858121e03229c5e337 Mon Sep 17 00:00:00 2001 From: Alexandre Chabot-Leclerc Date: Thu, 23 Jul 2026 22:19:53 -0400 Subject: [PATCH 1/5] Migrate to pyproject.toml Define the console entry point in modern project metadata and document zero-install uvx usage. --- README.md | 17 ++++++++++++----- pyproject.toml | 32 ++++++++++++++++++++++++++++++++ setup.py | 37 ------------------------------------- 3 files changed, 44 insertions(+), 42 deletions(-) create mode 100644 pyproject.toml delete mode 100644 setup.py diff --git a/README.md b/README.md index fa608a1..f141fba 100644 --- a/README.md +++ b/README.md @@ -7,10 +7,17 @@ into Things by Cultured Code ### On macOS -Install popthings using pip. Both Python 2 and Python 3 are supported. +Run popthings directly with [uv](https://docs.astral.sh/uv/), without installing +it first: ```bash -$ pip install popthings +uvx popthings template.taskpaper +``` + +Alternatively, install popthings using pip: + +```bash +pip install popthings ``` ### On iOS @@ -79,7 +86,7 @@ To import the template on the Mac, pass the TaskPaper filename to the their value. ```bash -$ popthings templatex-travel.taskpaper +uvx popthings templatex-travel.taskpaper Start value? 2018-09-01 Due value? 2018-09-10 Destination value? Paris @@ -114,7 +121,7 @@ are any. 1. Bump the version in `popthings.py` 2. Update the changelog, link the versions. 3. Commit and tag with version number. Push tags. Update the release on GitHub. -4. Build a source dist with `python3 setup.py clean && rm dist/* && python3 setup.py sdist bdist_wheel` +4. Build the source and wheel distributions with `uv build` 5. Test upload to PyPI test with `twine upload --repository-url https://test.pypi.org/legacy/ dist/*` 6. Create a temporary environment `mktmpenv` and test install with `pip install --index-url https://test.pypi.org/simple/ popthings` -7. If everything looks good, upload for real with `twine upload dist/*` \ No newline at end of file +7. If everything looks good, upload for real with `twine upload dist/*` diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..efc25a7 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,32 @@ +[build-system] +requires = ["setuptools>=77"] +build-backend = "setuptools.build_meta" + +[project] +name = "popthings" +dynamic = ["version"] +description = "Import TaskPaper templates with placeholders into Things" +readme = "README.md" +license = "MIT" +license-files = ["LICENSE"] +authors = [ + { name = "Alexandre Chabot-Leclerc", email = "github@alexchabot.net" }, +] +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Natural Language :: English", + "Operating System :: MacOS :: MacOS X", + "Programming Language :: Python :: 3", +] + +[project.scripts] +popthings = "popthings:cli" + +[project.urls] +Homepage = "https://github.com/achabotl/popthings" + +[tool.setuptools] +py-modules = ["popthings"] + +[tool.setuptools.dynamic] +version = { attr = "popthings.__version__" } diff --git a/setup.py b/setup.py deleted file mode 100644 index b192fe6..0000000 --- a/setup.py +++ /dev/null @@ -1,37 +0,0 @@ -import io -import popthings -from setuptools import setup - - -with io.open("README.md", "r", encoding="utf-8") as f: - long_description = f.read() - - -setup( - name="popthings", - version=popthings.__version__, - author="Alexandre Chabot-Leclerc", - author_email="github@alexchabot.net", - description=( - "iOS and command line tool to import a TaskPaper template" - " with placeholders into Things by Cultured Code" - ), - long_description=long_description, - long_description_content_type="text/markdown", - url="https://github.com/achabotl/popthings", - scripts=["popthings.py"], - entry_points={ - "console_scripts": [ - "popthings = popthings:cli", - ], - }, - classifiers=( - "Development Status :: 5 - Production/Stable", - "Programming Language :: Python :: 2", - "Programming Language :: Python :: 3", - "License :: OSI Approved :: MIT License", - "Operating System :: iOS", - "Operating System :: MacOS :: MacOS X", - "Natural Language :: English", - ), -) From 623d9b13d943e152b0be1bd5db3c0b1484bebdba Mon Sep 17 00:00:00 2001 From: Alexandre Chabot-Leclerc Date: Fri, 24 Jul 2026 21:44:52 -0400 Subject: [PATCH 2/5] Adopt uv packaging and document direct execution --- tests/header_with_note.taskpaper | 7 +++++++ tests/just_tasks.taskpaper | 2 ++ tests/just_tasks_.taskpaper | 15 +++++++++++++++ tests/small.taskpaper | 5 +++++ tests/text.taskpaper | 20 ++++++++++++++++++++ tests/with_empty_line.taskpaper | 5 +++++ 6 files changed, 54 insertions(+) create mode 100644 tests/header_with_note.taskpaper create mode 100644 tests/just_tasks.taskpaper create mode 100644 tests/just_tasks_.taskpaper create mode 100644 tests/small.taskpaper create mode 100644 tests/text.taskpaper create mode 100644 tests/with_empty_line.taskpaper diff --git a/tests/header_with_note.taskpaper b/tests/header_with_note.taskpaper new file mode 100644 index 0000000..b8049a2 --- /dev/null +++ b/tests/header_with_note.taskpaper @@ -0,0 +1,7 @@ +Project name: + Note under project + Header: + Note under header + - Task + Header 2: + Note under header 2 diff --git a/tests/just_tasks.taskpaper b/tests/just_tasks.taskpaper new file mode 100644 index 0000000..6de1c36 --- /dev/null +++ b/tests/just_tasks.taskpaper @@ -0,0 +1,2 @@ +- task 1 +- task 2 \ No newline at end of file diff --git a/tests/just_tasks_.taskpaper b/tests/just_tasks_.taskpaper new file mode 100644 index 0000000..0c266f5 --- /dev/null +++ b/tests/just_tasks_.taskpaper @@ -0,0 +1,15 @@ +Project 1: + $due $start $location + Note under project 1 + - Task 1 @due($start + 1w) + A note under task 1 + - Task 2 @start($start) + - Checklist item under task 2 + - A checklist under a checklist + Heading 1, to $location: + - Task under heading 1 + +Project 2: + - Task under project 2 + Heading 2, under project 2: + - Task under heading 2 diff --git a/tests/small.taskpaper b/tests/small.taskpaper new file mode 100644 index 0000000..0ab98ab --- /dev/null +++ b/tests/small.taskpaper @@ -0,0 +1,5 @@ +Project: + Note two levels in + - Task + - checklist item + Note diff --git a/tests/text.taskpaper b/tests/text.taskpaper new file mode 100644 index 0000000..78bc4cf --- /dev/null +++ b/tests/text.taskpaper @@ -0,0 +1,20 @@ +Project name: @start($start) @email + $start $due + Comment under project + More comments under project + - Task 0.1 @due($due) @email + Note 0.1 + Note 0.1 has two lines of comment + - Task 0.12 @start($start) + Heading 1: + Note 1. Where should it go? + - Task 1.1 + Note 1.1 + - Task 1.2 + HEading 2: + - Task 2.1 + Note 2.1 + - Checklist Item 2.1.1 + Note 2.1.1 +Project 2: + - Task under project 2 diff --git a/tests/with_empty_line.taskpaper b/tests/with_empty_line.taskpaper new file mode 100644 index 0000000..4099046 --- /dev/null +++ b/tests/with_empty_line.taskpaper @@ -0,0 +1,5 @@ +Project name: + - Task 1 + + - Task 2 + From 43faf67a986178133d337c2f26be606e600f8c31 Mon Sep 17 00:00:00 2001 From: Alexandre Chabot-Leclerc Date: Fri, 24 Jul 2026 21:49:37 -0400 Subject: [PATCH 3/5] Update Python version matrix for testing --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1b4cc9a..b1e3103 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"] + python-version: ["3.12", "3.13", "3.14"] steps: - uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }} From 0feed85656e3d1ac85c3185ac985dd80308bb749 Mon Sep 17 00:00:00 2001 From: Alexandre Chabot-Leclerc Date: Fri, 24 Jul 2026 21:53:13 -0400 Subject: [PATCH 4/5] Update setup-python action Use setup-python v6 throughout CI and hash pyproject.toml for the release pip cache. Previously the release workflow referenced the removed setup.py file and could fail before tests or publishing. --- .github/workflows/publish.yml | 8 ++++---- .github/workflows/test.yml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 5f5985f..2901886 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -12,11 +12,11 @@ jobs: steps: - uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} cache: pip - cache-dependency-path: '**/setup.py' + cache-dependency-path: pyproject.toml - name: Run tests run: | python -m unittest @@ -26,11 +26,11 @@ jobs: steps: - uses: actions/checkout@v2 - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v6 with: python-version: '3.10' cache: pip - cache-dependency-path: '**/setup.py' + cache-dependency-path: pyproject.toml - name: Install dependencies run: | pip install setuptools wheel twine build diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b1e3103..d822feb 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,7 +11,7 @@ jobs: steps: - uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} - name: Run tests From 7cdaa1fc3c69e77c5971f408dca8ab79fde2402c Mon Sep 17 00:00:00 2001 From: Alexandre Chabot-Leclerc Date: Fri, 24 Jul 2026 22:13:52 -0400 Subject: [PATCH 5/5] Require Python 3.12 Declare the supported interpreter floor and align release testing and publishing with Python 3.12-3.14. Previously the package metadata implicitly allowed versions that cannot install the build backend. --- .github/workflows/publish.yml | 4 ++-- pyproject.toml | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 2901886..973abab 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"] + python-version: ["3.12", "3.13", "3.14"] steps: - uses: actions/checkout@v2 - name: Set up Python ${{ matrix.python-version }} @@ -28,7 +28,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v6 with: - python-version: '3.10' + python-version: '3.12' cache: pip cache-dependency-path: pyproject.toml - name: Install dependencies diff --git a/pyproject.toml b/pyproject.toml index efc25a7..29bc9ea 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,6 +7,7 @@ name = "popthings" dynamic = ["version"] description = "Import TaskPaper templates with placeholders into Things" readme = "README.md" +requires-python = ">=3.12" license = "MIT" license-files = ["LICENSE"] authors = [ @@ -17,6 +18,10 @@ classifiers = [ "Natural Language :: English", "Operating System :: MacOS :: MacOS X", "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", ] [project.scripts]