Skip to content

Commit

Permalink
Feature/raw name relax (#56)
Browse files Browse the repository at this point in the history
* relax raw dataset name for upload
  • Loading branch information
dbernaciak committed Jun 28, 2024
1 parent 075fbd3 commit 7884dca
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 8 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pyfusion"
version = "1.1.3"
version = "1.1.4"
edition = "2021"


Expand Down
2 changes: 1 addition & 1 deletion py_src/fusion/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 6 additions & 3 deletions py_src/fusion/fusion.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'.
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down Expand Up @@ -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<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(?:-(?P<release>[a-z]+)(?P<candidate>\d+))?'
serialize = [
'{major}.{minor}.{patch}-{release}{candidate}',
Expand Down

0 comments on commit 7884dca

Please sign in to comment.