Skip to content

Commit 2b5814b

Browse files
committed
Implement required methods
1 parent e8672b8 commit 2b5814b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

planemo/database/postgres_singularity.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""Module describes a :class:`DatabaseSource` for managed, dockerized postgres databases."""
22

33
import os
4+
import shutil
45
import time
56
from tempfile import mkdtemp
67
from typing import Optional
@@ -94,6 +95,13 @@ def __init__(self, profile_directory: Optional[str] = None, **kwds):
9495
self._kwds = kwds
9596
self.running_process = None
9697

98+
def create_database(self, identifier):
99+
# Not needed, we'll create the database automatically when the container starts.
100+
pass
101+
102+
def delete_database(self, identifier):
103+
shutil.rmtree(self.database_location, ignore_errors=True)
104+
97105
def __enter__(self):
98106
self.running_process = start_postgres_singularity(
99107
singularity_path=self.singularity_path,

0 commit comments

Comments
 (0)