Skip to content

Commit

Permalink
black format
Browse files Browse the repository at this point in the history
  • Loading branch information
sunal1996 committed Dec 20, 2023
1 parent 07e9049 commit 56c35a2
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions src/aposteriori/data_prep/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,18 @@
@click.option(
"-ae",
"--atom_encoder",
type=click.Choice(["CNO", "CNOCB", "CNOCACB", "CNOCBCA", "CNOCACBQ", "CNOCBCAQ", "CNOCACBP", "CNOCBCAP"]),
type=click.Choice(
[
"CNO",
"CNOCB",
"CNOCACB",
"CNOCBCA",
"CNOCACBQ",
"CNOCBCAQ",
"CNOCACBP",
"CNOCBCAP",
]
),
default="CNO",
required=True,
help=(
Expand Down Expand Up @@ -269,14 +280,14 @@ def cli(
"CNOCB": Codec.CNOCB,
"CNOCACB": Codec.CNOCACB,
"CNOCACBQ": Codec.CNOCACBQ,
"CNOCACBP": Codec.CNOCACBP
"CNOCACBP": Codec.CNOCACBP,
}

# List of deprecated encodings and their replacements
deprecated_encodings = {
"CNOCBCA": "CNOCACB",
"CNOCBCAQ": "CNOCACBQ",
"CNOCBCAP": "CNOCACBP"
"CNOCBCAP": "CNOCACBP",
}

# Create Codec based on atom_encoder
Expand All @@ -285,8 +296,10 @@ def cli(
elif atom_encoder in deprecated_encodings:
replacement = deprecated_encodings[atom_encoder]
codec = current_codec_mapping[replacement]()
warnings.warn(f"{atom_encoder} encoding is deprecated and will be removed in future versions, "
f"atoms will be encoded as {replacement}")
warnings.warn(
f"{atom_encoder} encoding is deprecated and will be removed in future versions, "
f"atoms will be encoded as {replacement}"
)

make_frame_dataset(
structure_files=structure_files,
Expand Down

0 comments on commit 56c35a2

Please sign in to comment.