containerio 2.3.0__tar.gz → 2.3.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: containerio
3
- Version: 2.3.0
3
+ Version: 2.3.2
4
4
  Summary: Azure Blob Storage handler with unified local/cloud interface
5
5
  Author: Alliance SwissPass
6
6
  Requires-Dist: polars>=1.30.0
@@ -623,11 +623,10 @@ The CI pipeline will automatically:
623
623
  The repository includes a Crow CI pipeline that automatically builds, tests, and publishes the package when a git tag is pushed:
624
624
 
625
625
  1. Merge all branches you want to have part of a new release into main
626
- 1. Check tag for upcoming semantic release version with `git sv rn`
626
+ 1. `git sv rn`: check tag for upcoming semantic release version and associated changelog.
627
627
  1. If not already added, add your private key (whose public key is associated with your Codefloe Git user) to the SSH agent.
628
628
  `ssh-add ~/.ssh/<your-private-key>`
629
- 1. Generate tag with version based on git commit messages with `git sv tag`
630
- 1. Create and push a git tag (e.g., `git push --tags`)
629
+ 1. `git sv tag`: generate tag with version and push it to remote in one go, based on git commit parsing.
631
630
 
632
631
  The pipeline will:
633
632
  - Run linting and tests
@@ -609,11 +609,10 @@ The CI pipeline will automatically:
609
609
  The repository includes a Crow CI pipeline that automatically builds, tests, and publishes the package when a git tag is pushed:
610
610
 
611
611
  1. Merge all branches you want to have part of a new release into main
612
- 1. Check tag for upcoming semantic release version with `git sv rn`
612
+ 1. `git sv rn`: check tag for upcoming semantic release version and associated changelog.
613
613
  1. If not already added, add your private key (whose public key is associated with your Codefloe Git user) to the SSH agent.
614
614
  `ssh-add ~/.ssh/<your-private-key>`
615
- 1. Generate tag with version based on git commit messages with `git sv tag`
616
- 1. Create and push a git tag (e.g., `git push --tags`)
615
+ 1. `git sv tag`: generate tag with version and push it to remote in one go, based on git commit parsing.
617
616
 
618
617
  The pipeline will:
619
618
  - Run linting and tests
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "containerio"
3
- version = "2.3.0"
3
+ version = "2.3.2"
4
4
  description = "Azure Blob Storage handler with unified local/cloud interface"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.11"
@@ -684,12 +684,8 @@ class StorageHandler:
684
684
  pl.DataFrame: The content of the JSON file as a Polars
685
685
  DataFrame.
686
686
  """
687
- if self.local:
688
- file_path = self.base_path / blob_name
689
- return pl.read_json(source=file_path, **kwargs)
690
- else:
691
- data = self._read_blob_as_bytes(blob_name)
692
- return pl.read_json(source=BytesIO(data), **kwargs)
687
+ data = self.read_blob_as_bytes(blob_name=blob_name)
688
+ return pl.read_json(source=BytesIO(data), **kwargs)
693
689
 
694
690
  def read_csv_blob(self, blob_name: str, **kwargs: Dict) -> pl.DataFrame:
695
691
  """Reads a CSV file from storage into a Polars DataFrame.
@@ -900,17 +896,9 @@ class StorageHandler:
900
896
  Returns:
901
897
  None
902
898
  """
903
- if self.local:
904
- file_path = self.base_path / blob_name
905
- file_path.parent.mkdir(parents=True, exist_ok=True)
906
- df.write_json(file=file_path, **kwargs)
907
- else:
908
- # Write the DataFrame to an in-memory stream
909
- buffer = BytesIO()
910
- df.write_json(file=buffer, **kwargs)
911
- buffer.seek(0)
912
- # Upload the bytes to Azure Blob Storage
913
- self._write_blob_as_bytes(blob_name, buffer.getvalue())
899
+ buffer = BytesIO()
900
+ df.write_json(file=buffer, **kwargs)
901
+ self.write_blob_as_bytes(blob_name=blob_name, data=buffer.getvalue())
914
902
 
915
903
  def write_csv_blob(self, blob_name: str, df: pl.DataFrame, **kwargs: Dict) -> None:
916
904
  """Writes a Polars DataFrame to a CSV file in storage.