Skip to content

Commit

Permalink
Feature/fix fsync upload (#55)
Browse files Browse the repository at this point in the history
* fix fsync upload
  • Loading branch information
dbernaciak committed Jun 21, 2024
1 parent 4f84990 commit 075fbd3
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 9 deletions.
6 changes: 5 additions & 1 deletion 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.3] - 2024-06-20

* fix fsync upload

## [1.1.2] - 2024-06-16

* default root_url change
Expand Down Expand Up @@ -143,4 +147,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [1.0.1] - 2022-05-12

* First live release on JPMC gitub
* First live release on JPMC gitub
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.2"
version = "1.1.3"
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.2"
__version__ = "1.1.3"

from fusion.authentication import FusionCredentials
from fusion.fs_sync import fsync
Expand Down
2 changes: 1 addition & 1 deletion py_src/fusion/fs_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def _upload(
local_path: str = "",
) -> list[tuple[bool, str, Optional[str]]]:
upload_df = df.rename(columns={"path_local": "path"})
upload_df["path"] = local_path + upload_df["path"]
upload_df["path"] = [Path(local_path) / p for p in upload_df["path"]]
parallel = len(df) > 1
res = upload_files(
fs_fusion,
Expand Down
5 changes: 3 additions & 2 deletions py_src/fusion/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ class TqdmBatchCompletionCallback(joblib.parallel.BatchCompletionCallBack): # t

def __call__(self, *args: Any, **kwargs: Any) -> Any:
n = 0
for i in args[0]._result:
lst = args[0]._result if hasattr(args[0], "_result") else args[0]
for i in lst:
try:
if i[0] is True:
n += 1
Expand Down Expand Up @@ -1050,7 +1051,7 @@ def _upload(p_url: str, path: str) -> tuple[bool, str, Optional[str]]:
res = [None] * len(loop)
if show_progress:
with tqdm(total=len(loop)) as p:
for i, row in loop.iterrows():
for i, (_, row) in enumerate(loop.iterrows()):
r = _upload(row["url"], row["path"])
res[i] = r
if r[0] is True:
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.2"
version = "1.1.3"

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.2"
current_version = "1.1.3"
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 075fbd3

Please sign in to comment.