Skip to content

Commit

Permalink
Refactor the compile function as it's built in function
Browse files Browse the repository at this point in the history
  • Loading branch information
FanwangM committed Oct 5, 2024
1 parent 18f3c93 commit 0112a00
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions atomdb/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

from atomdb.periodic import element_number, element_symbol, element_name

from atomdb.species import compile, load, dump, raw_datafile
from atomdb.species import compile_species, load, dump, raw_datafile

from atomdb.promolecule import make_promolecule

Expand All @@ -38,7 +38,7 @@
"element_number",
"element_symbol",
"element_name",
"compile",
"compile_species",
"load",
"dump",
"raw_datafile",
Expand Down
6 changes: 3 additions & 3 deletions atomdb/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

from argparse import ArgumentParser

from atomdb import compile, load
from atomdb import compile_species, load


# Initialize command line argument parser
Expand All @@ -31,7 +31,7 @@
command_group = command.add_mutually_exclusive_group(required=True)

command_group.add_argument(
"-c", "--compile", action="store_true", help="compile a species into the database"
"-c", "--compile_species", action="store_true", help="compile_species a species into the database"
)

command_group.add_argument(
Expand Down Expand Up @@ -60,7 +60,7 @@

if args.compile:

compile(args.elem, args.charge, args.mult, args.exc, args.dataset)
compile_species(args.elem, args.charge, args.mult, args.exc, args.dataset)

elif args.query:

Expand Down
4 changes: 2 additions & 2 deletions atomdb/species.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@

__all__ = [
"Species",
"compile",
"compile_species",
"dump",
"load",
"raw_datafile",
Expand Down Expand Up @@ -712,7 +712,7 @@ def ked_func(self):
pass


def compile(
def compile_species(
elem,
charge,
mult,
Expand Down

0 comments on commit 0112a00

Please sign in to comment.