Skip to content

Commit

Permalink
Merge branch 'main' into hypervisco
Browse files Browse the repository at this point in the history
  • Loading branch information
cmhamel authored Nov 3, 2023
2 parents 0e5f382 + b06b872 commit 35d0bb5
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9"]
python-version: ["3.8", "3.9", "3.10"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
Expand Down
9 changes: 8 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,11 @@ venv/

# IDE files
.idea/
.vscode/
.vscode/

# outputs from tests
*.png
loads
.coverage
spack.lock
.spack-env/
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,31 @@ pip=/usr/local/opt/python/bin/pip3
SUITESPARSE_INCLUDE_DIR=$INC SUITESPARSE_LIBRARY_DIR=$LIB $pip install -e . sparse
```

## Installation using spack
Utilizing spack can alleviate some of the steps and headaches encountered in build described above to use spack to build optimism in a development environment, use the following instructions.

If you don't already have spack, you can clone the git repo using the following command
```
git clone https://github.com/spack/spack.git
```

Once you have spack you can do the following in the optimism directory
```
source /path/to/spack/share/spack/setup-env.sh
spack env activate .
spack concretize -f
spack install
```

The above will install all dependencies needed for optimism (including suite sparse and testing dependencies).

Finally, you can install optimism via pip with
```
pip install -e .[sparse,test]
```

Note that in each new terminal you will need to source the ```setup-env.sh``` script from spack and activate the env in the optimism folder.

## Citing OptimiSM

If you use OptimiSM in your research, please cite
Expand Down
17 changes: 17 additions & 0 deletions spack.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# This is a Spack Environment file.
#
# It describes a set of packages to be installed, along with
# configuration settings.
spack:
# add package specs to the `specs` list
specs:
- python
- py-pip
- py-pytest
- py-pytest-cov
- py-pytest-xdist
- py-scikit-sparse
view: true
concretizer:
unify: true

0 comments on commit 35d0bb5

Please sign in to comment.