Skip to content

Commit

Permalink
update SQLite & zstd
Browse files Browse the repository at this point in the history
  • Loading branch information
mlin committed Feb 27, 2023
1 parent ba82cb9 commit d248a12
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 11 deletions.
7 changes: 1 addition & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on: [push, pull_request]

env:
APT_DEPS: libzstd-dev samtools tabix libhts-dev pigz python3-pip libcurl4-openssl-dev
BREW_DEPS: [email protected] zstd samtools pigz coreutils
BREW_DEPS: [email protected] zstd samtools pigz coreutils sqlite
PIP_DEPS: pytest pytest-xdist

jobs:
Expand Down Expand Up @@ -127,11 +127,6 @@ jobs:
brew install $dep || brew upgrade $dep
done
# FIXME 2022-12-27: pin sqlite 3.39.4 due to query plan regression in 3.40.0
# https://sqlite.org/forum/forumpost/07b36e3899a9ae21
wget https://raw.githubusercontent.com/Homebrew/homebrew-core/fc08979e0cc7c580a2feba5447d9a518dc518826/Formula/sqlite.rb
brew reinstall -s sqlite.rb
/usr/local/bin/pip3 install $PIP_DEPS
- name: rust toolchain
uses: actions-rs/toolchain@v1
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
FROM centos:7 as builder

ARG CMAKE_VERSION=3.17.3
ARG SQLITE_VERSION=3390400
ARG ZSTD_VERSION=1.5.2
ARG SQLITE_VERSION=3410000
ARG ZSTD_VERSION=1.5.4
ARG CPU_ARCH=ivybridge
ENV CFLAGS="-march=${CPU_ARCH} -O3"
ENV CXXFLAGS=${CFLAGS}
Expand Down Expand Up @@ -35,7 +35,7 @@ RUN mkdir -p /work/GenomicSQLite

# SQLite
WORKDIR /work
RUN wget -nv http://www.sqlite.org/2022/sqlite-amalgamation-${SQLITE_VERSION}.zip \
RUN wget -nv http://www.sqlite.org/2023/sqlite-amalgamation-${SQLITE_VERSION}.zip \
&& unzip -o sqlite-amalgamation-${SQLITE_VERSION}.zip
WORKDIR /work/sqlite-amalgamation-${SQLITE_VERSION}
RUN bash -c "scl enable devtoolset-8 'gcc -shared -o libsqlite3.so.0 -fPIC -shared -Wl,-soname,libsqlite3.so.0 -g ${CFLAGS} ${SQLITE_CFLAGS} sqlite3.c' & pid=$? \
Expand Down
2 changes: 1 addition & 1 deletion test/genomicsqlite_smoke_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def main():
print(f"\ntest database: {dbfile}")
try:
dbconn = genomicsqlite.connect(dbfile)
for (table, bed) in (("exons1", _EXONS1), ("exons2", _EXONS2)):
for table, bed in (("exons1", _EXONS1), ("exons2", _EXONS2)):
dbconn.execute(
f"CREATE TABLE {table}(chrom TEXT, pos INTEGER, end INTEGER, id TEXT PRIMARY KEY)"
)
Expand Down
2 changes: 1 addition & 1 deletion test/test_parse_genomic_range.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

def test_parse_genomic_range():
con = genomicsqlite.connect(":memory:")
for (txt, chrom, begin_pos, end_pos) in [
for txt, chrom, begin_pos, end_pos in [
("chr1:2,345-06,789", "chr1", 2344, 6789),
("π:1-9,223,372,036,854,775,799", "π", 0, 9223372036854775799),
]:
Expand Down

0 comments on commit d248a12

Please sign in to comment.