Skip to content

fpl tests#158

Closed
clewis7 wants to merge 3 commits intomasterfrom
tests
Closed

fpl tests#158
clewis7 wants to merge 3 commits intomasterfrom
tests

Conversation

@clewis7
Copy link
Copy Markdown
Member

@clewis7 clewis7 commented Mar 31, 2023

refactored so there are no large binary files

did reorg for names

#152

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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