From 625583507475f3591d4fad01dac1c5643678c39d Mon Sep 17 00:00:00 2001 From: Davide Gamba <davide.gamba@cern.ch> Date: Mon, 24 May 2021 22:27:19 +0200 Subject: [PATCH] minor changes --- README.md | 9 ++++++++- datascout/_datascout.py | 9 ++------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 0781811..0079579 100644 --- a/README.md +++ b/README.md @@ -64,7 +64,14 @@ source ./venv/bin/activate python -m pip install -e . ``` -6. Created documentation: +6. Create documentation: ``` acc-py init-docs ``` + +7. Check code style using `black`: +``` +python -m pip install black +black --diff . # To see what `black` is proposing to do to your source code +black . # To let `black` edit the source code +``` diff --git a/datascout/_datascout.py b/datascout/_datascout.py index af28cae..5e479e3 100644 --- a/datascout/_datascout.py +++ b/datascout/_datascout.py @@ -348,7 +348,7 @@ def json_to_pandas(filename): """ Function provided for convenience, but not of interest for typical use case... """ - return df.read_json(filename) + return pd.read_json(filename) def pandas_to_dict(input_pandas): @@ -402,14 +402,9 @@ def parquet_to_awkward(filename): ####### Simple save/load functions for the user - -def _getFilename(): - return datetime.now().strftime("%Y.%m.%d.%H.%M.%S.%f") - - def save_dict(dictData, folderPath=None, filename=None, fileFormat="parquet"): if filename == None: - filename = _getFilename() + filename = datetime.now().strftime("%Y.%m.%d.%H.%M.%S.%f") Path(folderPath).mkdir(parents=True, exist_ok=True) filename = os.path.join(folderPath, filename) if fileFormat == "parquet": -- GitLab