diff --git a/abismal/command_line/__init__.py b/abismal/command_line/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/abismal/abismal.py b/abismal/command_line/abismal.py similarity index 99% rename from abismal/abismal.py rename to abismal/command_line/abismal.py index bdbaf4f..5254dc3 100644 --- a/abismal/abismal.py +++ b/abismal/command_line/abismal.py @@ -1,7 +1,7 @@ #!/usr/bin/env python def main(): - from abismal.parser import parser + from abismal.command_line.parser import parser parser = parser.parse_args() from abismal.io.tf_settings import set_log_level, set_gpu diff --git a/abismal/command_line/parser/__init__.py b/abismal/command_line/parser/__init__.py new file mode 100644 index 0000000..0ad55fb --- /dev/null +++ b/abismal/command_line/parser/__init__.py @@ -0,0 +1,38 @@ +""" +ABISMAL - merge serial diffraction data using neural networks and variational inference. +""" + +import abismal.command_line.parser.io as io +import abismal.command_line.parser.architecture as architecture +import abismal.command_line.parser.likelihood as likelihood +import abismal.command_line.parser.optimizer as optimizer +import abismal.command_line.parser.phenix as phenix +import abismal.command_line.parser.priors as priors +import abismal.command_line.parser.ray as ray +import abismal.command_line.parser.surrogate_posterior as surrogate_posterior +import abismal.command_line.parser.tf as tf +import abismal.command_line.parser.training as training + +groups = [ + architecture, + io, + likelihood, + optimizer, + phenix, + priors, + ray, + surrogate_posterior, + tf, + training, +] + +from argparse import ArgumentParser +parser = ArgumentParser(description=__doc__) +for group in groups: + g = parser.add_argument_group(group.title, group.description) + for args,kwargs in group.args_and_kwargs: + g.add_argument(*args, **kwargs) + +all = [ + parser, +] diff --git a/abismal/parser/architecture.py b/abismal/command_line/parser/architecture.py similarity index 100% rename from abismal/parser/architecture.py rename to abismal/command_line/parser/architecture.py diff --git a/abismal/parser/custom_types.py b/abismal/command_line/parser/custom_types.py similarity index 100% rename from abismal/parser/custom_types.py rename to abismal/command_line/parser/custom_types.py diff --git a/abismal/parser/io.py b/abismal/command_line/parser/io.py similarity index 100% rename from abismal/parser/io.py rename to abismal/command_line/parser/io.py diff --git a/abismal/parser/likelihood.py b/abismal/command_line/parser/likelihood.py similarity index 100% rename from abismal/parser/likelihood.py rename to abismal/command_line/parser/likelihood.py diff --git a/abismal/parser/optimizer.py b/abismal/command_line/parser/optimizer.py similarity index 100% rename from abismal/parser/optimizer.py rename to abismal/command_line/parser/optimizer.py diff --git a/abismal/parser/phenix.py b/abismal/command_line/parser/phenix.py similarity index 100% rename from abismal/parser/phenix.py rename to abismal/command_line/parser/phenix.py diff --git a/abismal/parser/priors.py b/abismal/command_line/parser/priors.py similarity index 95% rename from abismal/parser/priors.py rename to abismal/command_line/parser/priors.py index 33bfbe5..fac9efc 100644 --- a/abismal/parser/priors.py +++ b/abismal/command_line/parser/priors.py @@ -1,7 +1,7 @@ title = "Priors" description = "Arguments governing the prior distributions" -from abismal.parser.custom_types import list_of_ints,list_of_ops,list_of_floats +from abismal.command_line.parser.custom_types import list_of_ints,list_of_ops,list_of_floats args_and_kwargs = ( ( diff --git a/abismal/parser/ray.py b/abismal/command_line/parser/ray.py similarity index 100% rename from abismal/parser/ray.py rename to abismal/command_line/parser/ray.py diff --git a/abismal/parser/surrogate_posterior.py b/abismal/command_line/parser/surrogate_posterior.py similarity index 100% rename from abismal/parser/surrogate_posterior.py rename to abismal/command_line/parser/surrogate_posterior.py diff --git a/abismal/parser/tf.py b/abismal/command_line/parser/tf.py similarity index 100% rename from abismal/parser/tf.py rename to abismal/command_line/parser/tf.py diff --git a/abismal/parser/training.py b/abismal/command_line/parser/training.py similarity index 100% rename from abismal/parser/training.py rename to abismal/command_line/parser/training.py diff --git a/abismal/io/stream.py b/abismal/io/stream.py index e9c8cba..18be9eb 100755 --- a/abismal/io/stream.py +++ b/abismal/io/stream.py @@ -97,7 +97,7 @@ def get_dataset(self, peak_list_columns=None, **ray_kwargs): 'ewald_offset_x', 'ewald_offset_y', 'ewald_offset_z', ] - chunks = self.parallel_read_crystfel( + chunks = self.read_crystfel( wavelength=self.wavelength, peak_list_columns=peak_list_columns, **ray_kwargs, diff --git a/abismal/parser/__init__.py b/abismal/parser/__init__.py deleted file mode 100644 index 024c869..0000000 --- a/abismal/parser/__init__.py +++ /dev/null @@ -1,38 +0,0 @@ -""" -ABISMAL - merge serial diffraction data using neural networks and variational inference. -""" - -import abismal.parser.io as io -import abismal.parser.architecture as architecture -import abismal.parser.likelihood as likelihood -import abismal.parser.optimizer as optimizer -import abismal.parser.phenix as phenix -import abismal.parser.priors as priors -import abismal.parser.ray as ray -import abismal.parser.surrogate_posterior as surrogate_posterior -import abismal.parser.tf as tf -import abismal.parser.training as training - -groups = [ - architecture, - io, - likelihood, - optimizer, - phenix, - priors, - ray, - surrogate_posterior, - tf, - training, -] - -from argparse import ArgumentParser -parser = ArgumentParser(description=__doc__) -for group in groups: - g = parser.add_argument_group(group.title, group.description) - for args,kwargs in group.args_and_kwargs: - g.add_argument(*args, **kwargs) - -all = [ - parser, -] diff --git a/setup.py b/setup.py index 9983f35..1ff47a1 100644 --- a/setup.py +++ b/setup.py @@ -41,7 +41,7 @@ def getVersionNumber(): tests_require=['pytest', 'pytest-cov', 'pytest-xdist'], entry_points={ "console_scripts": [ - "abismal=abismal.abismal:main", + "abismal=abismal.command_line.abismal:main", ] }, )