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
- Activate poetry shell
poetry shell
- Install dependencies:
poetry install
python examples/case_results.py
- You can also run examples without activating shell:
poetry run python examples/case_results.py
poetry run pytest -rA
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]