Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
leoschwarz committed Jul 1, 2024
1 parent c4d4610 commit 5b05f78
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 14 deletions.
1 change: 0 additions & 1 deletion bfabric/bfabric.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,6 @@ def get_system_auth(
else:
config_path = Path(config_path).expanduser()


# Use the provided config data from arguments instead of the file
if not config_path.is_file():
if have_config_path:
Expand Down
4 changes: 1 addition & 3 deletions bfabric/scripts/bfabric_feeder_mascot.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,7 @@ def query_mascot_result(file_path: str) -> bool:
print("\thit")
wu = DB[file_path]
if "workunitid" in wu:
print(
f"\tdat file {file_path} already registered as workunit id {wu['workunitid']}. continue ..."
)
print(f"\tdat file {file_path} already registered as workunit id {wu['workunitid']}. continue ...")
return
else:
print("\tno workunitid found")
Expand Down
8 changes: 4 additions & 4 deletions bfabric/scripts/bfabric_list_workunit_parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,7 @@ def get_workunits_table_full(application_id: int, client: Bfabric, max_workunits
inputdataset_id=pl.col("inputdataset").struct[1],
)
else:
workunits_table_full = workunits_table_full.with_columns(
inputdataset_id=pl.lit(None)
)
workunits_table_full = workunits_table_full.with_columns(inputdataset_id=pl.lit(None))
return workunits_table_full


Expand Down Expand Up @@ -78,7 +76,9 @@ def get_parameter_table(client: Bfabric, workunits_table_explode: pl.DataFrame)
# load the parameters table
collect = []
for i_frame, frame in enumerate(workunits_table_explode.iter_slices(100)):
print(f"-- Reading parameters chunk {i_frame + 1} of {len(workunits_table_explode) // 100 + 1}", file=sys.stderr)
print(
f"-- Reading parameters chunk {i_frame + 1} of {len(workunits_table_explode) // 100 + 1}", file=sys.stderr
)
chunk = (
client.read("parameter", {"id": frame["parameter_id"].to_list()}).to_polars().rename({"id": "parameter_id"})
)
Expand Down
4 changes: 1 addition & 3 deletions bfabric/scripts/bfabric_save_csv2dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,7 @@ def check_for_invalid_characters(data: pl.DataFrame, invalid_characters: str) ->
.to_numpy()
)
if len(invalid_columns) > 0:
raise RuntimeError(
f"Invalid characters found in columns: {invalid_columns[0]}"
)
raise RuntimeError(f"Invalid characters found in columns: {invalid_columns[0]}")


def main() -> None:
Expand Down
4 changes: 1 addition & 3 deletions bfabric/scripts/bfabric_save_dataset2csv.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,7 @@ def main() -> None:
)
parser.add_argument("--sep", default=",", help="the separator to use in the csv file e.g. ',' or '\\t'")
args = parser.parse_args()
bfabric_save_dataset2csv(
client=client, out_dir=args.dir, out_filename=args.file, dataset_id=args.id, sep=args.sep
)
bfabric_save_dataset2csv(client=client, out_dir=args.dir, out_filename=args.file, dataset_id=args.id, sep=args.sep)


if __name__ == "__main__":
Expand Down

0 comments on commit 5b05f78

Please sign in to comment.