forked from pvlib/pvlib-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from AdamRJensen/main
Main
- Loading branch information
Showing
299 changed files
with
121,869 additions
and
89,380 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,47 @@ | ||
name: asv | ||
|
||
# CI ASV CHECK is aimed to verify that the benchmarks execute without error. | ||
on: [pull_request, push] | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
|
||
jobs: | ||
quick: | ||
quick-benchmarks: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
shell: bash -el {0} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Install Python | ||
uses: actions/setup-python@v3 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.9.7' | ||
python-version: '3.9' | ||
|
||
- name: Install asv | ||
run: pip install asv==0.4.2 | ||
|
||
# asv 0.4.2 (and more recent versions as well) creates conda envs | ||
# using the --force option, which was removed in conda 24.3. | ||
# Since ubuntu-latest now comes with conda 24.3 pre-installed, | ||
# using the system's conda will result in error. | ||
# To prevent that, we install an older version. | ||
# TODO: remove this when we eventually upgrade our asv version. | ||
# https://github.com/airspeed-velocity/asv/issues/1396 | ||
- name: Install Conda | ||
uses: conda-incubator/setup-miniconda@v3 | ||
with: | ||
conda-version: 24.1.2 | ||
|
||
- name: Run asv benchmarks | ||
run: | | ||
cd benchmarks | ||
asv machine --yes | ||
asv run HEAD^! --quick --dry-run --show-stderr | sed "/failed$/ s/^/##[error]/" | tee benchmarks.log | ||
if grep "failed" benchmarks.log > /dev/null ; then | ||
exit 1 | ||
fi | ||
asv run HEAD^! --quick --dry-run --show-stderr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"problemMatcher": [ | ||
{ | ||
"owner": "flake8-linter-error", | ||
"severity": "error", | ||
"pattern": [ | ||
{ | ||
"regexp": "^([^:]+):(\\d+):(\\d+):\\s+([EWCNF]\\d+\\s+.+)$", | ||
"file": 1, | ||
"line": 2, | ||
"column": 3, | ||
"message": 4 | ||
} | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Python Flake8 Linter | ||
on: | ||
pull_request: | ||
jobs: | ||
flake8-linter: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout source | ||
uses: actions/checkout@v4 | ||
- name: Install Python 3.11 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.11' | ||
- name: Install Flake8 5.0.4 linter | ||
run: pip install flake8==5.0.4 # use this version for --diff option | ||
- name: Setup Flake8 output matcher for PR annotations | ||
run: echo '::add-matcher::.github/workflows/flake8-linter-matcher.json' | ||
- name: Fetch pull request target branch | ||
run: | | ||
git remote add upstream https://github.com/pvlib/pvlib-python.git | ||
git fetch upstream $GITHUB_BASE_REF | ||
- name: Run Flake8 linter | ||
run: git diff upstream/$GITHUB_BASE_REF HEAD -- "*.py" | flake8 | ||
--exclude pvlib/version.py | ||
--ignore E201,E241,E226,W503,W504 | ||
--max-line-length 79 | ||
--diff |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: top_ranked_issues | ||
|
||
on: | ||
pull_request: # for testings purposes, should be removed | ||
schedule: | ||
# Runs every day at 3:00 AM UTC | ||
- cron: '0 3 * * *' | ||
|
||
jobs: | ||
run-script: | ||
runs-on: ubuntu-latest | ||
|
||
# Define GitHub access token | ||
env: | ||
GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
|
||
steps: | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.12" | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install github | ||
# Run a sample script | ||
- name: Run Script | ||
run: | | ||
python ./scripts/update_top_ranking_issues.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.