Skip to content

Commit

Permalink
Adding new/updated io.github.betaseg_download_granules_0.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Scaramir committed Dec 28, 2023
1 parent 1edb803 commit f029492
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 0 deletions.
Binary file modified album_catalog_index.db
Binary file not shown.
8 changes: 8 additions & 0 deletions solutions/io.github.betaseg/download_granules/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changelog
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).

## [0.1.0] - 2023-12-28

40 changes: 40 additions & 0 deletions solutions/io.github.betaseg/download_granules/solution.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
from album.runner.api import get_args, setup, download_if_not_exists


def run():
from pathlib import Path
import zipfile
import shutil

dl_path = download_if_not_exists(
"https://syncandshare.desy.de/index.php/s/5SJFRtAckjBg5gx/download/data_granules.zip", "data_granules.zip")

# extract data_granules.zip
if not Path(dl_path.parent).joinpath("data_granules").exists():
with zipfile.ZipFile(dl_path, 'r') as zip_ref:
zip_ref.extractall(dl_path.parent)

# copy to target path
shutil.copytree(dl_path.parent.joinpath("data_granules"), get_args().target_path)


setup(
group="io.github.betaseg",
name="download_granules",
version="0.1.0",
title="download_granules",
description="An album solution to download granules from the DESY sync&share.",
solution_creators=["Jan Philipp Albrecht"],
cite=[],
tags=["granules", "dataset"],
license="MIT",
album_api_version="0.5.5",
args=[
{
"name": "target_path",
"description": "target folder to extract data to. Folder should not exist yet.",
"required": True
},
],
run=run,
)
19 changes: 19 additions & 0 deletions solutions/io.github.betaseg/download_granules/solution.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
album_api_version: 0.5.5
args:
- description: target folder to extract data to. Folder should not exist yet.
name: target_path
required: true
changelog: null
cite: []
description: An album solution to download granules from the DESY sync&share.
group: io.github.betaseg
license: MIT
name: download_granules
solution_creators:
- Jan Philipp Albrecht
tags:
- granules
- dataset
timestamp: '2023-12-28T20:34:42.272861'
title: download_granules
version: 0.1.0

0 comments on commit f029492

Please sign in to comment.