Skip to content

Add missing modules to init.py#1103

Merged
wholmgren merged 3 commits into
pvlib:masterfrom
kandersolar:shading_init
Dec 10, 2020
Merged

Add missing modules to init.py#1103
wholmgren merged 3 commits into
pvlib:masterfrom
kandersolar:shading_init

Conversation

@kandersolar

@kandersolar kandersolar commented Dec 8, 2020

Copy link
Copy Markdown
Member
  • Closes #xxxx
  • I am familiar with the contributing guidelines
  • Tests added
  • Updates entries to docs/sphinx/source/api.rst for API changes.
  • Adds description and name entries in the appropriate "what's new" file in docs/sphinx/source/whatsnew for all changes. Includes link to the GitHub Issue with :issue:`num` or this Pull Request with :pull:`num`. Includes contributor name and/or GitHub username (link with :ghuser:`user`).
  • New code is fully documented. Includes numpydoc compliant docstrings, examples, and comments where necessary.
  • Pull request is nearly complete and ready for detailed review.
  • Maintainer: Appropriate GitHub Labels and Milestone are assigned to the Pull Request and linked Issue.

__init__.py is missing several modules. Some of the omissions don't make a practical difference, maybe because they get imported by other modules. For shading and scaling, some import patterns fail:

$ python -c 'from pvlib import shading'  # works; this is how the test suite does it
$ python -c 'import pvlib; pvlib.shading'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
AttributeError: module 'pvlib' has no attribute 'shading'

I think I got all the missing modules but another pair of eyes never hurts.

@wholmgren

Copy link
Copy Markdown
Member

Ah good catch @kanderso-nrel. Putting the imports in alphabetical order would make it easier to catch missing modules. While you're at it, I think this pattern might be more concise:

from pvlib import (  # noqa: F401
    shading,
    snow,
)

@wholmgren wholmgren added this to the 0.8.1 milestone Dec 8, 2020
@wholmgren wholmgren added the bug label Dec 8, 2020
@wholmgren

Copy link
Copy Markdown
Member

ignoring psm3 failures and merging... thanks @kanderso-nrel

@wholmgren wholmgren merged commit aa1635b into pvlib:master Dec 10, 2020
@kandersolar kandersolar deleted the shading_init branch December 10, 2020 03:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants