Skip to content

Warn when SPA is reloaded #614

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

Closed
wants to merge 7 commits into from
Closed

Warn when SPA is reloaded #614

wants to merge 7 commits into from

Conversation

cwhanse
Copy link
Member

@cwhanse cwhanse commented Nov 9, 2018

pvlib python pull request guidelines

Thank you for your contribution to pvlib python! You may delete all of these instructions except for the list below.

You may submit a pull request with your code at any stage of completion.

The following items must be addressed before the code can be merged. Please don't hesitate to ask for help if you're unsure of how to accomplish any of the items below:

  • Closes issue Slow calculation and memory leaking with 0.5.1 #401
  • I am familiar with the contributing guidelines.
  • Fully tested. Added and/or modified tests to ensure correct behavior for all reasonable inputs. Tests (usually) must pass on the TravisCI and Appveyor testing services.
  • Updates entries to docs/sphinx/source/api.rst for API changes.
  • Adds description and name entries in the appropriate docs/sphinx/source/whatsnew file for all changes.
  • Code quality and style is sufficient. Passes LGTM and SticklerCI checks.
  • New code is fully documented. Includes sphinx/numpydoc compliant docstrings and comments in the code where necessary.
  • Pull request is nearly complete and ready for detailed review.

Brief description of the problem and proposed solution (if not already fully described in the issue linked to above):


# Forecast functions

def get_num_intervals(end, start, deltat):
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

E302 expected 2 blank lines, found 1

K = get_num_intervals(start, max(history.index), deltat)

# find number of deltat intervals covering dataWindowLength in history
N = get_num_intervals(start - K*deltat,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

E226 missing whitespace around arithmetic operator


# find number of deltat intervals covering dataWindowLength in history
N = get_num_intervals(start - K*deltat,
start - K*deltat - dataWindowLength,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

E226 missing whitespace around arithmetic operator

# calculate base time for resample, minutes out of phase with midnight
midnight = resample_start.replace(hour=0, minute=0, second=0)
first_after_midnight = resample_start - \
int((resample_start - midnight) / deltat) * deltat
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

E127 continuation line over-indented for visual indent

base=base).mean()

# extract window from resampled history
return idata.loc[(idata.index>=resample_start) &
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

E225 missing whitespace around operator

trend='n',
order=order)

# if not provided, generate guess of model parameters, helps overcome
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

W291 trailing whitespace

# if not provided, generate guess of model parameters, helps overcome
# non-stationarity
if not start_params:
# generate a list with one entry '0' for each AR or MA parameter
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

W291 trailing whitespace

# generate a list with one entry '0' for each AR or MA parameter
# plus an entry '1' for the variance parameter
start_params = []
for i in range(0, order[0]+order[2]):
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

E226 missing whitespace around arithmetic operator

end=end,
freq=pd.to_timedelta(deltat))

f_intervals = len(idr-1) # first time in idr is last data point
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

E226 missing whitespace around arithmetic operator
E261 at least two spaces before inline comment

# return the requested forecast times

return f[fdr]

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

W391 blank line at end of file

@cwhanse cwhanse closed this Nov 13, 2018
@cwhanse cwhanse deleted the spa_warn branch November 13, 2018 16:23
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.

1 participant