Skip to content

ModelChainResult.__repr__ #1128

ModelChainResult.__repr__

ModelChainResult.__repr__ #1128

Workflow file for this run

name: pytest
on:
pull_request:
push:
branches:
- main
jobs:
test:
strategy:
fail-fast: false # don't cancel other matrix jobs when one fails
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.7, 3.8, 3.9, "3.10", "3.11"]
environment-type: [conda, bare]
suffix: [''] # placeholder as an alternative to "-min"
include:
- os: ubuntu-latest
python-version: 3.7
environment-type: conda
suffix: -min
exclude:
- os: macos-latest
environment-type: conda
- os: windows-latest
environment-type: bare
runs-on: ${{ matrix.os }}
steps:
# We check out only a limited depth and then pull tags to save time
- name: Checkout source
uses: actions/checkout@v3
with:
fetch-depth: 100
- name: Get tags
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- name: Install Conda environment with Micromamba
if: matrix.environment-type == 'conda'
uses: mamba-org/setup-micromamba@v1
with:
environment-file: ${{ env.REQUIREMENTS }}
cache-downloads: true
create-args: >-
python=${{ matrix.python-version }}
condarc: |
channel-priority: flexible
env:
# build requirement filename. First replacement is for the python
# version, second is to add "-min" if needed
REQUIREMENTS: ci/requirements-py${{ matrix.python-version }}${{ matrix.suffix }}.yml
- name: List installed package versions (conda)
if: matrix.environment-type == 'conda'
shell: bash -l {0} # necessary for conda env to be active
run: micromamba list
- name: Install bare Python ${{ matrix.python-version }}${{ matrix.suffix }}
if: matrix.environment-type == 'bare'
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install pvlib
if: matrix.environment-type == 'conda'
shell: bash -l {0}
run: python -m pip install --no-deps .
- name: Set up bare environment
if: matrix.environment-type == 'bare'
run: |
pip install .[test]
pip freeze
- name: Run tests
shell: bash -l {0} # necessary for conda env to be active
run: |
# ignore iotools & forecast; those tests are run in a separate workflow
pytest pvlib --cov=./ --cov-report=xml --ignore=pvlib/tests/iotools --ignore=pvlib/tests/test_forecast.py
- name: Upload coverage to Codecov
if: matrix.python-version == 3.7 && matrix.suffix == '' && matrix.os == 'ubuntu-latest' && matrix.environment-type == 'conda'
uses: codecov/codecov-action@v3
with:
fail_ci_if_error: true
verbose: true
flags: core # flags are configured in codecov.yml