Skip to content

Commit 49e57f7

Browse files
committed
Remove dependency on outdated GitPython
Only used to write commit hashes to MongoDB (but most are blank or ab62755) Current version if reinstalled has bug gitpython-developers/GitPython#983 without upgrading
1 parent e008ff0 commit 49e57f7

File tree

2 files changed

+2
-12
lines changed

2 files changed

+2
-12
lines changed

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ RUN curl -LO https://jbrowse.org/releases/JBrowse-${JBROWSE_VERSION}/JBrowse-${J
3434
rm JBrowse-${JBROWSE_VERSION}.zip && \
3535
cd /var/www/html/jbrowse && ./setup.sh
3636
RUN pip install --no-cache-dir numpy==1.11.2 pymongo==3.8.0 requests==2.22.0 && \
37-
pip3 install --no-cache-dir numpy==1.17.2 pymongo==3.8.0 requests==2.20.0 Jinja2==2.10.1 GitPython==3.0.5
37+
pip3 install --no-cache-dir numpy==1.17.2 pymongo==3.8.0 requests==2.20.0 Jinja2==2.10.1
3838
COPY config-template /var/www/html/config
3939

4040
CMD service mongodb start && exec apache2-foreground

src/guide-finder/GuideAdd.py

+1-11
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
99
"""
1010

11-
import os, sys, json, cgi, git, datetime
11+
import os, sys, json, cgi, datetime
1212
from subprocess import Popen, PIPE, DEVNULL
1313

1414
dir_path = os.path.dirname(os.path.abspath(__file__))
@@ -139,15 +139,6 @@ def combineSequence(self, rgen, guideSeq, pamSeq):
139139

140140
def insertGuide(self):
141141
""" create a new record in the database for the guide """
142-
143-
# get the current git commit hash
144-
try:
145-
repo = git.Repo(search_parent_directories=True)
146-
git_hash = repo.head.object.hexsha
147-
except Exception as e:
148-
# don't prevent guide from being added
149-
git_hash = ''
150-
# build the dict
151142
newGuideRecord = {
152143
'batchName': self.metadata['gene'],
153144
'status': 'Accepted',
@@ -164,7 +155,6 @@ def insertGuide(self):
164155
'ENSID': self.metadata['ENSID'],
165156
'guideLocation': self.guide['guideLocation'],
166157
'rgenID': self.metadata['rgenID'],
167-
'commitHash': git_hash,
168158
'dateAdded': datetime.datetime.utcnow()
169159
}
170160
# TODO: think about how best to display the scores -> on primer end need to allow for possibility of no score

0 commit comments

Comments
 (0)