Skip to content

Commit

Permalink
Squashed 'pCrunch/' changes from f1965c088..3d30d0f33
Browse files Browse the repository at this point in the history
3d30d0f33 Merge pull request #19 from NREL/weis_updates
e8e8468b0 fixes for more robust running of weis outputs
2e11a9183 test new location
9ea483b7c move tests into package structure for easier conda bundling
1650ba70b cleanup dependencies
6b093af69 removing all version imports and reqs
a3e5d4df7 dont need all python versions in pypi upload
cc6060517 remove versioneer
b731e615c Merge pull request #15 from NREL/develop
630e6b8dc Merge branch 'master' into develop
728637729 Merge pull request #16 from NREL/refresh
7cdb0b5d5 run tests on macs too
5c9514f07 cleanup config files and ci
4aa94eff3 Merge pull request #6 from ppozzobon/patch-1
ec208a58f updating with latest syntax
b56846dce Merge pull request #12 from NREL/fatigue_support
4b36f28aa bug fix on integrated values on summary stats

git-subtree-dir: pCrunch
git-subtree-split: 3d30d0f33889d1503beeab77ab552b177b225891
  • Loading branch information
gbarter committed May 25, 2023
1 parent 5d84bab commit 0466a38
Show file tree
Hide file tree
Showing 35 changed files with 1,697 additions and 4,197 deletions.
63 changes: 41 additions & 22 deletions .github/workflows/publish_to_pypi.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,44 @@
name: Upload to PyPi
name: Build and upload to PyPI

on: push
# Build on every branch push, tag push, and pull request change:
#on: [push, pull_request]
# Alternatively, to publish when a (published) GitHub Release is created, use the following:
on:
push:
pull_request:
release:
types:
- published

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build and publish
if: startsWith(github.ref, 'refs/tags')
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
build_and_upload_pypi:
runs-on: ubuntu-latest

# upload to PyPI on every tag starting with 'v'
#if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
# alternatively, to publish when a GitHub Release is created, use the following rule:
if: github.event_name == 'release' && github.event.action == 'published'
steps:
- name: checkout repository
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
id: cp
with:
python-version: "3.11"
update-environment: true

- name: Install pypa/build
run: |
'${{ steps.cp.outputs.python-path }}' -m pip install build
- name: Build a binary wheel and a source tarball
run: |
'${{ steps.cp.outputs.python-path }}' -m build .
- uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
# To test: repository_url: https://test.pypi.org/legacy/
61 changes: 33 additions & 28 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,37 @@
name: tests

on:
pull_request:
types: [opened, edited, synchronize]
on: [push, pull_request]

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
max-parallel: 3
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.7, 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: |
python -m pip install --upgrade pip
python -m pip install pytest
python -m pip install .
- name: Run pytest
run: |
python -m pytest -v --disable-warnings
build_pip:
name: Build (${{ matrix.os }} Python ${{ matrix.python-version }})
runs-on: ${{ matrix.os }}

defaults:
run:
shell: bash -l {0}

strategy:
fail-fast: False
matrix:
os: ["ubuntu-latest", "macOS-latest", "windows-latest"]
python-version: ["3.9", "3.10", "3.11"]

steps:
- name: checkout repository
uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
id: cp
with:
python-version: ${{ matrix.python-version }}
update-environment: true

- name: Pip Install
run: |
'${{ steps.cp.outputs.python-path }}' -m pip install -vv -e .[test]
- name: Test run
run: |
'${{ steps.cp.outputs.python-path }}' -m pytest -v --disable-warnings pCrunch
9 changes: 0 additions & 9 deletions .isort.cfg

This file was deleted.

Loading

0 comments on commit 0466a38

Please sign in to comment.