Skip to content

Commit

Permalink
Merge branch 'release/v0.2.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
wpk committed Apr 11, 2023
2 parents c61087e + 2829af4 commit 39437d5
Show file tree
Hide file tree
Showing 124 changed files with 59,377 additions and 134 deletions.
92 changes: 50 additions & 42 deletions .cruft.json
Original file line number Diff line number Diff line change
@@ -1,44 +1,52 @@
{
"template": "https://github.com/wpk-nist-gov/cookiecutter-pypackage.git",
"commit": "c209d4c07a6142de87d6b1600f7319ebc69729cd",
"checkout": "feature/markdown",
"skip": [
"src/thermoextrap/__init__.py",
"environment.yaml",
"HISTORY.md",
"AUTHORS.md",
"MANIFEST.in",
"README.md",
"docs/spelling_wordlist.txt",
"environment/"
],
"context": {
"cookiecutter": {
"full_name": "William P. Krekelberg",
"email": "[email protected]",
"github_username": "usnistgov",
"pypi_username": "wpk-nist",
"conda_channel": "wpk-nist",
"project_name": "thermo-extrap",
"project_slug": "thermoextrap",
"_copy_without_render": [
"*.html",
"docs/_templates/*.rst",
"docs/_templates/autosummary/*.rst",
"docs/_templates/autodocsumm/*.rst"
],
"project_short_description": "Thermodynamic extrapolation",
"version": "0.0.1",
"use_pytest": "y",
"use_pypi_deployment_with_travis": "n",
"command_line_interface": "No command-line interface",
"create_author_file": "y",
"open_source_license": "NIST license",
"sphinx_auto": "autosummary",
"sphinx_use_autodocsumm": "y",
"sphinx_theme": "sphinx_book_theme",
"_template": "https://github.com/wpk-nist-gov/cookiecutter-pypackage.git"
}
},
"directory": null
"template": "https://github.com/wpk-nist-gov/cookiecutter-pypackage.git",
"commit": "be1b9cec709f862f8de5132e517a42db90758f04",
"checkout": "feature/markdown",
"skip": [
"src/thermoextrap/__init__.py",
"environment.yaml",
"HISTORY.md",
"AUTHORS.md",
"MANIFEST.in",
"README.md",
"docs/spelling_wordlist.txt",
"environment/dev-extras.yaml",
"environment/docs-extras.yaml",
"environment/test-extras.yaml",
"docs/index.md",
"docs/installation.md",
".gitignore"
],
"context": {
"cookiecutter": {
"full_name": "William P. Krekelberg",
"email": "[email protected]",
"github_username": "usnistgov",
"pypi_username": "wpk-nist",
"conda_channel": "wpk-nist",
"project_name": "thermoextrap",
"project_slug": "thermoextrap",
"_copy_without_render": [
"*.html",
"docs/_templates/*.rst",
"docs/_templates/autosummary/*.rst",
"docs/_templates/autodocsumm/*.rst",
"docs/_static/*",
"docs/_static/css/*",
"docs/_static/js/*"
],
"project_short_description": "Thermodynamic extrapolation",
"version": "0.0.1",
"use_pytest": "y",
"use_pypi_deployment_with_travis": "n",
"command_line_interface": "No command-line interface",
"create_author_file": "y",
"open_source_license": "NIST license",
"sphinx_auto": "autosummary",
"sphinx_use_autodocsumm": "y",
"sphinx_theme": "sphinx_book_theme",
"_template": "https://github.com/wpk-nist-gov/cookiecutter-pypackage.git"
}
},
"directory": null
}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -112,3 +112,4 @@ pyrightconfig.json
/dist-conda/
/cruft.patch
/docs/jupyter_execute/
/docs/reference/generated/
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "examples/data"]
path = examples/data
url = [email protected]:usnistgov/thermoextrap-data.git
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ repos:
- id: flake8
stages: [manual]
additional_dependencies: [flake8-docstrings]
exclude: ^tests/|docs/notebooks/gpr/|src/thermoextrap/legacy/|^docs/conf.py|^setup.py
exclude: ^tests/|examples/gpr_active_learning/|src/thermoextrap/legacy/|^docs/conf.py|^setup.py
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.1.1
hooks:
Expand Down
18 changes: 12 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ You can contribute in many ways:

### Report Bugs

Report bugs at <https://github.com/usnistgov/thermo-extrap/issues>.
Report bugs at <https://github.com/usnistgov/thermoextrap/issues>.

If you are reporting a bug, please include:

Expand All @@ -29,13 +29,13 @@ and "help wanted" is open to whoever wants to implement it.

### Write Documentation

`thermo-extrap` could always use more documentation, whether as part of the
official `thermo-extrap` docs, in docstrings, or even on the web in blog posts,
`thermoextrap` could always use more documentation, whether as part of the
official `thermoextrap` docs, in docstrings, or even on the web in blog posts,
articles, and such.

### Submit Feedback

The best way to send feedback is to file an issue at <https://github.com/usnistgov/thermo-extrap/issues>.
The best way to send feedback is to file an issue at <https://github.com/usnistgov/thermoextrap/issues>.

If you are proposing a feature:

Expand Down Expand Up @@ -94,7 +94,13 @@ Ready to contribute? Here's how to set up `thermoextrap` for local development.
git clone [email protected]:your_name_here/thermoextrap.git
```

3. Create development environment. Using the makefile will install a development version using mamba.
The example notebooks require the `examples/data` submodule to be loaded.

```bash
git submodule update --init --recursive
```

3. Create development environment. Using the `make` will install a development version using mamba.

```bash
make mamba-dev
Expand Down Expand Up @@ -151,7 +157,7 @@ Ready to contribute? Here's how to set up `thermoextrap` for local development.
tox
```
or using the makefile:
or using the `make`:
```bash
make test-all
Expand Down
31 changes: 21 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,25 @@
[black-badge]: https://img.shields.io/badge/code%20style-black-000000.svg
[black-link]: https://github.com/ambv/black
[pypi-badge]: https://img.shields.io/pypi/v/thermoextrap
<!-- [pypi-badge]: https://badge.fury.io/py/thermo-extrap -->
<!-- [pypi-badge]: https://badge.fury.io/py/thermoextrap -->
[pypi-link]: https://pypi.org/project/thermoextrap
[docs-badge]: https://img.shields.io/badge/docs-sphinx-informational
[docs-link]: https://pages.nist.gov/thermo-extrap/
[docs-link]: https://pages.nist.gov/thermoextrap/
[repo-badge]: https://img.shields.io/badge/--181717?logo=github&logoColor=ffffff
[repo-link]: https://github.com/usnistgov/thermo-extrap
[repo-link]: https://github.com/usnistgov/thermoextrap
[conda-badge]: https://img.shields.io/conda/v/wpk-nist/thermoextrap
[conda-link]: https://anaconda.org/wpk-nist/thermoextrap
<!-- Use total link so works from anywhere -->
[license-badge]: https://img.shields.io/pypi/l/cmomy?color=informational
[license-link]: https://github.com/usnistgov/thermo-extrap/blob/master/LICENSE
[license-link]: https://github.com/usnistgov/thermoextrap/blob/master/LICENSE
<!-- For more badges, see https://shields.io/category/other and https://naereen.github.io/badges/ -->

[numpy]: https://numpy.org
[Numba]: https://numba.pydata.org/
[xarray]: https://docs.xarray.dev/en/stable/
[cmomy]: https://github.com/usnistgov/cmomy
[gpr-link]: https://github.com/usnistgov/thermo-extrap/tree/master/docs/notebooks/gpr
[notebook-link]: https://github.com/usnistgov/thermo-extrap/tree/master/docs/notebooks
[gpr-link]: https://github.com/usnistgov/thermoextrap/tree/master/examples/gpr_active_learning
[notebook-link]: https://github.com/usnistgov/thermoextrap/tree/master/examples/usage



Expand Down Expand Up @@ -92,6 +92,19 @@ If you install `thermoextrap` with conda, there are additional optional dependen
pip install tensorflow tensorflow-probability gpflow
```

To install from source do the following:
```bash
git clone [email protected]:usnistgov/thermoextrap.git
cd thermoextrap
pip install . [-e]
```

To (optionally) include the example data do the following:
```bash
git submodule update --init --recursive
```


## Example usage

```python
Expand All @@ -103,16 +116,14 @@ import thermoextrap

## Documentation

See the [documentation][docs-link] for a look at `thermo-extrap` in action.
See the [documentation][docs-link] for a look at `thermoextrap` in action.

To have a look at using `thermo-extrap` with Gaussian process regression, look in the [gpr][docs/notebooks/gpr] directory.
To have a look at using `thermoextrap` with Gaussian process regression, look in the [gpr][docs/notebooks/gpr] directory.

## License

This is free software. See [LICENSE][license-link].

## Related wor

## Related work

This package extensively uses the [cmomy] package to handle central comoments.
Expand Down
14 changes: 7 additions & 7 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@

html_context = {
"github_user": "usnistgov",
"github_repo": "thermo-extrap",
"github_repo": "thermoextrap",
"github_version": "master",
"doc_path": "docs",
}
Expand Down Expand Up @@ -231,7 +231,7 @@
master_doc = "index"

# General information about the project.
project = "thermo-extrap"
project = "thermoextrap"
copyright = "2021, William P. Krekelberg"
author = "William P. Krekelberg"

Expand Down Expand Up @@ -292,7 +292,7 @@
html_theme_options = dict(
# analytics_id='' this is configured in rtfd.io
# canonical_url="",
repository_url="https://github.com/usnistgov/thermo-extrap",
repository_url=f"https://github.com/{github_username}/thermoextrap",
repository_branch=html_context["github_version"],
path_to_docs=html_context["doc_path"],
# use_edit_page_button=True,
Expand Down Expand Up @@ -374,7 +374,7 @@
(
master_doc,
"thermoextrap.tex",
"thermo-extrap Documentation",
"thermoextrap Documentation",
"William P. Krekelberg",
"manual",
),
Expand All @@ -389,7 +389,7 @@
(
master_doc,
"thermoextrap",
"thermo-extrap Documentation",
"thermoextrap Documentation",
[author],
1,
),
Expand All @@ -405,7 +405,7 @@
(
master_doc,
"thermoextrap",
"thermo-extrap Documentation",
"thermoextrap Documentation",
author,
"thermoextrap",
"One line description of project.",
Expand Down Expand Up @@ -482,7 +482,7 @@ def linkcode_resolve(domain, info):

fn = os.path.relpath(fn, start=os.path.dirname(thermoextrap.__file__))

return f"https://github.com/{github_username}/thermo-extrap/blob/{html_context['github_version']}/src/thermoextrap/{fn}{linespec}"
return f"https://github.com/{github_username}/thermoextrap/blob/{html_context['github_version']}/src/thermoextrap/{fn}{linespec}"


# only set spelling stuff if installed:
Expand Down
14 changes: 0 additions & 14 deletions docs/examples/beta-extrap.md

This file was deleted.

46 changes: 46 additions & 0 deletions docs/examples/create-symlinks.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# this creates symlinks to files in thermoextrap/examples directory.

exts=(ipynb md)


rm -rf usage
for path in $(cat *.md | grep '^usage/'); do

target="../../examples/"${path}
name=$(basename $target)

if [ -f $target ]; then
# has extension

base=${name%.*}
ext=${name##*.}

else
# no extension. Try to add one
for ext in ${exts[@]}; do
tmp=${target}.${ext}
if [ -f "${tmp}" ] ; then
base=$name
target=$tmp
break
fi
done
fi


new_dir=$(dirname $path)
mkdir -p $new_dir

total_target=$(realpath --relative-to=${new_dir} $target)

# echo "target $target"
# echo "base $base"
# echo "ext $ext"
echo "target $total_target"
echo "new_dir $new_dir"
echo ""


ln -s $total_target $new_dir

done
22 changes: 9 additions & 13 deletions docs/examples/gpr.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
<!-- :::{include} ../notebooks/gpr/README.md -->
<!-- ::: -->
# GP Models Utilizing Derivative Information and Active Learning

# Gaussian process regression

The notebooks associated with this section can be found [here](https://github.com/usnistgov/thermo-extrap/tree/master/docs/notebooks/gpr)
The notebooks contained here provide a set of tutorials for using the Gaussian Process Regression (GPR) modeling capabilities found in the {mod}`thermoextrap.gpr_active` module.
For all of the code an analysis necessary to reproduce the paper associated with the development of this module, please see the [example_projects](https://github.com/usnistgov/thermoextrap/tree/master/examples/gpr_active_learning) directory.

:::{include} ../../examples/gpr_active_learning/README.md
:start-after: <!-- start-docs-readme -->
:::

```{toctree}
:maxdepth: 1
../notebooks/gpr/README.md
../notebooks/gpr/IdealGas
../notebooks/gpr/analysis_LJ_GEMC
../notebooks/gpr/analysis_LJ_NPT
../notebooks/gpr/analysis_LJ_lnPi
../notebooks/gpr/analysis_adsorption
../notebooks/gpr/analysis_polymer
usage/gpr/Ideal_Gas
usage/gpr/LJ_lnPi
usage/gpr/SWF_Adsorption
```
Loading

0 comments on commit 39437d5

Please sign in to comment.