Skip to content

Commit

Permalink
Merge pull request #167 from ssolson/setup
Browse files Browse the repository at this point in the history
Fix Bug in `wind-rose` CLI
  • Loading branch information
grantbuster authored Dec 11, 2023
2 parents 898c1d1 + 271b501 commit a11edfe
Show file tree
Hide file tree
Showing 4 changed files with 91 additions and 97 deletions.
58 changes: 28 additions & 30 deletions .github/workflows/pr_rev_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,33 +6,31 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout rex
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.ref }}
fetch-depth: 1
path: rex
- name: checkout reV
uses: actions/checkout@v2
with:
repository: nrel/reV
fetch-depth: 1
path: reV
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install rex dependencies
working-directory: ./rex
run: |
python -m pip install --upgrade pip
python -m pip install .
- name: Install reV dependencies
working-directory: ./reV
run: |
python -m pip install .
- name: Run reV pytest
working-directory: ./reV
run: |
python -m pip install pytest
python -m pytest -v --disable-warnings
- name: checkout rex
uses: actions/checkout@v3
with:
path: rex
- name: checkout reV
uses: actions/checkout@v3
with:
repository: nrel/reV
fetch-depth: 1
path: reV
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install rex dependencies
working-directory: ./rex
run: |
python -m pip install --upgrade pip
python -m pip install .
- name: Install reV dependencies
working-directory: ./reV
run: |
python -m pip install .
- name: Run reV pytest
working-directory: ./reV
run: |
python -m pip install pytest
python -m pytest -v --disable-warnings
72 changes: 35 additions & 37 deletions .github/workflows/pr_revx_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,40 +6,38 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout rex
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.ref }}
fetch-depth: 1
path: rex
- name: checkout reVX
uses: actions/checkout@v2
with:
repository: nrel/reVX
fetch-depth: 1
path: reVX
- name: Set up Python
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: 3.9
- name: Install rex dependencies
working-directory: ./rex
shell: bash -l {0}
run: |
conda install pip pandas
pip install -e .
- name: Install reVX dependencies
working-directory: ./reVX
shell: bash -l {0}
run: |
conda install rtree pytest
pip install geopandas
pip install --upgrade --force-reinstall shapely~=1.8
pip install -e .
pip install HOPP
- name: Run reVX pytest
working-directory: ./reVX
shell: bash -l {0}
run: |
pytest -v --disable-warnings
- name: checkout rex
uses: actions/checkout@v3
with:
path: rex
- name: checkout reVX
uses: actions/checkout@v2
with:
repository: nrel/reVX
fetch-depth: 1
path: reVX
- name: Set up Python
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: 3.9
- name: Install rex dependencies
working-directory: ./rex
shell: bash -l {0}
run: |
conda install pip pandas
pip install -e .
- name: Install reVX dependencies
working-directory: ./reVX
shell: bash -l {0}
run: |
conda install rtree pytest
pip install geopandas
pip install --upgrade --force-reinstall shapely~=1.8
pip install -e .
pip install HOPP
- name: Run reVX pytest
working-directory: ./reVX
shell: bash -l {0}
run: |
pytest -v --disable-warnings
56 changes: 27 additions & 29 deletions .github/workflows/pull_request_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,39 +9,37 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ['3.10']
python-version: ["3.10"]
include:
- os: ubuntu-latest
python-version: 3.9
- os: ubuntu-latest
python-version: 3.8

steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.ref }}
fetch-depth: 1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install --upgrade pip
pip install pytest
pip install pytest-cov
pip install -e .
- name: Run pytest and Generate coverage report
run: |
cd tests
pytest -v --disable-warnings --cov=./ --cov-report=xml:coverage.xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
flags: unittests
env_vars: OS,PYTHON
name: codecov-umbrella
fail_ci_if_error: false
verbose: true
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install --upgrade pip
pip install pytest
pip install pytest-cov
pip install -e .
- name: Run pytest and Generate coverage report
run: |
cd tests
pytest -v --disable-warnings --cov=./ --cov-report=xml:coverage.xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
flags: unittests
env_vars: OS,PYTHON
name: codecov-umbrella
fail_ci_if_error: false
verbose: true
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def run(self):
"rechunk=rex.rechunk_h5.rechunk_cli:main",
"combine-h5=rex.rechunk_h5.combine_h5_cli:main",
"temporal-stats=rex.temporal_stats.temporal_stats_cli:main",
"wind-rose=rex.jpd.wind_rose_cli:main"
"wind-rose=rex.joint_pd.wind_rose_cli:main"
],
},
include_package_data=True,
Expand Down

0 comments on commit a11edfe

Please sign in to comment.