Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for web workflow #163

Merged
merged 68 commits into from
Mar 5, 2024
Merged
Show file tree
Hide file tree
Changes from 67 commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
8b413ff
add support for web workflow
vladak Feb 22, 2023
151d358
fix install of multi-file packages
vladak Feb 22, 2023
ae5cc2a
Merge branch 'main' into web_workflow
FoamyGuy Oct 28, 2023
63dcbb9
disable too-many-args for main
FoamyGuy Oct 28, 2023
8987505
implementing --auto for webworkflow
FoamyGuy Nov 10, 2023
b7eb10b
fix for file protocol
FoamyGuy Nov 13, 2023
5615279
Merge branch 'main' into web_workflow
FoamyGuy Nov 13, 2023
225b490
fixes for USB workflow and --auto
FoamyGuy Nov 13, 2023
f4618b3
fix for None ctx.parent. Fix file scheme condition
FoamyGuy Nov 13, 2023
32dab6b
Merge branch 'main' into web_workflow
FoamyGuy Nov 17, 2023
97e60ed
starting refactor
FoamyGuy Nov 17, 2023
c6d430c
more refactoring
FoamyGuy Nov 18, 2023
86ccabe
more refactoring, some successful USB workflow functionality
FoamyGuy Nov 20, 2023
90299a0
fix --path argument functionality
FoamyGuy Nov 20, 2023
c1af505
main command function arguments access
FoamyGuy Nov 21, 2023
1b2e115
remove prints, fix trailing slash difference
FoamyGuy Nov 22, 2023
01a1ac2
code format
FoamyGuy Nov 22, 2023
f582873
Backend super class.
FoamyGuy Nov 22, 2023
a5b40b4
fixing tests
FoamyGuy Nov 23, 2023
75e5012
license for mock boot_out
FoamyGuy Nov 23, 2023
1681b29
working on windows USB fix
FoamyGuy Nov 23, 2023
168f8ec
remove prints
FoamyGuy Nov 22, 2023
51f9670
update readme for web workflow support
FoamyGuy Nov 27, 2023
4677400
remove extra tick mark
FoamyGuy Nov 27, 2023
d3eda67
fix typo, change name to DiskBackend, remove wrapper _get_circuitpyth…
FoamyGuy Nov 29, 2023
fb6cd84
starting move backends to own file
FoamyGuy Nov 29, 2023
499dee6
move libraries_from_code_py out of backend. fix CPY_VERSION issue for…
FoamyGuy Nov 30, 2023
bea088e
don't pass library path.
FoamyGuy Dec 2, 2023
d9ce3b2
copyright for shared.py and backends.py
FoamyGuy Dec 4, 2023
01f0a2d
removing path argument from backend functions and find_modules(). add…
FoamyGuy Dec 4, 2023
56c1dda
allow mock version_info in DiskBackend
FoamyGuy Dec 11, 2023
a96fd8e
refactor Module() not to take path. is_deice_present() for DiskBackend
FoamyGuy Dec 13, 2023
31270a0
is_deice_present() for WebBackend. pylint fixes. equalize behavior wh…
FoamyGuy Dec 14, 2023
2d07390
parse_boot_out helper. change DiskBackend() to take boot_out string i…
FoamyGuy Dec 14, 2023
1f9bee3
black format b4 pylint. fix tests tests to passing
FoamyGuy Dec 18, 2023
01cceec
remove prints
FoamyGuy Dec 18, 2023
6cc6a1d
Tweak for Web Workflow with sub paths
tyeth Feb 11, 2024
e5a2030
Dispose of request sockets + create DIRs first
tyeth Feb 11, 2024
7d3eb6c
extract_metadata changes from #198
FoamyGuy Feb 26, 2024
33a0528
Merge branch 'main' into web_workflow
FoamyGuy Feb 26, 2024
88a5f9a
code format
FoamyGuy Feb 26, 2024
e0bbec2
move password check and host check to WebBackend.
FoamyGuy Feb 26, 2024
bfae606
use self.password instead of parse url
FoamyGuy Feb 26, 2024
15aec59
Merge branch 'web_workflow_tweak' into web_workflow
FoamyGuy Feb 26, 2024
dbb8374
fix for json response files key. Use requests Session with retries in…
FoamyGuy Feb 26, 2024
deea802
lots of prints
FoamyGuy Mar 2, 2024
ac578b8
simplify logic in Module init
FoamyGuy Mar 2, 2024
84e048e
fix for name when module is directory
FoamyGuy Mar 2, 2024
a286849
timeouts on all requests. code format
FoamyGuy Mar 2, 2024
3ed8495
Add commandline option for timeout, sync existing REQUEST_TIMEOUT
tyeth Mar 2, 2024
d19e474
check for writable/free_space + auto_file fallback
tyeth Mar 2, 2024
c8ff055
Win:os.sep in Module.name/DiskBackend.library_path
tyeth Mar 2, 2024
5965afd
Add free space check for folders + nesting
tyeth Mar 3, 2024
d5d8ed6
Set logging to truncate log file automatically
tyeth Mar 3, 2024
1f8443f
remove extra sep
FoamyGuy Mar 3, 2024
42d9fe6
code format and pylint
FoamyGuy Mar 3, 2024
1c8b32c
ignore locals
FoamyGuy Mar 3, 2024
3ec6e34
try moving this?
FoamyGuy Mar 3, 2024
08e0c94
add a different one?
FoamyGuy Mar 3, 2024
2c8d3e9
different line
FoamyGuy Mar 3, 2024
3622c3d
inside the arguments
FoamyGuy Mar 3, 2024
3cd60f1
fix directory_module test
FoamyGuy Mar 3, 2024
bc30d36
lookup host from circuitpyhon.local
FoamyGuy Mar 3, 2024
73d5872
code format
FoamyGuy Mar 3, 2024
0c5dec0
use free_space instead of device_versions to verify presence
FoamyGuy Mar 3, 2024
258f084
cleanup and add error message
FoamyGuy Mar 3, 2024
1ef7651
function doc
FoamyGuy Mar 3, 2024
5479ff4
non_writeable drive error message.
FoamyGuy Mar 4, 2024
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
5 changes: 5 additions & 0 deletions .isort.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# SPDX-FileCopyrightText: 2023 Vladimír Kotal
#
# SPDX-License-Identifier: Unlicense
[settings]
profile = black
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
# SPDX-License-Identifier: Unlicense

repos:
- repo: https://github.com/python/black
rev: 22.3.0
hooks:
- id: black
exclude: "^tests/bad_python.py$"
- repo: https://github.com/pycqa/pylint
rev: v2.15.5
hooks:
Expand All @@ -16,11 +21,6 @@ repos:
name: lint (code)
types: [python]
exclude: "^(docs/|examples/|setup.py$|tests/bad_python.py$)"
- repo: https://github.com/python/black
rev: 22.3.0
hooks:
- id: black
exclude: "^tests/bad_python.py$"
- repo: https://github.com/fsfe/reuse-tool
rev: v0.14.0
hooks:
Expand Down
46 changes: 30 additions & 16 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -89,24 +89,32 @@ To get help, just type the command::
A tool to manage and update libraries on a CircuitPython device.

Options:
--verbose Comprehensive logging is sent to stdout.
--version Show the version and exit.
--path DIRECTORY Path to CircuitPython directory. Overrides automatic
path detection.
--help Show this message and exit.
-r --requirement Supports requirements.txt tracking of library
requirements with freeze and install commands.
--verbose Comprehensive logging is sent to stdout.
--path DIRECTORY Path to CircuitPython directory. Overrides automatic
path detection.
--host TEXT Hostname or IP address of a device. Overrides automatic
path detection.
--password TEXT Password to use for authentication when --host is used.
--board-id TEXT Manual Board ID of the CircuitPython device. If provided
in combination with --cpy-version, it overrides the
detected board ID.
--cpy-version TEXT Manual CircuitPython version. If provided in combination
with --board-id, it overrides the detected CPy version.
--version Show the version and exit.
--help Show this message and exit.

Commands:
freeze Output details of all the modules found on the connected...
install Installs .mpy version of named module(s) onto the device.
install --py Installs .py version of named module(s).
list Lists all out of date modules found on the connected...
show Show the long list of all available modules in the bundle.
show <query> Search the names in the modules in the bundle for a match.
uninstall Uninstall a named module(s) from the connected device.
update Update modules on the device. Use --all to automatically update
all modules.
bundle-add Add bundles to the local bundles list, by "user/repo"...
bundle-remove Remove one or more bundles from the local bundles list.
bundle-show Show the list of bundles, default and local, with URL,...
freeze Output details of all the modules found on the connected...
install Install a named module(s) onto the device.
list Lists all out of date modules found on the connected...
show Show a list of available modules in the bundle.
uninstall Uninstall a named module(s) from the connected device.
update Update modules on the device. Use --all to automatically
update all modules without Major Version warnings.



To automatically install all modules imported by ``code.py``,
Expand Down Expand Up @@ -221,6 +229,12 @@ The ``--version`` flag will tell you the current version of the
$ circup --version
CircUp, A CircuitPython module updater. Version 0.0.1


To use circup via the `Web Workflow <https://learn.adafruit.com/getting-started-with-web-workflow-using-the-code-editor>`_. on devices that support it. Use the ``--host`` and ``--password`` arguments before your circup command.::

$ circup --host 192.168.1.119 --password s3cr3t install adafruit_hid
$ circup --host cpy-9573b2.local --password s3cr3t install adafruit_hid

That's it!


Expand Down
Loading
Loading