Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
297 commits
Select commit Hold shift + click to select a range
0657882
Merge branch 'wizard' into sim-setup
dwhswenson Jun 18, 2021
266432c
First draft of new plugin infrastructure
dwhswenson Jul 4, 2021
d444895
fix deprecation warnings for OPS 1.5
dwhswenson Jul 6, 2021
d84a9fb
Fix tests for moved CVs in OPS 1.5
dwhswenson Jul 7, 2021
728db4d
Merge pull request #46 from dwhswenson/fix-tests-ops-1.5
dwhswenson Jul 7, 2021
47106e6
Add Wizard (skeleton form) to docs
dwhswenson Jul 7, 2021
e9dd815
Add test job with openmm etc integrations
dwhswenson Jul 7, 2021
ea29ac4
fix whitespace in yaml
dwhswenson Jul 7, 2021
b52c1ef
fix include in yaml
dwhswenson Jul 7, 2021
3b64ce7
fix typo in workflow
dwhswenson Jul 7, 2021
8dcd07d
fix workflow
dwhswenson Jul 7, 2021
e774caa
increase fetch-depth to help codecov
dwhswenson Jul 7, 2021
d07699e
... helps is fetch-depth is in the right heading
dwhswenson Jul 7, 2021
bbe0f85
starting on the wizard rewrite
dwhswenson Jul 24, 2021
2ba6390
finish test coverage
dwhswenson Jul 24, 2021
59b6fbe
Add test for bad MDTraj atom index input
dwhswenson Jul 24, 2021
4f3e53a
Add tests/wizard/__init__.py
dwhswenson Jul 24, 2021
0b33b79
no-cov on joke
dwhswenson Jul 24, 2021
45e77d6
long forgotten stash with lots of useful stuff
dwhswenson Jul 24, 2021
728083c
add tests/parsing/__init__.py
dwhswenson Jul 24, 2021
87029dd
tests for volumes combinations
dwhswenson Jul 24, 2021
ef1f086
fix for location of MDTrajTopology
dwhswenson Jul 24, 2021
55c2dbd
improvements to testing
dwhswenson Jul 24, 2021
c83eea3
update all commands to use new plugins
dwhswenson Jul 24, 2021
4ebfc42
Merge branch 'main' of github.com:openpathsampling/openpathsampling-c…
dwhswenson Jul 24, 2021
002555a
fix up tests
dwhswenson Jul 24, 2021
272087b
Clean up to remove unused stuff
dwhswenson Jul 24, 2021
e9a9b59
update example plugins; update some plugin docs
dwhswenson Jul 25, 2021
f7d923a
fully remove old OPSPlugin from tests
dwhswenson Jul 25, 2021
acc1304
plugin management docstrings
dwhswenson Jul 25, 2021
4b3ab8e
update docs on plugins; fix tests
dwhswenson Jul 25, 2021
e3ecd1e
Add tests for shooting
dwhswenson Jul 25, 2021
b6254ec
fix shooting tests
dwhswenson Jul 25, 2021
3597dd6
first steps toward autodocumenting yaml structures
dwhswenson Jul 26, 2021
1b2bab0
add json schema support to MDTraj CV
dwhswenson Jul 26, 2021
60eb119
Apply suggestions from code review
dwhswenson Jul 26, 2021
3d92cd2
misc review cleanup
dwhswenson Jul 26, 2021
4771349
Apply suggestions from code review
dwhswenson Jul 26, 2021
28d37f7
start using new parameters in volumes
dwhswenson Jul 27, 2021
ba3e668
Merge pull request #48 from dwhswenson/new_plugins
dwhswenson Jul 27, 2021
07b7d7c
Merge branch 'main' of github.com:openpathsampling/openpathsampling-c…
dwhswenson Jul 27, 2021
012e2f5
Merge pull request #41 from dwhswenson/wizard
dwhswenson Jul 27, 2021
1181edc
Merge branch 'main' of github.com:openpathsampling/openpathsampling-c…
dwhswenson Jul 27, 2021
76da8bc
mock => unittest.mock
dwhswenson Jul 27, 2021
345b77c
Some more refactoring of sim-setup
dwhswenson Jul 27, 2021
f703605
switched everything over to parameter/builder
dwhswenson Jul 27, 2021
548b389
remove now-unused classes
dwhswenson Jul 27, 2021
8f9fe2e
Start switch to plugins
dwhswenson Jul 29, 2021
379e5f1
add plugins files
dwhswenson Jul 29, 2021
e513680
Start toward registering parsing via plugins
dwhswenson Aug 10, 2021
bdb1ab9
proof of principle for plugin registration
dwhswenson Aug 10, 2021
f31b1c9
more updates to use the new plugin model
dwhswenson Aug 10, 2021
d4b3f29
remove old parsing from engines, cvs, volumes
dwhswenson Aug 11, 2021
c8bf0c3
add tests/parsing/utils
dwhswenson Aug 11, 2021
8163cfe
Remove old parsers: networks, schemes, strategies
dwhswenson Aug 11, 2021
769d3f7
skeleton of root_parser tests
dwhswenson Aug 13, 2021
1cd4885
some root parser tests
dwhswenson Aug 13, 2021
eb78804
more tests for root_parser
dwhswenson Aug 13, 2021
f0ee6ee
fix typo in error message
sroet Aug 23, 2021
5581252
Merge pull request #49 from sroet/sroet-patch-1
dwhswenson Aug 23, 2021
6d3f000
fix dropped simtk in OpenMM URLs
dwhswenson Sep 1, 2021
663a68d
remove other uses of simtk
dwhswenson Sep 2, 2021
7a9d041
Remove nc from descriptions of OPS files
dwhswenson Sep 2, 2021
70bdc3c
updates after code review
dwhswenson Sep 2, 2021
8e71c33
Merge pull request #50 from dwhswenson/fix-openmm-simtk-url
dwhswenson Sep 3, 2021
dd8396a
Merge branch 'main' of github.com:openpathsampling/openpathsampling-c…
dwhswenson Sep 3, 2021
4a8e50d
Apply suggestions from code review
dwhswenson Sep 4, 2021
8217eea
Merge pull request #51 from dwhswenson/update-help
dwhswenson Sep 4, 2021
59b890c
Some docstrings and tests for core
dwhswenson Sep 5, 2021
656a22e
Merge branch 'main' of github.com:openpathsampling/openpathsampling-c…
dwhswenson Sep 5, 2021
cb69db6
(most) tests for InstanceBuilder
dwhswenson Sep 5, 2021
eab9b4a
more tests in parsing core
dwhswenson Sep 5, 2021
2bd0eea
tests for helpers in compile command
dwhswenson Sep 5, 2021
f7cc88c
steps toward testing compile command
dwhswenson Sep 6, 2021
b64ea30
major refactor of root_paser
dwhswenson Sep 7, 2021
d77b8aa
Major rename: parsing => compiling
dwhswenson Sep 7, 2021
030679c
more tests for root_compiler
dwhswenson Sep 7, 2021
4b7dd7c
more cleanup to get tests running
dwhswenson Sep 7, 2021
ddc6a17
add test/commands/utils
dwhswenson Sep 7, 2021
ffbf6c5
cleanup; start to tests move scheme compiling
dwhswenson Sep 7, 2021
1b6f505
Fix the error_on_duplicate issue
dwhswenson Sep 8, 2021
ad714d9
fix other problem with duplication
dwhswenson Sep 8, 2021
1e531ba
more tests for compiling.schemes
dwhswenson Sep 8, 2021
71719d5
more testing/coverage
dwhswenson Sep 8, 2021
2f9dc3d
remove unneeded options for InputError
dwhswenson Sep 8, 2021
fdbd7a4
fix typo
dwhswenson Sep 8, 2021
43fec22
Renamings
dwhswenson Sep 8, 2021
4e74899
Rename: compiler_name => category
dwhswenson Sep 8, 2021
0318227
refactor for reusable get_installed_plugins
dwhswenson Sep 8, 2021
3daa542
add docs/compiling.rst
dwhswenson Sep 8, 2021
7fce8a5
compiling/__init__; and always error on duplicate
dwhswenson Sep 9, 2021
9d61206
Apply suggestions from code review
dwhswenson Sep 23, 2021
823ef0c
Update paths_cli/tests/compiling/test_volumes.py
dwhswenson Sep 23, 2021
454ff28
some fixes from review
dwhswenson Sep 23, 2021
571d283
redo reload modules after test
dwhswenson Sep 24, 2021
8904fd3
complete skipped tests in compiling/test_core
dwhswenson Sep 25, 2021
fb518ba
finish skipped tests in test_root_compiler
dwhswenson Sep 25, 2021
e463087
add compat.openmm to handle OpenMM imports
dwhswenson Sep 26, 2021
2dad4d8
fix name of unit when None
dwhswenson Sep 26, 2021
0b106e6
fix skiptest
dwhswenson Sep 26, 2021
ff4bc78
use custom_eval_int_strict_pos
dwhswenson Sep 26, 2021
63a0f33
bring coverage back to 100%
dwhswenson Sep 26, 2021
3fd2509
don't use endswith on possible None
dwhswenson Sep 26, 2021
854137c
cleanup per review comments
dwhswenson Sep 27, 2021
a43b2c0
Update paths_cli/compiling/core.py
dwhswenson Sep 27, 2021
8f6a797
Merge pull request #43 from dwhswenson/sim-setup
dwhswenson Sep 27, 2021
3cafb36
Merge branch 'main' into wizard-rewrite
dwhswenson Sep 27, 2021
f1df73f
Wizard rewrite for engines
dwhswenson Sep 30, 2021
ac15c65
clean up engines; rewrite cvs
dwhswenson Oct 2, 2021
3c45137
clean up CVs
dwhswenson Oct 2, 2021
4453c3a
Wizard works again!
dwhswenson Oct 6, 2021
71fbc69
switch codecov bash uploader for their github action
sroet Oct 6, 2021
40b359b
Merge pull request #53 from sroet/swap_codecov_bash_uploader
dwhswenson Oct 6, 2021
c357976
passing tests for most of CVs and half volumes
dwhswenson Oct 6, 2021
1be9867
only 3 failing tests now
dwhswenson Oct 7, 2021
abdbead
fix most tests
dwhswenson Oct 7, 2021
59b5770
tests pass locally
dwhswenson Oct 7, 2021
1bf6a89
Add missing files; make more args kwarg-only
dwhswenson Oct 7, 2021
f793f89
Drop Python 3.6 support
dwhswenson Oct 7, 2021
d2ee0a2
Merge pull request #55 from dwhswenson/drop-py36
dwhswenson Oct 8, 2021
37323f3
Merge branch 'main' of github.com:openpathsampling/openpathsampling-c…
dwhswenson Oct 8, 2021
da866bf
Add file location to CodeCov action
dwhswenson Oct 8, 2021
f8ed965
Merge pull request #56 from dwhswenson/codecov-fix
dwhswenson Oct 8, 2021
366dc73
Merge branch 'main' of github.com:openpathsampling/openpathsampling-c…
dwhswenson Oct 8, 2021
425f925
tests for wizard/helper.py
dwhswenson Oct 9, 2021
3660805
some tests & docstrings
dwhswenson Oct 21, 2021
bba408f
Rename plugins => plugin_registration
dwhswenson Oct 21, 2021
6cfc536
Start plugin_classes with LoadFromOPS
dwhswenson Oct 21, 2021
47c744a
move wizard object plugins into plugin_classes
dwhswenson Oct 21, 2021
36c887d
move WrapCategory to plugin_classes
dwhswenson Oct 22, 2021
f02a367
tests for wizard.parameters,standard_categories
dwhswenson Oct 22, 2021
7e6b55e
add test_parameters.py
dwhswenson Oct 22, 2021
0bc8270
unittest.mock
dwhswenson Oct 22, 2021
8290154
tests for plugin_registration
dwhswenson Oct 22, 2021
90ed290
separate compile's register_installed_plugins
dwhswenson Oct 23, 2021
bf38703
refactor get_text_from_context
dwhswenson Oct 23, 2021
0d706e6
start to tests for plugin_classes
dwhswenson Oct 23, 2021
0f0e0e0
Tests for object plugin classes
dwhswenson Oct 25, 2021
0a7b981
tests for WrapCategory
dwhswenson Oct 25, 2021
64572a7
finish plugin classes tests
dwhswenson Oct 25, 2021
93e5f9e
missing wizard tests
dwhswenson Oct 25, 2021
934040a
looks like all tests pass with full coverage
dwhswenson Oct 25, 2021
a88a677
some docstrings
dwhswenson Oct 26, 2021
b898478
docstrings
dwhswenson Oct 26, 2021
f8d0db4
add EvalHelperFunc, help for CVs, lambda_min/max
dwhswenson Oct 26, 2021
d7ec33d
fix use of LoadFromOPSFile
dwhswenson Oct 26, 2021
448088e
tests for EvalHelperFunc
dwhswenson Oct 26, 2021
0f14039
more help strings, add LoadFromOPS in volumes
dwhswenson Oct 26, 2021
f3344d5
switch _get_ops_object to use ask_enumerate_dict
dwhswenson Oct 26, 2021
7649c93
Apply suggestions from code review
dwhswenson Oct 27, 2021
9129def
import mock_wizard from mock_wizard
dwhswenson Oct 27, 2021
1474c8d
add debug logging to plugin registration
dwhswenson Oct 27, 2021
da5acdc
Error on duplicate WizardObjectPlugins
dwhswenson Oct 27, 2021
3696d69
Fix lack of context in negated volume
dwhswenson Oct 27, 2021
9b81d9a
Add OrderedSet to preserve plugin load order
dwhswenson Oct 27, 2021
7401c9e
Start to fixes for pylint/flake8 in compiling
dwhswenson Oct 28, 2021
df656ed
more pylint/pep8 cleanup in compiling
dwhswenson Oct 28, 2021
20aba5a
Apply suggestions from code review
dwhswenson Oct 28, 2021
acc6be2
finish pylint/flake8 for compiling
dwhswenson Oct 28, 2021
4441d18
Remove `plugins/` directory
dwhswenson Oct 28, 2021
d2a321c
add test for empty ordered set
dwhswenson Oct 28, 2021
750bb55
Update the negated volume intro text
dwhswenson Oct 28, 2021
1399860
Merge branch 'wizard-rewrite' of github.com:dwhswenson/openpathsampli…
dwhswenson Oct 28, 2021
2b6714b
Merge pull request #54 from dwhswenson/wizard-rewrite
dwhswenson Oct 28, 2021
8637860
Merge branch 'main' of github.com:openpathsampling/openpathsampling-c…
dwhswenson Oct 28, 2021
2f2b37c
cleanup (remove comments; pep8/pylint)
dwhswenson Oct 28, 2021
967371d
Start to wizard pauses (including tests)
dwhswenson Oct 29, 2021
5b99df0
support for catching QuitWizard exception
dwhswenson Oct 29, 2021
7568496
tests for wizard quit support
dwhswenson Oct 29, 2021
9d697ba
Merge branch 'main' of github.com:openpathsampling/openpathsampling-c…
dwhswenson Oct 30, 2021
dd67a69
roughly working automatic compile docs generation
dwhswenson Oct 30, 2021
936e0b3
add json_type
dwhswenson Oct 30, 2021
b0cea21
Add tests for config_handler, json_type_handlers
dwhswenson Oct 31, 2021
d2eca56
Merge pull request #61 from dwhswenson/remove-plugins-dir
dwhswenson Oct 31, 2021
084eef1
Update paths_cli/tests/test_utils.py
dwhswenson Oct 31, 2021
fe719e3
Merge pull request #59 from dwhswenson/pylint-compiling
dwhswenson Oct 31, 2021
fd5dfb4
Merge pull request #63 from dwhswenson/wizard-quit-save
dwhswenson Oct 31, 2021
f24564a
Merge pull request #60 from dwhswenson/plugins-ordered-set
dwhswenson Oct 31, 2021
34cf3a0
Merge pull request #58 from dwhswenson/wizard-extra-help
dwhswenson Nov 1, 2021
83de5f9
tests for docs_generator
dwhswenson Nov 1, 2021
2546f69
Merge branch 'main' of github.com:openpathsampling/openpathsampling-c…
dwhswenson Nov 1, 2021
e19b5a0
test for the gendocs script
dwhswenson Nov 1, 2021
d3567cc
docstrings
dwhswenson Nov 1, 2021
def35eb
a little cleanup; should be ready for review
dwhswenson Nov 1, 2021
ec5c859
Merge branch 'main' of github.com:openpathsampling/openpathsampling-c…
dwhswenson Nov 1, 2021
6fb06fc
Use the pauses, add section splitting line
dwhswenson Nov 1, 2021
d1f430a
Apply suggestions from code review
dwhswenson Nov 1, 2021
72669fd
fix tests for pausing
dwhswenson Nov 1, 2021
61b8da4
Update paths_cli/wizard/pause.py
dwhswenson Nov 1, 2021
d11d7bc
Fix uncaught exception if user input to empty
dwhswenson Nov 2, 2021
0226749
Merge pull request #65 from dwhswenson/wizard-empty-input
dwhswenson Nov 2, 2021
68fc7de
Merge pull request #62 from dwhswenson/wizard-pauses
dwhswenson Nov 2, 2021
59bc1b9
Merge pull request #64 from dwhswenson/compile-docs
dwhswenson Nov 2, 2021
89bf2cb
Start to pylint/flake8 wizard cleanup
dwhswenson Nov 3, 2021
8ed2442
more pylint cleanup in the wizard
dwhswenson Nov 3, 2021
005aeab
more pylint cleanup for the wizard
dwhswenson Nov 3, 2021
bc32c3c
docstrings/pylint for wizard.py
dwhswenson Nov 4, 2021
445cc61
no-cov on ImpossibleError
dwhswenson Nov 4, 2021
9fe9801
json types for most compiler plugins
dwhswenson Nov 4, 2021
3fb1571
lowercase retry/quit in missing-integration
dwhswenson Nov 4, 2021
559d022
add custom_eval_float
dwhswenson Nov 5, 2021
c455e9c
handle None; split do_main; link eval types
dwhswenson Nov 5, 2021
472574d
shooting-point-selector compilers
dwhswenson Nov 5, 2021
539c8b0
Merge pull request #66 from dwhswenson/pylint-wizard
dwhswenson Nov 5, 2021
1027f8b
more documentation for compiling objects
dwhswenson Nov 6, 2021
8773e7f
add descriptions to strategies
dwhswenson Nov 7, 2021
6ee8545
add test for get_compiler_none
dwhswenson Nov 7, 2021
a74d29d
Apply suggestions from code review
dwhswenson Nov 8, 2021
f9cd13d
Merge pull request #67 from dwhswenson/compile-docs
dwhswenson Nov 8, 2021
9d2a90a
Stop excluding tests from coverage
dwhswenson Nov 12, 2021
674d3fb
Exclude some test code that doesn't need coverage
dwhswenson Nov 13, 2021
40e2ec4
Ignore coverage on some unreachable lines in tests
dwhswenson Dec 7, 2021
4e3ff32
maybe fixed missing compiling/volumes testings
dwhswenson Dec 8, 2021
d841a74
_wrap was not needed (happens internally)
dwhswenson Dec 9, 2021
059f816
Cleanup more unused things in test coverage
dwhswenson Dec 9, 2021
f0d946b
Fix remaining missing lines from tests
dwhswenson Dec 10, 2021
600d361
Merge pull request #69 from dwhswenson/include-tests-coverage
dwhswenson Dec 10, 2021
52ef98d
update copyright to 2022
sroet Jan 3, 2022
4fc7e5a
update copyright in license
dwhswenson Jan 3, 2022
cbb4a65
Update docs/conf.py
dwhswenson Jan 3, 2022
f0c7722
Merge pull request #70 from sroet/update_copyright
dwhswenson Jan 3, 2022
dcda827
Fix error in output for contents
dwhswenson Sep 6, 2022
d570f5b
no-cov on attribute error
dwhswenson Nov 27, 2022
b430d8b
Merge pull request #73 from dwhswenson/fix-contents-iss71
dwhswenson Jan 7, 2023
e0e4c2e
Bump Python versions for testing
dwhswenson Apr 23, 2024
619a34e
setup => setup_method; teardown => teardown_method
dwhswenson Apr 23, 2024
e7f4149
use codecov v4; add token
dwhswenson Apr 23, 2024
ccd7c30
Merge pull request #74 from dwhswenson/back-to-green
dwhswenson Apr 23, 2024
4c7fada
Update badge; LICENSE
dwhswenson Apr 23, 2024
b05951c
Merge pull request #75 from dwhswenson/update-badge
dwhswenson Apr 23, 2024
ffbb306
Add help to compile; make it visible in CLI help
dwhswenson May 5, 2024
edc55ad
Add "Simulation Setup" section
dwhswenson May 5, 2024
78f967b
fix tests
dwhswenson May 9, 2024
5dc52b5
Merge pull request #76 from dwhswenson/compile-help
dwhswenson May 9, 2024
3867c5b
Silence annoying pymbar warnings
dwhswenson Jun 9, 2024
23f8ff8
SPEC0/NEP29: Add Python 3.12, drop Python 3.9
dwhswenson Jun 9, 2024
7ec200a
called_once_with => assert_called_once_with
dwhswenson Jun 9, 2024
1a9c964
add TODO to remove when warnings not triggered
dwhswenson Jun 11, 2024
4a9f55c
Merge pull request #78 from dwhswenson/py312
dwhswenson Jun 11, 2024
d94f993
Merge pull request #77 from dwhswenson/silence-pymbar
dwhswenson Jun 11, 2024
315128c
Release 0.3
dwhswenson Jun 11, 2024
f514224
update autorelease
dwhswenson Jun 11, 2024
025eb90
update version to 0.3.0 (need the patch)
dwhswenson Jun 11, 2024
f75dc5e
hack to add setuptools
dwhswenson Jun 11, 2024
c919c3b
update the autorelease version here, too
dwhswenson Jun 11, 2024
24df36f
switch to a version that exists
dwhswenson Jun 11, 2024
a16a85c
Merge branch 'main' of github.com:openpathsampling/openpathsampling-c…
dwhswenson Jun 11, 2024
2f83dff
I figured we got numpy as part of OPS? maybe not?
dwhswenson Jun 11, 2024
46afbf5
look at the error that caused the error. revert
dwhswenson Jun 11, 2024
5b341e5
Update setup.cfg
dwhswenson Jun 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[report]
omit =
*/paths_cli/tests/*
*/paths_cli/_installed_version.py
*/paths_cli/version.py
exclude_lines =
no-cov
def __repr__
raise NotImplementedError
__name__ == "__main__":
4 changes: 3 additions & 1 deletion .github/workflows/autorelease-default-env.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
INSTALL_AUTORELEASE="python -m pip install autorelease==0.2.6"
# Vendored from Autorelease 0.5.1
# Update by updating Autorelease and running `autorelease vendor actions`
INSTALL_AUTORELEASE="python -m pip install autorelease==0.5.1"
if [ -f autorelease-env.sh ]; then
source autorelease-env.sh
fi
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/autorelease-deploy.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
name: Autorelease
# Vendored from Autorelease 0.5.1
# Update by updating Autorelease and running `autorelease vendor actions`
name: "Autorelease Deploy"
on:
release:
types: [published]

jobs:
deploy_pypi:
if: ${{ github.repository == 'openpathsampling/openpathsampling-cli' }}
runs-on: ubuntu-latest
name: "Deploy to PyPI"
steps:
Expand All @@ -17,7 +20,11 @@ jobs:
if [ -f "autorelease-env.sh" ]; then
cat autorelease-env.sh >> $GITHUB_ENV
fi
eval $INSTALL_AUTORELEASE
if [ -f "./.autorelease/install-autorelease" ]; then
source ./.autorelease/install-autorelease
else
eval $INSTALL_AUTORELEASE
fi
name: "Install autorelease"
- run: |
python -m pip install twine wheel
Expand Down
13 changes: 11 additions & 2 deletions .github/workflows/autorelease-gh-rel.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
name: Autorelease
# Vendored from Autorelease 0.5.1
# Update by updating Autorelease and running `autorelease vendor actions`
name: "Autorelease Release"
on:
push:
branches:
# TODO: this should come from yaml conf
- stable

jobs:
release-gh:
if: ${{ github.repository == 'openpathsampling/openpathsampling-cli' }}
runs-on: ubuntu-latest
name: "Cut release"
steps:
Expand All @@ -18,7 +22,11 @@ jobs:
if [ -f "autorelease-env.sh" ]; then
cat autorelease-env.sh >> $GITHUB_ENV
fi
eval $INSTALL_AUTORELEASE
if [ -f "./.autorelease/install-autorelease" ]; then
source ./.autorelease/install-autorelease
else
eval $INSTALL_AUTORELEASE
fi
name: "Install autorelease"
- run: |
VERSION=`python setup.py --version`
Expand All @@ -27,3 +35,4 @@ jobs:
autorelease-release --project $PROJECT --version $VERSION --token $AUTORELEASE_TOKEN
env:
AUTORELEASE_TOKEN: ${{ secrets.AUTORELEASE_TOKEN }}
name: "Cut release"
31 changes: 25 additions & 6 deletions .github/workflows/autorelease-prep.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
name: "Autorelease"
# Vendored from Autorelease 0.5.1
# Update by updating Autorelease and running `autorelease vendor actions`
name: "Autorelease testpypi"
on:
pull_request:
branches:
# TODO: this should come from yaml conf
- stable

defaults:
Expand All @@ -10,6 +13,7 @@ defaults:

jobs:
deploy_testpypi:
if: ${{ github.repository == 'openpathsampling/openpathsampling-cli' }}
runs-on: ubuntu-latest
name: "Deployment test"
steps:
Expand All @@ -22,10 +26,14 @@ jobs:
if [ -f "autorelease-env.sh" ]; then
cat autorelease-env.sh >> $GITHUB_ENV
fi
eval $INSTALL_AUTORELEASE
if [ -f "./.autorelease/install-autorelease" ]; then
source ./.autorelease/install-autorelease
else
eval $INSTALL_AUTORELEASE
fi
name: "Install autorelease"
- run: |
python -m pip install twine wheel
python -m pip install twine wheel setuptools
name: "Install release tools"
- run: |
bump-dev-version
Expand All @@ -41,6 +49,7 @@ jobs:
repository_url: https://test.pypi.org/legacy/
name: "Deploy to testpypi"
test_testpypi:
if: ${{ github.repository == 'openpathsampling/openpathsampling-cli' }}
runs-on: ubuntu-latest
name: "Test deployed"
needs: deploy_testpypi
Expand All @@ -54,7 +63,17 @@ jobs:
if [ -f "autorelease-env.sh" ]; then
cat autorelease-env.sh >> $GITHUB_ENV
fi
eval $INSTALL_AUTORELEASE
if [ -f "./.autorelease/install-autorelease" ]; then
source ./.autorelease/install-autorelease
else
eval $INSTALL_AUTORELEASE
fi
name: "Install autorelease"
- run: test-testpypi

- name: "Install testpypi version"
run: install-testpypi
- name: "Test testpypi version"
run: |
if [ -f "autorelease-env.sh" ]; then
cat autorelease-env.sh >> $GITHUB_ENV
fi
test-testpypi
25 changes: 19 additions & 6 deletions .github/workflows/test-suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,28 @@ jobs:
strategy:
matrix:
CONDA_PY:
- 3.9
- 3.8
- 3.7
- 3.6
- "3.12"
- "3.11"
- "3.10"
INTEGRATIONS: [""]
include:
- CONDA_PY: "3.12"
INTEGRATIONS: 'all-optionals'

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 2
- uses: actions/setup-python@v2
- uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: ${{ matrix.CONDA_PY }}
- name: "Install testing tools"
run: python -m pip install -r ./devtools/tests_require.txt
- name: "Install integrations"
if: matrix.INTEGRATIONS == 'all-optionals'
run: conda install -c conda-forge -y openmm openmmtools mdtraj
- name: "Install"
run: |
conda install pip
Expand All @@ -57,8 +65,13 @@ jobs:
fi
python autorelease_check.py --branch $BRANCH --even ${EVENT}
- name: "Unit tests"
env:
PY_COLORS: "1"
run: |
python -c "import paths_cli"
py.test -vv --cov --cov-report xml:cov.xml
- name: "Report coverage"
run: bash <(curl -s https://codecov.io/bash)
- uses: codecov/codecov-action@v4
with:
files: ./cov.xml
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2019 David W.H. Swenson
Copyright (c) 2019-2024 David W.H. Swenson and contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Tests](https://github.com/openpathsampling/openpathsampling-cli/workflows/Tests/badge.svg)](https://github.com/openpathsampling/openpathsampling-cli/actions?query=workflow%3ATests)
[![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)
[![Documentation Status](https://readthedocs.org/projects/openpathsampling-cli/badge/?version=latest)](https://openpathsampling-cli.readthedocs.io/en/latest/?badge=latest)
[![Coverage Status](https://codecov.io/gh/openpathsampling/openpathsampling-cli/branch/master/graph/badge.svg)](https://codecov.io/gh/openpathsampling/openpathsampling-cli)
[![Maintainability](https://api.codeclimate.com/v1/badges/0d1ee29e1a05cfcdc01a/maintainability)](https://codeclimate.com/github/openpathsampling/openpathsampling-cli/maintainability)
Expand Down
2 changes: 1 addition & 1 deletion autorelease-env.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
INSTALL_AUTORELEASE="python -m pip install autorelease==0.2.3 nose sqlalchemy dill"
INSTALL_AUTORELEASE="python -m pip install autorelease==0.5 nose sqlalchemy dill"
PACKAGE_IMPORT_NAME=paths_cli
43 changes: 43 additions & 0 deletions docs/compiling.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@

Compiling
=========

Let's start with an overview of terminology.:

* **Compiling**: The process of converting input in a text format,
such as YAML or JSON, into OPS objects. Here we're focused on non-Python
alternatives to using the standard Python interpreter to compile objects.
* **Category**: The base category of object to be created (engine, CV,
volume, etc.)
* **Builder**: We will refer to a builder function, which creates an
instance of a specific

Everything is created with plugins. There are two types of plugins used in
the ``compiling`` subpackage:

* ``InstanceCompilerPlugin``: This is what you'll normally work with. These
convert the input text to an instance of a specific OPS object (for
example, an ``OpenMMEngine`` or an ``MDTrajFunctionCV``. In general, you
do not create subclasses of ``InstanceCompilerPlugin`` -- there are
subclasses specialized to engines (``EngineCompilerPlugin``), to CVs
(``CVCompilerPlugin``), etc. You create *instances* of those subclasses.
You write your builder function, and wrap in with in an instance of an
``InstanceCompilerPlugin``.
* ``CategoryPlugin``: These manage the plugins associated with a given
features. Contributors will almost never need to create one of these.
The only case in which you would need to create one of these is if you're
creating a new *category* of object, i.e., something like an engine where
users will have multiple options at the command line.

Other useful classes defined in the ``compiling`` subpackage include:

* ``Builder``: The ``Builder`` class is a convenience for creating builder
functions. It takes either a callable or a string as input, where a string
is treated as a path to an object to import at runtime. It also allows
takes parameters ``remapper`` and ``after_build``, which are callables
that act on the input dictionary before object creation (``remapper``) and
on the created object after object creations (``after_build``).
* ``CategoryCompiler``: This class manages plugins for a given category, as
well as tracking named objects of that type. These are created
automatically when plugins are registered; users do not need to create
these.
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import packaging.version

project = 'OpenPathSampling CLI'
copyright = '2019-2020, David W.H. Swenson'
copyright = '2019-2022, David W.H. Swenson and contributors'
author = 'David W.H. Swenson'

# The full version, including alpha/beta/rc tags
Expand Down
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ wrappers around well-tested OPS code.
plugins
parameters
workflows
wizard
full_cli
api/index

52 changes: 30 additions & 22 deletions docs/plugins.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,33 @@ There are two possible ways to distribute plugins (file plugins and
namespace plugins), but a given plugin script could be distributed either
way.

Writing a plugin script
-----------------------

An OPS plugin is simply a Python module that follows a few rules.

* It must define a variable ``CLI`` that is the main CLI function is
assigned to.
* It must define a variable ``SECTION`` to determine where to show it in
help (what kind of command it is). Valid values are ``"Simulation"``,
``"Analysis"``, ``"Miscellaneous"``, or ``"Workflow"``. If ``SECTION`` is
defined but doesn't have one of these values, it won't show in
``openpathsampling --help``, but might still be usable. If your command
doesn't show in the help, carefully check your spelling of the ``SECTION``
variable.
* The main CLI function must be decorated as a ``click.command``.
* (If distributed as a file plugin) It must be possible to ``exec`` it in an
empty namespace (mainly, this can mean no relative imports).
Writing a command plugin
------------------------

To write an OPS command plugin, you simply need to create an instance of
:class:`paths_cli.OPSCommandPlugin` and to install the module in a location
where the CLI knows to look for it. The input parameters to
``OPSCommandPlugin`` are:

* ``command``: This is the main CLI function for the subcommand. It must be
decorated as a ``click.command``.
* ``section``: This is a string to determine where to show it in help (what
kind of command it is). Valid values are ``"Simulation"``,
``"Analysis"``, ``"Miscellaneous"``, or ``"Workflow"``. If ``section``
doesn't have one of these values, it won't show in ``openpathsampling
--help``, but might still be usable. If your command doesn't show in the
help, carefully check your spelling of the ``section`` variable.
* ``requires_ops`` (optional, default ``(1, 0)``): Minimum allowed version
of OpenPathSampling. Note that this is currently informational only, and
has no effect on functionality.
* ``requires_cli`` (optional, default ``(0, 3)``): Minimum allowed version
of the OpenPathSampling CLI. Note that this is currently informational
only, and has no effect on functionality.


If you distribute your plugin as a file-based plugin, be aware that it must
be possible to ``exec`` it in an empty namespace (mainly, this can mean no
relative imports).

As a suggestion, I (DWHS) tend to structure my plugins as follows:

Expand All @@ -41,16 +51,15 @@ As a suggestion, I (DWHS) tend to structure my plugins as follows:
...
return final_status, simulation

CLI = plugin
SECTION = "MySection"
PLUGIN = OPSCommandPlugin(command=plugin, section="MySection")

The basic idea is that there's a ``plugin_main`` function that is based on
pure OPS, using only inputs that OPS can immediately understand (no need to
process the command line). This is easy to develop/test with OPS. Then
there's a wrapper function whose sole purpose is to convert the command line
parameters to something OPS can understand (using the ``get`` method). This
wrapper is the ``CLI`` variable. Give it an allowed ``SECTION``, and the
plugin is ready!
wrapper is the ``command`` in you ``OPSCommandPlugin``. Also provide an
allowed ``section``, and the plugin is ready!

The result is that plugins are astonishingly easy to develop, once you have
the scientific code implemented in a library. This structure also makes it
Expand Down Expand Up @@ -95,4 +104,3 @@ namespace.
.. _native namespace packages:
https://packaging.python.org/guides/packaging-namespace-packages/#native-namespace-packages


8 changes: 8 additions & 0 deletions docs/wizard.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.. _wizard:

Writing tools for the Wizard
============================

The Wizard API is still rapidly in flux, and we don't recommend developing
custom Wizard tools at this time. However, once its API is more stable, the
Wizard will be extendable by outside developers.
10 changes: 10 additions & 0 deletions example_plugins/one_pot_tps.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import click
from paths_cli import OPSCommandPlugin
from paths_cli.parameters import (INPUT_FILE, OUTPUT_FILE, ENGINE, STATES,
N_STEPS_MC, INIT_SNAP)
from paths_cli.commands.visit_all import visit_all_main
Expand Down Expand Up @@ -44,6 +45,15 @@ def one_pot_tps_main(output_storage, states, engine, engine_hot,
equil_multiplier, equil_extra)
return pathsampling_main(output_storage, scheme, equil_set, nsteps)

# these lines enable this plugin to support OPS CLI < 0.3
CLI = one_pot_tps
SECTION = "Workflow"
REQUIRES_OPS = (1, 2)

# these lines enable this plugin to support OPS CLI >= 0.3
PLUGIN = OPSCommandPlugin(
command=one_pot_tps,
section="Workflow",
requires_ops=(1, 2),
requires_cli=(0, 3)
)
Loading