Skip to content

Commit

Permalink
inline build database script
Browse files Browse the repository at this point in the history
  • Loading branch information
Felix Van der Jeugt authored and Felix Van der Jeugt committed Feb 17, 2021
1 parent dab72b8 commit dd047aa
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
14 changes: 13 additions & 1 deletion .github/workflows/static_database.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,19 @@ jobs:
run: ./run.sh static-database
- name: Build SQLite database from generated files
shell: bash
run: ./workflows/static_database/build_database.sh
run: |
# Initialize the database
sqlite3 output.db < workflows/static_database/structure.sql
# Read all generated data into this database
zcat data/tables/ec_numbers.tsv.gz | sed "s/\t/$/g" | sqlite3 -csv -separator "$" output.db '.import /dev/stdin ec_numbers'
zcat data/tables/go_terms.tsv.gz | sed "s/\t/$/g" | sqlite3 -csv -separator "$" output.db '.import /dev/stdin go_terms'
zcat data/tables/interpro_entries.tsv.gz | sed "s/\t/$/g" | sqlite3 -csv -separator "$" output.db '.import /dev/stdin interpro_entries'
zcat data/tables/taxons.tsv.gz | sed "s/\t/$/g" | sqlite3 -csv -separator "$" output.db '.import /dev/stdin taxons'
zcat data/tables/lineages.tsv.gz | sed "s/\t/$/g" | sqlite3 -csv -separator "$" output.db '.import /dev/stdin lineages'
# Compress the database before uploading it to a Github release
zip output.zip output.db
- name: Update database versioning
shell: bash
run: |
Expand Down
12 changes: 0 additions & 12 deletions workflows/static_database/build_database.sh

This file was deleted.

0 comments on commit dd047aa

Please sign in to comment.