equinor / esv-intersection

A reusable component to create intersection visualizations for wells
https://equinor.github.io/esv-intersection/storybook/latest
MIT License
12 stars 7 forks source link

Hitting Github API rate-limiting on storybook #265

Closed ooystein closed 4 years ago

ooystein commented 4 years ago

When debugging in the storybook locally (and probably in the deployed version to radix also) I quickly hit the Github API rate limit.

Do you have a way of working locally that don't pull the esv-intersection-data from github? If not, would you consider adding a flag or some way to get the app to work without hitting Github while developing?

Brynjulf commented 4 years ago

Hi @ooystein, we recently merged a pull request for this (#258 ), in the file .storybook/src/api/index.ts there is a commented line that will export mock data.

ooystein commented 4 years ago

The mock data from apiMock.ts seems to be lacking. It makes it very hard to create a bug report when I cant edit the mock data or the mock data is not available. Any suggestions? Maybe you have a clever way I haven't tried.

Brynjulf commented 4 years ago

@ooystein , it is true, we are lacking in proper mocked data. Could you elaborate when you say you can't edit the mock data?

We do have to revise how we fetch data and serve it to storybook or any other hosted demos

ooystein commented 4 years ago

I'm trying to make a branch to reproduce a bug. To demonstrate the bug I need to have some mock data. And easiest way would be if I could edit the mock data the repository already is using. But when the mockdata is lacking, and the good mock data from esv-intersection-data is unavailable due to github api rate limiting it's hard to cobble together an example.

Brynjulf commented 4 years ago

@ooystein in order to edit the mock data and stage the changes you would need to remove the line ./storybook/src/exampledata/** from the gitignore file

Brynjulf commented 4 years ago

we are using the data repo as a submodule, so this is no longer an issue