afsapi 0.2.8__tar.gz → 0.2.9__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- afsapi-0.2.9/.github/workflows/python-publish.yml +43 -0
- {afsapi-0.2.8 → afsapi-0.2.9}/PKG-INFO +5 -3
- {afsapi-0.2.8 → afsapi-0.2.9}/afsapi/api.py +5 -1
- {afsapi-0.2.8 → afsapi-0.2.9}/afsapi/models.py +1 -0
- afsapi-0.2.9/afsapi/version.py +24 -0
- {afsapi-0.2.8 → afsapi-0.2.9}/afsapi.egg-info/PKG-INFO +5 -3
- {afsapi-0.2.8 → afsapi-0.2.9}/afsapi.egg-info/SOURCES.txt +0 -2
- {afsapi-0.2.8 → afsapi-0.2.9}/async_tests.py +10 -3
- {afsapi-0.2.8 → afsapi-0.2.9}/pyproject.toml +3 -5
- {afsapi-0.2.8 → afsapi-0.2.9}/setup.cfg +2 -1
- afsapi-0.2.8/.github/workflows/python-publish.yml +0 -34
- afsapi-0.2.8/.github/workflows/python.yml +0 -53
- afsapi-0.2.8/.github/workflows/yaml.yml +0 -20
- afsapi-0.2.8/afsapi/version.py +0 -5
- {afsapi-0.2.8 → afsapi-0.2.9}/.gitignore +0 -0
- {afsapi-0.2.8 → afsapi-0.2.9}/LICENSE +0 -0
- {afsapi-0.2.8 → afsapi-0.2.9}/README.md +0 -0
- {afsapi-0.2.8 → afsapi-0.2.9}/afsapi/__init__.py +0 -0
- {afsapi-0.2.8 → afsapi-0.2.9}/afsapi/exceptions.py +0 -0
- {afsapi-0.2.8 → afsapi-0.2.9}/afsapi/throttler.py +0 -0
- {afsapi-0.2.8 → afsapi-0.2.9}/afsapi/utils.py +0 -0
- {afsapi-0.2.8 → afsapi-0.2.9}/afsapi.egg-info/dependency_links.txt +0 -0
- {afsapi-0.2.8 → afsapi-0.2.9}/afsapi.egg-info/not-zip-safe +0 -0
- {afsapi-0.2.8 → afsapi-0.2.9}/afsapi.egg-info/requires.txt +0 -0
- {afsapi-0.2.8 → afsapi-0.2.9}/afsapi.egg-info/top_level.txt +0 -0
- {afsapi-0.2.8 → afsapi-0.2.9}/requirements.txt +0 -0
- {afsapi-0.2.8 → afsapi-0.2.9}/setup.py +0 -0
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Publish to PyPI
|
|
3
|
+
|
|
4
|
+
on:
|
|
5
|
+
release:
|
|
6
|
+
types: [published]
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
attestations: write
|
|
10
|
+
contents: write
|
|
11
|
+
id-token: write
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
build:
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v4
|
|
18
|
+
with:
|
|
19
|
+
fetch-depth: 0
|
|
20
|
+
- uses: hynek/build-and-inspect-python-package@v2
|
|
21
|
+
with:
|
|
22
|
+
attest-build-provenance-github: "true"
|
|
23
|
+
|
|
24
|
+
pypi-publish:
|
|
25
|
+
name: upload release to PyPI
|
|
26
|
+
runs-on: ubuntu-latest
|
|
27
|
+
needs: build
|
|
28
|
+
environment: pypi
|
|
29
|
+
steps:
|
|
30
|
+
- uses: actions/download-artifact@v4
|
|
31
|
+
with:
|
|
32
|
+
name: Packages
|
|
33
|
+
path: dist
|
|
34
|
+
- name: Publish package distributions to PyPI
|
|
35
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
36
|
+
- name: Create GitHub Release
|
|
37
|
+
uses: actions/create-release@v1
|
|
38
|
+
env:
|
|
39
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
40
|
+
with:
|
|
41
|
+
tag_name: ${{ github.ref }}
|
|
42
|
+
release_name: ${{ github.ref }}
|
|
43
|
+
body: Release ${{ github.ref }}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: afsapi
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.9
|
|
4
4
|
Summary: Asynchronous Implementation of the Frontier Silicon API
|
|
5
5
|
Home-page: https://github.com/zhelev/python-afsapi.git
|
|
6
6
|
Author: Krasimir Zhelev
|
|
@@ -19,8 +19,10 @@ Classifier: Programming Language :: Python :: 3.5
|
|
|
19
19
|
Classifier: Programming Language :: Python :: 3.6
|
|
20
20
|
Classifier: Topic :: Software Development :: Libraries
|
|
21
21
|
Requires-Python: >=3.7
|
|
22
|
-
Description-Content-Type: text/markdown
|
|
22
|
+
Description-Content-Type: text/markdown
|
|
23
23
|
License-File: LICENSE
|
|
24
|
+
Requires-Dist: aiohttp<4,>=3.3.2
|
|
25
|
+
Dynamic: license-file
|
|
24
26
|
|
|
25
27
|
# python-afsapi
|
|
26
28
|
|
|
@@ -222,7 +222,7 @@ class AFSAPI:
|
|
|
222
222
|
raise FSApiException(
|
|
223
223
|
f"Unexpected result {result.status}: {await result.text()}"
|
|
224
224
|
)
|
|
225
|
-
doc = ET.fromstring(await result.text(encoding="utf-8"))
|
|
225
|
+
doc = ET.fromstring(await result.text(encoding="utf-8", errors="replace"))
|
|
226
226
|
status = unpack_xml(doc, "status")
|
|
227
227
|
|
|
228
228
|
if status == "FS_OK" or status == "FS_LIST_END":
|
|
@@ -517,6 +517,10 @@ class AFSAPI:
|
|
|
517
517
|
"""
|
|
518
518
|
return await self.handle_set(API["control"], int(value))
|
|
519
519
|
|
|
520
|
+
async def stop(self) -> t.Optional[bool]:
|
|
521
|
+
"""Stop (and Start) media."""
|
|
522
|
+
return await self.play_control(PlayControl.STOP)
|
|
523
|
+
|
|
520
524
|
async def play(self) -> t.Optional[bool]:
|
|
521
525
|
"""Play media."""
|
|
522
526
|
return await self.play_control(PlayControl.PLAY)
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# file generated by vcs-versioning
|
|
2
|
+
# don't change, don't track in version control
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
__all__ = [
|
|
6
|
+
"__version__",
|
|
7
|
+
"__version_tuple__",
|
|
8
|
+
"version",
|
|
9
|
+
"version_tuple",
|
|
10
|
+
"__commit_id__",
|
|
11
|
+
"commit_id",
|
|
12
|
+
]
|
|
13
|
+
|
|
14
|
+
version: str
|
|
15
|
+
__version__: str
|
|
16
|
+
__version_tuple__: tuple[int | str, ...]
|
|
17
|
+
version_tuple: tuple[int | str, ...]
|
|
18
|
+
commit_id: str | None
|
|
19
|
+
__commit_id__: str | None
|
|
20
|
+
|
|
21
|
+
__version__ = version = '0.2.9'
|
|
22
|
+
__version_tuple__ = version_tuple = (0, 2, 9)
|
|
23
|
+
|
|
24
|
+
__commit_id__ = commit_id = 'g26887da2b'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: afsapi
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.9
|
|
4
4
|
Summary: Asynchronous Implementation of the Frontier Silicon API
|
|
5
5
|
Home-page: https://github.com/zhelev/python-afsapi.git
|
|
6
6
|
Author: Krasimir Zhelev
|
|
@@ -19,8 +19,10 @@ Classifier: Programming Language :: Python :: 3.5
|
|
|
19
19
|
Classifier: Programming Language :: Python :: 3.6
|
|
20
20
|
Classifier: Topic :: Software Development :: Libraries
|
|
21
21
|
Requires-Python: >=3.7
|
|
22
|
-
Description-Content-Type: text/markdown
|
|
22
|
+
Description-Content-Type: text/markdown
|
|
23
23
|
License-File: LICENSE
|
|
24
|
+
Requires-Dist: aiohttp<4,>=3.3.2
|
|
25
|
+
Dynamic: license-file
|
|
24
26
|
|
|
25
27
|
# python-afsapi
|
|
26
28
|
|
|
@@ -121,21 +121,28 @@ async def test_play() -> None:
|
|
|
121
121
|
status = await afsapi.get_play_status()
|
|
122
122
|
print("Status: %s" % status)
|
|
123
123
|
|
|
124
|
+
pause = await afsapi.pause()
|
|
125
|
+
print("Start play succeeded? - %s" % pause)
|
|
126
|
+
await asyncio.sleep(2)
|
|
127
|
+
|
|
124
128
|
start_play = await afsapi.play()
|
|
125
129
|
print("Start play succeeded? - %s" % start_play)
|
|
126
|
-
await asyncio.sleep(
|
|
130
|
+
await asyncio.sleep(2)
|
|
127
131
|
|
|
128
132
|
forward = await afsapi.forward()
|
|
129
133
|
print("Next succeeded? - %s" % forward)
|
|
130
|
-
await asyncio.sleep(
|
|
134
|
+
await asyncio.sleep(2)
|
|
131
135
|
|
|
132
136
|
rewind = await afsapi.rewind()
|
|
133
137
|
print("Prev succeeded? - %s" % rewind)
|
|
134
138
|
|
|
139
|
+
stop = await afsapi.stop()
|
|
140
|
+
print("Stop play succeeded? - %s" % stop)
|
|
141
|
+
await asyncio.sleep(2)
|
|
142
|
+
|
|
135
143
|
except Exception:
|
|
136
144
|
logging.error(traceback.format_exc())
|
|
137
145
|
|
|
138
|
-
|
|
139
146
|
loop = asyncio.new_event_loop()
|
|
140
147
|
|
|
141
148
|
loop.run_until_complete(test_sys())
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
[build-system]
|
|
2
2
|
requires = [
|
|
3
3
|
"setuptools >= 48",
|
|
4
|
-
"setuptools_scm[toml]
|
|
4
|
+
"setuptools_scm[toml]",
|
|
5
5
|
"setuptools_scm_git_archive",
|
|
6
6
|
"wheel >= 0.29.0",
|
|
7
7
|
]
|
|
@@ -12,10 +12,8 @@ write_to = "afsapi/version.py"
|
|
|
12
12
|
|
|
13
13
|
[tool.mypy]
|
|
14
14
|
strict = true
|
|
15
|
-
files=["afsapi"]
|
|
16
|
-
exclude = [
|
|
17
|
-
"afsapi/__init__.py"
|
|
18
|
-
]
|
|
15
|
+
files = ["afsapi"]
|
|
16
|
+
exclude = ["afsapi/__init__.py"]
|
|
19
17
|
|
|
20
18
|
[pycodestyle]
|
|
21
19
|
max_line_length = 120
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name = afsapi
|
|
3
3
|
description = Asynchronous Implementation of the Frontier Silicon API
|
|
4
4
|
long_description = file: README.md
|
|
5
|
-
long_description_content_type = text/markdown
|
|
5
|
+
long_description_content_type = text/markdown
|
|
6
6
|
url = https://github.com/zhelev/python-afsapi.git
|
|
7
7
|
author = Krasimir Zhelev
|
|
8
8
|
author_email = krasimir.zhelev@gmail.com
|
|
@@ -32,6 +32,7 @@ install_requires =
|
|
|
32
32
|
python_requires = >=3.7
|
|
33
33
|
setup_requires =
|
|
34
34
|
setuptools_scm
|
|
35
|
+
setuptools
|
|
35
36
|
|
|
36
37
|
[bdist_wheel]
|
|
37
38
|
universal = 1
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
name: Upload Python Package
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
release:
|
|
5
|
-
types: [published]
|
|
6
|
-
|
|
7
|
-
jobs:
|
|
8
|
-
deploy:
|
|
9
|
-
runs-on: ubuntu-latest
|
|
10
|
-
|
|
11
|
-
steps:
|
|
12
|
-
- uses: actions/checkout@v2
|
|
13
|
-
- name: Set up Python
|
|
14
|
-
uses: actions/setup-python@v2
|
|
15
|
-
with:
|
|
16
|
-
python-version: "3.10"
|
|
17
|
-
- name: Install dependencies
|
|
18
|
-
run: |
|
|
19
|
-
python -m pip install --upgrade pip
|
|
20
|
-
pip install build
|
|
21
|
-
- name: Build package
|
|
22
|
-
run: python -m build
|
|
23
|
-
|
|
24
|
-
- uses: shogo82148/actions-upload-release-asset@v1
|
|
25
|
-
with:
|
|
26
|
-
upload_url: ${{ github.event.release.upload_url }}
|
|
27
|
-
asset_path: dist/*
|
|
28
|
-
- name: Publish package
|
|
29
|
-
uses: >-
|
|
30
|
-
pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
|
|
31
|
-
if: github.repository_owner == 'wlcrs'
|
|
32
|
-
with:
|
|
33
|
-
user: __token__
|
|
34
|
-
password: ${{ secrets.PYPI_API_TOKEN }}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: Python
|
|
3
|
-
|
|
4
|
-
on: push
|
|
5
|
-
|
|
6
|
-
jobs:
|
|
7
|
-
build-n-test:
|
|
8
|
-
name: Build and test Python code
|
|
9
|
-
runs-on: ubuntu-20.04
|
|
10
|
-
steps:
|
|
11
|
-
- uses: actions/checkout@master
|
|
12
|
-
- name: Set up Python 3.10
|
|
13
|
-
uses: actions/setup-python@v1
|
|
14
|
-
with:
|
|
15
|
-
python-version: "3.10"
|
|
16
|
-
|
|
17
|
-
- name: flake8 Lint
|
|
18
|
-
uses: py-actions/flake8@v2
|
|
19
|
-
with:
|
|
20
|
-
max-line-length: "120"
|
|
21
|
-
env:
|
|
22
|
-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
- name: Install pypa/build
|
|
26
|
-
run: >-
|
|
27
|
-
python -m
|
|
28
|
-
pip install
|
|
29
|
-
build
|
|
30
|
-
--user
|
|
31
|
-
- name: Build a binary wheel and a source tarball
|
|
32
|
-
run: >-
|
|
33
|
-
python -m
|
|
34
|
-
build
|
|
35
|
-
--sdist
|
|
36
|
-
--wheel
|
|
37
|
-
--outdir dist/
|
|
38
|
-
.
|
|
39
|
-
|
|
40
|
-
- name: Install Requirements (for Mypy analysis)
|
|
41
|
-
run: pip install -r requirements.txt
|
|
42
|
-
|
|
43
|
-
- name: Install Mypy
|
|
44
|
-
run: pip install mypy
|
|
45
|
-
|
|
46
|
-
- name: Mypy
|
|
47
|
-
run: mypy
|
|
48
|
-
|
|
49
|
-
- name: Save packages as artifacts
|
|
50
|
-
uses: actions/upload-artifact@v2
|
|
51
|
-
with:
|
|
52
|
-
name: packages
|
|
53
|
-
path: dist/
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: Yaml Lint
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
paths:
|
|
6
|
-
- '**.yml'
|
|
7
|
-
- '**.yaml'
|
|
8
|
-
jobs:
|
|
9
|
-
lintAllTheThings:
|
|
10
|
-
runs-on: ubuntu-latest
|
|
11
|
-
steps:
|
|
12
|
-
- uses: actions/checkout@v2
|
|
13
|
-
- name: yaml-lint
|
|
14
|
-
uses: ibiqlik/action-yamllint@v3
|
|
15
|
-
with:
|
|
16
|
-
config_data: |
|
|
17
|
-
extends: default
|
|
18
|
-
rules:
|
|
19
|
-
truthy: disable
|
|
20
|
-
...
|
afsapi-0.2.8/afsapi/version.py
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|