From 0af341bfc2f8ec925b0c7148a81c39127c84ae1c Mon Sep 17 00:00:00 2001 From: Peter Kerpedjiev Date: Tue, 12 Jan 2021 14:34:29 -0800 Subject: [PATCH 1/5] Updated the CHANGELOG --- CHANGELOG.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d2768362..919a382f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,8 @@ -Future version +v1.14.2 + +- Turn off thumbnail generation + +v1.14.* - Added support for bigBed files - Update readme installation instructions and troubleshooting instructions for macOS 10.15 From 0b817ebab1073654e50edb7e166ab6c7737c2bd9 Mon Sep 17 00:00:00 2001 From: Peter Kerpedjiev Date: Tue, 10 Aug 2021 21:29:19 -0700 Subject: [PATCH 2/5] Bump clodius version --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 80fe678d..f17436bd 100644 --- a/requirements.txt +++ b/requirements.txt @@ -21,7 +21,7 @@ requests==2.20.0 scikit-learn==0.19.2 slugid==2.0.0 redis==2.10.5 -clodius==0.12.0 +clodius==0.17.0 simple-httpfs==0.2.0 pyppeteer==0.0.25 From 75fd62c1f0cf2d2c2f5e76c593a5f9e151fa5411 Mon Sep 17 00:00:00 2001 From: Peter Kerpedjiev Date: Tue, 10 Aug 2021 21:29:54 -0700 Subject: [PATCH 3/5] Updated the CHANGELOG --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 919a382f..e5f9432b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +v1.14.3 + +- Bump clodius version + v1.14.2 - Turn off thumbnail generation From 89378091e8e2e8d150a3c9159387e43add461509 Mon Sep 17 00:00:00 2001 From: Peter Kerpedjiev Date: Sun, 15 Aug 2021 20:53:54 -0700 Subject: [PATCH 4/5] Bumped h5py requirement version --- CHANGELOG.md | 4 ++++ requirements.txt | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ddc89be2..ad3efd6c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +v1.14.4 + +- Bump h5py requirement version + v1.14.3 - Bump clodius version diff --git a/requirements.txt b/requirements.txt index f17436bd..e2ea6e73 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,7 +7,7 @@ django-guardian==1.5.1 django-rest-swagger==2.2.0 django==2.1.11 djangorestframework==3.9.1 -h5py==2.6.0 +h5py>=3.0.0 higlass-python==0.2.1 jsonschema==3.2.0 numba==0.46.0 From 78e5bc7bddb83001bf1a18b87864c93e5db1adcf Mon Sep 17 00:00:00 2001 From: Peter Kerpedjiev Date: Mon, 22 Nov 2021 21:03:04 -0800 Subject: [PATCH 5/5] Fix bug where url tilesets could not be deleted --- CHANGELOG.md | 4 ++ .../management/commands/delete_tileset.py | 39 ++++++++++++------- 2 files changed, 29 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c8eb07f..c917de86 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +v1.14.6 + +- Fix bug where url tilesets could not be deleted + v1.14.5 - Don't require indexfile field in Tileset model diff --git a/tilesets/management/commands/delete_tileset.py b/tilesets/management/commands/delete_tileset.py index 8b6988b0..5d3f0fee 100644 --- a/tilesets/management/commands/delete_tileset.py +++ b/tilesets/management/commands/delete_tileset.py @@ -1,30 +1,41 @@ +import os + +from django.conf import settings from django.core.management.base import BaseCommand, CommandError from django.db.models import ProtectedError -from django.conf import settings + import tilesets.models as tm -import os + class Command(BaseCommand): def add_arguments(self, parser): - parser.add_argument('--uuid', type=str, required=True) - + parser.add_argument("--uuid", type=str, required=True) + def handle(self, *args, **options): - uuid = options.get('uuid') - + uuid = options.get("uuid") + # search for Django object, remove associated file and record instance = tm.Tileset.objects.get(uuid=uuid) if not instance: - raise CommandError('Instance for specified uuid ({}) was not found'.format(uuid)) + raise CommandError( + "Instance for specified uuid ({}) was not found".format(uuid) + ) else: filename = instance.datafile.name filepath = os.path.join(settings.MEDIA_ROOT, filename) - if not os.path.isfile(filepath): - raise CommandError('File does not exist under media root') - try: - os.remove(filepath) - except OSError: - raise CommandError('File under media root could not be removed') + + if not filepath.endswith(".."): + # ignore files that are mounted using simple-httpfs + if not os.path.isfile(filepath): + raise CommandError("File does not exist under media root") + try: + os.remove(filepath) + except OSError: + raise CommandError("File under media root could not be removed") + try: instance.delete() except ProtectedError: - raise CommandError('Instance for specified uuid ({}) could not be deleted'.format(uuid)) \ No newline at end of file + raise CommandError( + "Instance for specified uuid ({}) could not be deleted".format(uuid) + )