Skip to content
This repository has been archived by the owner on Nov 24, 2023. It is now read-only.

Commit

Permalink
feat: Add REMOTE_FILE - nodes PR:276 (#375)
Browse files Browse the repository at this point in the history
Co-authored-by: jjerphan <[email protected]>
  • Loading branch information
flojoy-bot[bot] and jjerphan authored Sep 12, 2023
1 parent 2280317 commit e649598
Show file tree
Hide file tree
Showing 5 changed files with 917 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
The REMOTE_FILE node loads a remote file of a different type and converts it to a DataContainer class.
The REMOTE_FILE node loads a remote file using an HTTP URL and converts it to a DataContainer class.

Parameters
----------
Expand All @@ -14,6 +14,9 @@ The REMOTE_FILE node loads a remote file of a different type and converts it to
-----
If both file_url and default are not specified when `file_type="Image"`, a default image will be loaded.

REMOTE_FILE for now only supports HTTP file URLs, in particular GCP URL (starting with `gcp://`),
S3 URL (starting with `s3://`) and other bucket-like URLs are not supported.

Raises
------
ValueError
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ def get_file_url(url: str):
return url


# TODO: Consolidate remote files (S3, HTTP, etc...) and perhaps even merge REMOTE_FILE AND LOCAL_FILE in a single node.
@flojoy(
deps={
"xlrd": "2.0.1",
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
In this example, a `REMOTE_FILE` node loads Flojoy's logo from the internet and plots using a `IMAGE` node.
14 changes: 12 additions & 2 deletions nodeSidebar.json
Original file line number Diff line number Diff line change
Expand Up @@ -153,29 +153,39 @@
],
"Flow": [
"nodes/LOGIC_GATES/CONDITIONALS/CONDITIONAL/CONDITIONAL",
"nodes/LOGIC_GATES/CONDITIONALS/CONDITIONALS",
"nodes/LOGIC_GATES/LOOPS/APPEND/APPEND",
"nodes/LOGIC_GATES/LOOPS/LOOP/LOOP",
"nodes/LOGIC_GATES/LOOPS/LOOPS",
"nodes/LOGIC_GATES/LOOP_TOOLS/BREAK/BREAK",
"nodes/LOGIC_GATES/LOOP_TOOLS/LOOP_INDEX/LOOP_INDEX",
"nodes/LOGIC_GATES/TIMERS/TIMER/TIMER"
"nodes/LOGIC_GATES/LOOP_TOOLS/LOOP_TOOLS",
"nodes/LOGIC_GATES/TIMERS/TIMER/TIMER",
"nodes/LOGIC_GATES/TIMERS/TIMERS"
],
"I/O > Imaging": [
"nodes/INSTRUMENTS/WEB_CAM/CAMERA/CAMERA",
"nodes/INSTRUMENTS/WEB_CAM/WEB_CAM"
],
"I/O > Instruments > Keithley": [
"nodes/INSTRUMENTS/KEITHLEY/KEITHLEY",
"nodes/INSTRUMENTS/KEITHLEY/KEITHLEY2400/KEITHLEY2400"
],
"I/O > Instruments > LabJack": [
"nodes/INSTRUMENTS/LABJACK/LABJACK",
"nodes/INSTRUMENTS/LABJACK/LABJACKU3/LABJACKU3"
],
"I/O > Instruments > Phidget": [
"nodes/INSTRUMENTS/PHIDGET/PHIDGET",
"nodes/INSTRUMENTS/PHIDGET/PHIDGET22/PHIDGET22"
],
"I/O > Motion > Stepper Motor Drivers": [
"nodes/INSTRUMENTS/STEPPER_MOTOR/STEPPER_DRIVER_TIC/STEPPER_DRIVER_TIC",
"nodes/INSTRUMENTS/STEPPER_MOTOR/STEPPER_DRIVER_TIC_KNOB/STEPPER_DRIVER_TIC_KNOB"
"nodes/INSTRUMENTS/STEPPER_MOTOR/STEPPER_DRIVER_TIC_KNOB/STEPPER_DRIVER_TIC_KNOB",
"nodes/INSTRUMENTS/STEPPER_MOTOR/STEPPER_MOTOR"
],
"I/O > Protocols > Serial": [
"nodes/INSTRUMENTS/SERIAL/SERIAL",
"nodes/INSTRUMENTS/SERIAL/SERIAL_SINGLE_MEASUREMENT/SERIAL_SINGLE_MEASUREMENT",
"nodes/INSTRUMENTS/SERIAL/SERIAL_TIMESERIES/SERIAL_TIMESERIES"
],
Expand Down

0 comments on commit e649598

Please sign in to comment.