8000 Merge remote-tracking branch 'upstream/main' into pr/2258 · AdamRJensen/pvlib-python@e6e5e85 · GitHub
[go: up one dir, main page]

Skip to content

Commit e6e5e85

Browse files
committed
Merge remote-tracking branch 'upstream/main' into pr/2258
2 parents e5b4f2c + 9fb2eb3 commit e6e5e85

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+36750
-35520
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!-- Thank you for your contribution! 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. Feel free to remove checklist items that are not relevant to your change. -->
22

33
- [ ] Closes #xxxx
4-
- [ ] I am familiar with the [contributing guidelines](https://pvlib-python.readthedocs.io/en/latest/contributing.html)
4+
- [ ] I am familiar with the [contributing guidelines](https://pvlib-python.readthedocs.io/en/latest/contributing/index.html)
55
- [ ] Tests added
66
- [ ] Updates entries in [`docs/sphinx/source/reference`](https://github.com/pvlib/pvlib-python/blob/main/docs/sphinx/source/reference) for API changes.
77
- [ ] Adds description and name entries in the appropriate "what's new" file in [`docs/sphinx/source/whatsnew`](https://github.com/pvlib/pvlib-python/tree/main/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` ``).

.github/workflows/publish.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,21 @@ jobs:
3333
- name: Build packages
3434
run: python -m build
3535

36+
- name: List distribution file sizes
37+
run: du -h dist/*
38+
3639
- name: Check metadata verification
3740
run: python -m twine check --strict dist/*
3841

42+
- name: Ensure that the wheel installs successfully
43+
run: |
44+
mkdir ./tmp
45+
pip install $(find dist -type f -name "*.whl") --target=./tmp
46+
47+
- name: List installed file sizes
48+
run: du -h pvlib
49+
working-directory: ./tmp
50+
3951
# only publish distribution to PyPI for tagged commits
4052
- name: Publish distribution to PyPI
4153
if: startsWith(github.ref, 'refs/tags/v')
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Update Top Ranked Issues
2+
3+
on:
4+
schedule:
5+
# Runs every day at 00:00 AM UTC
6+
- cron: '0 0 * * *'
7+
8+
jobs:
9+
run-script:
10+
runs-on: ubuntu-latest
11+
12+
# Run only if the repository is pvlib/pvlib-python
13+
if: ${{ github.repository == 'pvlib/pvlib-python' }}
14+
15+
env:
16+
GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
17+
18+
steps:
19+
- name: Check out the repository
20+
uses: actions/checkout@v4 # This ensures the repository code is available
21+
22+
- name: Set up Python
23+
uses: actions/setup-python@v5
24+
with:
25+
python-version: "3.12"
26+
27+
- name: Install dependencies
28+
run: |
29+
python -m pip install --upgrade pip
30+
pip install PyGithub
31+
32+
- name: Run update_top_ranking_issues.py
33+
run: |
34+
python ./scripts/update_top_ranking_issues.py

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ Contributing
8181
============
8282

8383
We need your help to make pvlib-python a great tool!
84-
Please see the [Contributing page](http://pvlib-python.readthedocs.io/en/stable/contributing.html) for more on how you can contribute.
84+
Please see the [Contributing page](https://pvlib-python.readthedocs.io/en/stable/contributing/index.html) for more on how you can contribute.
8585
The long-term success of pvlib-python requires substantial community support.
8686

8787

docs/examples/shading/plot_martinez_shade_loss.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
import pandas as pd
4848
import numpy as np
4949
import matplotlib.pyplot as plt
50-
from matplotlib.dates import ConciseDateFormatter
50+
from matplotlib.dates import DateFormatter
5151

5252
pitch = 4 # meters
5353
width = 1.5 # meters
@@ -235,10 +235,6 @@
235235
ax1.plot(times, shade_losses, label=k, linestyle=linestyle)
236236
ax1.legend(loc="upper center")
237237
ax1.grid()
238-
ax1.set_xlabel("Time")
239-
ax1.xaxis.set_major_formatter(
240-
ConciseDateFormatter("%H:%M", tz="Europe/Madrid")
241-
)
242238
ax1.set_ylabel(r"$P_{out}$ losses")
243239
ax1.set_title("Per module")
244240

@@ -248,9 +244,7 @@
248244
ax2.legend(loc="upper center")
249245
ax2.grid()
250246
ax2.set_xlabel("Time")
251-
ax2.xaxis.set_major_formatter(
252-
ConciseDateFormatter("%H:%M", tz="Europe/Madrid")
253-
)
247+
ax2.xaxis.set_major_formatter(DateFormatter("%H:%M", tz="Europe/Madrid"))
254248
ax2.set_ylabel(r"$P_{out}$ losses")
255249
ax2.set_title("Per row")
256250
fig.tight_layout()
Loading

docs/sphinx/source/conf.py

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,30 @@
5656
'sphinx_gallery.gen_gallery',
5757
'sphinx_toggleprompt',
5858
'sphinx_favicon',
59+
'hoverxref.extension',
5960
]
6061

6162
mathjax3_config = {'chtml': {'displayAlign': 'left',
6263
'displayIndent': '2em'}}
6364

65+
# Example configuration for intersphinx: refer to the Python standard library.
66+
intersphinx_mapping = {
67+
'python': ('https://docs.python.org/3/', None),
68+
'numpy': ('https://numpy.org/doc/stable/', None),
69+
'scipy': ('https://docs.scipy.org/doc/scipy/reference/', None),
70+
'pandas': ('https://pandas.pydata.org/pandas-docs/stable', None),
71+
'matplotlib': ('https://matplotlib.org/stable', None),
72+
}
73+
74+
# Enable hover tooltips
75+
hoverxref_auto_ref = True
76+
hoverxref_roles = [
77+
"class", "meth", "func", "ref", "term", "obj", "mod", "data"
78+
]
79+
hoverxref_role_types = dict.fromkeys(hoverxref_roles, "tooltip")
80+
hoverxref_domains = ["py"]
81+
hoverxref_intersphinx = list(intersphinx_mapping.keys())
82+
6483
napoleon_use_rtype = False # group rtype on same line together with return
6584

6685
# Add any paths that contain templates here, relative to this directory.
@@ -357,15 +376,6 @@ def setup(app):
357376
# If true, do not generate a @detailmenu in the "Top" node's menu.
358377
# texinfo_no_detailmenu = False
359378

360-
# Example configuration for intersphinx: refer to the Python standard library.
361-
intersphinx_mapping = {
362-
'python': ('https://docs.python.org/3/', None),
363-
'numpy': ('https://numpy.org/doc/stable/', None),
364-
'scipy': ('https://docs.scipy.org/doc/scipy/reference/', None),
365-
'pandas': ('https://pandas.pydata.org/pandas-docs/stable', None),
366-
'matplotlib': ('https://matplotlib.org/stable', None),
367-
}
368-
369379
ipython_warning_is_error = False
370380

371381
# suppress "WARNING: Footnote [1] is not referenced." messages

docs/sphinx/source/contributing/how_to_contribute_new_code.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,7 @@ We strongly recommend using virtual environments for development.
153153
Virtual environments make it easier to switch between different
154154
versions of software. This `scientific-python.org guide
155155
<https://learn.scientific-python.org/development/tutorials/dev-environment/>`_
156-
is a good reference for virtual environments. The pvlib-python `installation
157-
user guide <https://pvlib-python.readthedocs.io/en/stable/user_guide/
158-
installation.html#set-up-a-virtual-environment>`_ also provides instructions on
156+
is a good reference for virtual environments. The pvlib-python
157+
:ref:`installation guide <setupenvironment>` also provides instructions on
159158
setting up a virtual environment. If this is your first pull request, don't
160159
worry about using a virtual environment.

docs/sphinx/source/contributing/index.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.. _contributing:
2+
13
============
24
Contributing
35
============

0 commit comments

Comments
 (0)
0