diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 4e961e3f..7015c9e0 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -26,13 +26,12 @@ jobs: uses: actions-rs/toolchain@v1 with: profile: minimal - toolchain: nightly + toolchain: stable override: true - name: Rust unit tests run: | - cd rust/ - cargo test + cd rust/ && cargo test - name: Python unit tests run: | diff --git a/MANIFEST.in b/MANIFEST.in index f297e030..11f4cb87 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -4,5 +4,5 @@ recursive-include rust/fastsim-core/src * recursive-include rust/fastsim-core/proc-macros/src * recursive-include rust/fastsim-py/src * recursive-include rust/fastsim-cli/src * -recursive-include fastsim/resources * -recursive-include fastsim/docs * \ No newline at end of file +recursive-include python/fastsim/resources * +recursive-include python/fastsim/demos * \ No newline at end of file diff --git a/README.md b/README.md index 7dd45f03..af8018b9 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,7 @@ Developers might want to install the code in place so that FASTSim files can be 1. Within the same python environment, navigate to `fastsim/rust/` and run `pip install maturin`. 1. _Optional_: Within the `rust/` folder (which contains the rust `src/` folder), run `cargo test --release` to build and run the tests. - 1. In `fastsim/rust/fastsim-py`, you should now be able to run `maturin develop --release`, which will enable the tests that use rust to run. You should also now be able to run `fastsim/fastsim/docs/demo.py`. + 1. In `./rust/fastsim-py`, you should now be able to run `maturin develop --release`, which will enable the tests that use rust to run. You should also now be able to run `./python/fastsim/demos/demo.py`. After FASTSim has been installed as editable per the above instructions, you can rebuild and test everything with `sh build_and_test.sh` in Windows bash or `./build_and_test.sh` in Linux/Unix in the `fastsim/` dir. @@ -52,7 +52,7 @@ After FASTSim has been installed as editable per the above instructions, you can At the root level of the git repository: `pytest -v python/fastsim/tests/`. This can also be run in the python environment directly. # Usage -To see and run examples, navigate to fastsim/docs and run the various *demo.py files to see fastsim use cases. There are other examples in fastsim/tests. +To see and run examples, navigate to `./python/fastsim/demos` and run the various *demo.py files to see fastsim use cases. There are other examples in fastsim/tests. # Adding FASTSim as a Depency in Rust diff --git a/python/fastsim/docs/.gitignore b/python/fastsim/demos/.gitignore similarity index 100% rename from python/fastsim/docs/.gitignore rename to python/fastsim/demos/.gitignore diff --git a/python/fastsim/docs/2017_Ford_F150_thermal_val.py b/python/fastsim/demos/2017_Ford_F150_thermal_val.py similarity index 100% rename from python/fastsim/docs/2017_Ford_F150_thermal_val.py rename to python/fastsim/demos/2017_Ford_F150_thermal_val.py diff --git a/python/fastsim/docs/__init__.py b/python/fastsim/demos/__init__.py similarity index 100% rename from python/fastsim/docs/__init__.py rename to python/fastsim/demos/__init__.py diff --git a/python/fastsim/docs/accel_demo.py b/python/fastsim/demos/accel_demo.py similarity index 100% rename from python/fastsim/docs/accel_demo.py rename to python/fastsim/demos/accel_demo.py diff --git a/python/fastsim/docs/cav_demo.py b/python/fastsim/demos/cav_demo.py similarity index 100% rename from python/fastsim/docs/cav_demo.py rename to python/fastsim/demos/cav_demo.py diff --git a/python/fastsim/docs/cav_sweep.py b/python/fastsim/demos/cav_sweep.py similarity index 100% rename from python/fastsim/docs/cav_sweep.py rename to python/fastsim/demos/cav_sweep.py diff --git a/python/fastsim/docs/demo.py b/python/fastsim/demos/demo.py similarity index 100% rename from python/fastsim/docs/demo.py rename to python/fastsim/demos/demo.py diff --git a/python/fastsim/docs/demo_abc_drag_coef_conv.py b/python/fastsim/demos/demo_abc_drag_coef_conv.py similarity index 100% rename from python/fastsim/docs/demo_abc_drag_coef_conv.py rename to python/fastsim/demos/demo_abc_drag_coef_conv.py diff --git a/python/fastsim/docs/demo_eu_vehicle_wltp.py b/python/fastsim/demos/demo_eu_vehicle_wltp.py similarity index 100% rename from python/fastsim/docs/demo_eu_vehicle_wltp.py rename to python/fastsim/demos/demo_eu_vehicle_wltp.py diff --git a/python/fastsim/docs/fastsim-icon-web-131x172.jpg b/python/fastsim/demos/fastsim-icon-web-131x172.jpg similarity index 100% rename from python/fastsim/docs/fastsim-icon-web-131x172.jpg rename to python/fastsim/demos/fastsim-icon-web-131x172.jpg diff --git a/python/fastsim/docs/fusion_thermal_cal.py b/python/fastsim/demos/fusion_thermal_cal.py similarity index 100% rename from python/fastsim/docs/fusion_thermal_cal.py rename to python/fastsim/demos/fusion_thermal_cal.py diff --git a/python/fastsim/docs/fusion_thermal_cal_post.py b/python/fastsim/demos/fusion_thermal_cal_post.py similarity index 100% rename from python/fastsim/docs/fusion_thermal_cal_post.py rename to python/fastsim/demos/fusion_thermal_cal_post.py diff --git a/python/fastsim/docs/fusion_thermal_demo.py b/python/fastsim/demos/fusion_thermal_demo.py similarity index 100% rename from python/fastsim/docs/fusion_thermal_demo.py rename to python/fastsim/demos/fusion_thermal_demo.py diff --git a/python/fastsim/docs/mp_parallel_demo.py b/python/fastsim/demos/mp_parallel_demo.py similarity index 100% rename from python/fastsim/docs/mp_parallel_demo.py rename to python/fastsim/demos/mp_parallel_demo.py diff --git a/python/fastsim/docs/stop_start_demo.py b/python/fastsim/demos/stop_start_demo.py similarity index 100% rename from python/fastsim/docs/stop_start_demo.py rename to python/fastsim/demos/stop_start_demo.py diff --git a/python/fastsim/docs/time_dilation_demo.py b/python/fastsim/demos/time_dilation_demo.py similarity index 100% rename from python/fastsim/docs/time_dilation_demo.py rename to python/fastsim/demos/time_dilation_demo.py diff --git a/python/fastsim/docs/wltc_calibration.py b/python/fastsim/demos/wltc_calibration.py similarity index 100% rename from python/fastsim/docs/wltc_calibration.py rename to python/fastsim/demos/wltc_calibration.py diff --git a/python/fastsim/tests/test_cav_demo.py b/python/fastsim/tests/test_cav_demo.py index 7b51b93a..1d09e334 100644 --- a/python/fastsim/tests/test_cav_demo.py +++ b/python/fastsim/tests/test_cav_demo.py @@ -13,7 +13,7 @@ def test_that_demo_runs_without_error(self): is_interactive_key = 'FASTSIM_DEMO_IS_INTERACTIVE' original_value = os.getenv(is_interactive_key) os.environ[is_interactive_key] = 'False' - from fastsim.docs.cav_demo import RAN_SUCCESSFULLY + from fastsim.demos.cav_demo import RAN_SUCCESSFULLY if original_value is not None: os.environ[is_interactive_key] = original_value else: diff --git a/python/fastsim/tests/test_cav_sweep.py b/python/fastsim/tests/test_cav_sweep.py index 36e2a97b..5d4afb95 100644 --- a/python/fastsim/tests/test_cav_sweep.py +++ b/python/fastsim/tests/test_cav_sweep.py @@ -1,12 +1,12 @@ """ -Test fastsim/docs/cav_sweep.py for regressions +Test fastsim/demos/cav_sweep.py for regressions """ import unittest import os import csv from pathlib import Path -from fastsim.docs.cav_sweep import main, CSV_KEYS +from fastsim.demos.cav_sweep import main, CSV_KEYS import fastsim as fsim THIS_DIR = os.path.abspath(os.path.dirname(__file__)) diff --git a/python/fastsim/tests/test_demo.py b/python/fastsim/tests/test_demo.py index 0fc0b604..e5512871 100644 --- a/python/fastsim/tests/test_demo.py +++ b/python/fastsim/tests/test_demo.py @@ -1,5 +1,5 @@ """ -Tests the code from fastsim/docs/demo.py +Tests the code from fastsim/demos/demo.py """ import unittest import pytest