-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding new/updated io.github.betaseg_download_granules_0.1.0
- Loading branch information
Showing
4 changed files
with
67 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
19
solutions/io.github.betaseg/download_granules/solution.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |