-
Notifications
You must be signed in to change notification settings - Fork 0
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
Elizabeth/try local install #10
base: main
Are you sure you want to change the base?
Conversation
WalkthroughThe changes involve updates to the Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (3)
app/README.md (1)
10-10
: Consider formatting the URL as a proper Markdown link.To improve readability and follow Markdown best practices, consider formatting the URL as a proper link.
Here's a suggested improvement:
- https://visualstudio.microsoft.com/ C++ build tools required + [C++ build tools](https://visualstudio.microsoft.com/) requiredThis change will make the link clickable in rendered Markdown and improve the overall appearance of the README.
🧰 Tools
🪛 Markdownlint
10-10: null
Bare URL used(MD034, no-bare-urls)
README.md (2)
11-11
: Approve change with suggestions for improvementThe updated instruction improves the setup process by explicitly specifying both Python and Node.js versions. However, there are a few points to consider:
- The spelling of "Node.js" should be corrected (currently "nodejs").
- Consider specifying Node.js version 18.0, as mentioned in the PR objectives to resolve the
better-sqlite3
build issue.- The PR objectives mention issues with
nidaqmx
andbetter-sqlite3
. Should these be addressed in the README?Here's a suggested revision:
- 1. Create the `bloom-desktop` environment with python 3.8 and nodejs: `mamba create --name bloom-desktop python=3.8 nodejs pip` + 1. Create the `bloom-desktop` environment with Python 3.8 and Node.js 18.0: `mamba create --name bloom-desktop python=3.8 nodejs=18.0 pip`Additionally, consider adding a note about potential issues with
nidaqmx
andbetter-sqlite3
, and how to resolve them if encountered during the setup process.🧰 Tools
🪛 LanguageTool
[uncategorized] ~11-~11: The official spelling of this programming framework is “Node.js”.
Context: ...esktopenvironment with python 3.8 and nodejs:
mamba create --name bloom-desktop pyt...(NODE_JS)
Line range hint
1-37
: Suggest additional improvements to address PR objectivesWhile the changes improve the initial setup process, the README could be further enhanced to address the issues mentioned in the PR objectives:
Add a note about the
nidaqmx
package installation issue:
"Note: Thenidaqmx
package available from the conda channel may be broken. The pip version is up-to-date and recommended."Include information about potential
better-sqlite3
compilation issues:
"If you encounter compilation issues withbetter-sqlite3
, ensure you're using Node.js version 18.0 or later."Consider adding a troubleshooting section to help users address common setup issues.
These additions will make the README more comprehensive and help users avoid or resolve the issues mentioned in the PR objectives.
🧰 Tools
🪛 LanguageTool
[uncategorized] ~11-~11: The official spelling of this programming framework is “Node.js”.
Context: ...esktopenvironment with python 3.8 and nodejs:
mamba create --name bloom-desktop pyt...(NODE_JS)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (2)
- README.md (1 hunks)
- app/README.md (1 hunks)
🧰 Additional context used
🪛 LanguageTool
README.md
[uncategorized] ~11-~11: The official spelling of this programming framework is “Node.js”.
Context: ...esktopenvironment with python 3.8 and nodejs:
mamba create --name bloom-desktop pyt...(NODE_JS)
🪛 Markdownlint
app/README.md
10-10: null
Bare URL used(MD034, no-bare-urls)
🔇 Additional comments (1)
app/README.md (1)
10-10
: Excellent addition of C++ build tools requirement!This new line provides crucial information for users setting up the Bloom Desktop application. It directly addresses the installation issues mentioned in the PR objectives, particularly the problems related to building native Node.js modules like
better-sqlite3
.🧰 Tools
🪛 Markdownlint
10-10: null
Bare URL used(MD034, no-bare-urls)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🧹 Outside diff range and nitpick comments (5)
app/README.md (1)
11-17
: Minor improvements for clarity and consistencyThe additional details about build tools and the
npm install
process are helpful. Consider the following suggestions:
- Change "cleanup" to "clean up" for grammatical correctness.
- Convert the bare URL to a proper markdown link for better readability and to address the Markdownlint warning.
Here's a suggested update:
6. Run `npm install`. - Make sure you are in `app` directory. - Build tools required for this step: - - https://visualstudio.microsoft.com/ C++ for Desktop Development on Windows + - [Visual Studio](https://visualstudio.microsoft.com/) C++ for Desktop Development on Windows - XCode for Mac - `build-essential` for Linux - - Use `npm cache clean` to cleanup + - Use `npm cache clean` to clean up🧰 Tools
🪛 LanguageTool
[misspelling] ~17-~17: Did you mean the phrasal verb “clean up” instead of the noun ‘cleanup’?
Context: ...or Linux - Usenpm cache clean
to cleanup 7. Runnpm run client:generate
to gen...(CLEAN_UP)
🪛 Markdownlint
14-14: null
Bare URL used(MD034, no-bare-urls)
pylon/pylon_fake.py (2)
13-14
: LGTM: Logging configuration addedThe logging configuration is appropriately set to DEBUG level. This is useful for development and troubleshooting.
Consider adding a comment explaining why DEBUG level is used, or consider making the log level configurable through an environment variable for easier switching between production and development settings.
15-18
: LGTM: Improved path handling forsample_scan
The changes to
sample_scan
are well-implemented:
- Using
pathlib
for path construction is a good practice.- The relative path makes the code more portable across different environments.
- The debug log statement aids in troubleshooting.
Consider removing the commented-out line (15) as it's no longer needed and can be retrieved from version control if necessary.
pylon/pylon_stream_forever_fake.py (2)
Line range hint
9-19
: Approve logging implementation with a suggestion for production use.The addition of logging is a great improvement for debugging and monitoring. However, consider adjusting the logging level for production use.
For production, consider using a less verbose logging level:
import logging logging.basicConfig(level=logging.INFO) # or logging.WARNING for productionThis will reduce the amount of log output in production while still capturing important information.
🧰 Tools
🪛 Ruff
28-28: Local variable
n
is assigned to but never usedRemove assignment to unused variable
n
(F841)
53-63
: Approve error handling and logging improvements with a suggestion.The additions to the
img_to_base64
function significantly improve its robustness and debuggability:
- Error handling for invalid images is a great addition.
- The use of context managers for BytesIO and PIL Image ensures proper resource management.
- The debug logs provide valuable information about the image processing steps.
Consider modifying the base64 logging to avoid potential exposure of sensitive data:
logging.debug(f"base64_img length: {len(base64_img)}")This change will still provide useful information without risking the exposure of image data in logs.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (4)
- README.md (1 hunks)
- app/README.md (1 hunks)
- pylon/pylon_fake.py (1 hunks)
- pylon/pylon_stream_forever_fake.py (4 hunks)
🧰 Additional context used
🪛 LanguageTool
README.md
[uncategorized] ~11-~11: The official spelling of this programming framework is “Node.js”.
Context: ...esktopenvironment with python 3.8 and nodejs:
mamba create --name bloom-desktop pyt...(NODE_JS)
app/README.md
[misspelling] ~17-~17: Did you mean the phrasal verb “clean up” instead of the noun ‘cleanup’?
Context: ...or Linux - Usenpm cache clean
to cleanup 7. Runnpm run client:generate
to gen...(CLEAN_UP)
🪛 Markdownlint
app/README.md
14-14: null
Bare URL used(MD034, no-bare-urls)
🪛 Ruff
pylon/pylon_stream_forever_fake.py
28-28: Local variable
n
is assigned to but never usedRemove assignment to unused variable
n
(F841)
🔇 Additional comments (14)
README.md (3)
Line range hint
1-33
: Overall README improvementsThe changes to the README file generally improve the setup process by providing more specific instructions and simplifying the installation steps. However, there are a few areas where additional clarity could be beneficial:
- Explicitly mentioning the change from conda to pip for
nidaqmx
installation.- Providing context for why these changes were made.
- Ensuring that the unchanged sections (NI-DAQ Control and Basler Pylon) are still accurate and complete.
These improvements will help future contributors better understand the setup process and the reasoning behind certain decisions.
🧰 Tools
🪛 LanguageTool
[uncategorized] ~11-~11: The official spelling of this programming framework is “Node.js”.
Context: ...esktopenvironment with python 3.8 and nodejs:
mamba create --name bloom-desktop pyt...(NODE_JS)
11-11
: 🛠️ Refactor suggestionImprove environment setup instruction
The updated instruction provides more specific versions for Python and Node.js, which is excellent for reproducibility. However, there are a few points to consider:
- The official spelling of Node.js should be used instead of "nodejs".
- The PR objectives mention issues with
nidaqmx
installation from conda, but this change isn't reflected in the README.Consider updating the instruction as follows:
-1. Create the `bloom-desktop` environment with python 3.8 and nodejs: `mamba create --name bloom-desktop python=3.8 nodejs=18 pip -c conda-forge` +1. Create the `bloom-desktop` environment with Python 3.8 and Node.js 18: `mamba create --name bloom-desktop python=3.8 nodejs=18 pip -c conda-forge`Also, consider adding a note about the
nidaqmx
installation issue and why it's now installed via pip instead of conda.To ensure consistency with the project's actual requirements, let's check the
requirements.txt
file:#!/bin/bash # Description: Verify the contents of requirements.txt cat requirements.txt🧰 Tools
🪛 LanguageTool
[uncategorized] ~11-~11: The official spelling of this programming framework is “Node.js”.
Context: ...esktopenvironment with python 3.8 and nodejs:
mamba create --name bloom-desktop pyt...(NODE_JS)
Line range hint
16-33
: Review NI-DAQ and Basler Pylon setup instructionsWhile these sections weren't changed in this PR, consider reviewing them to ensure they're still accurate and complete, especially given the issues mentioned in the PR objectives (ZeroDivisionError and problems with closing captured images).
It might be helpful to verify if these instructions are still valid and if any additional steps are needed to address the reported issues. Consider running the following commands to check for any recent changes or issues related to these components:
✅ Verification successful
Verification Successful: README.md Setup Instructions Are Current
The setup instructions for NI-DAQ Control and Basler Pylon in README.md remain accurate and have not been affected by recent changes.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check for recent changes or issues related to NI-DAQ and Basler Pylon git log -n 5 -- "*daq*" "*pylon*" git grep -n "ZeroDivisionError" git grep -n "onCaptureImage"Length of output: 1419
🧰 Tools
🪛 LanguageTool
[uncategorized] ~11-~11: The official spelling of this programming framework is “Node.js”.
Context: ...esktopenvironment with python 3.8 and nodejs:
mamba create --name bloom-desktop pyt...(NODE_JS)
app/README.md (5)
5-10
: LGTM: Clear and detailed installation stepsThe updated installation instructions provide a clear, step-by-step process for setting up the Bloom Desktop application. The addition of the conda environment activation step and the detailed instructions for creating and editing configuration files are helpful improvements.
18-19
: LGTM: Clear instructions for client generation and database deploymentThe added steps for generating the TypeScript client and deploying the database are clear and provide necessary information for setting up the application.
23-23
: LGTM: Clear Quickstart instructionThe Quickstart instruction is clear and concise, providing users with a simple command to run the application from the correct directory.
Line range hint
33-39
: LGTM: Comprehensive software update instructionsThe "Updating the software" section provides clear and comprehensive instructions for users to update their existing installation. The steps cover all necessary aspects of the update process, including pulling changes, updating dependencies, regenerating the client, and applying database migrations.
🧰 Tools
🪛 LanguageTool
[misspelling] ~17-~17: Did you mean the phrasal verb “clean up” instead of the noun ‘cleanup’?
Context: ...or Linux - Usenpm cache clean
to cleanup 7. Runnpm run client:generate
to gen...(CLEAN_UP)
🪛 Markdownlint
14-14: null
Bare URL used(MD034, no-bare-urls)
Line range hint
1-39
: Great improvements to the README fileThe changes to the README file significantly enhance its clarity and usefulness. The installation instructions are now more detailed and comprehensive, covering environment setup, configuration, and build requirements. The added Quickstart section and the clear update instructions make it easier for users to get started and maintain the Bloom Desktop application.
These improvements will greatly assist users in setting up and using the application, potentially reducing installation-related issues and support requests.
🧰 Tools
🪛 LanguageTool
[misspelling] ~17-~17: Did you mean the phrasal verb “clean up” instead of the noun ‘cleanup’?
Context: ...or Linux - Usenpm cache clean
to cleanup 7. Runnpm run client:generate
to gen...(CLEAN_UP)
🪛 Markdownlint
14-14: null
Bare URL used(MD034, no-bare-urls)
pylon/pylon_fake.py (2)
9-9
: LGTM: Logging import addedThe addition of the
logging
import is appropriate for the new logging functionality introduced in this file.
Line range hint
1-18
: Summary: Improvements in logging and path handlingThe changes in this file enhance its functionality and maintainability:
- Addition of logging improves debugging capabilities.
- The use of
pathlib
forsample_scan
increases portability across different environments.- The changes align well with the PR objectives, addressing issues related to path handling.
These modifications are well-implemented and improve the overall quality of the code.
pylon/pylon_stream_forever_fake.py (4)
20-24
: Approve path handling improvements.The use of
pathlib
for handling the sample scan path is an excellent improvement. It enhances cross-platform compatibility and makes the code more robust. The added debug log is helpful for confirming the correct path resolution.
30-30
: Approve addition of frame count logging.The debug log for reporting the number of frames found is a helpful addition. It provides valuable information for debugging and monitoring the stream_frames function.
40-40
: Approve addition of image read logging.The debug log for confirming when an image is read is a valuable addition. It enhances the ability to track the image reading process during execution.
Line range hint
1-83
: Overall improvements in logging and error handling.The changes made to this file significantly enhance its debuggability and robustness:
- Addition of comprehensive logging throughout the script.
- Improved error handling in the
img_to_base64
function.- Better path handling using
pathlib
.These improvements align well with the PR objectives, particularly in addressing installation and runtime issues. The enhanced logging will be valuable for diagnosing problems like the
ZeroDivisionError
mentioned in the PR summary.To further improve the code:
- Consider adjusting the logging level for production use.
- Implement the functionality for the
num_frames
setting or remove it if unused.- Be cautious about logging potentially sensitive data in the base64 string.
These changes provide a solid foundation for better error detection and debugging in the
bloom-desktop-pilot
project.🧰 Tools
🪛 Ruff
28-28: Local variable
n
is assigned to but never usedRemove assignment to unused variable
n
(F841)
3. Install pip requirements: | ||
`pip install -r requirements.txt` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Clarify the change in installation method
The updated instruction simplifies the setup process by focusing solely on pip requirements, which aligns with the PR objectives regarding nidaqmx
installation issues. However, it might be beneficial to provide more context for this change.
Consider adding a brief explanation:
3. Install pip requirements:
`pip install -r requirements.txt`
+ Note: We now use pip to install all requirements, including `nidaqmx`, due to issues with the conda version.
This addition would help future contributors understand the reasoning behind the installation method change.
Committable suggestion was skipped due to low confidence.
# Test images are in "test/sample_scan" directory from the root of the repo | ||
sample_scan = pathlib.Path(__file__).parent.parent / "test" / "sample_scan" | ||
logging.debug(f"sample_scan: {sample_scan}") | ||
|
||
|
||
|
||
def stream_frames(camera_settings): | ||
n = camera_settings["num_frames"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove unused variable 'n'.
The local variable 'n' is assigned but never used in the function. This was detected by the static analysis tool.
Consider removing the unused variable:
def stream_frames(camera_settings):
- n = camera_settings["num_frames"]
src_frames = glob.glob(os.path.join(sample_scan, "*.png"))
If the num_frames
setting is intended to be used, please implement its functionality or remove it from the camera_settings
if it's no longer needed.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
n = camera_settings["num_frames"] | |
def stream_frames(camera_settings): | |
src_frames = glob.glob(os.path.join(sample_scan, "*.png")) |
🧰 Tools
🪛 Ruff
28-28: Local variable
n
is assigned to but never usedRemove assignment to unused variable
n
(F841)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Outside diff range and nitpick comments (6)
app/README.md (3)
7-12
: Approve changes with a suggestion for clarity.The additional information about test images and environment variables is helpful. However, the reference to the external environment variables could be more explicit.
Consider adding a brief explanation of why these environment variables are needed. For example:
- Use the same environment variables as in https://gitlab.com/salk-tm/bloom/-/blob/main/web/env.dev to configure bloom-desktop to work with your local supabase instance. + Use the same environment variables as in https://gitlab.com/salk-tm/bloom/-/blob/main/web/env.dev to configure bloom-desktop to work with your local Supabase instance. These variables include necessary credentials and configuration settings for the Supabase connection.🧰 Tools
🪛 Markdownlint
11-11: null
Bare URL used(MD034, no-bare-urls)
13-19
: Approve changes with a suggestion for clarity on cache cleaning.The additional details about build tools for different operating systems are very helpful. However, the instruction for cache cleaning can be improved.
Consider rewording the cache cleaning instruction for clarity:
- - Use `npm cache clean` to cleanup + - If you encounter issues, try cleaning the npm cache with `npm cache clean --force`This change provides more context on when to use the cache cleaning command and uses the correct phrasal verb "clean up".
🧰 Tools
🪛 LanguageTool
[misspelling] ~19-~19: Did you mean the phrasal verb “clean up” instead of the noun ‘cleanup’?
Context: ...or Linux - Usenpm cache clean
to cleanup 8. Runnpm run client:generate
to gen...(CLEAN_UP)
🪛 Markdownlint
16-16: null
Bare URL used(MD034, no-bare-urls)
Line range hint
27-46
: Consider reviewing unchanged sections for consistency.While the "Modifying the database" and "Updating the software" sections haven't been changed, it might be beneficial to review them to ensure they align with the updated installation instructions. For example, check if any new steps or considerations from the installation process should be reflected in the update process.
🧰 Tools
🪛 LanguageTool
[grammar] ~6-~6: The word “setup” is a noun. The verb is spelled with a white space.
Context: ...tm/bloom/-/tree/main?ref_type=heads] to setup a local supabase instance to interact w...(NOUN_VERB_CONFUSION)
[misspelling] ~19-~19: Did you mean the phrasal verb “clean up” instead of the noun ‘cleanup’?
Context: ...or Linux - Usenpm cache clean
to cleanup 8. Runnpm run client:generate
to gen...(CLEAN_UP)
🪛 Markdownlint
6-6: (bloom)[https://gitlab.com/salk-tm/bloom/-/tree/main?ref_type=heads]
Reversed link syntax(MD011, no-reversed-links)
11-11: null
Bare URL used(MD034, no-bare-urls)
16-16: null
Bare URL used(MD034, no-bare-urls)
pylon/pylon_stream_forever_fake.py (3)
20-22
: LGTM: Improved path handling with pathlib.The use of
pathlib
for handling the sample scan path is a good improvement. It provides a more robust and cross-platform way to manage file paths.Consider using an f-string for the logging statement to make it more concise:
-logging.info(f"sample_scan: {sample_scan}") +logging.info(f"{sample_scan=}")This change uses the new Python 3.8+ feature of self-documenting expressions in f-strings, which includes both the variable name and its value in the output.
52-62
: LGTM: Improved error handling and resource management inimg_to_base64
.The changes in the
img_to_base64
function are well-implemented:
- Error handling for invalid images has been added.
- Context managers are now used for BytesIO and PIL Image, ensuring proper resource management.
- Debug logging has been added at various stages, which will aid in troubleshooting.
These improvements enhance the function's robustness and observability.
Consider using a more descriptive error message when logging invalid images:
- logging.error("Invalid image encountered!") + logging.error(f"Invalid image encountered: size={img.size if img is not None else None}")This change provides more context about why the image is considered invalid, which could be helpful for debugging.
Line range hint
1-80
: Overall improvements and next steps.The changes made to this file significantly improve its robustness and observability:
- Comprehensive logging has been added throughout the script.
- Error handling has been enhanced, particularly in the
img_to_base64
function.- The use of
pathlib
for path handling improves cross-platform compatibility.These improvements align well with the PR objectives of addressing runtime issues, particularly the ZeroDivisionError mentioned. The added logging will help diagnose such issues more effectively.
While these changes are valuable, they don't directly address the installation issues with
nidaqmx
andbetter-sqlite3
mentioned in the PR objectives. Consider the following next steps:
- Document the resolution of using
nodejs=18.0
for thebetter-sqlite3
build issue in the project's README or installation guide.- If not already done, update the project's dependency specifications to reflect the correct versions that work together (e.g., specifying
nodejs=18.0
in the environment setup).- Consider adding error handling around the parts of the code that previously caused the ZeroDivisionError to provide more informative error messages.
These steps will help ensure that the installation process is smooth for other developers and that the runtime behavior is more predictable and easier to debug.
🧰 Tools
🪛 Ruff
27-27: Local variable
n
is assigned to but never usedRemove assignment to unused variable
n
(F841)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (3)
- app/README.md (1 hunks)
- pylon/pylon_fake.py (1 hunks)
- pylon/pylon_stream_forever_fake.py (4 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- pylon/pylon_fake.py
🧰 Additional context used
🪛 LanguageTool
app/README.md
[grammar] ~6-~6: The word “setup” is a noun. The verb is spelled with a white space.
Context: ...tm/bloom/-/tree/main?ref_type=heads] to setup a local supabase instance to interact w...(NOUN_VERB_CONFUSION)
[misspelling] ~19-~19: Did you mean the phrasal verb “clean up” instead of the noun ‘cleanup’?
Context: ...or Linux - Usenpm cache clean
to cleanup 8. Runnpm run client:generate
to gen...(CLEAN_UP)
🪛 Markdownlint
app/README.md
6-6: (bloom)[https://gitlab.com/salk-tm/bloom/-/tree/main?ref_type=heads]
Reversed link syntax(MD011, no-reversed-links)
11-11: null
Bare URL used(MD034, no-bare-urls)
16-16: null
Bare URL used(MD034, no-bare-urls)
🪛 Ruff
pylon/pylon_stream_forever_fake.py
27-27: Local variable
n
is assigned to but never usedRemove assignment to unused variable
n
(F841)
🔇 Additional comments (5)
app/README.md (2)
20-21
: LGTM: Clear instructions for client generation and database deployment.These steps provide clear instructions for generating the TypeScript client and deploying the database. The explicit mention of the schema file location is helpful.
25-25
: LGTM: Helpful directory specification for start command.The addition of the directory information for running the start command is a useful clarification for users.
pylon/pylon_stream_forever_fake.py (3)
9-9
: LGTM: Logging configuration added.The addition of logging functionality is a good practice. It will help with debugging and monitoring the application's behavior.
Also applies to: 18-18
29-29
: LGTM: Enhanced logging instream_frames
.The addition of debug log statements in the
stream_frames
function improves observability. This will be helpful for troubleshooting and understanding the function's behavior during execution.Also applies to: 39-39
27-27
:⚠️ Potential issueRemove unused variable 'n'.
The local variable 'n' is assigned but never used in the function. This was detected by the static analysis tool.
Consider removing the unused variable:
def stream_frames(camera_settings): - n = camera_settings["num_frames"] src_frames = glob.glob(os.path.join(sample_scan, "*.png"))
If the
num_frames
setting is intended to be used, please implement its functionality or remove it from thecamera_settings
if it's no longer needed.🧰 Tools
🪛 Ruff
27-27: Local variable
n
is assigned to but never usedRemove assignment to unused variable
n
(F841)
1. `mamba activate bloom-desktop` | ||
2. Follow the instructions in (bloom)[https://gitlab.com/salk-tm/bloom/-/tree/main?ref_type=heads] to setup a local supabase instance to interact with, and add some test data. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix link formatting and grammar in Supabase setup instruction.
The new steps are helpful, but there are two issues to address:
- The link to the Bloom repository is formatted incorrectly. Use square brackets for the text and parentheses for the URL.
- The word "setup" should be "set up" when used as a verb.
Please apply the following changes:
-2. Follow the instructions in (bloom)[https://gitlab.com/salk-tm/bloom/-/tree/main?ref_type=heads] to setup a local supabase instance to interact with, and add some test data.
+2. Follow the instructions in [bloom](https://gitlab.com/salk-tm/bloom/-/tree/main?ref_type=heads) to set up a local Supabase instance to interact with, and add some test data.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
1. `mamba activate bloom-desktop` | |
2. Follow the instructions in (bloom)[https://gitlab.com/salk-tm/bloom/-/tree/main?ref_type=heads] to setup a local supabase instance to interact with, and add some test data. | |
1. `mamba activate bloom-desktop` | |
2. Follow the instructions in [bloom](https://gitlab.com/salk-tm/bloom/-/tree/main?ref_type=heads) to set up a local Supabase instance to interact with, and add some test data. |
🧰 Tools
🪛 LanguageTool
[grammar] ~6-~6: The word “setup” is a noun. The verb is spelled with a white space.
Context: ...tm/bloom/-/tree/main?ref_type=heads] to setup a local supabase instance to interact w...(NOUN_VERB_CONFUSION)
🪛 Markdownlint
6-6: (bloom)[https://gitlab.com/salk-tm/bloom/-/tree/main?ref_type=heads]
Reversed link syntax(MD011, no-reversed-links)
nidaqmx
from-c conda
is broken https://anaconda.org/conda-forge/nidaqmx/filesnidaqmx
frompip
looks up-to-date https://pypi.org/project/nidaqmx/#historynodejs
unconstrainednodejs=18.0
fixes the build issue forbetter-sqlite3
bloom-desktop-pilot/pylon/pylon_stream_forever_fake.py
Line 17 in 58fe37e
onCaptureImage()
Summary by CodeRabbit
Summary by CodeRabbit
bloom-desktop
environment to specify Python 3.8 and Node.js requirements..env
file.npm cache clean
for cleanup.