Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fpl tests #158

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

Closed
wants to merge 3 commits into from
Closed

fpl tests #158

wants to merge 3 commits into from

Conversation

clewis7
Copy link
Member

@clewis7 clewis7 commented Mar 31, 2023

refactored so there are no large binary files

did reorg for names

#152

Copy link
Member

Choose a reason for hiding this comment

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

I guess we can just keep it to make sure accessing graphics within a gridplot works etc.

data = np.load("../data/random.npy")

iw.show()

Copy link
Member

Choose a reason for hiding this comment

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

can you test before and after setting timepoint?

set timepoint using the slider as well as @current_index

Copy link
Member Author

Choose a reason for hiding this comment

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

need to think some more about testing image widget, somehow need renderer and canvas to be offscreen as in the other examples

Comment on lines +21 to +23
sine = np.load("../data/sine.npy")
cosine = np.load("../data/cosine.npy")
sinc = np.load("../data/sinc.npy")
Copy link
Member

Choose a reason for hiding this comment

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

just make these, don't save them since it's not randomly generated

Copy link
Member Author

Choose a reason for hiding this comment

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

when I didn't save them was when I kept getting errors locally about the data changing...idk what the precision is like when you call np.sin() or np.cos() on a linspace but I think this is what was causing the problem before and that is why I saved them

Copy link
Member

Choose a reason for hiding this comment

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

what if you force float32 when making the linspace?

Copy link
Member Author

Choose a reason for hiding this comment

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

will try

@kushalkolar
Copy link
Member

it's not working just through pytest because:

  1. you need an __init__.py in examples/tests
  2. You need relative import for testutils, from .testutils import instead of from testutils import
  3. you need relative paths to data files, for example:
data_path = Path(__file__).parent.parent.joinpath("data", "random.npy")
data = np.load(data_path)

@kushalkolar
Copy link
Member

Seems like zenodo is still the best place to store these, ah well. The file will be small at least so download time should be very fast.

@clewis7 clewis7 closed this Apr 19, 2023
@kushalkolar
Copy link
Member

superseeded by #179

@kushalkolar kushalkolar deleted the tests branch June 17, 2023 06:21
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.

2 participants