Skip to content

Commit

Permalink
Merge branch 'main' into logger-level
Browse files Browse the repository at this point in the history
  • Loading branch information
PicoCentauri authored Mar 27, 2024
2 parents 21afcb0 + 98adcf9 commit d8c0455
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -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}
Expand Down
5 changes: 5 additions & 0 deletions docs/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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)
------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion docs/rst/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
Expand Down
2 changes: 1 addition & 1 deletion src/mdacli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@


__all__ = ["cli"]
__version__ = '0.1.28'
__version__ = '0.1.29'
__authors__ = 'MDAnalysis Development Team and contributors'
5 changes: 3 additions & 2 deletions src/mdacli/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down
2 changes: 1 addition & 1 deletion src/mdacli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
7 changes: 7 additions & 0 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down

0 comments on commit d8c0455

Please sign in to comment.