diff --git a/Makefile b/Makefile index e0d7423b9..0342667c5 100644 --- a/Makefile +++ b/Makefile @@ -15,6 +15,12 @@ poetry-remove: install: poetry install +.PHONY: install_examples_dependencies +install_examples_dependencies: + poetry install -E examples + # sadly pip ffmpeg doesnt work, hence we use conda for ffmpeg + conda install -c conda-forge ffmpeg + .PHONY: install_with_new_dependency install_with_new_dependency: poetry lock diff --git a/examples/README.md b/examples/README.md index 06fb8f823..ae2e99688 100644 --- a/examples/README.md +++ b/examples/README.md @@ -8,7 +8,7 @@ More [advanced cases](#advanced-cases) are stored in separate repository with it In order to run examples, you will need to install additional dependencies. ```bash -poetry install -E examples +make install_examples_dependencies ``` ## Case Examples @@ -30,7 +30,7 @@ Examples can serve as a starting template for customized usages. * __Features__: CosseratRod, MuscleTorques, AnisotropicFrictionalPlane, Gravity, CMA Optimization * [MuscularSnake](./MuscularSnake) * __Purpose__: Example of [Parallel connection module](../elastica/experimental/connection_contact_joint/parallel_connection.py) and customized [Force module](./MuscularSnake/muscle_forces.py) to implement muscular snake. - * __Features__: MuscleForces(custom implemented) + * __Features__: MuscleForces(custom implemented) * [ButterflyCase](./ButterflyCase) * __Purpose__: Demonstrate simple restoration with initial strain. * __Features__: CosseratRod @@ -51,13 +51,13 @@ Examples can serve as a starting template for customized usages. * __Features__: HelicalBucklingBC * [ContinuumFlagellaCase](./ContinuumFlagellaCase) * __Purpose__: Demonstrate flagella modeling using PyElastica. - * __Features__: SlenderBodyTheory, MuscleTorques, + * __Features__: SlenderBodyTheory, MuscleTorques, * [MuscularFlagella](./MuscularFlagella) * __Purpose__: Example of customizing [Joint module](./MuscularFlagella/connection_flagella.py) and [Force module](./MuscularFlagella/muscle_forces_flagella.py) to implement muscular flagella. * __Features__: MuscleForces(custom implemented) * [RodContactCase](./RodContactCase) * [RodRodContact](./RodContactCase/RodRodContact) - * __Purpose__: Demonstrates contact between two rods, for different initial conditions. + * __Purpose__: Demonstrates contact between two rods, for different initial conditions. * __Features__: CosseratRod, ExternalContact * [RodSelfContact](./RodContactCase/RodSelfContact) * [PlectonemesCase](./RodContactCase/RodSelfContact/PlectonemesCase) diff --git a/poetry.lock b/poetry.lock index d5fc025f2..1aa1970f3 100644 --- a/poetry.lock +++ b/poetry.lock @@ -176,14 +176,6 @@ category = "main" optional = true python-versions = ">=3.6" -[[package]] -name = "decorator" -version = "4.4.2" -description = "Decorators for Humans" -category = "main" -optional = true -python-versions = ">=2.6, !=3.0.*, !=3.1.*" - [[package]] name = "distlib" version = "0.3.5" @@ -200,14 +192,6 @@ category = "main" optional = true python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" -[[package]] -name = "ffmpeg" -version = "1.4" -description = "ffmpeg python package url [https://github.com/jiashaokun/ffmpeg]" -category = "main" -optional = true -python-versions = "*" - [[package]] name = "filelock" version = "3.7.1" @@ -275,43 +259,6 @@ category = "main" optional = false python-versions = ">=3.5" -[[package]] -name = "imageio" -version = "2.20.0" -description = "Library for reading and writing a wide range of image, video, scientific, and volumetric data formats." -category = "main" -optional = true -python-versions = ">=3.7" - -[package.dependencies] -numpy = "*" -pillow = ">=8.3.2" - -[package.extras] -all-plugins = ["astropy", "av", "imageio-ffmpeg", "opencv-python", "psutil", "tifffile"] -all-plugins-pypy = ["av", "imageio-ffmpeg", "psutil", "tifffile"] -build = ["wheel"] -dev = ["invoke", "pytest", "pytest-cov", "fsspec", "black", "flake8"] -docs = ["sphinx", "numpydoc", "pydata-sphinx-theme"] -ffmpeg = ["imageio-ffmpeg", "psutil"] -fits = ["astropy"] -full = ["astropy", "av", "black", "flake8", "fsspec", "gdal", "imageio-ffmpeg", "invoke", "itk", "numpydoc", "opencv-python", "psutil", "pydata-sphinx-theme", "pytest", "pytest-cov", "sphinx", "tifffile", "wheel"] -gdal = ["gdal"] -itk = ["itk"] -linting = ["black", "flake8"] -opencv = ["opencv-python"] -pyav = ["av"] -test = ["invoke", "pytest", "pytest-cov", "fsspec"] -tifffile = ["tifffile"] - -[[package]] -name = "imageio-ffmpeg" -version = "0.4.7" -description = "FFMPEG wrapper for Python" -category = "main" -optional = true -python-versions = ">=3.5" - [[package]] name = "imagesize" version = "1.4.1" @@ -459,31 +406,6 @@ category = "main" optional = true python-versions = ">=3.7" -[[package]] -name = "moviepy" -version = "1.0.3" -description = "Video editing with Python" -category = "main" -optional = true -python-versions = "*" - -[package.dependencies] -decorator = ">=4.0.2,<5.0" -imageio = {version = ">=2.5,<3.0", markers = "python_version >= \"3.4\""} -imageio_ffmpeg = {version = ">=0.2.0", markers = "python_version >= \"3.4\""} -numpy = [ - {version = ">=1.17.3", markers = "python_version != \"2.7\""}, - {version = "*", markers = "python_version >= \"2.7\""}, -] -proglog = "<=1.0.0" -requests = ">=2.8.1,<3.0" -tqdm = ">=4.11.2,<5.0" - -[package.extras] -doc = ["numpydoc (>=0.6.0,<1.0)", "sphinx_rtd_theme (>=0.1.10b0,<1.0)", "Sphinx (>=1.5.2,<2.0)", "pygame (>=1.9.3,<2.0)"] -optional = ["youtube-dl", "opencv-python (>=3.0,<4.0)", "scipy (>=0.19.0,<1.5)", "scikit-image (>=0.13.0,<1.0)", "scikit-learn", "matplotlib (>=2.0.0,<3.0)"] -test = ["coverage (<5.0)", "coveralls (>=1.1,<2.0)", "pytest-cov (>=2.5.1,<3.0)", "pytest (>=3.0.0,<4.0)", "requests (>=2.8.1,<3.0)"] - [[package]] name = "mypy-extensions" version = "0.4.3" @@ -633,17 +555,6 @@ pyyaml = ">=5.1" toml = "*" virtualenv = ">=20.0.8" -[[package]] -name = "proglog" -version = "0.1.10" -description = "Log and progress bar manager for console, notebooks, web..." -category = "main" -optional = true -python-versions = "*" - -[package.dependencies] -tqdm = "*" - [[package]] name = "py" version = "1.11.0" @@ -1119,12 +1030,12 @@ testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest- [extras] docs = ["Sphinx", "sphinx-book-theme", "readthedocs-sphinx-search", "sphinx-autodoc-typehints", "myst-parser", "numpydoc", "docutils"] -examples = ["cma", "ffmpeg", "moviepy", "matplotlib"] +examples = ["cma", "matplotlib"] [metadata] lock-version = "1.1" python-versions = ">=3.7,<3.11" -content-hash = "1571e4eae9449362d7459c6a12769dd63dadc8dd6466310ffc6bfe3f05fc9ac3" +content-hash = "8c5275738d95bea7cac03652da5b3ae6edc695c24b187256973b709c32527975" [metadata.files] alabaster = [ @@ -1148,10 +1059,8 @@ codecov = [] colorama = [] coverage = [] cycler = [] -decorator = [] distlib = [] docutils = [] -ffmpeg = [] filelock = [] flake8 = [] fonttools = [] @@ -1160,8 +1069,6 @@ idna = [ {file = "idna-3.3-py3-none-any.whl", hash = "sha256:84d9dd047ffa80596e0f246e2eab0b391788b0503584e8945f2368256d2735ff"}, {file = "idna-3.3.tar.gz", hash = "sha256:9d643ff0a55b762d5cdb124b8eaa99c66322e2157b69160bc32796e824360e6d"}, ] -imageio = [] -imageio-ffmpeg = [] imagesize = [] importlib-metadata = [] iniconfig = [ @@ -1253,7 +1160,6 @@ mccabe = [ ] mdit-py-plugins = [] mdurl = [] -moviepy = [] mypy-extensions = [ {file = "mypy_extensions-0.4.3-py2.py3-none-any.whl", hash = "sha256:090fedd75945a69ae91ce1303b5824f428daf5a028d2f6ab8a299250a846f15d"}, {file = "mypy_extensions-0.4.3.tar.gz", hash = "sha256:2d82818f5bb3e369420cb3c4060a7970edba416647068eb4c5343488a6c604a8"}, @@ -1342,7 +1248,6 @@ pluggy = [ {file = "pluggy-1.0.0.tar.gz", hash = "sha256:4224373bacce55f955a878bf9cfa763c1e360858e330072059e10bad68531159"}, ] pre-commit = [] -proglog = [] py = [ {file = "py-1.11.0-py2.py3-none-any.whl", hash = "sha256:607c53218732647dff4acdfcd50cb62615cedf612e72d1724fb1a0cc6405b378"}, {file = "py-1.11.0.tar.gz", hash = "sha256:51c75c4126074b472f746a24399ad32f6053d1b34b68d2fa41e558e6f4a98719"}, diff --git a/pyproject.toml b/pyproject.toml index ce01675bb..e0c0d30ff 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -52,8 +52,6 @@ myst-parser = {version = "^0.17.2", optional = true, extras = ["docs"]} numpydoc = {version = "^1.3.1", optional = true, extras = ["docs"]} docutils = {version = "^0.17.1", optional = true, extras = ["docs"]} cma = {version = "^3.2.2", optional = true, extras = ["examples"]} -ffmpeg = {version = "^1.4", optional = true, extras = ["examples"]} -moviepy = {version = "^1.0.3", optional = true, extras = ["examples"]} matplotlib = {version = "^3.3.2", optional = true, extras = ["examples"]} [tool.poetry.dev-dependencies] @@ -79,8 +77,6 @@ docs = [ ] examples = [ "cma", - "ffmpeg", - "moviepy", "matplotlib", ]