Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 6 additions & 34 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,5 @@
# This workflow will install Python dependencies and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.


name: Python application


on:
release:
types: [published]
Expand All @@ -23,30 +10,15 @@ permissions:

jobs:
build:

runs-on: ubuntu-latest
environment: release
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v3
with:
python-version: "3.12"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- run: pip install -U wheel build
- name: Build a binary wheel and a source tarball
run: python -m build
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
- uses: astral-sh/setup-uv@v7
- name: Lint with ruff
# ruff detects config from pyproject.toml
run: uvx ruff check .
- name: PyPI publish with uv
run: uv publish
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@ tests/util/local_auth.toml
.venv
identifier.sqlite
obfuscated.sb3
.pytest_cache
.ruff_cache
85 changes: 66 additions & 19 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,48 +5,95 @@ build-backend = "setuptools.build_meta"
[project]
name = "scratchattach"
version = "2.1.13"
authors = [{name = "TimMcCool"}]
authors = [{ name = "TimMcCool" }]
description = "A Scratch API Wrapper"
requires-python = ">= 3.12"
dependencies = [
"websocket-client",
"requests",
"bs4",
"SimpleWebSocketServer",
"typing-extensions",
"browser_cookie3",
"aiohttp",
"rich"
"websocket-client",
"requests",
"bs4",
"SimpleWebSocketServer",
"typing-extensions",
"browser_cookie3",
"aiohttp",
"rich",
]
readme = "README.md"
license = "MIT"
license-files = ["LICENSE"]
keywords = ["scratch api", "scratchattach", "scratch api python", "scratch python", "scratch for python", "scratch", "scratch cloud", "scratch cloud variables", "scratch bot"]
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3",
"Operating System :: Unix",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
keywords = [
"scratch api",
"scratchattach",
"scratch api python",
"scratch python",
"scratch for python",
"scratch",
"scratch cloud",
"scratch cloud variables",
"scratch bot",
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3",
"Operating System :: Unix",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
]

[project.urls]
Source = "https://github.com/timmccool/scratchattach"
Homepage = "https://scratchattach.tim1de.net"

[project.entry-points."console_scripts"]
[project.scripts]
scratch = "scratchattach.__main__:main"

[project.optional-dependencies]
cli = ["rich-pixels"]
lark = ["lark"]

[tool.ruff]
line-length = 127
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".ipynb_checkpoints",
".mypy_cache",
".nox",
".pants.d",
".pyenv",
".pytest_cache",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
".vscode",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"site-packages",
"venv",
]
[tool.ruff.lint]
select = ["E9", "F63", "F7", "F82", "C901"]

[tool.ruff.lint.mccabe]
max-complexity = 10

[tool.setuptools.packages]
find = {include = ["scratchattach"]}
find = { include = ["scratchattach"] }

[dependency-groups]
dev = [
"cryptography>=46.0.3",
"pytest>=9.0.2",
"python-dotenv>=1.2.1",
]
Loading