Skip to content

Commit

Permalink
Merge pull request #111 from Breakthrough-Energy/develop
Browse files Browse the repository at this point in the history
chore: merge v0.2.0 into master
  • Loading branch information
danielolsen authored Feb 14, 2021
2 parents 701ae12 + 1c4d0a8 commit 6fab2c0
Show file tree
Hide file tree
Showing 31 changed files with 2,059 additions and 613 deletions.
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.git
.pytest_cache
.tox
21 changes: 21 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Lint

on: push

jobs:
formatting:
if: "!contains(github.event.head_commit.message, 'skip_ci')"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- run: python -m pip install --upgrade tox
- run: tox -e checkformatting
flake8:
if: "!contains(github.event.head_commit.message, 'skip_ci')"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- run: python -m pip install --upgrade tox
- run: tox -e flake8
24 changes: 24 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Pytest

on: push

jobs:
test:
if: "!contains(github.event.head_commit.message, 'skip_ci')"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [3.7, 3.8]

name: Python ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- run: python -m pip install --upgrade pip tox
- run: tox -e pytest
28 changes: 28 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
FROM python:3.8.3

WORKDIR /build/julia_installer

RUN wget -q https://julialang-s3.julialang.org/bin/linux/x64/1.5/julia-1.5.3-linux-x86_64.tar.gz &&\
tar -xf julia-1.5.3-linux-x86_64.tar.gz -C /usr/share

WORKDIR /build/gurobi_installer

RUN wget -q https://packages.gurobi.com/9.1/gurobi9.1.0_linux64.tar.gz && \
tar -xf gurobi9.1.0_linux64.tar.gz -C /usr/share

ENV PATH="$PATH:/usr/share/julia-1.5.3/bin" \
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/share/gurobi910/linux64/lib \
GUROBI_HOME='/usr/share/gurobi910/linux64' \
GRB_LICENSE_FILE='/usr/share/gurobi_license/gurobi.lic' \
JULIA_PROJECT='/app' \
PYTHONPATH=/app/pyreisejl:${PYTHONPATH} \
FLASK_APP=pyreisejl/utility/app.py

WORKDIR /app
COPY . .

RUN julia -e 'using Pkg; Pkg.activate("."); Pkg.instantiate(); Pkg.add("Gurobi"); import Gurobi; using REISE' && \
pip install -r requirements.txt


CMD ["flask", "run", "--host", "0.0.0.0"]
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2021 Breakthrough Energy

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading

0 comments on commit 6fab2c0

Please sign in to comment.