Skip to content

Commit fd78aa6

Browse files
authored
Merge pull request #2 from ListenNotes/fix/python-sdk-sync
Prepare Python SDK 3.0.0 with playlist support and uv
2 parents 2053721 + f3de0d2 commit fd78aa6

23 files changed

Lines changed: 3248 additions & 13606 deletions

‎.coveragerc‎

Lines changed: 0 additions & 9 deletions
This file was deleted.

‎.flake8‎

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
# [flake8]
2-
# exclude =
3-
# setup.py
4-
5-
# E501 is the "Line too long" error. We disable it because we use Black for
6-
# code formatting. Black makes a best effort to keep lines under the max
7-
# length, but can go over in some cases.
8-
# W503 goes against PEP8 rules. It's disabled by default, but must be disabled
9-
# explicitly when using `ignore`.
10-
# ignore = E501, W503
1+
[flake8]
2+
max-line-length = 100
3+
extend-ignore = E203, W503

‎.github/workflows/python.yml‎

Lines changed: 45 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,55 @@ name: Python CI
22

33
on:
44
push:
5-
branches: [ main ]
5+
branches: [main]
66
pull_request:
7-
branches: [ main ]
7+
branches: [main]
88

9-
jobs:
10-
build:
9+
permissions:
10+
contents: read
1111

12+
jobs:
13+
test:
14+
name: Test (Python ${{ matrix.python-version }})
1215
runs-on: ubuntu-latest
13-
1416
strategy:
17+
fail-fast: false
1518
matrix:
16-
python-version: ['3.10', '3.11', '3.12', '3.13']
17-
19+
python-version: ['3.10', '3.14']
20+
steps:
21+
- uses: actions/checkout@v4
22+
- uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
23+
with:
24+
version: '0.11.25'
25+
python-version: ${{ matrix.python-version }}
26+
enable-cache: true
27+
- run: uv sync --locked
28+
- run: uv run --locked pytest --cov=listennotes --cov-report=term-missing
29+
integration:
30+
name: Integration (public mock API)
31+
runs-on: ubuntu-latest
32+
timeout-minutes: 5
33+
steps:
34+
- uses: actions/checkout@v4
35+
- uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
36+
with:
37+
version: '0.11.25'
38+
python-version: '3.14'
39+
enable-cache: true
40+
- run: uv sync --locked
41+
- run: uv run --locked pytest --run-integration -m integration
42+
quality:
43+
name: Lint and package
44+
runs-on: ubuntu-latest
1845
steps:
19-
- uses: actions/checkout@v4
20-
- name: Use Python ${{ matrix.python-version }}
21-
uses: actions/setup-python@v4
22-
with:
23-
python-version: ${{ matrix.python-version }}
24-
- run: make
25-
- run: make test
46+
- uses: actions/checkout@v4
47+
- uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0
48+
with:
49+
version: '0.11.25'
50+
python-version: '3.14'
51+
enable-cache: true
52+
- run: uv sync --locked
53+
- run: uv run --locked black --check listennotes tests
54+
- run: uv run --locked flake8 listennotes tests
55+
- run: uv build --no-sources
56+
- run: uv publish --dry-run --trusted-publishing never

‎.gitignore‎

Lines changed: 10 additions & 118 deletions
Original file line numberDiff line numberDiff line change
@@ -1,131 +1,23 @@
1-
# Byte-compiled / optimized / DLL files
1+
# Python environments and bytecode
2+
.venv/
3+
venv/
24
__pycache__/
35
*.py[cod]
4-
*$py.class
5-
6-
# C extensions
7-
*.so
86

9-
# Distribution / packaging
10-
.Python
7+
# Build artifacts
118
build/
12-
develop-eggs/
139
dist/
14-
downloads/
15-
eggs/
16-
.eggs/
17-
lib/
18-
lib64/
19-
parts/
20-
sdist/
21-
var/
22-
wheels/
23-
pip-wheel-metadata/
24-
share/python-wheels/
2510
*.egg-info/
26-
.installed.cfg
27-
*.egg
28-
MANIFEST
29-
30-
# PyInstaller
31-
# Usually these files are written by a python script from a template
32-
# before PyInstaller builds the exe, so as to inject date/other infos into it.
33-
*.manifest
34-
*.spec
35-
36-
# Installer logs
37-
pip-log.txt
38-
pip-delete-this-directory.txt
3911

40-
# Unit test / coverage reports
41-
htmlcov/
42-
.tox/
43-
.nox/
12+
# Test and coverage output
13+
.pytest_cache/
4414
.coverage
4515
.coverage.*
46-
.cache
47-
nosetests.xml
4816
coverage.xml
49-
*.cover
50-
*.py,cover
51-
.hypothesis/
52-
.pytest_cache/
53-
54-
# Translations
55-
*.mo
56-
*.pot
57-
58-
# Django stuff:
59-
*.log
60-
local_settings.py
61-
db.sqlite3
62-
db.sqlite3-journal
63-
64-
# Flask stuff:
65-
instance/
66-
.webassets-cache
67-
68-
# Scrapy stuff:
69-
.scrapy
70-
71-
# Sphinx documentation
72-
docs/_build/
73-
74-
# PyBuilder
75-
target/
76-
77-
# Jupyter Notebook
78-
.ipynb_checkpoints
79-
80-
# IPython
81-
profile_default/
82-
ipython_config.py
83-
84-
# pyenv
85-
.python-version
86-
87-
# pipenv
88-
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
89-
# However, in case of collaboration, if having platform-specific dependencies or dependencies
90-
# having no cross-platform support, pipenv may install dependencies that don't work, or not
91-
# install all needed dependencies.
92-
#Pipfile.lock
93-
94-
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
95-
__pypackages__/
96-
97-
# Celery stuff
98-
celerybeat-schedule
99-
celerybeat.pid
100-
101-
# SageMath parsed files
102-
*.sage.py
17+
htmlcov/
10318

104-
# Environments
19+
# Local credentials and editor state
10520
.env
106-
.venv
107-
env/
108-
venv/
109-
ENV/
110-
env.bak/
111-
venv.bak/
112-
113-
# Spyder project settings
114-
.spyderproject
115-
.spyproject
116-
117-
# Rope project settings
118-
.ropeproject
119-
120-
# mkdocs documentation
121-
/site
122-
123-
# mypy
124-
.mypy_cache/
125-
.dmypy.json
126-
dmypy.json
127-
128-
# Pyre type checker
129-
.pyre/
130-
21+
.env.*
13122
.idea/
23+
.DS_Store

‎MANIFEST.in‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
include uv.lock .flake8
2+
recursive-include tests *.py
3+
include examples/sample.py

‎Makefile‎

Lines changed: 0 additions & 47 deletions
This file was deleted.

0 commit comments

Comments
 (0)