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

Fix datasets #17

Merged
merged 6 commits into from
Apr 8, 2021
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
40 changes: 40 additions & 0 deletions .githooks/compress_files.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#!/usr/bin/env bash
# File: zip_files.sh
# Description: This bash file compresses the .cpp core code of prospr
# multiple times into archives with different extensions.
# It also compresses the provided datasets into archives
# with different extensions. All archives are moved into
# the archives folder.

set -e

ARCHIVEDIR=archives
COREDIR=prospr/core/src
DATADIR=prospr/data


# Create .zip core archive.
zip -jrq prospr_core.zip "${COREDIR}/"
mv prospr_core.zip "${ARCHIVEDIR}/prospr_core.zip"

# Create .tar.gz core archive.
cd "${COREDIR}"
tar -czf prospr_core.tar.gz *.cpp *.hpp
cd ../../../
mv "${COREDIR}"/prospr_core.tar.gz "${ARCHIVEDIR}"/prospr_core.tar.gz

# Create .zip data archive.
cd "${DATADIR}"
zip -rq prospr_data.zip .
cd ../../
mv "${DATADIR}"/prospr_data.zip "${ARCHIVEDIR}"/prospr_data.zip

# Create .tar.gz data archive.
cd "${DATADIR}"
tar -czf prospr_data.tar.gz */*.csv
cd ../../
mv "${DATADIR}"/prospr_data.tar.gz "${ARCHIVEDIR}"/prospr_data.tar.gz

# Add archives to git stage.
git add "${ARCHIVEDIR}"/prospr_core.zip "${ARCHIVEDIR}"/prospr_core.tar.gz \
"${ARCHIVEDIR}"/prospr_data.zip "${ARCHIVEDIR}"/prospr_data.tar.gz
22 changes: 0 additions & 22 deletions .githooks/zip_core.sh

This file was deleted.

6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ repos:
language_version: python3.8
- repo: local
hooks:
- id: zip-core
name: zip-core
entry: ./.githooks/zip_core.sh
- id: compress-files
name: compress-files
entry: ./.githooks/compress_files.sh
language: script
15 changes: 12 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,19 @@ This package can simply be installed via pip by running:
pip install prospr
```

## C++ core archives
## Archives
All the C++ core files and datasets are also available as compressed archives.
See the subsections below for direct links.

### C++ core
All the core code which prospr runs on, is available as a compressed archive.
The folder `core_archives` contains a [.zip](core_archives/prospr_core.zip) and
a [.tar.gz](core_archives/prospr_core.tar.gz) archive.
The folder `archives` contains a [.zip](archives/prospr_core.zip) and
a [.tar.gz](archives/prospr_core.tar.gz) archive.

### Datasets
The complete collection of datasets is available as a compressed archive in the
`archives` folder. It is available as a [.zip](archives/prospr_data.zip) and a
[.tar.tz](archives/prospr_data.tar.gz) archive.

## Example usage
*Work in progress*
Expand Down
Binary file added archives/prospr_core.tar.gz
Binary file not shown.
Binary file not shown.
Binary file added archives/prospr_data.tar.gz
Binary file not shown.
Binary file added archives/prospr_data.zip
Binary file not shown.
Binary file removed core_archives/prospr_core.tar.gz
Binary file not shown.
1 change: 1 addition & 0 deletions prospr/core/src/depth_first.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* File: depth_first.h
* Description: Header file for a depth-first search function.
*/

#ifndef DEPTH_FIRST_H
#define DEPTH_FIRST_H

Expand Down
1 change: 1 addition & 0 deletions prospr/core/src/depth_first_bnb.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* Description: Header file for a depth-first branch-and-bound search
* function.
*/

#ifndef DEPTH_FIRST_BNB_H
#define DEPTH_FIRST_BNB_H

Expand Down
1 change: 1 addition & 0 deletions prospr/core/src/protein.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* File: protein.h
* Description: Header file for a protein object within the HP-model.
*/

#ifndef PROTEIN_H
#define PROTEIN_H

Expand Down
Loading