Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v0.10.4 #228

Merged
merged 3 commits into from
Oct 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading