Skip to content

Commit 478d501

Browse files
authored
[WIP] Change dependencies to crates published on crates.io. (feos-org#5)
1 parent 67ebd69 commit 478d501

File tree

9 files changed

+486
-25
lines changed

9 files changed

+486
-25
lines changed

.github/workflows/documentation.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
with:
2727
manylinux: auto
2828
command: build
29-
args: --release --out dist --no-sdist --cargo-extra-args="--no-default-features --features openblas-static"
29+
args: --release --out dist --no-sdist
3030
- name: Install module
3131
run: |
3232
pip install feos --no-index --find-links dist --force-reinstall

.github/workflows/release.yml

Lines changed: 147 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,147 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags: ["v*"]
6+
7+
jobs:
8+
linux:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
- uses: actions/setup-python@v2
13+
with:
14+
python-version: 3.9
15+
- name: Build Wheels
16+
uses: messense/maturin-action@v1
17+
with:
18+
manylinux: auto
19+
command: build
20+
args: --release --out dist --no-sdist
21+
- name: Upload wheels
22+
uses: actions/upload-artifact@v2
23+
with:
24+
name: dist
25+
path: dist
26+
27+
macos:
28+
runs-on: macos-latest
29+
steps:
30+
- uses: actions/checkout@v2
31+
- uses: actions/setup-python@v2
32+
with:
33+
python-version: 3.9
34+
architecture: x64
35+
- name: Install Rust toolchain
36+
uses: actions-rs/toolchain@v1
37+
with:
38+
toolchain: stable
39+
profile: minimal
40+
default: true
41+
- name: Build wheels - x86_64
42+
uses: messense/maturin-action@v1
43+
with:
44+
target: x86_64
45+
args: --release --out dist --no-sdist
46+
- name: Build wheels - universal2
47+
uses: messense/maturin-action@v1
48+
with:
49+
args: --release --universal2 --out dist --no-sdist
50+
- name: Upload wheels
51+
uses: actions/upload-artifact@v2
52+
with:
53+
name: dist
54+
path: dist
55+
56+
windows:
57+
runs-on: windows-latest
58+
strategy:
59+
matrix:
60+
target: [x64, x86]
61+
steps:
62+
- uses: actions/checkout@v2
63+
- uses: actions/setup-python@v2
64+
with:
65+
python-version: 3.9
66+
architecture: ${{ matrix.target }}
67+
- name: Install Rust toolchain
68+
uses: actions-rs/toolchain@v1
69+
with:
70+
toolchain: stable
71+
profile: minimal
72+
default: true
73+
- name: Build wheels
74+
uses: messense/maturin-action@v1
75+
with:
76+
target: ${{ matrix.target }}
77+
args: --release --out dist --no-sdist
78+
- name: Upload wheels
79+
uses: actions/upload-artifact@v2
80+
with:
81+
name: dist
82+
path: dist
83+
84+
deploy-pypi:
85+
name: Publish wheels to PyPI and TestPyPI
86+
runs-on: ubuntu-latest
87+
needs: [linux, windows, macos]
88+
steps:
89+
- uses: actions/download-artifact@v2
90+
with:
91+
name: dist
92+
path: dist
93+
- uses: actions/setup-python@v2
94+
with:
95+
python-version: 3.9
96+
- name: Publish to PyPi
97+
env:
98+
TWINE_USERNAME: __token__
99+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
100+
run: |
101+
pip install --upgrade twine
102+
twine upload --skip-existing dist/*
103+
104+
build-documentation:
105+
runs-on: ubuntu-latest
106+
steps:
107+
- uses: actions/checkout@v2
108+
- name: Setup python
109+
uses: actions/setup-python@v2
110+
with:
111+
python-version: 3.9
112+
- name: Install pandoc
113+
run: sudo apt-get install -y pandoc
114+
- name: Install python dependencies
115+
run: |
116+
pip install sphinx sphinx-bootstrap-theme nbsphinx ipython pygments
117+
- name: Build Wheels
118+
uses: messense/maturin-action@v1
119+
with:
120+
manylinux: auto
121+
command: build
122+
args: --release --out dist --no-sdist
123+
- name: Install module
124+
run: |
125+
pip install feos --no-index --find-links dist --force-reinstall
126+
- name: Build documentation
127+
run: sphinx-build docs/ public/ -b html
128+
- name: Upload artifacts
129+
uses: actions/upload-artifact@v2
130+
with:
131+
name: documentation
132+
path: public
133+
134+
release-documentation:
135+
needs: [build-documentation]
136+
runs-on: ubuntu-latest
137+
steps:
138+
- name: Download artifacts
139+
uses: actions/download-artifact@v1
140+
with:
141+
name: documentation
142+
path: public
143+
- name: Deploy documentation to gh-pages
144+
uses: peaceiris/actions-gh-pages@v3
145+
with:
146+
github_token: ${{ secrets.GITHUB_TOKEN }}
147+
publish_dir: ./public

.github/workflows/wheels.yml

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
name: Build Wheels
2+
on:
3+
push:
4+
branches: [main]
5+
pull_request:
6+
branches: [main]
7+
jobs:
8+
linux:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
- uses: actions/setup-python@v2
13+
with:
14+
python-version: 3.9
15+
- name: Build Wheels
16+
uses: messense/maturin-action@main
17+
with:
18+
manylinux: auto
19+
command: build
20+
args: --release --out dist --no-sdist
21+
- name: Upload wheels
22+
uses: actions/upload-artifact@v2
23+
with:
24+
name: dist
25+
path: dist
26+
macos:
27+
runs-on: macos-latest
28+
steps:
29+
- uses: actions/checkout@v2
30+
- uses: actions/setup-python@v2
31+
with:
32+
python-version: 3.9
33+
architecture: x64
34+
- name: Install Rust toolchain
35+
uses: actions-rs/toolchain@v1
36+
with:
37+
toolchain: stable
38+
profile: minimal
39+
default: true
40+
- name: Build wheels - x86_64
41+
uses: messense/maturin-action@main
42+
with:
43+
target: x86_64
44+
args: --release --out dist --no-sdist
45+
- name: Build wheels - universal2
46+
uses: messense/maturin-action@main
47+
with:
48+
args: --release --universal2 --out dist --no-sdist
49+
- name: Upload wheels
50+
uses: actions/upload-artifact@v2
51+
with:
52+
name: dist
53+
path: dist
54+
windows:
55+
runs-on: windows-latest
56+
strategy:
57+
matrix:
58+
target: [x64, x86]
59+
steps:
60+
- uses: actions/checkout@v2
61+
- uses: actions/setup-python@v2
62+
with:
63+
python-version: 3.9
64+
architecture: ${{ matrix.target }}
65+
- name: Install Rust toolchain
66+
uses: actions-rs/toolchain@v1
67+
with:
68+
toolchain: stable
69+
profile: minimal
70+
default: true
71+
- name: Build wheels
72+
uses: messense/maturin-action@main
73+
with:
74+
target: ${{ matrix.target }}
75+
args: --release --out dist --no-sdist
76+
- name: Upload wheels
77+
uses: actions/upload-artifact@v2
78+
with:
79+
name: dist
80+
path: dist

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Changelog
2+
All notable changes to this project will be documented in this file.
3+
4+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6+
7+
## [Unreleased]
8+
9+
## [0.1.0] - 2022-01-14
10+
### Added
11+
- Initial release

Cargo.toml

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,26 @@
11
[package]
22
name = "feos"
33
version = "0.1.0"
4-
authors = ["Gernot Bauer <bauer@itt.uni-stuttgart.de>", "Philipp Rehner <rehner@itt.uni-stuttgart.de>"]
4+
authors = ["Gernot Bauer <bauer@itt.uni-stuttgart.de>", "Philipp Rehner <prehner@ethz.ch>"]
55
edition = "2018"
66
rust-version = "1.53"
7+
readme = "README.md"
8+
license = "MIT OR Apache-2.0"
9+
description = "FeOs - A framework for equations of state and classical density functional theory."
10+
homepage = "https://github.com/feos-org"
11+
repository = "https://github.com/feos-org/feos"
12+
keywords = ["physics", "thermodynamics", "equations_of_state", "phase_equilibria", "density_functional_theory"]
13+
categories = ["science"]
714

815
[lib]
916
crate-type = ["cdylib"]
1017

1118
[dependencies]
12-
quantity = "0.3"
13-
feos-core = "0.1"
14-
feos-dft = { git = "https://github.com/feos-org/feos-dft", branch = "main" }
15-
feos-pcsaft = { git = "https://github.com/feos-org/feos-pcsaft", branch = "main", features = ["python"] }
19+
quantity = { version = "0.4", features = ["python"] }
20+
feos-core = { version = "0.1", features = ["python"] }
21+
feos-dft = { version = "0.1", features = ["python"] }
22+
feos-pcsaft = { version = "0.1", features = ["python"] }
1623

1724
[dependencies.pyo3]
18-
version = "0.14"
19-
features = ["extension-module", "abi3", "abi3-py36"]
20-
21-
[features]
22-
default = ["openblas-system"]
23-
openblas-system = ["feos-pcsaft/openblas-system"]
24-
openblas-static = ["feos-pcsaft/openblas-static"]
25-
intel-mkl-system = ["feos-pcsaft/intel-mkl-system"]
26-
intel-mkl-static = ["feos-pcsaft/intel-mkl-static"]
27-
netlib-system = ["feos-pcsaft/netlib-system"]
28-
netlib-static = ["feos-pcsaft/netlib-static"]
25+
version = "0.15"
26+
features = ["extension-module", "abi3", "abi3-py37"]

README.md

Lines changed: 34 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,28 @@
11
# FeOs - A Framework for Equations of State and Classical Density Functional Theory
22

33
[![documentation](https://img.shields.io/badge/docs-github--pages-blue)](https://feos-org.github.io/feos/)
4+
[![repository](https://img.shields.io/pypi/v/feos)](https://pypi.org/project/feos/)
45

5-
This is the repository of the `FeOs` Python package.
6+
The `FeOs` package conveniently provides bindings to the Rust implementations of different equation of state and Helmholtz energy functional models in a single Python package.
7+
8+
## Models
9+
The following models are currently published as part of the `FeOs` framework
10+
11+
|name|description|eos|dft|
12+
|-|-|:-:|:-:|
13+
|[`feos-pcsaft`](https://github.com/feos-org/feos-pcsaft)|perturbed-chain (polar) statistical associating fluid theory|&#128504;|&#128504;|
14+
15+
The list is being expanded continuously. Currently under development are implementations of ePC-SAFT, (heterosegmented) group contribution PC-SAFT and equations of state/Helmholtz energy functionals for model fluids like LJ and Mie fluids.
16+
17+
Other public repositories that implement models within the `FeOs` framework, but are currently not part of the `feos` Python package, are
18+
19+
|name|description|eos|dft|
20+
|-|-|:-:|:-:|
21+
|[`feos-fused-chains`](https://github.com/feos-org/feos-fused-chains)|heterosegmented fused-sphere chain functional||&#128504;|
622

723
## Installation
824

9-
Currently, `FeOs` is not hosted on pypi because we still work on the interfaces.
10-
Once it is on pypi, you will be able to install it via `pip`:
25+
`FeOs` can be installed via `pip` and runs on Windows, Linux and macOS:
1126

1227
```
1328
pip install feos
@@ -16,19 +31,30 @@ pip install feos
1631
## Building from source
1732

1833
To compile the code you need the Rust compiler (`rustc >= 1.53`) and `maturin` installed.
19-
For development, use
34+
To install the package directly into the active environment, use
2035

2136
```
2237
maturin develop --release
2338
```
2439

25-
For `develop` to work you need openBLAS installed and in your PATH.
26-
2740
To build wheels, use
2841

2942
```
30-
maturin build --release --out dist --no-sdist --cargo-extra-args="--no-default-features --features openblas-static"
43+
maturin build --release --out dist --no-sdist
3144
```
3245

33-
which statically links to openBLAS so that the wheel is manylinux compatible.
46+
## Documentation
47+
48+
For a documentation of the Python API, Python examples, and a guide to the underlying Rust framework check out the [documentation](https://feos-org.github.io/feos/).
49+
50+
## Developers
51+
52+
This software is currently maintained by members of the groups of
53+
- Prof. Joachim Gross, [Institute of Thermodynamics and Thermal Process Engineering (ITT), University of Stuttgart](https://www.itt.uni-stuttgart.de/)
54+
- Prof. André Bardow, [Energy and Process Systems Engineering (EPSE), ETH Zurich](https://epse.ethz.ch/)
55+
56+
## Contributing
57+
58+
`FeOs` grew from the need to maintain a common codebase used within the scientific work done in our groups. We share the code publicly as a platform to publish our own research but also encourage other researchers and developers to contribute their own models or implementations of existing equations of state.
3459

60+
If you want to contribute to ``FeOs``, there are several ways to go: improving the documentation and helping with language issues, testing the code on your systems to find bugs, adding new models or algorithms, or providing feature requests. Feel free to message us if you have questions or open an issue in this or the model-specific repositories to discuss improvements.

docs/rustguide/getting_started.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ These crates offer abstractions for tasks that are common for all equations of s
4040
Using ``core`` and ``dft``, the following *implementations* of equations of state and functionals are currently available:
4141

4242
* ``feos-pcsaft``: the `PC-SAFT equation of state <https://pubs.acs.org/doi/abs/10.1021/ie0003887>`_.
43+
44+
The following crates are actively worked on and will be released in the near future:
45+
4346
* ``feos-gc-pcsaft``: the `hetero-segmented group contribution <https://aip.scitation.org/doi/full/10.1063/1.4945000>`_ method of the PC-SAFT equation of state.
4447
* ``feos-uv-theory``: the equation of state based on UV-Theory.
4548
* ``feos-thol``: the `Thol equation of state <https://aip.scitation.org/doi/full/10.1063/1.4945000>`_ for pure Lennard-Jones fluids.

0 commit comments

Comments
 (0)