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

Spacemouse debugging #23

Merged
merged 4 commits into from
Feb 7, 2024
Merged

Conversation

gautams3
Copy link
Contributor

@gautams3 gautams3 commented Feb 7, 2024

Add a test file to debug spacemouse output

@jianlanluo
Copy link
Collaborator

also can you fix the pre-commit failing ?

@youliangtan
Copy link
Member

Thanks for the test script. Just run pre-commit run --all-files to automatically deal with the linting

@gautams3
Copy link
Contributor Author

gautams3 commented Feb 7, 2024

  1. addressed comments by @jianlanluo
  2. fixed pre-commit failures

These are a lot of commits for a minor change. It might help to squash-and-merge instead of the default.

@gautams3 gautams3 requested a review from jianlanluo February 7, 2024 19:37

"""
import time
import numpy as np
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

import should be on top of the file

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I misunderstood then. You want imports to be on top, but the setting of numpy precision options to be in the test? both of these are global changes.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can set print options in the test and reset it with np.set_printoptions()

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

import should always go to the top of a py file,

np print precesion is local to your function, e.g., you can change in another function; so it should go to the function which actually needs it

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

np print precision is not local. But we can make it local with a context manager. just pushed a change

@jianlanluo jianlanluo merged commit 2099733 into rail-berkeley:main Feb 7, 2024
1 check passed
@gautams3 gautams3 deleted the spacemouse_debug branch February 7, 2024 21:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants