circfirm 4.0.0__py3-none-any.whl → 4.0.1__py3-none-any.whl
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.
- circfirm/backend/cache.py +0 -1
- circfirm/backend/s3.py +0 -1
- circfirm/cli/cache.py +5 -0
- circfirm/cli/query.py +24 -5
- circfirm/cli/update.py +5 -2
- {circfirm-4.0.0.dist-info → circfirm-4.0.1.dist-info}/METADATA +3 -2
- {circfirm-4.0.0.dist-info → circfirm-4.0.1.dist-info}/RECORD +13 -13
- {circfirm-4.0.0.dist-info → circfirm-4.0.1.dist-info}/WHEEL +1 -1
- {circfirm-4.0.0.dist-info → circfirm-4.0.1.dist-info}/entry_points.txt +0 -0
- {circfirm-4.0.0.dist-info → circfirm-4.0.1.dist-info/licenses}/LICENSE +0 -0
- {circfirm-4.0.0.dist-info → circfirm-4.0.1.dist-info/licenses}/NOTICE +0 -0
- {circfirm-4.0.0.dist-info → circfirm-4.0.1.dist-info/licenses}/NOTICE.license +0 -0
- {circfirm-4.0.0.dist-info → circfirm-4.0.1.dist-info}/top_level.txt +0 -0
circfirm/backend/cache.py
CHANGED
circfirm/backend/s3.py
CHANGED
|
@@ -17,7 +17,6 @@ import packaging.version
|
|
|
17
17
|
from mypy_boto3_s3 import S3ServiceResource
|
|
18
18
|
|
|
19
19
|
import circfirm.backend
|
|
20
|
-
import circfirm.backend.cache
|
|
21
20
|
|
|
22
21
|
S3_CONFIG = botocore.client.Config(signature_version=botocore.UNSIGNED)
|
|
23
22
|
S3_RESOURCE: S3ServiceResource = boto3.resource("s3", config=S3_CONFIG)
|
circfirm/cli/cache.py
CHANGED
|
@@ -13,6 +13,7 @@ import re
|
|
|
13
13
|
import shutil
|
|
14
14
|
from typing import Optional
|
|
15
15
|
|
|
16
|
+
import botocore.exceptions
|
|
16
17
|
import click
|
|
17
18
|
|
|
18
19
|
import circfirm
|
|
@@ -153,3 +154,7 @@ def cache_latest(board_id: str, language: str, pre_release: bool) -> None:
|
|
|
153
154
|
)
|
|
154
155
|
except ConnectionError as err:
|
|
155
156
|
raise click.exceptions.ClickException(err.args[0])
|
|
157
|
+
except botocore.exceptions.ConnectionError:
|
|
158
|
+
raise click.exceptions.ClickException(
|
|
159
|
+
"Could not connect to the S3 bucket - check network connection"
|
|
160
|
+
)
|
circfirm/cli/query.py
CHANGED
|
@@ -9,6 +9,7 @@ Author(s): Alec Delaney
|
|
|
9
9
|
|
|
10
10
|
import re
|
|
11
11
|
|
|
12
|
+
import botocore.exceptions
|
|
12
13
|
import click
|
|
13
14
|
import requests
|
|
14
15
|
|
|
@@ -51,12 +52,18 @@ def query_board_ids(regex: str) -> None:
|
|
|
51
52
|
except ValueError as err:
|
|
52
53
|
raise click.ClickException(err.args[0])
|
|
53
54
|
except requests.ConnectionError as err:
|
|
55
|
+
print("Triggered!")
|
|
54
56
|
raise click.ClickException(
|
|
55
57
|
"Issue with requesting information from git repository, check network connection"
|
|
56
58
|
)
|
|
57
59
|
for board in boards:
|
|
58
60
|
board_id = board.strip()
|
|
59
|
-
|
|
61
|
+
try:
|
|
62
|
+
result = re.search(regex, board_id)
|
|
63
|
+
except re.PatternError:
|
|
64
|
+
raise click.exceptions.ClickException(
|
|
65
|
+
"Regex pattern error - please check the regex syntax"
|
|
66
|
+
)
|
|
60
67
|
if result:
|
|
61
68
|
click.echo(board_id)
|
|
62
69
|
|
|
@@ -69,7 +76,16 @@ def query_board_ids(regex: str) -> None:
|
|
|
69
76
|
)
|
|
70
77
|
def query_versions(board_id: str, language: str, regex: str) -> None:
|
|
71
78
|
"""Query the CircuitPython versions available for a board."""
|
|
72
|
-
|
|
79
|
+
try:
|
|
80
|
+
versions = circfirm.backend.s3.get_board_versions(
|
|
81
|
+
board_id, language, regex=regex
|
|
82
|
+
)
|
|
83
|
+
except botocore.exceptions.ConnectionError as err:
|
|
84
|
+
raise click.exceptions.ClickException(err.args[0])
|
|
85
|
+
except re.PatternError:
|
|
86
|
+
raise click.exceptions.ClickException(
|
|
87
|
+
"Regex pattern error - please check the regex syntax"
|
|
88
|
+
)
|
|
73
89
|
for version in reversed(versions):
|
|
74
90
|
click.echo(version)
|
|
75
91
|
|
|
@@ -86,8 +102,11 @@ def query_versions(board_id: str, language: str, regex: str) -> None:
|
|
|
86
102
|
)
|
|
87
103
|
def query_latest(board_id: str, language: str, pre_release: bool) -> None:
|
|
88
104
|
"""Query the latest CircuitPython versions available."""
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
105
|
+
try:
|
|
106
|
+
version = circfirm.backend.s3.get_latest_board_version(
|
|
107
|
+
board_id, language, pre_release
|
|
108
|
+
)
|
|
109
|
+
except botocore.exceptions.ConnectionError as err:
|
|
110
|
+
raise click.exceptions.ClickException(err.args[0])
|
|
92
111
|
if version:
|
|
93
112
|
click.echo(version)
|
circfirm/cli/update.py
CHANGED
|
@@ -9,12 +9,12 @@ Author(s): Alec Delaney
|
|
|
9
9
|
|
|
10
10
|
from typing import Optional
|
|
11
11
|
|
|
12
|
+
import botocore.exceptions
|
|
12
13
|
import click
|
|
13
14
|
import packaging.version
|
|
14
15
|
|
|
15
16
|
import circfirm.backend.device
|
|
16
17
|
import circfirm.backend.s3
|
|
17
|
-
import circfirm.cli.install
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
@click.command()
|
|
@@ -79,7 +79,10 @@ def cli( # noqa: PLR0913
|
|
|
79
79
|
except OSError as err:
|
|
80
80
|
raise click.ClickException(err.args[0])
|
|
81
81
|
|
|
82
|
-
|
|
82
|
+
try:
|
|
83
|
+
new_versions = circfirm.backend.s3.get_board_versions(board_id, language)
|
|
84
|
+
except botocore.exceptions.ConnectionError as err:
|
|
85
|
+
raise click.exceptions.ClickException(err.args[0])
|
|
83
86
|
|
|
84
87
|
if not pre_release:
|
|
85
88
|
new_versions = [
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: circfirm
|
|
3
|
-
Version: 4.0.
|
|
3
|
+
Version: 4.0.1
|
|
4
4
|
Summary: CLI tool for install firmware for CircuitPython boards
|
|
5
5
|
Author-email: Alec Delaney <tekktrik@gmail.com>
|
|
6
6
|
License: MIT
|
|
@@ -46,6 +46,7 @@ Requires-Dist: pytest~=8.3; extra == "dev"
|
|
|
46
46
|
Requires-Dist: sphinx~=7.4; extra == "dev"
|
|
47
47
|
Requires-Dist: sphinx-tabs~=3.4; extra == "dev"
|
|
48
48
|
Requires-Dist: sphinx-rtd-theme~=3.0; extra == "dev"
|
|
49
|
+
Dynamic: license-file
|
|
49
50
|
|
|
50
51
|
..
|
|
51
52
|
SPDX-FileCopyrightText: 2022 Alec Delaney, for Adafruit Industries
|
|
@@ -2,26 +2,26 @@ circfirm/__init__.py,sha256=Uk6XRo7aFQcwUOMfst4GVt8tuXbMRnDIsPRrWeBtxLQ,719
|
|
|
2
2
|
circfirm/py.typed,sha256=F2H7kdQErBIQUjr5WG2gdwj35iaUHi4Eyc2hovaLTMA,97
|
|
3
3
|
circfirm/startup.py,sha256=HoeMpISAJswKTFn-sHhtoCD5yISHW5z8ZPW7WgSr2xg,1946
|
|
4
4
|
circfirm/backend/__init__.py,sha256=fzxooHsys60iPrj6q6l-t3m2iGAC6FEIinP1UFgGHKE,1858
|
|
5
|
-
circfirm/backend/cache.py,sha256=
|
|
5
|
+
circfirm/backend/cache.py,sha256=WZwBP-c9KkTX5IpkRovj46FUzk6JJdFB8-FIWC3--5k,2907
|
|
6
6
|
circfirm/backend/device.py,sha256=t_g4iPJ4C2Qg5xKUr1AI6XPu5-ULTDZ4e3qAZVSfJs8,1776
|
|
7
7
|
circfirm/backend/github.py,sha256=ePHXTCxqGcJOyVsutdbsL80MaxIYBdNIV9Yzz8aG4Yg,2090
|
|
8
|
-
circfirm/backend/s3.py,sha256=
|
|
8
|
+
circfirm/backend/s3.py,sha256=rFxR4XcP9njGcAe3FikJmcvaJHmgFFCqGRSqHD3lqDE,2145
|
|
9
9
|
circfirm/cli/__init__.py,sha256=TBJxvMqzTXQNEv2jKTZHqxeTTvGoQ9sz4o4R91Qe4Kg,6454
|
|
10
10
|
circfirm/cli/about.py,sha256=_QNqXtbyerlxewPVieCdOvQ6BZWqdgvncBIzj39zpCU,340
|
|
11
|
-
circfirm/cli/cache.py,sha256=
|
|
11
|
+
circfirm/cli/cache.py,sha256=fpwktpS7e0Ikg8qekUoC40qHHARcShiLuxSW7ZIqg5I,5430
|
|
12
12
|
circfirm/cli/config.py,sha256=9ye3jQhgXaOMAXIlJWHp8PhBEtjUTJSL9szTXCQU2Cg,3122
|
|
13
13
|
circfirm/cli/current.py,sha256=3kjvAQ5oFuXxey8RtU6T5GJPnTmIy2saEpyYoqVOTU8,1034
|
|
14
14
|
circfirm/cli/detect.py,sha256=hXOIFjQAylx5kDT1chU2HJXqIv14scDJheO5-XUioeI,944
|
|
15
15
|
circfirm/cli/install.py,sha256=z0pT7J_n4A3dJn-ocZk-uYcKkOZ3iUHbId-f-k97cg0,1253
|
|
16
|
-
circfirm/cli/query.py,sha256=
|
|
17
|
-
circfirm/cli/update.py,sha256=
|
|
16
|
+
circfirm/cli/query.py,sha256=hZMzxojZUNr7eNCj5dz9WY2u9DTXov21PnRcYcPhkQ4,3633
|
|
17
|
+
circfirm/cli/update.py,sha256=ZXLjUmpaJCvEI19rafCzGIco3wJZ-zCB4YpYxb7Iciw,3559
|
|
18
18
|
circfirm/templates/settings.yaml,sha256=SM1zjXvZg1jikzn9TjgOufl0Pn9KBbrw8sIcJ01BRhQ,69
|
|
19
19
|
circfirm/templates/settings.yaml.license,sha256=F2H7kdQErBIQUjr5WG2gdwj35iaUHi4Eyc2hovaLTMA,97
|
|
20
|
-
circfirm-4.0.
|
|
21
|
-
circfirm-4.0.
|
|
22
|
-
circfirm-4.0.
|
|
23
|
-
circfirm-4.0.
|
|
24
|
-
circfirm-4.0.
|
|
25
|
-
circfirm-4.0.
|
|
26
|
-
circfirm-4.0.
|
|
27
|
-
circfirm-4.0.
|
|
20
|
+
circfirm-4.0.1.dist-info/licenses/LICENSE,sha256=6pPP6gJ00tqCkxg5gABHDwWUiXZ_mBzH94xxPOqwGj4,1069
|
|
21
|
+
circfirm-4.0.1.dist-info/licenses/NOTICE,sha256=-iTImDmAffekkp_kj8De0_pvckHvXAHLPAJTWOgQsiw,2956
|
|
22
|
+
circfirm-4.0.1.dist-info/licenses/NOTICE.license,sha256=FIvC5TnLXwPBj-dgEV4FBwAlJxzMXhgl50TXLv2d88o,96
|
|
23
|
+
circfirm-4.0.1.dist-info/METADATA,sha256=trxEBd0QhzT8ETbp7ce6R_8J0E1pHRUKjIx-_9TvY24,4700
|
|
24
|
+
circfirm-4.0.1.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
25
|
+
circfirm-4.0.1.dist-info/entry_points.txt,sha256=33qZTmSuXz8dgi29yjSyb8VsEA8HyhWuhn2MNcjatGQ,46
|
|
26
|
+
circfirm-4.0.1.dist-info/top_level.txt,sha256=qA2407wap3My6jGA5uchH2JjUM7qn73oBPwALN7GR5k,9
|
|
27
|
+
circfirm-4.0.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|