pip install flow360
pip install -U flow360 --pre
Get your api-key from flow360.simulation.cloud
You can set your api-key by ONE of the following methods:
- Set globaly for your acount:
flow360 configure
will store api-key in ~/.flow360 - In shell:
- Bash/Zsh shell (Linux or Mac):
export FLOW360_APIKEY="my api-key"
- Powershell (Windows):
$Env:FLOW360_APIKEY="my api-key"
- Bash/Zsh shell (Linux or Mac):
- In python script:
os.environ["FLOW360_APIKEY"] = "my api-key"
before or afterimport flow360
NOTE
Environment FLOW360_APIKEY
variable takes precedence before Flow360 configure file generated by flow360 configure
- Get examples from this repository:
git clone https://github.com/flexcompute/Flow360.git
cd Flow360/examples
- run
python case_results.py
- clone repo
- Install poetry
pip install poetry
poetry env activate
gives you the command to activate the virtual environment, copy paste and run the command to enter the virtual environment. Or you can just prependpoetry run
on all the python related commands.- Install dependencies:
poetry install
python examples/case_results.py
- You can also run examples without activating shell:
poetry run python examples/case_results.py
black .
- performs auto-formattingisort .
- sorts importspoetry run pylint $(git ls-files "flow360/*.py") --rcfile .pylintrc
- checks code stylepoetry run pytest -rA tests/simulation
- run V2 related testspoetry run pytest -rA --ignore tests/simulation
- run V1 related tests (cannot be run altogether)pytest -rA tests/simulation --cov-report=html --cov=flow360/component/simulation
- see test coverage report for V2 clientpytest -rA --ignore tests/simulation --cov-report=html --cov=flow360 && open htmlcov/index.html
- see test coverage report for V1+V2 client
If you want to install the requirements to locally build the documentation you can run:
poetry install -E docs
Alternatively, you can also install the extra in any pip-controlled venv:
pip install -e .[docs]