Skip to content

Commit

Permalink
Apply pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
bobleesj committed Oct 27, 2024
1 parent 4eefc65 commit 2786a66
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions src/cifkit/models/cif_ensemble.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ def __init__(
preprocess=True,
logging_enabled=False,
) -> None:
"""Initialize a CifEnsemble object, containing a collection of Cif objects
"""Initialize a CifEnsemble object, containing a collection of Cif
objects.
Parameters
----------
Expand Down Expand Up @@ -136,6 +137,7 @@ def unique_tags(self) -> set[str]:
@property
def unique_space_group_names(self) -> set[str]:
"""Get unique space groups from all .cif files in the folder.
Examples
--------
>>> cif_ensemble.unique_space_group_names
Expand All @@ -146,6 +148,7 @@ def unique_space_group_names(self) -> set[str]:
@property
def unique_space_group_numbers(self) -> set[str]:
"""Get unique space groups from all .cif files in the folder.
Examples
--------
>>> cif_ensemble.unique_space_group_numbers
Expand All @@ -156,6 +159,7 @@ def unique_space_group_numbers(self) -> set[str]:
@property
def unique_site_mixing_types(self) -> set[int]:
"""Get unique site mixing types from all .cif files in the folder.
Examples
--------
>>> cif_ensemble.unique_site_mixing_types
Expand All @@ -166,6 +170,7 @@ def unique_site_mixing_types(self) -> set[int]:
@property
def unique_composition_types(self) -> set[int]:
"""Get unique composition types from all .cif files in the folder.
Examples
--------
>>> cif_ensemble.unique_composition_types
Expand Down Expand Up @@ -206,7 +211,8 @@ def CN_unique_values_by_min_dist_method(self) -> set[str]:
Returns
-------
set[str]
Unique coordination number values by minimum distance method from all .cif files.
Unique coordination number values by minimum distance method from all .cif
files.
"""
return self._get_unique_property_values_from_set(
"CN_unique_values_by_min_dist_method"
Expand Down Expand Up @@ -291,7 +297,8 @@ def unique_CN_values_by_method_methods_stat(
return self._attribute_stats("CN_unique_values_by_best_methods")

def _collect_cif_data(self, attribute, transform=None):
"""Generic method to collect data from CIF files based on an attribute."""
"""Generic method to collect data from CIF files based on an
attribute."""
collected_data = []
for cif in self.cifs:
attr_value = getattr(cif, attribute, None)
Expand Down Expand Up @@ -443,7 +450,7 @@ def move_cif_files(
Set of file paths to CIF files.
to_directory_path : str
Destination directory path.
Examples
--------
>>> file_paths = {
Expand Down Expand Up @@ -477,9 +484,9 @@ def copy_cif_files(
>>> cif_ensemble_test.copy_cif_files(file_paths, dest_dir_path)
"""
copy_files(to_directory_path, list(file_paths))

# FIXME: refactor this section to maintain DRY principle

def generate_structure_histogram(self, display=False, output_dir=None):
plot_histogram(
"structure",
Expand Down

0 comments on commit 2786a66

Please sign in to comment.