From 1fd86a6d7dacaab3573e9685b3ecbc9877a6a163 Mon Sep 17 00:00:00 2001 From: Jamie Hardt Date: Wed, 21 Jan 2026 21:56:05 -0800 Subject: [PATCH 1/6] Switching to ruff linter (#17) * Migrating to uv build and manager * Updated Flake8 settings * Updating github workflow * Update python-package.yml Removed redundant flake8 run * Twiddle * Version number in banner * Changing to ruff linter * Tweaking workflow * Update python-package.yml * Update __init__.py * Update __init__.py * removing flake8 file * Doc notes * Twiddling with RtD --------- Co-authored-by: Jamie Hardt --- .flake8 | 4 ---- .github/workflows/python-package.yml | 11 ++++------- .readthedocs.yaml | 28 ++++++++++++++++++---------- pyproject.toml | 12 ++++++++++-- src/ptulsconv/commands.py | 2 +- src/ptulsconv/docparser/__init__.py | 3 +++ src/ptulsconv/pdf/__init__.py | 14 +++++++------- 7 files changed, 43 insertions(+), 31 deletions(-) delete mode 100644 .flake8 diff --git a/.flake8 b/.flake8 deleted file mode 100644 index aff2980..0000000 --- a/.flake8 +++ /dev/null @@ -1,4 +0,0 @@ -[flake8] -per-file-ignores = - src/ptulsconv/__init__.py: F401 - src/ptulsconv/docparser/__init__.py: F401 diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 3569e57..57a12f4 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -27,14 +27,11 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - python -m pip install flake8 pytest - pip install -e . - - name: Lint with flake8 + pip install . + pip install --group dev . + - name: Lint with ruff run: | - # stop the build if there are Python syntax errors or undefined names - flake8 src/ptulsconv tests --count --select=E9,F63,F7,F82 --show-source --statistics - # exit-zero treats all errors as warnings. - flake8 src/ptulsconv tests --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics + ruff check src - name: Test with pytest run: | pytest diff --git a/.readthedocs.yaml b/.readthedocs.yaml index dd09666..2276bb8 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -10,10 +10,15 @@ build: os: ubuntu-20.04 tools: python: "3.10" - # You can also specify other tool versions: - # nodejs: "16" - # rust: "1.55" - # golang: "1.17" + jobs: + pre_install: + - pip install --upgrade --upgrade-strategy only-if-needed --group doc . + build: + html: + python -m sphinx -T -b html -d _build/doctrees -D language=en . $READTHEDOCS_OUTPUT/html + post_build: + - echo "Command run at 'post_build' step" + - echo `date` # Build documentation in the docs/ directory with Sphinx sphinx: @@ -23,10 +28,13 @@ sphinx: formats: - pdf +# FIXME: We should be installing the `doc` dependency group and not the `doc` +# extra. + #Optionally declare the Python requirements required to build your docs -python: - install: - - method: pip - path: . - extra_requirements: - - doc \ No newline at end of file +# python: +# install: +# - method: pip +# path: . +# extra_requirements: +# - doc diff --git a/pyproject.toml b/pyproject.toml index e1d1cf8..382d702 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,8 @@ version = "4.0.0" description = "Read Pro Tools Text exports and generate PDF ADR Reports, JSON" readme = "README.md" requires-python = ">=3.9" -license = { file = "LICENSE" } + +license-files = ["LICENSE"] keywords = ["text-processing", "parsers", "film", "broadcast", "editing", "editorial"] classifiers = [ @@ -27,6 +28,9 @@ dependencies = [ "tqdm>=4.67.1", ] +# [tool.uv.build-backend] +# data = { headers = "include/headers", scripts = "bin" } + [project.urls] Source = 'https://github.com/iluvcapra/ptulsconv' Issues = 'https://github.com/iluvcapra/ptulsconv/issues' @@ -48,5 +52,9 @@ build-backend = "uv_build" [dependency-groups] dev = [ - "flake8>=7.3.0", + "ruff>=0.13.1", +] +doc = [ + "sphinx>=7.4.7", + "sphinx-rtd-theme>=3.0.2", ] diff --git a/src/ptulsconv/commands.py b/src/ptulsconv/commands.py index cb1422b..979f62d 100644 --- a/src/ptulsconv/commands.py +++ b/src/ptulsconv/commands.py @@ -55,8 +55,8 @@ def output_adr_csv(lines: List[ADRLine], time_format: TimecodeFormat): directories for each character number and name pair, and within that directory, creates a CSV file for each reel. """ - reels = set([ln.reel for ln in lines]) + reels: set[str | None] = set([ln.reel for ln in lines]) for n, name in [(n.character_id, n.character_name) for n in lines]: dir_name = "%s_%s" % (n, name) os.makedirs(dir_name, exist_ok=True) diff --git a/src/ptulsconv/docparser/__init__.py b/src/ptulsconv/docparser/__init__.py index d950b6d..840e568 100644 --- a/src/ptulsconv/docparser/__init__.py +++ b/src/ptulsconv/docparser/__init__.py @@ -2,4 +2,7 @@ Docparser module """ + from .pt_doc_parser import parse_document + +__all__ = [parse_document] diff --git a/src/ptulsconv/pdf/__init__.py b/src/ptulsconv/pdf/__init__.py index ea106de..985ced9 100644 --- a/src/ptulsconv/pdf/__init__.py +++ b/src/ptulsconv/pdf/__init__.py @@ -79,13 +79,13 @@ def make_doc_template(page_size, filename, document_title, header_box, page_box = page_box.split_y(0.75 * inch, direction='d') title_box, report_box = header_box.split_x(3.5 * inch, direction='r') - on_page_lambda = (lambda c, _: - draw_header_footer(c, report_box, title_box, - footer_box, title=title, - supervisor=supervisor, - document_subheader=document_subheader, - client=client, - doc_title=document_header)) + def on_page_lambda(c, _): + draw_header_footer(c, report_box, title_box, + footer_box, title=title, + supervisor=supervisor, + document_subheader=document_subheader, + client=client, + doc_title=document_header) frames = [Frame(page_box.min_x, page_box.min_y, page_box.width, page_box.height)] From c45ca3a8fd0cb7c92e9c66457183c8a6545f05a8 Mon Sep 17 00:00:00 2001 From: Jamie Hardt Date: Sun, 15 Feb 2026 15:49:26 -0800 Subject: [PATCH 2/6] Decline contributions from Large Language Models Added a note regarding contributions from Large Language Models. --- CONTRIBUTING.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index dafc1c3..3eaaa1f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,4 +1,6 @@ # Contributing to ptulsconv +\ +Contributions made by Large Language Models are politely declined. ## Testing From bf9ff7b00fb07032c0b85e9b1d091ec7ec3d030a Mon Sep 17 00:00:00 2001 From: Jamie Hardt Date: Mon, 30 Mar 2026 11:46:52 -0700 Subject: [PATCH 3/6] Documentation updates (#18) * Update .readthedocs.yaml Updated RTD version to `ubuntu-lts-latest` * Update .readthedocs.yaml RTD config fix --- .readthedocs.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 2276bb8..ef92ddf 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -7,7 +7,7 @@ version: 2 # Set the version of Python and other tools you might need build: - os: ubuntu-20.04 + os: ubuntu-lts-latest tools: python: "3.10" jobs: @@ -15,7 +15,7 @@ build: - pip install --upgrade --upgrade-strategy only-if-needed --group doc . build: html: - python -m sphinx -T -b html -d _build/doctrees -D language=en . $READTHEDOCS_OUTPUT/html + - python -m sphinx -T -b html -d _build/doctrees -D language=en . $READTHEDOCS_OUTPUT/html post_build: - echo "Command run at 'post_build' step" - echo `date` From 98958c42f411a4668fb4a658ae52203eeae2d813 Mon Sep 17 00:00:00 2001 From: Jamie Hardt Date: Mon, 30 Mar 2026 11:50:00 -0700 Subject: [PATCH 4/6] Update .readthedocs.yaml --- .readthedocs.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index ef92ddf..a703578 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -12,6 +12,7 @@ build: python: "3.10" jobs: pre_install: + - pip install --upgrade pip - pip install --upgrade --upgrade-strategy only-if-needed --group doc . build: html: From ebd0b54b6aa546b2e50cdfa8ef0322e2bce34b78 Mon Sep 17 00:00:00 2001 From: Jamie Hardt Date: Mon, 30 Mar 2026 11:54:59 -0700 Subject: [PATCH 5/6] Update .readthedocs.yaml --- .readthedocs.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index a703578..27b47a8 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -9,14 +9,14 @@ version: 2 build: os: ubuntu-lts-latest tools: - python: "3.10" + python: "3.13" jobs: pre_install: - pip install --upgrade pip - pip install --upgrade --upgrade-strategy only-if-needed --group doc . - build: - html: - - python -m sphinx -T -b html -d _build/doctrees -D language=en . $READTHEDOCS_OUTPUT/html + # build: + # html: + # - python -m sphinx -T -b html -d _build/doctrees -D language=en . $READTHEDOCS_OUTPUT/html post_build: - echo "Command run at 'post_build' step" - echo `date` From 90f78c8fa2a488fca09ba8daed62b6d7ad12efcf Mon Sep 17 00:00:00 2001 From: Jamie Hardt Date: Sun, 3 May 2026 12:16:07 -0700 Subject: [PATCH 6/6] Update CONTRIBUTING.md Updating Agents policy --- CONTRIBUTING.md | 38 +++++++++++++++++++++++++++++++++++--- 1 file changed, 35 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3eaaa1f..cfe68bd 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,6 +1,6 @@ -# Contributing to ptulsconv -\ -Contributions made by Large Language Models are politely declined. +# Contributing + +Contributions to `ptulsconv` are welcome! ## Testing @@ -9,3 +9,35 @@ Before submitting PRs or patches, please make sure your branch passes all of the ```sh ~/ptulsconv$ pytest ``` + +## Regarding use of Agents + +`ptulsconv` is an open-source project that is offered free for no commerical gain, and +is developed and maintained for educational and creative reasons. + +If you use an agent or LLM to produce code for it you are missing out on the benefits +of contributing to an open-source project, particularly community, collaboration with +other developers and designers, and being able to learn and experiment without the +burden of deadlines or worrying about business cases or profits. + +This project is supposed to be fun, do not let machines have fun for you. + +We can't prevent you from using LLMs to contribute to this project but we ask you +abide by the following eitiquette when doing so: + +* All communication with the maintainers must be written by a human in their own + voice. Never use an LLM to craft thread comments, discussion posts, issues, emails + or other correspondence with other developers or the maintainers. +* PRs must be submitted by a person. Do not allow an agent to submit its own PRs to + this project. +* Especially if you are a new contributor to this project, please submit only one PR + at a time and please restrict the subject matter of the PR to a specific unit, + module or tool. All submissions have to be reviewed and understood by the + maintainers before they can be merged. + +Obviously we can't verify if you follow all of these rules but certain telltale +traits of LLM-predicted text or code will raise a flag: lack of brevity in +descriptions or code comments, large amounts of text describing your process or +steps that add little to understanding the changes you've made, use of an +obsequious tone or being excessively accomodating, immediately doing requests +without further discussion or clarifications.