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

Unability to freeze the website if no runs have calendar #460

Open
hroncok opened this Issue Sep 26, 2018 · 5 comments

Comments

Projects
None yet
2 participants
@hroncok
Member

hroncok commented Sep 26, 2018

No run with times (can happen):

Error: Nothing frozen for endpoints course_calendar_ics. Did you forget a URL generator?

No run at all (unlikely):

Error: Nothing frozen for endpoints course_calendar, course_calendar_ics. Did you forget a URL generator?

How do we get rid ourselves form this error? We can filter MissingURLGeneratorWarning, but only some.

@hroncok

This comment has been minimized.

Member

hroncok commented Sep 26, 2018

czechitas-ostrava-jaro is still in master and has calendar. once removed, this will hit me.

hroncok added a commit to cvut/naucse.python.cz that referenced this issue Sep 26, 2018

Remove (almost) all other runs to speed up Travis
   Kept one with a calendar as a workaorund for:
   pyvec#460
@hroncok

This comment has been minimized.

Member

hroncok commented Sep 26, 2018

@mikicz can this be solved in NaucseFreezer? Do you have some elegant idea?

@mikicz

This comment has been minimized.

Member

mikicz commented Sep 26, 2018

Well, I have a solution, IDK if it's ideal. You can override the _check_endpoints method of the Freezer class to do nothing and the problem goes away, it works even without the czechitas-ostrava-jaro run...

I also tried to use warnings.simplefilter to filter out the warning and it didn't help...

@hroncok

This comment has been minimized.

Member

hroncok commented Sep 26, 2018

Can we copy paste it and remove specific endpoints from the check?

Maybe we can send PR to Frozen-Flask to do this in a more flexible fashion?

@mikicz

This comment has been minimized.

Member

mikicz commented Sep 27, 2018

Yes, quite easily, you just need to add one line to the function...

not_generated_endpoints -= {'course_calendar_ics', 'course_calendar'}

A PR for flexible solution would of course be better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment