Skip to content

Commit

Permalink
pyproject, ect: Drop contextily dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
stroitzsch committed Oct 9, 2023
1 parent 17204ed commit 3f99eee
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 243 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/maintenance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
uses: conda-incubator/setup-miniconda@v2
- name: Install dependencies
run: |
conda create -n mesmo -c conda-forge python=3.10 contextily
conda create -n mesmo -c conda-forge python=3.10
conda activate mesmo
python development_setup.py
- name: Get new environment-${{ matrix.os }}.yml
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pythontests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
uses: conda-incubator/setup-miniconda@v2
- name: Install dependencies
run: |
conda create -n mesmo -c conda-forge python=${{ matrix.python-version }} contextily
conda create -n mesmo -c conda-forge python=${{ matrix.python-version }}
conda activate mesmo
python development_setup.py
- name: Run tests with coverage report
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ FROM condaforge/miniforge3:latest
WORKDIR /mesmo

# Setup conda environment.
RUN conda create -n mesmo -c conda-forge python=3.10 contextily cvxpy numpy pandas scipy
RUN conda create -n mesmo -c conda-forge python=3.10
# Activate conda environment for RUN commands.
SHELL ["conda", "run", "--no-capture-output", "-n", "mesmo", "/bin/bash", "-c"]
# Activate conda environment for interactive shell.
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,17 @@ The documentation is located at [mesmo-dev.github.io/mesmo](https://mesmo-dev.gi

MESMO has not yet been deployed to Python package indexes, but can be installed in a local development environment as follows:

1. Install `conda`-based Python distribution¹ such as [Anaconda](https://www.anaconda.com/distribution/) or [Miniconda](https://docs.conda.io/en/latest/miniconda.html) or [Miniforge](https://github.com/conda-forge/miniforge).
1. Install Python distribution such as [Anaconda](https://www.anaconda.com/distribution/) or [Miniconda](https://docs.conda.io/en/latest/miniconda.html) or [Miniforge](https://github.com/conda-forge/miniforge).
2. Clone or download the repository. Ensure that the `cobmo` submodule directory is loaded as well.
3. In `conda`-enabled shell (e.g. Anaconda Prompt), run:
- `cd path_to_mesmo_repository`
- `conda create -n mesmo -c conda-forge python=3.10 contextily`
- `conda create -n mesmo -c conda-forge python=3.10`
- `conda activate mesmo`
- `python development_setup.py`

MESMO ships with [HiGHS](https://highs.dev/) as default optimization solver², but also supports [Gurobi](http://www.gurobi.com/) and [any CVXPY-supported solvers](https://www.cvxpy.org/tutorial/advanced/index.html#choosing-a-solver).
MESMO ships with [HiGHS](https://highs.dev/) as default optimization solver¹, but also supports [Gurobi](http://www.gurobi.com/) and [any CVXPY-supported solvers](https://www.cvxpy.org/tutorial/advanced/index.html#choosing-a-solver).

For notes ¹/² and alternative installation guide, see [docs/installation.md](docs/installation.md).
For note ¹ and alternative installation guide, see [docs/installation.md](docs/installation.md).

## Contributing

Expand Down
10 changes: 4 additions & 6 deletions docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,19 @@

MESMO has not yet been deployed to Python package indexes, but can be installed in a local development environment as follows:

1. Install `conda`-based Python distribution¹ such as [Anaconda](https://www.anaconda.com/distribution/) or [Miniconda](https://docs.conda.io/en/latest/miniconda.html) or [Miniforge](https://github.com/conda-forge/miniforge).
1. Install Python distribution such as [Anaconda](https://www.anaconda.com/distribution/) or [Miniconda](https://docs.conda.io/en/latest/miniconda.html) or [Miniforge](https://github.com/conda-forge/miniforge).
2. Clone or download the repository. Ensure that the `cobmo` submodule directory is loaded as well.
3. In `conda`-enabled shell (e.g. Anaconda Prompt), run:
- `cd path_to_mesmo_repository`
- `conda create -n mesmo -c conda-forge python=3.10 contextily`
- `conda create -n mesmo -c conda-forge python=3.10`
- `conda activate mesmo`
- `python development_setup.py`

MESMO ships with [HiGHS](https://highs.dev/) as default optimization solver², but also supports [Gurobi](http://www.gurobi.com/) and [any CVXPY-supported solvers](https://www.cvxpy.org/tutorial/advanced/index.html#choosing-a-solver).
MESMO ships with [HiGHS](https://highs.dev/) as default optimization solver¹, but also supports [Gurobi](http://www.gurobi.com/) and [any CVXPY-supported solvers](https://www.cvxpy.org/tutorial/advanced/index.html#choosing-a-solver).

### Notes

¹ The installation via `conda` is recommended, because it also allows installing the `contextily` package on Windows, which is required for some geographical plots. The direct installation via `pip` in a non-`conda` environment is also possible, but is currently not tested.

² HiGHS is currently MESMO's default optimization solver and the HiGHS binaries are automatically fetched during MESMO setup. Other solvers can be selected via [MESMO configuration](configuration_reference.md#optimization-solver-configuration). For better performance, MESMO implements direct solver interfaces to HiGHS and Gurobi. Other solvers are indirectly supported [via CVXPY](https://www.cvxpy.org/tutorial/advanced/index.html#choosing-a-solver). CVXPY comes bundled with several open-source solvers and supports additional solvers via manual installation (see "Install with ... support" sections in [CVPXY installation guide](https://www.cvxpy.org/install/index.html)). Note that interfacing solvers via CVXPY currently has [performance limitations](https://github.com/cvxpy/cvxpy/issues/704) for large-scale scenarios.
¹ HiGHS is currently MESMO's default optimization solver and the HiGHS binaries are automatically fetched during MESMO setup. Other solvers can be selected via [MESMO configuration](configuration_reference.md#optimization-solver-configuration). For better performance, MESMO implements direct solver interfaces to HiGHS and Gurobi. Other solvers are indirectly supported [via CVXPY](https://www.cvxpy.org/tutorial/advanced/index.html#choosing-a-solver). CVXPY comes bundled with several open-source solvers and supports additional solvers via manual installation (see "Install with ... support" sections in [CVPXY installation guide](https://www.cvxpy.org/install/index.html)). Note that interfacing solvers via CVXPY currently has [performance limitations](https://github.com/cvxpy/cvxpy/issues/704) for large-scale scenarios.

## Alternative installation

Expand Down
230 changes: 1 addition & 229 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ pyyaml = "^6.0.1"
requests = "^2.31.0" # For HiGHS installation.
scipy = "^1.11.3"
tqdm = "^4.66.1"
contextily = "^1.4.0"

[tool.poetry.group.test.dependencies]
coverage = { extras = ["toml"], version = "^7.3.2" }
Expand Down

0 comments on commit 3f99eee

Please sign in to comment.