Skip to content

Commit b89a129

Browse files
Merge pull request #37 from symbiotic-engineering/becca-joss-cleanup-readme
Becca joss cleanup readme
2 parents 07b015f + d86b3a1 commit b89a129

39 files changed

+168
-878
lines changed

.dvc/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/config.local
2+
/tmp
3+
/cache

.dvc/config

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[core]
2+
remote = calkit
3+
['remote "calkit"']
4+
url = https://api.calkit.io/projects/symbiotic-engineering/openflash/dvc
5+
auth = custom

.dvcignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Add patterns of files dvc should ignore, which could improve
2+
# the performance. Learn more at
3+
# https://dvc.org/doc/user-guide/dvcignore

.github/workflows/.secrets

Whitespace-only changes.
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: Publish Python Package
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*.*.*' # Trigger on version tags like v1.0
7+
8+
permissions:
9+
contents: write
10+
packages: write
11+
12+
jobs:
13+
build-and-publish:
14+
runs-on: ubuntu-latest
15+
environment:
16+
name: pypi
17+
url: https://pypi.org/project/open-flash/
18+
permissions:
19+
id-token: write
20+
steps:
21+
- name: Checkout code
22+
uses: actions/checkout@v4
23+
with:
24+
fetch-depth: 0
25+
26+
- name: Set up Python
27+
uses: actions/setup-python@v5
28+
with:
29+
python-version: '3.x' # Specify your Python version
30+
31+
- name: Install build tools
32+
run: pip install build twine
33+
34+
- name: Build distribution packages
35+
run: python -m build
36+
37+
- name: Publish package to PyPI
38+
uses: pypa/gh-action-pypi-publish@release/v1
39+
with:
40+
password: ${{ secrets.PYPI_API_TOKEN }}
41+
42+
- name: Setup Miniconda
43+
uses: conda-incubator/setup-miniconda@v3
44+
with:
45+
python-version: 3.11
46+
environment-file: path/to/conda/env.yaml # Replace with the path to your conda environment
47+
auto-update-conda: false
48+
auto-activate-base: false
49+
show-channel-urls: true
50+
51+
- name: Build and upload conda packages
52+
uses: uibcdf/action-build-and-upload-conda-packages@v1.4.0
53+
id: conda-build-and-upload
54+
with:
55+
python-version: 3.11
56+
meta_yaml_dir: conda-recipe
57+
user: sea-lab
58+
token: ${{ secrets.ANACONDA_TOKEN }}
59+
60+
- name: Re-format output paths
61+
id: reformat-paths
62+
# Needed to have the correct newline-separated files format for the following release step
63+
run: |
64+
paths=$(tr ' ' '\n' <<< "${{steps.conda-build-and-upload.outputs.paths}}")
65+
echo "newline-separated-paths=$paths" >> $GITHUB_OUTPUT
66+
67+
- name: Create GitHub release
68+
uses: softprops/action-gh-release@v2
69+
with:
70+
tag_name: ${{ github.ref_name }}
71+
name: ${{ github.ref_name }} # Replace with the name for your release
72+
generate_release_notes: true
73+
fail_on_unmatched_files: true
74+
files: ${{steps.reformat-paths.outputs.newline-separated-paths}}

README.md

Lines changed: 41 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -3,40 +3,55 @@ Open-source Flexible Library for Analytical and Semi-analytical Hydrodynamics
33

44
## About The OpenFLASH Project
55

6-
The OpenFLASH project is a Python package designed for solving boundary value problems using eigenfunction expansion methods. It provides a modular framework for defining complex geometries, setting up multi-domain problems, performing numerical computations, and analyzing results, particularly in fields like fluid dynamics.
6+
The OpenFLASH project is a Python package designed for solving hydrodynamic boundary value problems using eigenfunction expansion methods. It provides a modular framework for defining complex geometries, setting up multi-domain problems, performing numerical computations, and analyzing results, particularly for linear potential flow hydrodynamics. It can be significantly faster than Boundary Element Method calculations although is restricted to certain geometries (currently axisymmetric compound cylinders).
77

8-
When referencing this work, please reference our `docs/citations.rst`
9-
10-
**License:**
8+
When referencing this work, please reference our `citation.cff`.
119

1210
This project is licensed under the MIT License. See the `LICENSE` file for details.
1311

14-
**How to Run the Python Code:**
12+
## Installation
13+
Three common installation options are shown below. For more details, see the [installation](https://symbiotic-engineering.github.io/OpenFLASH/installation.html) section of the docs.
1514

16-
1. **Install the package:**
17-
```bash
18-
pip install git+[https://github.com/symbiotic-engineering/semi-analytical-hydro.git](https://github.com/symbiotic-engineering/semi-analytical-hydro.git)
19-
```
20-
2. **Install dependencies:** Navigate to the project directory (if you cloned it) and run:
21-
```bash
22-
pip install -r requirements.txt
23-
```
24-
3. **Explore the `docs/` and `package/test` directory:** These directories contain scripts and notebooks demonstrating how to use the OpenFLASH framework for different problems. Run these examples to understand the workflow.
25-
4. **Refer to the documentation in the `docs/` directory:** The documentation provides detailed information on the different modules and classes within the `open-flash` package.
15+
Option 1: via pypi (recommended for users who manage environments with venv or similar)
2616

27-
## MATLAB
28-
We also have a MATLAB code version, although the Python version is intended as primary for future development. MATLAB only supports bodies consisting of 2 concentric cylinders, rather than the arbitrary N concentric cylinders in the Python package.
17+
```bash
18+
pip install open-flash
19+
```
2920

30-
See `matlab/src/run_MEEM.m` for the symbolic and numeric code, see `matlab/test/` for some scripts to get results, and `matlab/dev` for various matlab experiments.
21+
Option 2: via conda (recommended for users who manage environments with conda)
22+
23+
```bash
24+
conda create -n openflash-env hopeonthestack::open-flash
25+
conda activate openflash-env
26+
```
27+
28+
Option 3: via git (recommended for developers)
3129

30+
Note - if you are a developer outside of the SEA Lab, please create a fork and clone your fork.
31+
1. **Clone the repository:**
32+
```bash
33+
git clone https://github.com/symbiotic-engineering/OpenFLASH.git
34+
cd OpenFLASH
35+
```
36+
2. **Install the package:**
37+
```bash
38+
pip install -e .
39+
```
40+
3. **Install dependencies:**
41+
```bash
42+
pip install -r requirements.txt
43+
```
3244

33-
## References
45+
## Usage
3446

35-
The following publications are relevant to this package:
47+
Please see our [documentation](https://symbiotic-engineering.github.io/OpenFLASH/) and [tutorial notebook](https://symbiotic-engineering.github.io/OpenFLASH/tutorial_walk.html). The documentation provides detailed instructions and API reference for the different modules and classes within the `openflash` package.
3648

37-
1. I. K. Chatjigeorgiou, *Analytical Methods in Marine Hydrodynamics*. Cambridge: Cambridge University Press, 2018. doi: 10.1017/9781316838983.
38-
2. F. P. Chau and R. W. Yeung, “Inertia and Damping of Heaving Compound Cylinders,” presented at the 25th International Workshop on Water Waves and Floating Bodies, Harbin, China, Jan. 2010. Accessed: Sep. 27, 2023. [Online]. Available: https://www.academia.edu/73219479/Inertia_and_Damping_of_Heaving_Compound_Cylinders_Fun
39-
3. F. P. Chau and R. W. Yeung, “Inertia, Damping, and Wave Excitation of Heaving Coaxial Cylinders,” presented at the ASME 2012 31st International Conference on Ocean, Offshore and Arctic Engineering, American Society of Mechanical Engineers Digital Collection, Aug. 2013, pp. 803–813. doi: 10.1115/OMAE2012-83987.
40-
4. R. W. Yeung, “Added mass and damping of a vertical cylinder in finite-depth waters,” *Appl. Ocean Res.*, vol. 3, no. 3, pp. 119–133, Jul. 1981, doi: 10.1016/0141-1187(81)90101-2.
41-
5. D. Son, V. Belissen, and R. W. Yeung, “Performance validation and optimization of a dual coaxial-cylinder ocean-wave energy extractor,” *Renew. Energy*, vol. 92, pp. 192–201, Jul. 2016, doi: 10.1016/j.renene.2016.01.032.
42-
6. K. Kokkinowrachos, S. Mavrakos, and S. Asorakos, “Behaviour of vertical bodies of revolution in waves,” *Ocean Eng.*, vol. 13, no. 6, pp. 505–538, Jan. 1986, doi: 10.1016/0029-8018(86)90037-5.
49+
If you prefer not to utilize the package programatically, the model can also be run with an [interactive web app](http://symbiotic-engineering.github.io/OpenFLASH/app_streamlit.html) (the site may take several seconds to load).
50+
51+
## Theory
52+
Please see our [equations documentation](https://symbiotic-engineering.github.io/OpenFLASH/multi_equations.html) and [references](https://symbiotic-engineering.github.io/OpenFLASH/citations.html) for mathematical background and derivations as well as validation information.
53+
54+
## MATLAB
55+
We also have a MATLAB code version, although the Python package is intended as primary for future development. MATLAB only supports bodies consisting of 2 concentric cylinders, rather than the arbitrary N concentric cylinders in the Python package.
56+
57+
See `matlab/src/run_MEEM.m` for the symbolic and numeric code, see `matlab/test/` for some scripts to get results, and `matlab/dev` for various matlab experiments.

calkit.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
owner: symbiotic-engineering
2+
name: openflash
3+
title: OpenFLASH
4+
description:
5+
git_repo_url: https://github.com/symbiotic-engineering/OpenFLASH

conda-recipe/meta.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package:
22
name: open-flash
3-
version: "0.2.2"
3+
version: {{ GIT_DESCRIBE_TAG }}
44

55
source:
66
path: ..
@@ -27,6 +27,7 @@ requirements:
2727
- h5netcdf
2828
- xarray
2929
- streamlit
30+
- ipykernel
3031

3132
about:
3233
home: https://github.com/symbiotic-engineering/semi-analytical-hydro

conda-recipe/meta.yaml.bak

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

docs/app_walk.rst

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
App Module
55
============
66

7-
.. automodule:: app
8-
:members:
9-
:undoc-members:
10-
:show-inheritance:
7+
.. .. automodule:: app
8+
.. :members:
9+
.. :undoc-members:
10+
.. :show-inheritance:
1111
1212
.. _app-overview:
1313

@@ -22,11 +22,13 @@ Running the App
2222
There are two ways to run the Streamlit application:
2323

2424
**Option 1: Use the Web-Based App (Recommended)**
25+
2526
The app is deployed and can be run directly in your web browser, with no installation required. This is the easiest way to get started.
2627

2728
* **Interactive Streamlit App:** `Launch App <app_streamlit.html>`_
2829

2930
**Option 2: Run the App Locally**
31+
3032
Ensure that you have Streamlit and the `openflash` package installed.
3133

3234
.. code-block:: bash

0 commit comments

Comments
 (0)