diff --git a/CHANGELOG.md b/CHANGELOG.md index b2dd3b7..35bf35b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.1.4] - 2024-06-28 + +* relax naming convention for single file upload + ## [1.1.3] - 2024-06-20 * fix fsync upload diff --git a/Cargo.lock b/Cargo.lock index 5ae30a9..4df4847 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -103,7 +103,7 @@ dependencies = [ [[package]] name = "pyfusion" -version = "1.1.3" +version = "1.1.4" dependencies = [ "pyo3", ] diff --git a/Cargo.toml b/Cargo.toml index 704cceb..f1981ae 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pyfusion" -version = "1.1.3" +version = "1.1.4" edition = "2021" diff --git a/py_src/fusion/__init__.py b/py_src/fusion/__init__.py index 9366f29..beb5dd1 100644 --- a/py_src/fusion/__init__.py +++ b/py_src/fusion/__init__.py @@ -2,7 +2,7 @@ __author__ = """Fusion Devs""" __email__ = "fusion_developers@jpmorgan.com" -__version__ = "1.1.3" +__version__ = "1.1.4" from fusion.authentication import FusionCredentials from fusion.fs_sync import fsync diff --git a/py_src/fusion/fusion.py b/py_src/fusion/fusion.py index 69a69f1..8bf73f4 100644 --- a/py_src/fusion/fusion.py +++ b/py_src/fusion/fusion.py @@ -1047,7 +1047,8 @@ def upload( # noqa: PLR0913 path (str): path to a file or a folder with files dataset (str, optional): Dataset name to which the file will be uplaoded (for single file only). If not provided the dataset will be implied from file's name. - dt_str (str, optional): A single date. Defaults to 'latest' which will return the most recent. + dt_str (str, optional): A file name. Can be any string but is usually a date. + Defaults to 'latest' which will return the most recent. Relevant for a single file upload only. If not provided the dataset will be implied from file's name. catalog (str, optional): A catalog identifier. Defaults to 'common'. @@ -1101,8 +1102,10 @@ def upload( # noqa: PLR0913 warnings.warn(msg, stacklevel=2) return [(False, path, msg)] is_raw = js.loads(fs_fusion.cat(f"{catalog}/datasets/{dataset}"))["isRawData"] - file_format = path.split(".")[-1] - local_url_eqiv = [path_to_url(f"{dataset}__{catalog}__{dt_str}.{file_format}", is_raw)] + file_format = path.split(".")[-1] if not is_raw else "raw" + local_url_eqiv = [ + "/".join(distribution_to_url("", dataset, dt_str, file_format, catalog, False).split("/")[1:]) + ] data_map_df = pd.DataFrame([file_path_lst, local_url_eqiv]).T data_map_df.columns = ["path", "url"] # type: ignore diff --git a/pyproject.toml b/pyproject.toml index e853e51..d9b19e2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "pyfusion" -version = "1.1.3" +version = "1.1.4" homepage = "https://github.com/jpmorganchase/fusion" description = "JPMC Fusion Developer Tools" @@ -207,7 +207,7 @@ report.fail_under = 60 run.parallel = true [tool.bumpversion] -current_version = "1.1.3" +current_version = "1.1.4" parse = '(?P\d+)\.(?P\d+)\.(?P\d+)(?:-(?P[a-z]+)(?P\d+))?' serialize = [ '{major}.{minor}.{patch}-{release}{candidate}',