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

Fix spaghettiness #10

Merged
merged 19 commits into from
Jan 15, 2022
Merged

Fix spaghettiness #10

merged 19 commits into from
Jan 15, 2022

Conversation

king-millez
Copy link
Member

@king-millez king-millez commented Aug 12, 2021

Anti spaghetti brigade

This pull request is similar to our ausbills update which refactors the code into a consistent model-based system.

Key changes

The main difference is the new StreamModel dataclass, which creates a standard for stream objects that all sites must follow, e.g stream URLs, titles, and their live statuses.

This method will make it easy for the web app to simply utilise importlib to loop through the various parliaments, rather than the stupid system I wrote in late 2020 which is stupid and bad.

The parliament modules have also all been moved into the site directory, so in the event that a jurisdiction secedes from Australia, or New Zealand becomes an Australian state, Legistream can quickly and automatically adapt to the minor changes.

Closes Issues

@tomlister
Copy link

LGTM

@tomlister
Copy link

Still need hosting?

@king-millez
Copy link
Member Author

Still need hosting?

Possibly, was using DigitalOcean previously but if you have a better option I'm all ears!

@tomlister
Copy link

In that case, I suggest checking out Amazon Lightsail. Starting at $3.5/month for the lowest tier. Free 3 months trial.

You can always go serverless for free! Shout out https://vercel.com
Though, you'd need some major refactoring of your code.

@king-millez
Copy link
Member Author

In that case, I suggest checking out Amazon Lightsail. Starting at $3.5/month for the lowest tier. Free 3 months trial.

You can always go serverless for free! Shout out https://vercel.com
Though, you'd need some major refactoring of your code.

@king-millez king-millez reopened this Aug 12, 2021
@king-millez
Copy link
Member Author

king-millez commented Aug 12, 2021

Tried to close comment box and closed PR, classy.

@king-millez
Copy link
Member Author

Parliament schedules for testing:

ACT

31-8-21

QLD

13-8-21

31-8-21

Vic

17-8-21

Tas

24-8-21

SA

13-8-21

24-8-21

WA

17-8-21

NSW

16-8-21

@king-millez king-millez marked this pull request as ready for review January 15, 2022 08:17
@king-millez king-millez merged commit 90d37ee into main Jan 15, 2022
@king-millez king-millez deleted the not-spaghetti branch January 15, 2022 08:18
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.

pip package has wrong version [fed] parliament streams stay live after due ending
2 participants