MIT-LCP / MIT-LCP/physionet

Remove resetdb script from MIMIC-II importer package

Open Beginner friendly
#13 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
82
Forks
21
Avg merge
35m
Merged PRs (30d)
1

Description

The MIMIC-II importer package includes a script call "resetdb" which deletes the entire Postgres database cluster when run (i.e. deletes all Postgres databases on the system, not just MIMIC). It may be best to remove this from the importer package (people can find instructions on the web if necessary).

#! /bin/sh
# file: resetdb.sh      13 February 2011
#
# Please think twice before running this program!!
#
# To reset the PostgreSQL database cluster to its initial state, run this
# script as root.  This was useful while debugging the MIMIC exporter,
# but it's dangerous to leave it around -- please remove it if you
# have no need for it.

echo "Warning: the entire PostgreSQL database cluster will be removed!"
echo -n "Are you sure you want to do this? [y/N]: "
read ANSWER
case $ANSWER in
  y*|Y*) echo "The database cluster will be removed in 5 seconds unless you interrupt this script."
    sleep 7
    service postgresql-9.0 stop
    rm -rf /var/lib/pgsql/9.0
    service postgresql-9.0 initdb
    service postgresql-9.0 start
    ./prep.sh
    ;;
     *) echo "Cancelled, no changes made."
    ;;
esac
exit

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate resetdb.sh in the MIMIC-II importer package and confirm how it is included or referenced. Remove the dangerous script from the package, then verify that the remaining importer files do not depend on it and that the package still contains the expected import instructions.

Written by the indexing model from the issue text.

Assessment

Tech stack
postgresql, shell
Domain
databases
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.