Skip to content

Commit

Permalink
Merge pull request #228 from pepkit/dev
Browse files Browse the repository at this point in the history
Release v0.10.4
  • Loading branch information
khoroshevskyi authored Oct 2, 2023
2 parents 2d7581e + 772f50d commit 2c8a73a
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 6 deletions.
6 changes: 6 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html) and [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) format.

# [0.10.4] - 10-02-2023

### Fixed

- PEP zip downloading

# [0.10.3] - 08-31-2023

### Changed
Expand Down
2 changes: 1 addition & 1 deletion pephub/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.10.3"
__version__ = "0.10.4"
13 changes: 9 additions & 4 deletions pephub/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from yaml import safe_load
import zipfile
import io
import yaml

import peppy
from peppy.const import SAMPLE_DF_KEY
Expand Down Expand Up @@ -130,20 +131,24 @@ def zip_pep(project: peppy.Project) -> Response:
if project.config:
prj_cof_file = project.config_file or "config.yaml"
cfg_filename_base = basename(prj_cof_file)
content_to_zip[cfg_filename_base] = project.config.to_yaml()
content_to_zip[cfg_filename_base] = yaml.dump(project.config, indent=4)

if project.sample_table is not None:
sample_table_filename = basename(
project.to_dict().get("sample_table", "sample_table.csv")
)
content_to_zip[sample_table_filename] = project[SAMPLE_DF_KEY].to_csv()
content_to_zip[sample_table_filename] = project[SAMPLE_DF_KEY].to_csv(
index=False
)

if project.subsample_table is not None:
if not isinstance(project.subsample_table, list):
subsample_table_filename = basename(
project.to_dict().get("subsample_table", "subsample_table.csv")
)
content_to_zip[subsample_table_filename] = project.subsample_table.to_csv()
content_to_zip[subsample_table_filename] = project.subsample_table.to_csv(
index=False
)
else:
subsample_table_filenames = project.to_dict().get(
"subsample_table", "subsample_table.csv"
Expand All @@ -152,7 +157,7 @@ def zip_pep(project: peppy.Project) -> Response:
project.subsample_table, subsample_table_filenames
):
subsample_table_filename = basename(sstable_filename)
content_to_zip[subsample_table_filename] = sstable.to_csv()
content_to_zip[subsample_table_filename] = sstable.to_csv(index=False)

zip_filename = project.name or f"downloaded_pep_{date.today()}"
return zip_conv_result(content_to_zip, filename=zip_filename)
Expand Down
2 changes: 1 addition & 1 deletion requirements/requirements-all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ tqdm
uvicorn
python-dotenv
pepdbagent>=0.6.0
peppy<=0.40.0a4
peppy>=0.40.0a4
qdrant-client
requests
aiofiles
Expand Down

0 comments on commit 2c8a73a

Please sign in to comment.