Skip to content

Commit

Permalink
[infra] Corrige issue #267: (#282)
Browse files Browse the repository at this point in the history
* Simple fix, just make the path string into Posix format with pathlib.Path.as_posix()

* fix replace error

* bump version to 1.4.2 fix partition path bug on windows
  • Loading branch information
Hellcassius authored Feb 17, 2021
1 parent 9b661f1 commit 4b72c5d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions basedosdados/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,8 @@ def upload(

parts = [
(
str(filepath)
.replace(str(path) + "/", "")
filepath.as_posix()
.replace(path.as_posix() + "/", "")
.replace(str(filepath.name), "")
)
for filepath in paths
Expand Down
2 changes: 1 addition & 1 deletion basedosdados/table.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ def init(

partition_columns = [
k.split("=")[0]
for k in str(data_sample_path).split("/")
for k in data_sample_path.as_posix().split("/")
if "=" in k
]

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ packages = [
]
readme = "README.md"
repository = "https://github.com/base-dos-dados/bases"
version = "1.4.1"
version = "1.4.2"

[tool.poetry.scripts]
basedosdados = 'basedosdados.cli:cli'
Expand Down

0 comments on commit 4b72c5d

Please sign in to comment.