Skip to content

Commit

Permalink
add deprecation notice
Browse files Browse the repository at this point in the history
  • Loading branch information
rvhonorato committed Sep 19, 2024
1 parent f7b6859 commit 7eb3101
Showing 1 changed file with 45 additions and 18 deletions.
63 changes: 45 additions & 18 deletions src/haddock/clis/cli_restraints.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,59 +17,83 @@
haddock3-restraints <TASK_NAME> -h
"""

import argparse
import sys

from haddock.clis.restraints.restrain_bodies import add_restrain_bodies_arguments, restrain_bodies
from haddock.clis.restraints.passive_from_active import add_pass_from_act_arguments, passive_from_active
from haddock.clis.restraints.validate_tbl import add_validate_tbl_arguments, validate_tbl
from haddock.clis.restraints.active_passive_to_ambig import add_actpass_to_ambig_arguments, actpass_to_ambig
from haddock.clis.restraints.calc_accessibility import add_calc_accessibility_arguments, calc_accessibility
from haddock import log
from haddock.clis.restraints.active_passive_to_ambig import (
actpass_to_ambig,
add_actpass_to_ambig_arguments,
)
from haddock.clis.restraints.calc_accessibility import (
add_calc_accessibility_arguments,
calc_accessibility,
)
from haddock.clis.restraints.passive_from_active import (
add_pass_from_act_arguments,
passive_from_active,
)
from haddock.clis.restraints.restrain_bodies import (
add_restrain_bodies_arguments,
restrain_bodies,
)
from haddock.clis.restraints.validate_tbl import (
add_validate_tbl_arguments,
validate_tbl,
)
from haddock.clis.restraints.z_surface_restraints import (
add_z_surf_restraints_arguments,
gen_z_surface_restraints,
)


# Command line interface parser
ap = argparse.ArgumentParser(
prog="haddock3-restraints",
description=__doc__,
formatter_class=argparse.RawDescriptionHelpFormatter,
)
)

subparsers = ap.add_subparsers(title='subcommands',
description='valid subcommands',
help='additional help')
subparsers = ap.add_subparsers(
title="subcommands", description="valid subcommands", help="additional help"
)

# restrain_bodies subcommand
restrain_bodies_subcommand = subparsers.add_parser('restrain_bodies')
restrain_bodies_subcommand = subparsers.add_parser("restrain_bodies")
restrain_bodies_subcommand.set_defaults(func=restrain_bodies)
restrain_bodies_subcommand = add_restrain_bodies_arguments(restrain_bodies_subcommand)

# passive_from_active subcommand
pass_from_act_subcommand = subparsers.add_parser('passive_from_active')
pass_from_act_subcommand = subparsers.add_parser("passive_from_active")
pass_from_act_subcommand.set_defaults(func=passive_from_active)
pass_from_act_subcommand = add_pass_from_act_arguments(pass_from_act_subcommand)

# validate_tbl subcommand
validate_tbl_subcommand = subparsers.add_parser('validate_tbl')
validate_tbl_subcommand = subparsers.add_parser("validate_tbl")
validate_tbl_subcommand.set_defaults(func=validate_tbl)
validate_tbl_subcommand = add_validate_tbl_arguments(validate_tbl_subcommand)

# active_passive_to_ambig subcommand
actpass_to_ambig_subcommand = subparsers.add_parser('active_passive_to_ambig')
actpass_to_ambig_subcommand = subparsers.add_parser("active_passive_to_ambig")
actpass_to_ambig_subcommand.set_defaults(func=actpass_to_ambig)
actpass_to_ambig_subcommand = add_actpass_to_ambig_arguments(actpass_to_ambig_subcommand)
actpass_to_ambig_subcommand = add_actpass_to_ambig_arguments(
actpass_to_ambig_subcommand
)

# calc_accessibility subcommand
calc_accessibility_subcommand = subparsers.add_parser('calc_accessibility')
calc_accessibility_subcommand = subparsers.add_parser("calc_accessibility")
calc_accessibility_subcommand.set_defaults(func=calc_accessibility)
calc_accessibility_subcommand = add_calc_accessibility_arguments(calc_accessibility_subcommand)
calc_accessibility_subcommand = add_calc_accessibility_arguments(
calc_accessibility_subcommand
)

# z_surface_restraints subcommand
z_surface_restraints_subcommand = subparsers.add_parser('z_surface_restraints')
z_surface_restraints_subcommand = subparsers.add_parser("z_surface_restraints")
z_surface_restraints_subcommand.set_defaults(func=gen_z_surface_restraints)
z_surface_restraints_subcommand = add_z_surf_restraints_arguments(z_surface_restraints_subcommand)
z_surface_restraints_subcommand = add_z_surf_restraints_arguments(
z_surface_restraints_subcommand
)


def _ap():
Expand All @@ -83,6 +107,9 @@ def load_args(ap):

def maincli():
"""Execute main client."""
log.info(
"[DEPRECATION NOTICE] This command will soon be replaced with `haddock-restraints`"
)
args = ap.parse_args()
cmd = vars(load_args(ap))
cmd.pop("func")
Expand Down

0 comments on commit 7eb3101

Please sign in to comment.