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

BSUoS import URLs change #16

Open
tlocke opened this issue May 22, 2018 · 1 comment
Open

BSUoS import URLs change #16

tlocke opened this issue May 22, 2018 · 1 comment

Comments

@tlocke
Copy link
Contributor

tlocke commented May 22, 2018

The URLs for the latest download of BSUoS data changes on every upload. Looks like we'll have to get Chellow to examine the page to get the URLs.

@tlocke
Copy link
Contributor Author

tlocke commented May 25, 2018

I've made the following changes:

  • It now doesn't wait until there's a full month's data to download, it'll use whatever it's got.
  • It stores all the settlement runs (II, SF, RF).
  • There's a global alert (red text on every page) if the importer fails.
  • Since the URLs of the current data change on every upload, I've added a feature where the importer scrapes the page for the latest URLs.
  • For loading in historical data there's a list of URLs in the configuration that the importer will additionally look at.

So, to install it follow these steps:

  • Disable the bsuos importer by setting 'enabled' to 'false'.
  • Execute the command: chellow stop
  • pip install --upgrade chellow
  • chellow start
  • Delete all the BSUoS rate scripts except the first one.
  • Make sure that the first rate script covers exactly one month.
  • Update the BSUoS properties to be:

{
"discover_urls": true,
"enabled": true}

{
"discover_urls": true,
"enabled": true,
"urls": ["https://www.nationalgrid.com/sites/default/files/documents/2016-2017%20SF.xls", "https://www.nationalgrid.com/sites/default/files/documents/8589938560-2015-2016%20SF.xlsx"]}

  • Remember to remove the items from the 'urls' list after you've imported all the data, otherwise the importer will download them every time.

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

No branches or pull requests

1 participant