From a5dba897e990552e75d33fb5c7f9d2afcf9c630a Mon Sep 17 00:00:00 2001 From: Daft Date: Tue, 3 Mar 2026 21:34:56 +0100 Subject: [PATCH 1/5] add ci.yml --- .github/workflows/ci.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..ce97c6c --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,16 @@ +name: CI + +on: + push: + pull_request: + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: "3.14" + - run: pip install -e .[dev] + - run: pytest \ No newline at end of file From 1434b5d52e9118c7088d21b21c755838bd51eeee Mon Sep 17 00:00:00 2001 From: Daft Date: Tue, 3 Mar 2026 21:40:48 +0100 Subject: [PATCH 2/5] renamed main.py to cli.py --- src/{main.py => catboxer/cli.py} | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) rename src/{main.py => catboxer/cli.py} (96%) diff --git a/src/main.py b/src/catboxer/cli.py similarity index 96% rename from src/main.py rename to src/catboxer/cli.py index d5c00e7..0278fa2 100644 --- a/src/main.py +++ b/src/catboxer/cli.py @@ -16,7 +16,7 @@ def upload_file(args): def download_file(args): print(f"Downloading {args.file} to {args.output}") -if __name__ == '__main__': +def main(): parser = argparse.ArgumentParser(prog="catboxer") subparsers = parser.add_subparsers(title="commands", dest="command", required=True) @@ -33,4 +33,7 @@ def download_file(args): download_parser.set_defaults(func=download_file) args = parser.parse_args() - args.func(args) \ No newline at end of file + args.func(args) + +if __name__ == '__main__': + main() \ No newline at end of file From d5330977f10db92c9dbf5f496032d5e0b6904824 Mon Sep 17 00:00:00 2001 From: Daft Date: Tue, 3 Mar 2026 21:41:14 +0100 Subject: [PATCH 3/5] refactored into src/catboxer/ --- src/{ => catboxer}/catbox.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename src/{ => catboxer}/catbox.py (100%) diff --git a/src/catbox.py b/src/catboxer/catbox.py similarity index 100% rename from src/catbox.py rename to src/catboxer/catbox.py From 6d8983f524573994bc1c38ce770be7f090feee80 Mon Sep 17 00:00:00 2001 From: Daft Date: Tue, 3 Mar 2026 21:43:35 +0100 Subject: [PATCH 4/5] added pyproject.toml --- pyproject.toml | 11 +++++++++++ src/catboxer/__init__.py | 0 src/catboxer/cli.py | 2 +- 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 pyproject.toml create mode 100644 src/catboxer/__init__.py diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..02a15a7 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,11 @@ +[build-system] +requires = ["setuptools>=61"] +build-backend = "setuptools.build_meta" + +[project] +name = "catboxer" +version = "0.1.0" +requires-python = ">=3.9" + +[project.scripts] +catboxer = "catboxer.cli:main" \ No newline at end of file diff --git a/src/catboxer/__init__.py b/src/catboxer/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/src/catboxer/cli.py b/src/catboxer/cli.py index 0278fa2..1e53464 100644 --- a/src/catboxer/cli.py +++ b/src/catboxer/cli.py @@ -1,7 +1,7 @@ import argparse from pathlib import Path -from catbox import upload +from catboxer.catbox import upload def upload_file(args): From 4bec63ba63bea99f753801ea51a38ae3715d05a0 Mon Sep 17 00:00:00 2001 From: Daft Date: Tue, 3 Mar 2026 21:44:33 +0100 Subject: [PATCH 5/5] removed pytest --- .github/workflows/ci.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ce97c6c..1ba4722 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,5 +12,4 @@ jobs: - uses: actions/setup-python@v5 with: python-version: "3.14" - - run: pip install -e .[dev] - - run: pytest \ No newline at end of file + - run: pip install -e .[dev] \ No newline at end of file