Skip to content

Commit

Permalink
Merge pull request #99 from slacgismo/dev
Browse files Browse the repository at this point in the history
PR from Sara: Ready for v1!
  • Loading branch information
pluflou authored Aug 7, 2023
2 parents 0740ab6 + da4ab1a commit a2f4e55
Show file tree
Hide file tree
Showing 85 changed files with 4,595 additions and 2,255 deletions.
62 changes: 62 additions & 0 deletions .github/workflows/test-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Test Build

on:
pull_request:
branches: [ main ]
jobs:
build-pypi:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3

- name: Install Python
uses: actions/setup-python@v3
with:
python-version: '3.10'

- name: Install Twine
run: sudo pip install twine

- name: Create the distribution
run: |
git fetch --prune --unshallow --tags
sudo python setup.py sdist bdist_wheel
build-conda:
runs-on: ubuntu-latest
# sets default shell to remove need for source to run the conda shell
defaults:
run:
shell: bash -l {0}
environment: test-deployment
steps:
- name: Checkout Repository
uses: actions/checkout@v3

# Much better than manual installation, original version Miniconda2-4.7.10-Linux-x86_64.sh is broken
- name: Install Miniconda
uses: conda-incubator/setup-miniconda@v2
with:
auto-activate-base: true
activate-environment: ""
miniconda-version: "latest"

- name: Install the Conda Dependencies
run: |
conda config --set always_yes yes --set auto_update_conda false
conda update conda
conda install conda-build
# echo yes before login to prevent anaconda bug breaking automation
# git tags MUST be fetched otherwise output will be blank
# bash variables cannot be used in github actions, must use actions specific syntax and methods
# channels need to be specified on build and are saved in the package for installs
- name: Build the Anaconda Package
id: condabuild
run: |
conda install anaconda-client
conda config --set anaconda_upload no
git fetch --prune --unshallow --tags
VERSION_FROM_GIT_TAG=$(git tag --list "v*[0-9]" --sort=version:refname | tail -1 | cut -c 2-)test conda build . -c mosek -c anaconda -c pvlib -c slacgismo -c conda-forge --numpy 1.22.0
echo '::set-output name=gitversion::$(git tag --list "v*[0-9]" --sort=version:refname | tail -1 | cut -c 2-)'
60 changes: 0 additions & 60 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,63 +39,3 @@ jobs:
# Current unit test is not consistent. Occasionally fails despite usually passing. Needs to be fixed.
- name: Run Unit Tests
run: sudo $pythonLocation/bin/python3 -m coverage run -m unittest

build-pypi:
runs-on: ubuntu-latest
needs: run-tests
steps:
- name: Checkout Repository
uses: actions/checkout@v3

- name: Install Python
uses: actions/setup-python@v3
with:
python-version: '3.10'

- name: Install Twine
run: sudo pip install twine

- name: Create the distribution
run: |
git fetch --prune --unshallow --tags
sudo python setup.py sdist bdist_wheel
build-conda:
runs-on: ubuntu-latest
needs: run-tests
# sets default shell to remove need for source to run the conda shell
defaults:
run:
shell: bash -l {0}
environment: test-deployment
steps:
- name: Checkout Repository
uses: actions/checkout@v3

# Much better than manual installation, original version Miniconda2-4.7.10-Linux-x86_64.sh is broken
- name: Install Miniconda
uses: conda-incubator/setup-miniconda@v2
with:
auto-activate-base: true
activate-environment: ""
miniconda-version: "latest"

- name: Install the Conda Dependencies
run: |
conda config --set always_yes yes --set auto_update_conda false
conda update conda
conda install conda-build
# echo yes before login to prevent anaconda bug breaking automation
# git tags MUST be fetched otherwise output will be blank
# bash variables cannot be used in github actions, must use actions specific syntax and methods
# channels need to be specified on build and are saved in the package for installs
- name: Build the Anaconda Package
id: condabuild
run: |
conda install anaconda-client
conda config --set anaconda_upload no
git fetch --prune --unshallow --tags
VERSION_FROM_GIT_TAG=$(git tag --list "v*[0-9]" --sort=version:refname | tail -1 | cut -c 2-)test conda build . -c mosek -c anaconda -c pvlib -c slacgismo -c conda-forge --numpy 1.22.0
echo '::set-output name=gitversion::$(git tag --list "v*[0-9]" --sort=version:refname | tail -1 | cut -c 2-)'
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ cmake
pykml
haversine
boto3
sig-decomp
# I suggest using the MOSEK convex solver with cvxpy, if possible. For additional information about setting up MOSEK,
# see here: https://docs.mosek.com/8.1/pythonapi/install-interface.html. A license is required to use this software.
# Academic license info: https://www.mosek.com/products/academic-licenses/
Expand Down
Loading

0 comments on commit a2f4e55

Please sign in to comment.