Skip to content

Reorganize file structure #1452

Reorganize file structure

Reorganize file structure #1452

Workflow file for this run

name: Testing
on: [ push, pull_request ]
jobs:
build:
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -el {0}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest"] # , "macos-latest"] # , "windows-latest"]
python-version: [ 3.8 ]
steps:
- name: checkout repository
uses: actions/checkout@v3
- name: Install conda/mamba and dependencies
uses: conda-incubator/setup-miniconda@v2
# https://github.com/marketplace/actions/setup-miniconda
env:
SKLEARN_ALLOW_DEPRECATED_SKLEARN_PACKAGE_INSTALL: True
with:
mamba-version: "*"
channels: conda-forge
channel-priority: true
python-version: ${{ matrix.python-version }}
environment-file: environment.yml
activate-environment: hopp
auto-activate-base: false
- name: Debug Print dependencies
run: |
conda list
- name: Install package
run: |
python setup.py develop
pip install -vv --no-deps -e .
- name: Create env file
run: |
touch .env
echo NREL_API_KEY=${{ secrets.NREL_API_KEY }} >> .env
cat .env
- name: Unit tests
run: |
pip install pytest
pytest --cache-clear -vs tests
- name: Lint with flake8
run: |
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
pip install flake8
flake8 . --count --exit-zero --statistics --ignore=E501