diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 2a8f8f0..534e727 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.1.28 +current_version = 0.1.29 commit = True message = [SKIP] version bump {current_version} -> {new_version} diff --git a/docs/CHANGELOG.rst b/docs/CHANGELOG.rst index 7fc5357..2e379c1 100644 --- a/docs/CHANGELOG.rst +++ b/docs/CHANGELOG.rst @@ -5,6 +5,11 @@ Changelog * Replace Boolean ``debug`` option in ``setup_logging`` by more flexible integer ``level`` parameter. +v0.1.29 (2024-03-21) +------------------------------------------ + +* Change handling of lowercase module names + v0.1.28 (2023-09-29) ------------------------------------------ diff --git a/docs/rst/conf.py b/docs/rst/conf.py index 04c09d8..e68cac5 100644 --- a/docs/rst/conf.py +++ b/docs/rst/conf.py @@ -62,7 +62,7 @@ year = '2021' author = 'Philip Loche, Joao MC Teixeira and Oliver Beckstein' copyright = '{0}, {1}'.format(year, author) -version = release = '0.1.28' +version = release = '0.1.29' pygments_style = 'trac' templates_path = ['_templates'] diff --git a/pyproject.toml b/pyproject.toml index aa38a7e..88a3d1c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta" [project] name = "mdacli" -version = "0.1.28" +version = "0.1.29" description = "A command line client for MDAnalysis Analysis classes." authors = [ {name = "MDAnalysis Development Team and contributors", email = "mdanalysis@numfocus.org"}, diff --git a/src/mdacli/__init__.py b/src/mdacli/__init__.py index 528f43b..d2faf4e 100644 --- a/src/mdacli/__init__.py +++ b/src/mdacli/__init__.py @@ -11,5 +11,5 @@ __all__ = ["cli"] -__version__ = '0.1.28' +__version__ = '0.1.29' __authors__ = 'MDAnalysis Development Team and contributors' diff --git a/src/mdacli/__main__.py b/src/mdacli/__main__.py index 1c41c1e..d92f262 100644 --- a/src/mdacli/__main__.py +++ b/src/mdacli/__main__.py @@ -10,8 +10,9 @@ A command line interface (CLI) to the analysis modules of MDAnalysis. The modules are all structured as part of a single mdacli wrapper, and invoked -with commands like `mda RMSD`. This command uses the class -:class:`MDAnalysis.analysis.rms.RMSD` for calculating the RMSD. +with commands like `mda RMSD` (The lowercase `mda rmsd` is also supported). +This command uses the class :class:`MDAnalysis.analysis.rms.RMSD` for +calculating the RMSD. Documentation for each module can be found at the respective sections on the `MDAnalysis Documentation`_, as well as `mda command -h`. diff --git a/src/mdacli/cli.py b/src/mdacli/cli.py index 34ad039..db00d81 100644 --- a/src/mdacli/cli.py +++ b/src/mdacli/cli.py @@ -124,7 +124,7 @@ def cli(name, # Get the correct ArgumentParser instance from all subparsers # `[0]` selects the first subparser where our analysises live in. - _key = analysis_callable.__name__.lower() + _key = analysis_callable.__name__ ap_sup = ap._subparsers._group_actions[0].choices[_key] arg_grouped_dict = split_argparse_into_groups(ap_sup, args) diff --git a/tests/test_cli.py b/tests/test_cli.py index 45ea68c..8e37446 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -37,6 +37,13 @@ def test_case_insensitive(args): subprocess.check_call(["mda", args, "-h"]) +@pytest.mark.parametrize('args', ("RMSF", "rmsf")) +def test_case_insensitive_with_flags(args): + """Test for module name being case insensitive with additional flags.""" + # Check if it still works if the module name is not the second argument + subprocess.check_call(['mda', '--debug', args, "-h"]) + + def test_running_analysis(tmpdir): """Test running a complete analysis.""" with tmpdir.as_cwd():