The DTOcean Installation Modules calculates the scheduling of installation of the designs created by the dtocean-electrical and dtocean-moorings modules and the OECs themselves. It produces a detailed time-based installation plan and associated costs. Installation is optimised for minimum cost.
See dtocean-app or dtocean-core to use this package within the DTOcean ecosystem.
* For python 2.7 only.
Installation and development of dtocean-installation uses the Anaconda Distribution (Python 2.7)
To install:
$ conda install -c defaults -c free -c conda-forge -c dataonlygreater dtocean-installation
Conda can be used to install dependencies into a dedicated environment from the source code root directory:
$ conda create -n _dtocean_install python=2.7 pip
Activate the environment, then copy the .condrc
file to store installation
channels:
$ conda activate _dtocean_install
$ copy .condarc %CONDA_PREFIX%
OR, if you're using Powershell:
$ conda activate _dtocean_install
$ copy .condarc $env:CONDA_PREFIX
Install polite and dtocean-logistics into the environment. For example, if installing them from source:
$ cd \\path\\to\\polite
$ conda install --file requirements-conda-dev.txt
$ pip install -e .
$ cd \\path\\to\\dtocean-logistics
$ conda install --file requirements-conda-dev.txt
$ pip install -e .
Finally, install dtocean-installation and its dependencies using conda and pip:
$ cd \\path\\to\\dtocean-installation
$ conda install --file requirements-conda-dev.txt
$ pip install -e .
To deactivate the conda environment:
$ conda deactivate
A test suite is provided with the source code that uses pytest.
If not already active, activate the conda environment set up in the Source Code section:
$ conda activate _dtocean_install
Install packages required for testing to the environment (one time only):
$ conda install -y pytest
Run the tests:
$ py.test tests
To uninstall the conda package:
$ conda remove dtocean-installation
To uninstall the source code and its conda environment:
$ conda remove --name _dtocean_install --all
Example scripts are available in the "examples" folder of the source code.
$ cd examples
$ python example.py
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
See this blog post for information regarding development of the DTOcean ecosystem.
Please make sure to update tests as appropriate.
This package was initially created as part of the EU DTOcean project by:
- Boris Teillant at WavEC
- Paulo Chainho at WavEC
- Pedro Vicente at WavEC
- Adam Collin at the University of Edinburgh
- Mathew Topper at TECNALIA
It is now maintained by Mathew Topper at Data Only Greater.