Skip to content

Commit 3dce9bf

Browse files
Merge pull request #251 from GazzolaLab/update-0.3.1
Update 0.3.1
2 parents 7b3fe2d + 81851f2 commit 3dce9bf

File tree

154 files changed

+6295
-3127
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

154 files changed

+6295
-3127
lines changed

.github/workflows/ci-sphinx.yml

Lines changed: 0 additions & 41 deletions
This file was deleted.

.github/workflows/main.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ jobs:
2020
runs-on: ${{ matrix.os }}
2121
strategy:
2222
matrix:
23-
python-version: ["3.7", "3.8", "3.9", "3.10"]
23+
python-version: ["3.8", "3.9", "3.10"]
2424
os: [ubuntu-latest, macos-latest] #, windows-latest] # Run macos tests if really required, since they charge 10 times more for macos
2525
include:
2626
- os: ubuntu-latest
2727
path: ~/.cache/pip
2828
- os: macos-latest
2929
path: ~/Library/Caches/pip
30-
# - os: windows-latest
31-
# path: ~\AppData\Local\pip\Cache
30+
#- os: windows-latest
31+
# path: ~\AppData\Local\pip\Cache
3232
# Steps represent a sequence of tasks that will be executed as part of the job
3333
steps:
3434
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
@@ -102,6 +102,6 @@ jobs:
102102
run: |
103103
make test_coverage_xml
104104
- name: Upload coverage to Codecov
105-
uses: codecov/codecov-action@v2
105+
uses: codecov/codecov-action@v3
106106
with:
107107
token: ${{ secrets.CODECOV_TOKEN }}

.readthedocs.yaml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,11 @@ build:
66
os: ubuntu-20.04
77
tools: {python: "3.10"}
88
jobs:
9-
pre_create_environment:
10-
- asdf plugin add poetry
11-
- asdf install poetry latest
12-
- asdf global poetry latest
13-
- poetry config virtualenvs.create false # Key
9+
post_create_environment:
10+
- pip install poetry
11+
- poetry config virtualenvs.create false
1412
post_install:
15-
- poetry install -E docs
13+
- poetry install --all-extras
1614

1715
# Build documentation in the docs/ directory with Sphinx
1816
sphinx:

CONTRIBUTING.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,15 @@ make install
6060
make pre-commit-install
6161
```
6262

63+
If you are planning to contribute to the examples,
64+
extra dependencies can be installed using `poetry install -E examples`.
65+
66+
If you are planning to contribute on the functionality for simulating magnetic Cosserat rods,
67+
implementation details can be found [here](https://github.com/armantekinalp/MagnetoPyElastica).
68+
6369
If you are planning to contribute on documentation, extra dependencies can be installed
64-
using `poetry install -E docs`. The detail instruction is included
70+
using `poetry install -E docs`.
71+
The detail instruction is included
6572
[here](https://github.com/GazzolaLab/PyElastica/blob/master/docs/README.md).
6673

6774
4. Now your working environment is set!

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2019-2022 GazzolaLab
3+
Copyright (c) 2019-2023 GazzolaLab
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

Makefile

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#* Variables
22
PYTHON := python3
33
PYTHONPATH := `pwd`
4+
AUTOFLAKE8_ARGS := -r --exclude '__init__.py' --keep-pass-after-docstring
45
#* Poetry
56
.PHONY: poetry-download
67
poetry-download:
@@ -46,6 +47,17 @@ flake8:
4647
poetry run flake8 --version
4748
poetry run flake8 elastica tests
4849

50+
.PHONY: autoflake8-check
51+
autoflake8-check:
52+
poetry run autoflake8 --version
53+
poetry run autoflake8 $(AUTOFLAKE8_ARGS) elastica tests examples
54+
poetry run autoflake8 --check $(AUTOFLAKE8_ARGS) elastica tests examples
55+
56+
.PHONY: autoflake8-format
57+
autoflake8-format:
58+
poetry run autoflake8 --version
59+
poetry run autoflake8 --in-place $(AUTOFLAKE8_ARGS) elastica tests examples
60+
4961
.PHONY: format-codestyle
5062
format-codestyle: black flake8
5163

@@ -62,7 +74,7 @@ test_coverage_xml:
6274
NUMBA_DISABLE_JIT=1 poetry run pytest --cov=elastica --cov-report=xml
6375

6476
.PHONY: check-codestyle
65-
check-codestyle: black-check flake8
77+
check-codestyle: black-check flake8 autoflake8-check
6678

6779
.PHONY: formatting
6880
formatting: format-codestyle

README.md

Lines changed: 30 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,39 @@
33

44
[![Build_status][badge-travis]][link-travis] [![CI][badge-CI]][link-CI] [![Documentation Status][badge-docs-status]][link-docs-status] [![codecov][badge-codecov]][link-codecov] [![Downloads][badge-pepy-download-count]][link-pepy-download-count] [![DOI][badge-doi]][link-doi] [![Binder][badge-binder]][link-binder] [![Gitter][badge-gitter]][link-gitter]
55
</div>
6-
6+
77
PyElastica is the python implementation of **Elastica**: an *open-source* project for simulating assemblies of slender, one-dimensional structures using Cosserat Rod theory.
88

99
[![gallery][link-readme-gallary]][link-project-website]
1010

1111
Visit [cosseratrods.org][link-project-website] for more information and learn about Elastica and Cosserat rod theory.
1212

13-
## How to Start
13+
## How to Start
1414
[![PyPI version][badge-pypi]][link-pypi] [![Documentation Status][badge-docs-status]][link-docs-status]
1515

16-
PyElastica is compatible with Python 3.7 - 3.10.
16+
PyElastica is compatible with Python 3.8 - 3.10.
1717

1818
~~~bash
19-
$ pip install pyelastica
19+
$ pip install pyelastica
2020
~~~
2121

22+
With this you get a minimal version with very little dependencies.
23+
24+
All options:
25+
- `magnetism`: use this if you want to simulate magnetic Cosserat rods
26+
interacting with external magnetic environments (details can be found [here](https://github.com/armantekinalp/MagnetoPyElastica)) .
27+
- `examples`: installs dependencies to run example cases,
28+
found under the folder `examples`.
29+
- `docs`: packages to build documentation
30+
31+
Options can be combined e.g.
32+
```bash
33+
pip install "pyelastica[magnetism,examples,docs]"
34+
```
35+
2236
Documentation of PyElastica is available [here][link-docs-website].
2337

38+
Example cases for simulating magnetic Cosserat rods can be found [here](https://github.com/armantekinalp/MagnetoPyElastica).
2439
## Citation
2540

2641
We ask that any publications which use Elastica cite as following:
@@ -36,7 +51,7 @@ We ask that any publications which use Elastica cite as following:
3651
Zhi Dou and
3752
Chia-Hsien (Cathy) Shih and
3853
Mattia Gazzola},
39-
title = {{PyElastica: Open-source software for the
54+
title = {{PyElastica: Open-source software for the
4055
simulation of assemblies of slender, one-
4156
dimensional structures using Cosserat Rod theory}},
4257
month = feb,
@@ -50,19 +65,22 @@ We ask that any publications which use Elastica cite as following:
5065

5166
<details>
5267
<summary><h4>References</h4></summary>
53-
68+
5469
- Gazzola, Dudte, McCormick, Mahadevan, <strong>Forward and inverse problems in the mechanics of soft filaments</strong>, Royal Society Open Science, 2018. doi: [10.1098/rsos.171628](https://doi.org/10.1098/rsos.171628)
5570
- Zhang, Chan, Parthasarathy, Gazzola, <strong>Modeling and simulation of complex dynamic musculoskeletal architectures</strong>, Nature Communications, 2019. doi: [10.1038/s41467-019-12759-5](https://doi.org/10.1038/s41467-019-12759-5)
5671

5772
</details>
5873

5974
## List of publications and submissions
60-
61-
- [Control-oriented modeling of bend propagation in an octopus arm](https://arxiv.org/abs/2110.07211) (UIUC, 2021)
75+
- [Topology, dynamics, and control of an octopus-analog muscular hydrostat](https://arxiv.org/abs/2304.08413) (UIUC, 2023)
76+
- [Hierarchical control and learning of a foraging CyberOctopus](https://arxiv.org/abs/2302.05811) (UIUC, 2023)
77+
- [Energy-shaping control of a muscular octopus arm moving in three dimensions](https://royalsocietypublishing.org/doi/full/10.1098/rspa.2022.0593) (UIUC, 2023) (Proceedings of the Royal Society A 2023)
78+
- [A sensory feedback control law for octopus arm movements](https://ieeexplore.ieee.org/abstract/document/9993021/) (UIUC, 2022) (IEEE CDC 2022)
79+
- [Control-oriented modeling of bend propagation in an octopus arm](https://ieeexplore.ieee.org/abstract/document/9867689/) (UIUC, 2021) (IEEE ACC 2022)
6280
- [A physics-informed, vision-based method to reconstruct all deformation modes in slender bodies](https://arxiv.org/abs/2109.08372) (UIUC, 2021) (IEEE ICRA 2022) [code](https://github.com/GazzolaLab/BR2-vision-based-smoothing)
63-
- [Optimal control of a soft CyberOctopus arm](https://ieeexplore.ieee.org/document/9483284) (UIUC, 2021) (ACC 2021)
81+
- [Optimal control of a soft CyberOctopus arm](https://ieeexplore.ieee.org/document/9483284) (UIUC, 2021) (IEEE ACC 2021)
6482
- [Elastica: A compliant mechanics environment for soft robotic control](https://ieeexplore.ieee.org/document/9369003) (UIUC, 2021) (IEEE RA-L 2021)
65-
- [Controlling a CyberOctopus soft arm with muscle-like actuation](https://arxiv.org/abs/2010.03368) (UIUC, 2020)
83+
- [Controlling a CyberOctopus soft arm with muscle-like actuation](https://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=9683318) (UIUC, 2020) (IEEE CDC 2021)
6684
- [Energy shaping control of a CyberOctopus soft arm](https://ieeexplore.ieee.org/document/9304408) (UIUC, 2020) (IEEE CDC 2020)
6785

6886
## Tutorials
@@ -83,8 +101,10 @@ _Names arranged alphabetically_
83101
- Arman Tekinalp
84102
- Chia-Hsien Shih (Cathy)
85103
- Fan Kiat Chan
104+
- Ilia Nasiriziba
86105
- Noel Naughton
87106
- [Seung Hyun Kim](https://github.com/skim0119)
107+
- Songyuan Cui
88108
- Tejaswin Parthasarathy (Teja)
89109
- [Yashraj Bhosale](https://github.com/bhosale2)
90110

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
# -- Project information -----------------------------------------------------
2323

2424
project = 'PyElastica'
25-
copyright = '2022, Gazzola Lab'
25+
copyright = '2023, Gazzola Lab'
2626
author = 'Gazzola Lab'
2727

2828
# The full version, including alpha/beta/rc tags

docs/guide/workflow.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ rod1 = CosseratRod.straight_rod(
6363
base_length=0.5, # original length of rod (m)
6464
base_radius=10e-2, # original radius of rod (m)
6565
density=1e3, # density of rod (kg/m^3)
66-
nu=1e-3, # Energy dissipation of rod, internal damping constant, deprecated in v0.3.0
6766
youngs_modulus=1e7, # Elastic Modulus (Pa)
6867
shear_modulus=1e7/(2* (1+0.5)), # Shear Modulus (Pa)
6968
)
@@ -75,7 +74,6 @@ rod2 = CosseratRod.straight_rod(
7574
base_length=0.5, # original length of rod (m)
7675
base_radius=10e-2, # original radius of rod (m)
7776
density=1e3, # density of rod (kg/m^3)
78-
nu=0.0, # Energy dissipation of rod, internal damping constant, deprecated in v0.3.0
7977
youngs_modulus=1e7, # Elastic Modulus (Pa)
8078
shear_modulus=1e7/(2* (1+0.5)), # Shear Modulus (Pa)
8179
)

docs/index.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ If you are interested to contribute, please read `contribution-guide`_ first.
3636

3737
overview/welcome_page
3838
overview/installation
39+
overview/FAQs
3940

4041
.. toctree::
4142
:maxdepth: 1
@@ -50,7 +51,7 @@ If you are interested to contribute, please read `contribution-guide`_ first.
5051
.. toctree::
5152
:maxdepth: 2
5253
:caption: API Documentation
53-
54+
5455
api/rods
5556
api/rigidbody
5657
api/constraints

0 commit comments

Comments
 (0)