Skip to content

Commit

Permalink
Merge pull request #44 from openpathsampling/release-0.2.1
Browse files Browse the repository at this point in the history
Release 0.2.1
  • Loading branch information
dwhswenson authored Apr 28, 2021
2 parents 30bb0d9 + 6a20615 commit f2d68e2
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test-suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ name: "Tests"
on:
pull_request:
branches:
- master
- main
- stable
push:
branches:
- master
- main
tags:
- "v*"
schedule:
Expand Down
8 changes: 8 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version: 2

python:
version: 3.7
install:
- requirements: docs/requirements.txt
- method: pip
path: .
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Build Status](https://travis-ci.com/openpathsampling/openpathsampling-cli.svg?branch=master)](https://travis-ci.com/openpathsampling/openpathsampling-cli)
[![Tests](https://github.com/openpathsampling/openpathsampling-cli/workflows/Tests/badge.svg)](https://github.com/openpathsampling/openpathsampling-cli/actions?query=workflow%3ATests)
[![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 docs/plugins.rst
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ If the plugin is part of a larger Python package, or if it is important to
track version numbers or to be able to change which plugins are installed
in particular Python environments, the namespace distribution mechanism is a
better choice. We use `native namespace packages`_, which is a standard way
of making plugins in Python. Plugins should be in the ``paths_cli.plugins``
of making plugins in Python. Plugins should be in the ``paths_cli_plugins``
namespace.

.. _native namespace packages:
Expand Down
4 changes: 2 additions & 2 deletions example_plugins/one_pot_tps.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
N_STEPS_MC, INIT_SNAP)
from paths_cli.commands.visit_all import visit_all_main
from paths_cli.commands.equilibrate import equilibrate_main
from paths_cli.commands.pathsampling import path_sampling_main
from paths_cli.commands.pathsampling import pathsampling_main


@click.command("one-pot-tps",
Expand Down Expand Up @@ -42,7 +42,7 @@ def one_pot_tps_main(output_storage, states, engine, engine_hot,
equil_extra = 0
equil_set, _ = equilibrate_main(None, scheme, trajectory,
equil_multiplier, equil_extra)
return path_sampling_main(output_storage, scheme, equil_set, nsteps)
return pathsampling_main(output_storage, scheme, equil_set, nsteps)

CLI = one_pot_tps
SECTION = "Workflow"
Expand Down
2 changes: 1 addition & 1 deletion paths_cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def app_dir_plugins(posix):
FilePluginLoader(commands),
FilePluginLoader(app_dir_plugins(posix=False)),
FilePluginLoader(app_dir_plugins(posix=True)),
NamespacePluginLoader('paths_cli.plugins')
NamespacePluginLoader('paths_cli_plugins')
]

plugins = sum([loader() for loader in self.plugin_loaders], [])
Expand Down
14 changes: 9 additions & 5 deletions paths_cli/plugin_management.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,15 @@ def iter_namespace(ns_pkg):
return pkgutil.iter_modules(ns_pkg.__path__,
ns_pkg.__name__ + ".")

ns = importlib.import_module(self.search_path)
candidates = [
importlib.import_module(name)
for _, name, _ in iter_namespace(ns)
]
try:
ns = importlib.import_module(self.search_path)
except ModuleNotFoundError:
candidates = []
else:
candidates = [
importlib.import_module(name)
for _, name, _ in iter_namespace(ns)
]
return candidates

@staticmethod
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = openpathsampling-cli
version = 0.2.0
version = 0.2.1
# version should end in .dev0 if this isn't to be released
description = Command line tool for OpenPathSampling
long_description = file: README.md
Expand Down

0 comments on commit f2d68e2

Please sign in to comment.