Skip to content

Commit ff1e719

Browse files
authored
Merge pull request #79 from openpathsampling/release-0.3
Release 0.3
2 parents f2d68e2 + 5b341e5 commit ff1e719

File tree

127 files changed

+8764
-259
lines changed

Some content is hidden

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

127 files changed

+8764
-259
lines changed

.coveragerc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
[report]
22
omit =
3-
*/paths_cli/tests/*
43
*/paths_cli/_installed_version.py
54
*/paths_cli/version.py
65
exclude_lines =
76
no-cov
87
def __repr__
98
raise NotImplementedError
9+
__name__ == "__main__":

.github/workflows/autorelease-default-env.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
INSTALL_AUTORELEASE="python -m pip install autorelease==0.2.6"
1+
# Vendored from Autorelease 0.5.1
2+
# Update by updating Autorelease and running `autorelease vendor actions`
3+
INSTALL_AUTORELEASE="python -m pip install autorelease==0.5.1"
24
if [ -f autorelease-env.sh ]; then
35
source autorelease-env.sh
46
fi

.github/workflows/autorelease-deploy.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1-
name: Autorelease
1+
# Vendored from Autorelease 0.5.1
2+
# Update by updating Autorelease and running `autorelease vendor actions`
3+
name: "Autorelease Deploy"
24
on:
35
release:
46
types: [published]
57

68
jobs:
79
deploy_pypi:
10+
if: ${{ github.repository == 'openpathsampling/openpathsampling-cli' }}
811
runs-on: ubuntu-latest
912
name: "Deploy to PyPI"
1013
steps:
@@ -17,7 +20,11 @@ jobs:
1720
if [ -f "autorelease-env.sh" ]; then
1821
cat autorelease-env.sh >> $GITHUB_ENV
1922
fi
20-
eval $INSTALL_AUTORELEASE
23+
if [ -f "./.autorelease/install-autorelease" ]; then
24+
source ./.autorelease/install-autorelease
25+
else
26+
eval $INSTALL_AUTORELEASE
27+
fi
2128
name: "Install autorelease"
2229
- run: |
2330
python -m pip install twine wheel

.github/workflows/autorelease-gh-rel.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
1-
name: Autorelease
1+
# Vendored from Autorelease 0.5.1
2+
# Update by updating Autorelease and running `autorelease vendor actions`
3+
name: "Autorelease Release"
24
on:
35
push:
46
branches:
7+
# TODO: this should come from yaml conf
58
- stable
69

710
jobs:
811
release-gh:
12+
if: ${{ github.repository == 'openpathsampling/openpathsampling-cli' }}
913
runs-on: ubuntu-latest
1014
name: "Cut release"
1115
steps:
@@ -18,7 +22,11 @@ jobs:
1822
if [ -f "autorelease-env.sh" ]; then
1923
cat autorelease-env.sh >> $GITHUB_ENV
2024
fi
21-
eval $INSTALL_AUTORELEASE
25+
if [ -f "./.autorelease/install-autorelease" ]; then
26+
source ./.autorelease/install-autorelease
27+
else
28+
eval $INSTALL_AUTORELEASE
29+
fi
2230
name: "Install autorelease"
2331
- run: |
2432
VERSION=`python setup.py --version`
@@ -27,3 +35,4 @@ jobs:
2735
autorelease-release --project $PROJECT --version $VERSION --token $AUTORELEASE_TOKEN
2836
env:
2937
AUTORELEASE_TOKEN: ${{ secrets.AUTORELEASE_TOKEN }}
38+
name: "Cut release"

.github/workflows/autorelease-prep.yml

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1-
name: "Autorelease"
1+
# Vendored from Autorelease 0.5.1
2+
# Update by updating Autorelease and running `autorelease vendor actions`
3+
name: "Autorelease testpypi"
24
on:
35
pull_request:
46
branches:
7+
# TODO: this should come from yaml conf
58
- stable
69

710
defaults:
@@ -10,6 +13,7 @@ defaults:
1013

1114
jobs:
1215
deploy_testpypi:
16+
if: ${{ github.repository == 'openpathsampling/openpathsampling-cli' }}
1317
runs-on: ubuntu-latest
1418
name: "Deployment test"
1519
steps:
@@ -22,10 +26,14 @@ jobs:
2226
if [ -f "autorelease-env.sh" ]; then
2327
cat autorelease-env.sh >> $GITHUB_ENV
2428
fi
25-
eval $INSTALL_AUTORELEASE
29+
if [ -f "./.autorelease/install-autorelease" ]; then
30+
source ./.autorelease/install-autorelease
31+
else
32+
eval $INSTALL_AUTORELEASE
33+
fi
2634
name: "Install autorelease"
2735
- run: |
28-
python -m pip install twine wheel
36+
python -m pip install twine wheel setuptools
2937
name: "Install release tools"
3038
- run: |
3139
bump-dev-version
@@ -41,6 +49,7 @@ jobs:
4149
repository_url: https://test.pypi.org/legacy/
4250
name: "Deploy to testpypi"
4351
test_testpypi:
52+
if: ${{ github.repository == 'openpathsampling/openpathsampling-cli' }}
4453
runs-on: ubuntu-latest
4554
name: "Test deployed"
4655
needs: deploy_testpypi
@@ -54,7 +63,17 @@ jobs:
5463
if [ -f "autorelease-env.sh" ]; then
5564
cat autorelease-env.sh >> $GITHUB_ENV
5665
fi
57-
eval $INSTALL_AUTORELEASE
66+
if [ -f "./.autorelease/install-autorelease" ]; then
67+
source ./.autorelease/install-autorelease
68+
else
69+
eval $INSTALL_AUTORELEASE
70+
fi
5871
name: "Install autorelease"
59-
- run: test-testpypi
60-
72+
- name: "Install testpypi version"
73+
run: install-testpypi
74+
- name: "Test testpypi version"
75+
run: |
76+
if [ -f "autorelease-env.sh" ]; then
77+
cat autorelease-env.sh >> $GITHUB_ENV
78+
fi
79+
test-testpypi

.github/workflows/test-suite.yml

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,20 +24,28 @@ jobs:
2424
strategy:
2525
matrix:
2626
CONDA_PY:
27-
- 3.9
28-
- 3.8
29-
- 3.7
30-
- 3.6
27+
- "3.12"
28+
- "3.11"
29+
- "3.10"
30+
INTEGRATIONS: [""]
31+
include:
32+
- CONDA_PY: "3.12"
33+
INTEGRATIONS: 'all-optionals'
3134

3235
steps:
3336
- uses: actions/checkout@v2
37+
with:
38+
fetch-depth: 2
3439
- uses: actions/setup-python@v2
3540
- uses: conda-incubator/setup-miniconda@v2
3641
with:
3742
auto-update-conda: true
3843
python-version: ${{ matrix.CONDA_PY }}
3944
- name: "Install testing tools"
4045
run: python -m pip install -r ./devtools/tests_require.txt
46+
- name: "Install integrations"
47+
if: matrix.INTEGRATIONS == 'all-optionals'
48+
run: conda install -c conda-forge -y openmm openmmtools mdtraj
4149
- name: "Install"
4250
run: |
4351
conda install pip
@@ -57,8 +65,13 @@ jobs:
5765
fi
5866
python autorelease_check.py --branch $BRANCH --even ${EVENT}
5967
- name: "Unit tests"
68+
env:
69+
PY_COLORS: "1"
6070
run: |
6171
python -c "import paths_cli"
6272
py.test -vv --cov --cov-report xml:cov.xml
63-
- name: "Report coverage"
64-
run: bash <(curl -s https://codecov.io/bash)
73+
- uses: codecov/codecov-action@v4
74+
with:
75+
files: ./cov.xml
76+
env:
77+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

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 David W.H. Swenson
3+
Copyright (c) 2019-2024 David W.H. Swenson and contributors
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

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[![Tests](https://github.com/openpathsampling/openpathsampling-cli/workflows/Tests/badge.svg)](https://github.com/openpathsampling/openpathsampling-cli/actions?query=workflow%3ATests)
1+
[![Tests](https://github.com/openpathsampling/openpathsampling-cli/actions/workflows/test-suite.yml/badge.svg)](https://github.com/openpathsampling/openpathsampling-cli/actions/workflows/test-suite.yml)
22
[![Documentation Status](https://readthedocs.org/projects/openpathsampling-cli/badge/?version=latest)](https://openpathsampling-cli.readthedocs.io/en/latest/?badge=latest)
33
[![Coverage Status](https://codecov.io/gh/openpathsampling/openpathsampling-cli/branch/master/graph/badge.svg)](https://codecov.io/gh/openpathsampling/openpathsampling-cli)
44
[![Maintainability](https://api.codeclimate.com/v1/badges/0d1ee29e1a05cfcdc01a/maintainability)](https://codeclimate.com/github/openpathsampling/openpathsampling-cli/maintainability)

autorelease-env.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
INSTALL_AUTORELEASE="python -m pip install autorelease==0.2.3 nose sqlalchemy dill"
1+
INSTALL_AUTORELEASE="python -m pip install autorelease==0.5 nose sqlalchemy dill"
22
PACKAGE_IMPORT_NAME=paths_cli

docs/compiling.rst

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
2+
Compiling
3+
=========
4+
5+
Let's start with an overview of terminology.:
6+
7+
* **Compiling**: The process of converting input in a text format,
8+
such as YAML or JSON, into OPS objects. Here we're focused on non-Python
9+
alternatives to using the standard Python interpreter to compile objects.
10+
* **Category**: The base category of object to be created (engine, CV,
11+
volume, etc.)
12+
* **Builder**: We will refer to a builder function, which creates an
13+
instance of a specific
14+
15+
Everything is created with plugins. There are two types of plugins used in
16+
the ``compiling`` subpackage:
17+
18+
* ``InstanceCompilerPlugin``: This is what you'll normally work with. These
19+
convert the input text to an instance of a specific OPS object (for
20+
example, an ``OpenMMEngine`` or an ``MDTrajFunctionCV``. In general, you
21+
do not create subclasses of ``InstanceCompilerPlugin`` -- there are
22+
subclasses specialized to engines (``EngineCompilerPlugin``), to CVs
23+
(``CVCompilerPlugin``), etc. You create *instances* of those subclasses.
24+
You write your builder function, and wrap in with in an instance of an
25+
``InstanceCompilerPlugin``.
26+
* ``CategoryPlugin``: These manage the plugins associated with a given
27+
features. Contributors will almost never need to create one of these.
28+
The only case in which you would need to create one of these is if you're
29+
creating a new *category* of object, i.e., something like an engine where
30+
users will have multiple options at the command line.
31+
32+
Other useful classes defined in the ``compiling`` subpackage include:
33+
34+
* ``Builder``: The ``Builder`` class is a convenience for creating builder
35+
functions. It takes either a callable or a string as input, where a string
36+
is treated as a path to an object to import at runtime. It also allows
37+
takes parameters ``remapper`` and ``after_build``, which are callables
38+
that act on the input dictionary before object creation (``remapper``) and
39+
on the created object after object creations (``after_build``).
40+
* ``CategoryCompiler``: This class manages plugins for a given category, as
41+
well as tracking named objects of that type. These are created
42+
automatically when plugins are registered; users do not need to create
43+
these.

0 commit comments

Comments
 (0)