-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
120 additions
and
149 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,19 @@ permissions: | |
jobs: | ||
build: | ||
name: Build and test | ||
runs-on: ubuntu-latest | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: | ||
- "3.9" | ||
- "3.10" | ||
- "3.11" | ||
- "3.12" | ||
os: | ||
- ubuntu-latest | ||
- macos-latest | ||
- windows-latest | ||
|
||
defaults: | ||
run: | ||
|
@@ -36,27 +48,36 @@ jobs: | |
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install flake8 pytest pyomo==6.4.1 | ||
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | ||
- name: Install flake8 | ||
run: | | ||
python -m pip install flake8 | ||
- name: Install CBC | ||
if: matrix.os != 'windows-latest' | ||
run: | | ||
mamba install coincbc | ||
- name: Lint with flake8 | ||
mamba install coin-or-cbc coincbc | ||
- name: install CBC (Windows) | ||
if: matrix.os == 'windows-latest' | ||
run: | | ||
# stop the build if there are Python syntax errors or undefined names | ||
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | ||
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | ||
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | ||
- name: Install osier package | ||
curl -L https://github.com/coin-or/Cbc/releases/download/releases%2F2.10.10/Cbc-releases.2.10.10-w64-msvc17-md.zip -o cbc.zip | ||
unzip cbc.zip -d ${HOME}/cbc | ||
echo "${HOME}/cbc/bin" >> $GITHUB_PATH | ||
- name: Install osier package (macos) | ||
if: matrix.os == 'macos-latest' | ||
run: | | ||
pip install . | ||
- name : Install recent unyt update | ||
pip install -e .'[doc]' | ||
- name: Install osier package | ||
if: matrix.os != 'macos-latest' | ||
run: | | ||
python3 -m pip install -e git+https://github.com/yt-project/unyt.git#egg=unyt | ||
pip install -e .[doc] | ||
- name: Test with pytest | ||
run: | | ||
pytest tests/ | ||
- name: Open Journals PDF Generator | ||
uses: openjournals/[email protected] | ||
|
||
- name: Lint with flake8 | ||
run: | | ||
# stop the build if there are Python syntax errors or undefined names | ||
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | ||
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | ||
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
[build-system] | ||
requires = ["setuptools >= 64.0"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name="osier" | ||
version = "0.3.0" | ||
description = "osier: A justice oriented energy system optimization tool" | ||
readme = "README.md" | ||
keywords = ["energy systems", "optimization", "multi-objective", "justice", "multi-criteria decision"] | ||
|
||
license = { file = "LICENSE" } | ||
|
||
requires-python = ">= 3.9" | ||
|
||
dependencies = [ | ||
'numpy', | ||
'pandas', | ||
'matplotlib', | ||
'pytest', | ||
'dill', | ||
'openpyxl', | ||
'nrelpy', | ||
'unyt', | ||
'pymoo', | ||
'pyentrp', | ||
'deap', | ||
'pyomo' | ||
] | ||
|
||
authors = [ | ||
{name = "Sam Dotson", email = "[email protected]"}, | ||
] | ||
maintainers = [ | ||
{name = "Sam Dotson", email = "[email protected]"} | ||
] | ||
|
||
classifiers = [ | ||
"Development Status :: 3 - Alpha", | ||
"Intended Audience :: Science/Research", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
"Environment :: Console", | ||
"Natural Language :: English", | ||
"Operating System :: OS Independent" | ||
] | ||
|
||
[project.urls] | ||
Homepage = "https://osier.readthedocs.io" | ||
Repository = "https://github.com/arfc/osier" | ||
Issues = "https://github.com/arfc/osier/issues" | ||
|
||
[project.optional-dependencies] | ||
doc = [ | ||
'sphinx>=5.1', | ||
'sphinx-autobuild', | ||
'myst-parser', | ||
"sphinx_design", | ||
"sphinx-autodoc-typehints", | ||
'numpydoc', | ||
'pydata_sphinx_theme', | ||
'nbsphinx', | ||
'pandoc' | ||
] | ||
|
||
[tool.setuptools.packages.find] | ||
include = ['osier'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters