Skip to content

Commit

Permalink
Fix/version conflicts (#109)
Browse files Browse the repository at this point in the history
* Version conflicts
* Version conflicts
* Fixing document versions
* removing redundant tests
* Accomodating the breaking changes on cognite-sdk 7.1
* Version changes
  • Loading branch information
vminfant authored Nov 16, 2023
1 parent 136ec7d commit e669500
Show file tree
Hide file tree
Showing 11 changed files with 442 additions and 422 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
run_linting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: 3.9
Expand All @@ -25,7 +25,7 @@ jobs:
runs-on: ubuntu-latest
needs: run_linting
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: 3.9
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup pip cache
uses: actions/cache@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ repos:
hooks:
- id: isort
- repo: https://github.com/psf/black
rev: 23.9.1
rev: 23.11.0
hooks:
- id: black
args:
- --line-length
- "120"
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.5.1
rev: v1.7.0
hooks:
- id: mypy
exclude: ^(tests/|examples/|docs/)
Expand Down
9 changes: 7 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,14 @@ Changes are grouped as follows
## [0.2.9] - 2023-10-26

### Added
- Support for native multipart file upload for CDF in Azure and Google.
- Support for native multipart file upload for CDF in Azure and Google.

## [0.2.10] - 2023-11-1

### Fixed
- Fix internal cache accumulated if big files are handled with native multipart implementation
- Fix internal cache accumulated if big files are handled with native multipart implementation

## [0.3.0] - 2023-11-16

### Fixed
- Dependency updates for docs & source code.
2 changes: 1 addition & 1 deletion cognite/cdffs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from .spec import CdfFileSystem

__version__ = "0.2.10"
__version__ = "0.3.0"
__all__ = ["CdfFileSystem"]

fsspec.register_implementation(CdfFileSystem.protocol, CdfFileSystem)
2 changes: 1 addition & 1 deletion cognite/cdffs/memory_upload_strategy.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ def upload_chunk(self, data: bytes, index: int) -> None:
def merge_chunks(self) -> int:
"""Merge all uploaded blocks into the final blob."""
content = b"".join([self.blocks[key] for key in sorted(self.blocks.keys())])
self.cognite_client.files.upload_bytes(content=content, **self.metadata.dump(), overwrite=True)
self.cognite_client.files.upload_bytes(content=content, **self.metadata.dump(camel_case=False), overwrite=True)
return len(content)
6 changes: 3 additions & 3 deletions cognite/cdffs/spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,7 @@ def __init__(
self.all_bytes_caching: bool = "cache_type" in kwargs and kwargs["cache_type"] == "all"
self.file_metadata: FileMetadata = FileMetadata(
**{
**fs.file_metadata.dump(),
**fs.file_metadata.dump(camel_case=False),
"name": Path(path).name,
"external_id": self.external_id,
"directory": self.root_dir,
Expand All @@ -681,8 +681,8 @@ def __init__(
if isinstance(kwargs.get("file_metadata"), FileMetadata) and mode != "rb":
self.file_metadata = FileMetadata(
**{
**self.file_metadata.dump(),
**kwargs.pop("file_metadata").dump(), # type: ignore
**self.file_metadata.dump(camel_case=False),
**kwargs.pop("file_metadata").dump(camel_case=False), # type: ignore
}
)

Expand Down
6 changes: 3 additions & 3 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
toml==0.10.2
fsspec==2023.9.2
cognite-sdk==6.28.0
fsspec==2023.10.0
cognite-sdk==7.1.0
requests==2.31.0
pydantic==2.4.2
pydantic==2.5.1
807 changes: 411 additions & 396 deletions poetry.lock

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "cognite-cdffs"
version = "0.2.10"
version = "0.3.0"
description = "File System Interface for CDF Files"
license = "Apache-2.0"
authors = ["Infant Alex <[email protected]>"]
Expand All @@ -9,19 +9,19 @@ packages = [
{ include="cognite", from="." },
]
[tool.poetry.group.test.dependencies]
pandas = "^2.1.1"
pyarrow = "^13.0.0"
pandas = "^2.1.3"
pyarrow = "^14.0.1"
zarr = "^2.16.1"
dask = "^2023.7.1"
dask = "^2023.11.0"
xarray = "^2023.9.0"
geodatasets = "^2023.3.0"
geopandas = "^0.13.2"
geopandas = "^0.14.1"

[tool.poetry.group.dev.dependencies]
types-requests = "^2.28.11.5"
pytest-cov = "^4.1.0"
black = "^23.7.0"
responses = "^0.23.2"
black = "^23.11.0"
responses = "^0.24.1"
flake8 = "^6.1.0"
pre-commit = "^3.2.2"
flake8-pyproject = "^1.2.3"
Expand Down Expand Up @@ -68,11 +68,11 @@ commands =

[tool.poetry.dependencies]
python = ">=3.9.10,<3.13"
cognite-sdk = "^6.28.0"
fsspec = "^2023.9.2"
cognite-sdk = "^7.1.0"
fsspec = "^2023.10.0"
requests = "^2.31.0"
twine = "^4.0.2"
pydantic = "^2.4.2"
pydantic = "^2.5.1"
python-dotenv = "^1.0.0"
pydantic-settings = "^2.0.3"
tenacity = "^8.2.3"
Expand Down

0 comments on commit e669500

Please sign in to comment.