Repository: asyml/stave (language: python)

Issue:
Update stave package name
**Is your feature request related to a problem? Please describe.**
To import `StaveViewer`, we need to use:
```python
from nlpviewer_backend.lib.stave_viewer import StaveViewer
```
The current package name is `nlpviewer_backend`, which is not very indicative of a Stave package.

**Describe the solution you'd like**
We want to change the package name to something more intuitive for users, e.g., `stave_backend`.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.



Discussion / hints:

Fix patch:
diff --git a/.env b/.env
index 9b6a0a5..5ce3cda 100644
--- a/.env
+++ b/.env
@@ -1,1 +1,1 @@
-PYTHONPATH=./simple-backend/nlpviewer_backend
\ No newline at end of file
+PYTHONPATH=./simple-backend/stave_backend
\ No newline at end of file
diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml
index f9da74c..471e15d 100644
--- a/.github/workflows/pypi.yml
+++ b/.github/workflows/pypi.yml
@@ -34,7 +34,7 @@ jobs:
         run: |
           yarn install
           yarn run build
-          mv ./build ./simple-backend/nlpviewer_backend/lib/build
+          mv ./build ./simple-backend/stave_backend/lib/build
       - name: Build a binary wheel and a source tarball
         run: |
           python -m build --sdist --wheel --outdir dist/ .
diff --git a/MANIFEST.in b/MANIFEST.in
index de3de1b..6ecb60a 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,2 +1,2 @@
-recursive-include simple-backend/nlpviewer_backend/sample_projects *
-recursive-include simple-backend/nlpviewer_backend/lib/build *
\ No newline at end of file
+recursive-include simple-backend/stave_backend/sample_projects *
+recursive-include simple-backend/stave_backend/lib/build *
\ No newline at end of file
diff --git a/setup.py b/setup.py
index 3a309c8..2c5e45a 100644
--- a/setup.py
+++ b/setup.py
@@ -34,7 +34,7 @@
     },
     entry_points={
         'console_scripts':[
-            'stave = nlpviewer_backend.lib.stave_cli:main'
+            'stave = stave_backend.lib.stave_cli:main'
         ]
     },
     classifiers=[
diff --git a/simple-backend/manage.py b/simple-backend/manage.py
index 7987b91..f751d98 100755
--- a/simple-backend/manage.py
+++ b/simple-backend/manage.py
@@ -3,7 +3,7 @@
 import sys
 
 if __name__ == '__main__':
-    os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'nlpviewer_backend.settings')
+    os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'stave_backend.settings')
     try:
         from django.core.management import execute_from_command_line
     except ImportError as exc:
diff --git a/simple-backend/sample_sql/nlpviewer_backend_document.sql b/simple-backend/sample_sql/stave_backend_document.sql
similarity index 99%
rename from simple-backend/sample_sql/nlpviewer_backend_document.sql
rename to simple-backend/sample_sql/stave_backend_document.sql
index 5b62a4f..028675b 100644
--- a/simple-backend/sample_sql/nlpviewer_backend_document.sql
+++ b/simple-backend/sample_sql/stave_backend_document.sql
@@ -1,5 +1,5 @@
 BEGIN TRANSACTION;
-INSERT INTO "nlpviewer_backend_document" ("id","name","textPack","project_id") VALUES (42,'project1-doc1-example','{
+INSERT INTO "stave_backend_document" ("id","name","textPack","project_id") VALUES (42,'project1-doc1-example','{
   "py/object": "forte.data.data_pack.DataPack",
   "py/state": {
     "_text": "Tomorrow ''s summit meeting will bring Ehud Barak and Yasser Arafat to the resort city of Sharm El - eikh . Getting both to attend was not an easy task . The last thing President Clinton did today before heading to the Mideast is go to church -- appropriate , perhaps , given the enormity of the task he and his national security team face in the days ahead . We do have to try to reduce the violee and take a turn back for a period of calmness so that we can move back to a peace process , but even if the violence subsides , Israelis and Palestinians will still have to deal with an open wound -- a scar so long and so deep from these last two weeks , it may be years before there is a real effort at talking peace again . Both sides have almost stepped back six years in terms of their statements and attitudes , six years or more -- before the Oslo accords , when the Israelis promised land and the Palestinians promised security . Today there is only finger pointing . Arafat deliberately launched it in order to attract the attention of the world by paying with the blood of his own people . I urge Mr. Barak to lift the siege of Palestinians , to speak to the Palestinians as its neighbors because they are his neighbors . The Palestinians clearly face the greatest pressure in this summit , since the Israelis are not the only ones blaming them for the outbreak of violence . I think we all know that Arafat is in charge of the Palestinian Authority . He has the responsibility for controlling the violence . But it may not be so easy for Arafat . Today , thousands of Palestinians are calling for continued fighting . Half of the Palestinian population is under the age of 14 and many have been influenced by military factions like Hamas and Hezbollah -- not by Arafat . When you talk about Arafat and the people around him , you have to understand how young this population really is -- how volatile , how close to exploding it really is . Almost no one seems optimistic about the future of the Mideast . That ''s the heartbreak of this region says one State Department official . Whenever you take a step forward , you are bound to be pushed way back . Martha Raddatz , ABC News , the State Department .",
diff --git a/simple-backend/sample_sql/nlpviewer_backend_project.sql b/simple-backend/sample_sql/stave_backend_project.sql
similarity index 99%
rename from simple-backend/sample_sql/nlpviewer_backend_project.sql
rename to simple-backend/sample_sql/stave_backend_project.sql
index eb0618a..15f3225 100644
--- a/simple-backend/sample_sql/nlpviewer_backend_project.sql
+++ b/simple-backend/sample_sql/stave_backend_project.sql
@@ -1,5 +1,5 @@
 BEGIN TRANSACTION;
-INSERT INTO "nlpviewer_backend_project" ("id","name","ontology","user_id","config", "project_type") VALUES (5,'project-1-example','{
+INSERT INTO "stave_backend_project" ("id","name","ontology","user_id","config", "project_type") VALUES (5,'project-1-example','{
 
   "name": "base_ontology",
 
diff --git a/simple-backend/nlpviewer_backend/__init__.py b/simple-backend/stave_backend/__init__.py
similarity index 100%
rename from simple-backend/nlpviewer_backend/__init__.py
rename to simple-backend/stave_backend/__init__.py
diff --git a/simple-backend/nlpviewer_backend/__version__.py b/simple-backend/stave_backend/__version__.py
similarity index 100%
rename from simple-backend/nlpviewer_backend/__version__.py
rename to simple-backend/stave_backend/__version__.py
diff --git a/simple-backend/nlpviewer_backend/admin.py b/simple-backend/stave_backend/admin.py
similarity index 100%
rename from simple-backend/nlpviewer_backend/admin.py
rename to simple-backend/stave_backend/admin.py
diff --git a/simple-backend/nlpviewer_backend/handlers/__init__.py b/simple-backend/stave_backend/handlers/__init__.py
similarity index 100%
rename from simple-backend/nlpviewer_backend/handlers/__init__.py
rename to simple-backend/stave_backend/handlers/__init__.py
diff --git a/simple-backend/nlpviewer_backend/handlers/crossdoc.py b/simple-backend/stave_backend/handlers/crossdoc.py
similarity index 100%
rename from simple-backend/nlpviewer_backend/handlers/crossdoc.py
rename to simple-backend/stave_backend/handlers/crossdoc.py
diff --git a/simple-backend/nlpviewer_backend/handlers/document.py b/simple-backend/stave_backend/handlers/document.py
similarity index 91%
rename from simple-backend/nlpviewer_backend/handlers/document.py
rename to simple-backend/stave_backend/handlers/document.py
index 5d4b756..4aa9ed2 100644
--- a/simple-backend/nlpviewer_backend/handlers/document.py
+++ b/simple-backend/stave_backend/handlers/document.py
@@ -11,7 +11,7 @@
 from ..lib.utils import fetch_doc_check_perm, check_perm_project, fetch_job
 
 @require_login
-@permission_required('nlpviewer_backend.view_document', raise_exception=True)
+@permission_required('stave_backend.view_document', raise_exception=True)
 def listAll(request):
     """Lists all documents from the database.
     
@@ -55,7 +55,7 @@ def create(request):
     received_json_data = json.loads(request.body)
     project_id = received_json_data.get('project_id')
     project = Project.objects.get(id=project_id)
-    check_perm_project(project, request.user, 'nlpviewer_backend.new_project')
+    check_perm_project(project, request.user, 'stave_backend.new_project')
 
     doc = Document(
         name=received_json_data.get('name'),
@@ -85,7 +85,7 @@ def edit(request, document_id):
 
             {"id": 42, "name": "project1-doc1-example", "project_id": 5, "textPack": "...", ...}    
     """
-    doc = fetch_doc_check_perm(document_id, request.user, "nlpviewer_backend.edit_text")
+    doc = fetch_doc_check_perm(document_id, request.user, "stave_backend.edit_text")
     
     received_json_data = json.loads(request.body)
 
@@ -134,7 +134,7 @@ def query(request, document_id):
 
             {"id": 42, "name": "project1-doc1-example", "project_id": 5, "textPack": "...", ...}    
     """
-    doc = fetch_doc_check_perm(document_id, request.user, "nlpviewer_backend.read_project")
+    doc = fetch_doc_check_perm(document_id, request.user, "stave_backend.read_project")
 
     docJson = model_to_dict(
         doc)
@@ -156,7 +156,7 @@ def delete(request, document_id):
         ok if succeeded, otherwise forbidden or not found    
     """
     
-    doc = fetch_doc_check_perm(document_id, request.user, "nlpviewer_backend.remove_project")
+    doc = fetch_doc_check_perm(document_id, request.user, "stave_backend.remove_project")
     doc.delete()
 
     return HttpResponse('ok')
@@ -175,7 +175,7 @@ def edit_text(request, document_id):
     Returns:
         ok if succeeded, otherwise forbidden or not found 
     """
-    doc = fetch_doc_check_perm(document_id, request.user, "nlpviewer_backend.edit_text")
+    doc = fetch_doc_check_perm(document_id, request.user, "stave_backend.edit_text")
 
     data = json.loads(request.body)
     
@@ -227,7 +227,7 @@ def new_annotation(request, document_id):
     #     }
     # }
 
-    doc = fetch_doc_check_perm(document_id, request.user, "nlpviewer_backend.edit_annotation")
+    doc = fetch_doc_check_perm(document_id, request.user, "stave_backend.edit_annotation")
     
     docJson = model_to_dict(doc)
     textPackJson = json.loads(docJson['textPack'])
@@ -269,7 +269,7 @@ def edit_annotation(request, document_id, annotation_id):
     Returns:
        OK if succeeded, otherwise forbidden or not found 
     """
-    doc = fetch_doc_check_perm(document_id, request.user, "nlpviewer_backend.edit_annotation")
+    doc = fetch_doc_check_perm(document_id, request.user, "stave_backend.edit_annotation")
 
     received_json_data = json.loads(request.body)
     annotation = received_json_data.get('data')
@@ -309,7 +309,7 @@ def delete_annotation(request, document_id, annotation_id):
     # return OK
 
     # if doc doesn't exist
-    doc = fetch_doc_check_perm(document_id, request.user, "nlpviewer_backend.edit_annotation")
+    doc = fetch_doc_check_perm(document_id, request.user, "stave_backend.edit_annotation")
 
     docJson = model_to_dict(doc)
     textPackJson = json.loads(docJson['textPack'])
@@ -363,7 +363,7 @@ def new_link(request, document_id):
     #     }
     #   }
 
-    doc = fetch_doc_check_perm(document_id, request.user, "nlpviewer_backend.edit_annotation")
+    doc = fetch_doc_check_perm(document_id, request.user, "stave_backend.edit_annotation")
 
     received_json_data = json.loads(request.body)
 
@@ -396,7 +396,7 @@ def edit_link(request, document_id, link_id):
     Returns:
        OK if succeeded, otherwise forbidden or not found.
     """
-    doc = fetch_doc_check_perm(document_id, request.user, "nlpviewer_backend.edit_annotation")
+    doc = fetch_doc_check_perm(document_id, request.user, "stave_backend.edit_annotation")
 
     received_json_data = json.loads(request.body)
     link = received_json_data.get('data')
@@ -430,7 +430,7 @@ def delete_link(request, document_id, link_id):
     Returns:
        OK if succeeded, otherwise forbidden or not found.
     """
-    doc = fetch_doc_check_perm(document_id, request.user, "nlpviewer_backend.edit_annotation")
+    doc = fetch_doc_check_perm(document_id, request.user, "stave_backend.edit_annotation")
 
     docJson = model_to_dict(doc)
     textPackJson = json.loads(docJson['textPack'])
@@ -466,7 +466,7 @@ def get_doc_ontology_pack(request, document_id):
 
             {"id":1 , 'textPack': "sample", "ontology": "sample"}
     """
-    doc = fetch_doc_check_perm(document_id, request.user, "nlpviewer_backend.read_project")
+    doc = fetch_doc_check_perm(document_id, request.user, "stave_backend.read_project")
 
     # Convert every large integer to string to prevent precision loss
     # In javascript, integers are accurate up to 15 digits.
@@ -518,7 +518,7 @@ def get_next_document_id(request, document_id):
 
             {"id": "1"}
     """
-    doc = fetch_doc_check_perm(document_id, request.user, "nlpviewer_backend.read_project")
+    doc = fetch_doc_check_perm(document_id, request.user, "stave_backend.read_project")
     docs = doc.project.documents
 
     next_doc = docs.filter(id__gt=document_id).first()
@@ -548,7 +548,7 @@ def get_prev_document_id(request, document_id):
 
             {"id": "1"}
     """
-    doc = fetch_doc_check_perm(document_id, request.user, "nlpviewer_backend.read_project")
+    doc = fetch_doc_check_perm(document_id, request.user, "stave_backend.read_project")
     docs = doc.project.documents
 
     prev_doc = docs.filter(id__lt=document_id).last()
@@ -583,9 +583,9 @@ def query_or_create_job(request, document_id):
     )
     # Check permission
     doc = fetch_doc_check_perm(
-        document_id, request.user, "nlpviewer_backend.edit_annotation"
+        document_id, request.user, "stave_backend.edit_annotation"
     )
-    check_perm_project(doc.project, request.user, "nlpviewer_backend.edit_annotation")
+    check_perm_project(doc.project, request.user, "stave_backend.edit_annotation")
 
     ## TODO: Add permission check for the job creation
     job.save()
diff --git a/simple-backend/nlpviewer_backend/handlers/nlp.py b/simple-backend/stave_backend/handlers/nlp.py
similarity index 100%
rename from simple-backend/nlpviewer_backend/handlers/nlp.py
rename to simple-backend/stave_backend/handlers/nlp.py
diff --git a/simple-backend/nlpviewer_backend/handlers/project.py b/simple-backend/stave_backend/handlers/project.py
similarity index 93%
rename from simple-backend/nlpviewer_backend/handlers/project.py
rename to simple-backend/stave_backend/handlers/project.py
index b7dae1b..3ca5df9 100644
--- a/simple-backend/nlpviewer_backend/handlers/project.py
+++ b/simple-backend/stave_backend/handlers/project.py
@@ -14,7 +14,7 @@
 from guardian.shortcuts import get_objects_for_user
 
 @require_login
-@permission_required('nlpviewer_backend.view_project', raise_exception=True)
+@permission_required('stave_backend.view_project', raise_exception=True)
 def listAll(request):
     """
     list all projects from the databse.
@@ -31,7 +31,7 @@ def list_user_projects(request):
     list all projects of the current user.
     """
     
-    projects_read = get_objects_for_user(request.user, 'nlpviewer_backend.read_project').all().values('id', 'name')
+    projects_read = get_objects_for_user(request.user, 'stave_backend.read_project').all().values('id', 'name')
     projects_user = request.user.projects.all().values('id', 'name')
 
     projects_list = list(projects_user.union(projects_read))
@@ -41,7 +41,7 @@ def list_user_projects(request):
 
 
 @require_login
-@permission_required('nlpviewer_backend.add_project', raise_exception=True)
+@permission_required('stave_backend.add_project', raise_exception=True)
 def create(request):
     """
     create a new project.
@@ -80,7 +80,7 @@ def edit(request, project_id):
     accessible for users with 'edit_project' permission and the owner of the project.
     """
     
-    project = fetch_project_check_perm(project_id, request.user, "nlpviewer_backend.edit_project")
+    project = fetch_project_check_perm(project_id, request.user, "stave_backend.edit_project")
 
     received_json_data = json.loads(request.body)
     project.project_name = received_json_data.get('project_name')
@@ -97,7 +97,7 @@ def query(request, project_id):
     query a project by id.
     accessible for users with 'read_project' permission and the owner of the project.
     """
-    project = fetch_project_check_perm(project_id, request.user, "nlpviewer_backend.read_project")
+    project = fetch_project_check_perm(project_id, request.user, "stave_backend.read_project")
     docJson = model_to_dict(
         project)
     return JsonResponse(docJson, safe=False)
@@ -105,7 +105,7 @@ def query(request, project_id):
 @require_login
 def query_docs(request, project_id):
 
-    project = fetch_project_check_perm(project_id, request.user, "nlpviewer_backend.read_project")
+    project = fetch_project_check_perm(project_id, request.user, "stave_backend.read_project")
     
     docs = project.documents.all().values()
     return JsonResponse(list(docs), safe=False)
@@ -122,7 +122,7 @@ def query_crossdocs(request, project_id):
 @require_login
 def delete(request, project_id):
     
-    project = fetch_project_check_perm(project_id, request.user, "nlpviewer_backend.remove_project")
+    project = fetch_project_check_perm(project_id, request.user, "stave_backend.remove_project")
     project.delete()
 
     return HttpResponse('ok')
@@ -203,7 +203,7 @@ def export_project(request, project_id):
     project_path = received_json_data.get("project_path")
 
     # Write project meta data
-    project = fetch_project_check_perm(project_id, request.user, "nlpviewer_backend.read_project")
+    project = fetch_project_check_perm(project_id, request.user, "stave_backend.read_project")
     project_writer = StaveProjectWriter(
         project_path=project_path,
         project_name=project.name,
diff --git a/simple-backend/nlpviewer_backend/handlers/session.py b/simple-backend/stave_backend/handlers/session.py
similarity index 100%
rename from simple-backend/nlpviewer_backend/handlers/session.py
rename to simple-backend/stave_backend/handlers/session.py
diff --git a/simple-backend/nlpviewer_backend/handlers/user.py b/simple-backend/stave_backend/handlers/user.py
similarity index 100%
rename from simple-backend/nlpviewer_backend/handlers/user.py
rename to simple-backend/stave_backend/handlers/user.py
diff --git a/simple-backend/nlpviewer_backend/lib/__init__.py b/simple-backend/stave_backend/lib/__init__.py
similarity index 100%
rename from simple-backend/nlpviewer_backend/lib/__init__.py
rename to simple-backend/stave_backend/lib/__init__.py
diff --git a/simple-backend/nlpviewer_backend/lib/require_login.py b/simple-backend/stave_backend/lib/require_login.py
similarity index 100%
rename from simple-backend/nlpviewer_backend/lib/require_login.py
rename to simple-backend/stave_backend/lib/require_login.py
diff --git a/simple-backend/nlpviewer_backend/lib/stave_cli.py b/simple-backend/stave_backend/lib/stave_cli.py
similarity index 97%
rename from simple-backend/nlpviewer_backend/lib/stave_cli.py
rename to simple-backend/stave_backend/lib/stave_cli.py
index 33fe940..fa5e682 100644
--- a/simple-backend/nlpviewer_backend/lib/stave_cli.py
+++ b/simple-backend/stave_backend/lib/stave_cli.py
@@ -18,8 +18,8 @@
 import argparse
 import getpass
 import logging
-from nlpviewer_backend.lib.stave_viewer import StaveViewer
-from nlpviewer_backend.lib.stave_session import StaveSession
+from stave_backend.lib.stave_viewer import StaveViewer
+from stave_backend.lib.stave_session import StaveSession
 
 START = "start"
 LOAD = "load-samples"
@@ -80,7 +80,7 @@ def get_args():
 def set_logger(verbose: bool, log_file: str):
     """
     Set up logging. The implementation is contingent on the LOGGING field
-    in "nlpviewer_backend/settings.py", so this can only be called after
+    in "stave_backend/settings.py", so this can only be called after
     the server starts.
     """
     root_logger = logging.getLogger()
diff --git a/simple-backend/nlpviewer_backend/lib/stave_project.py b/simple-backend/stave_backend/lib/stave_project.py
similarity index 100%
rename from simple-backend/nlpviewer_backend/lib/stave_project.py
rename to simple-backend/stave_backend/lib/stave_project.py
diff --git a/simple-backend/nlpviewer_backend/lib/stave_session.py b/simple-backend/stave_backend/lib/stave_session.py
similarity index 100%
rename from simple-backend/nlpviewer_backend/lib/stave_session.py
rename to simple-backend/stave_backend/lib/stave_session.py
diff --git a/simple-backend/nlpviewer_backend/lib/stave_viewer.py b/simple-backend/stave_backend/lib/stave_viewer.py
similarity index 98%
rename from simple-backend/nlpviewer_backend/lib/stave_viewer.py
rename to simple-backend/stave_backend/lib/stave_viewer.py
index f29326c..0029f5f 100644
--- a/simple-backend/nlpviewer_backend/lib/stave_viewer.py
+++ b/simple-backend/stave_backend/lib/stave_viewer.py
@@ -351,11 +351,11 @@ def load_database(self, load_samples: bool = False):
     def _start_server(self):
         asyncio.set_event_loop(asyncio.new_event_loop())
         if not self.in_viewer_mode:
-            os.environ['DJANGO_SETTINGS_MODULE'] = "nlpviewer_backend.settings"
+            os.environ['DJANGO_SETTINGS_MODULE'] = "stave_backend.settings"
             os.environ["DJANGO_ALLOW_ASYNC_UNSAFE"] = "true"
             django.setup()
             # TODO: Database's path needs to be set to the package
-            #   directory, i.e., "nlpviewer_backend/". Though it's not
+            #   directory, i.e., "stave_backend/". Though it's not
             #   recommended to modify django settings at runtime, it's easy
             #   for code maintaining since it eliminates the need to track two
             #   different "settings.py" files in the same repo.
diff --git a/simple-backend/nlpviewer_backend/lib/utils.py b/simple-backend/stave_backend/lib/utils.py
similarity index 92%
rename from simple-backend/nlpviewer_backend/lib/utils.py
rename to simple-backend/stave_backend/lib/utils.py
index 055f6c8..9e9572b 100644
--- a/simple-backend/nlpviewer_backend/lib/utils.py
+++ b/simple-backend/stave_backend/lib/utils.py
@@ -18,7 +18,7 @@ def fetch_doc_check_perm(id, user, perm):
         user:
             A User instance.
         perm:
-            Permission to check. Example: "nlpviewer_backend.read_project"
+            Permission to check. Example: "stave_backend.read_project"
 
     Returns:
         A json response of the or forbidden or not found.
@@ -43,7 +43,7 @@ def fetch_project_check_perm(id, user, perm):
         user:
             A User instance.
         perm:
-            Permission to check. Example: "nlpviewer_backend.read_project"
+            Permission to check. Example: "stave_backend.read_project"
             
     Returns:
         A json response of the or forbidden or not found.
diff --git a/simple-backend/nlpviewer_backend/migrations/0001_initial.py b/simple-backend/stave_backend/migrations/0001_initial.py
similarity index 100%
rename from simple-backend/nlpviewer_backend/migrations/0001_initial.py
rename to simple-backend/stave_backend/migrations/0001_initial.py
diff --git a/simple-backend/nlpviewer_backend/migrations/0002_document_ontology.py b/simple-backend/stave_backend/migrations/0002_document_ontology.py
similarity index 88%
rename from simple-backend/nlpviewer_backend/migrations/0002_document_ontology.py
rename to simple-backend/stave_backend/migrations/0002_document_ontology.py
index 80b500b..1c4565b 100644
--- a/simple-backend/nlpviewer_backend/migrations/0002_document_ontology.py
+++ b/simple-backend/stave_backend/migrations/0002_document_ontology.py
@@ -6,7 +6,7 @@
 class Migration(migrations.Migration):
 
     dependencies = [
-        ('nlpviewer_backend', '0001_initial'),
+        ('stave_backend', '0001_initial'),
     ]
 
     operations = [
diff --git a/simple-backend/nlpviewer_backend/migrations/0003_auto_20200712_0421.py b/simple-backend/stave_backend/migrations/0003_auto_20200712_0421.py
similarity index 90%
rename from simple-backend/nlpviewer_backend/migrations/0003_auto_20200712_0421.py
rename to simple-backend/stave_backend/migrations/0003_auto_20200712_0421.py
index fe7727a..7715d6d 100644
--- a/simple-backend/nlpviewer_backend/migrations/0003_auto_20200712_0421.py
+++ b/simple-backend/stave_backend/migrations/0003_auto_20200712_0421.py
@@ -7,7 +7,7 @@
 class Migration(migrations.Migration):
 
     dependencies = [
-        ('nlpviewer_backend', '0002_document_ontology'),
+        ('stave_backend', '0002_document_ontology'),
     ]
 
     operations = [
@@ -27,6 +27,6 @@ class Migration(migrations.Migration):
         migrations.AddField(
             model_name='document',
             name='project',
-            field=models.ForeignKey(blank=True, default='', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='documents', to='nlpviewer_backend.Project'),
+            field=models.ForeignKey(blank=True, default='', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='documents', to='stave_backend.Project'),
         ),
     ]
diff --git a/simple-backend/nlpviewer_backend/migrations/0004_auto_20200712_0957.py b/simple-backend/stave_backend/migrations/0004_auto_20200712_0957.py
similarity index 84%
rename from simple-backend/nlpviewer_backend/migrations/0004_auto_20200712_0957.py
rename to simple-backend/stave_backend/migrations/0004_auto_20200712_0957.py
index e51cb98..0e4a8e5 100644
--- a/simple-backend/nlpviewer_backend/migrations/0004_auto_20200712_0957.py
+++ b/simple-backend/stave_backend/migrations/0004_auto_20200712_0957.py
@@ -6,7 +6,7 @@
 class Migration(migrations.Migration):
 
     dependencies = [
-        ('nlpviewer_backend', '0003_auto_20200712_0421'),
+        ('stave_backend', '0003_auto_20200712_0421'),
     ]
 
     operations = [
diff --git a/simple-backend/nlpviewer_backend/migrations/0005_remove_document_ontology.py b/simple-backend/stave_backend/migrations/0005_remove_document_ontology.py
similarity index 83%
rename from simple-backend/nlpviewer_backend/migrations/0005_remove_document_ontology.py
rename to simple-backend/stave_backend/migrations/0005_remove_document_ontology.py
index b485af9..f3b3eee 100644
--- a/simple-backend/nlpviewer_backend/migrations/0005_remove_document_ontology.py
+++ b/simple-backend/stave_backend/migrations/0005_remove_document_ontology.py
@@ -6,7 +6,7 @@
 class Migration(migrations.Migration):
 
     dependencies = [
-        ('nlpviewer_backend', '0004_auto_20200712_0957'),
+        ('stave_backend', '0004_auto_20200712_0957'),
     ]
 
     operations = [
diff --git a/simple-backend/nlpviewer_backend/migrations/0006_auto_20201203_0206.py b/simple-backend/stave_backend/migrations/0006_auto_20201203_0206.py
similarity index 94%
rename from simple-backend/nlpviewer_backend/migrations/0006_auto_20201203_0206.py
rename to simple-backend/stave_backend/migrations/0006_auto_20201203_0206.py
index db4c676..e49b5b8 100644
--- a/simple-backend/nlpviewer_backend/migrations/0006_auto_20201203_0206.py
+++ b/simple-backend/stave_backend/migrations/0006_auto_20201203_0206.py
@@ -9,7 +9,7 @@ class Migration(migrations.Migration):
 
     dependencies = [
         migrations.swappable_dependency(settings.AUTH_USER_MODEL),
-        ('nlpviewer_backend', '0005_remove_document_ontology'),
+        ('stave_backend', '0005_remove_document_ontology'),
     ]
 
     operations = [
diff --git a/simple-backend/nlpviewer_backend/migrations/0006_project_config.py b/simple-backend/stave_backend/migrations/0006_project_config.py
similarity index 83%
rename from simple-backend/nlpviewer_backend/migrations/0006_project_config.py
rename to simple-backend/stave_backend/migrations/0006_project_config.py
index 5ef30c9..b8bea3f 100644
--- a/simple-backend/nlpviewer_backend/migrations/0006_project_config.py
+++ b/simple-backend/stave_backend/migrations/0006_project_config.py
@@ -6,7 +6,7 @@
 class Migration(migrations.Migration):
 
     dependencies = [
-        ('nlpviewer_backend', '0005_remove_document_ontology'),
+        ('stave_backend', '0005_remove_document_ontology'),
     ]
 
     operations = [
diff --git a/simple-backend/nlpviewer_backend/migrations/0007_auto_20210111_1741.py b/simple-backend/stave_backend/migrations/0007_auto_20210111_1741.py
similarity index 90%
rename from simple-backend/nlpviewer_backend/migrations/0007_auto_20210111_1741.py
rename to simple-backend/stave_backend/migrations/0007_auto_20210111_1741.py
index c1c1c24..0d4edef 100644
--- a/simple-backend/nlpviewer_backend/migrations/0007_auto_20210111_1741.py
+++ b/simple-backend/stave_backend/migrations/0007_auto_20210111_1741.py
@@ -6,7 +6,7 @@
 class Migration(migrations.Migration):
 
     dependencies = [
-        ('nlpviewer_backend', '0006_project_config'),
+        ('stave_backend', '0006_project_config'),
     ]
 
     operations = [
diff --git a/simple-backend/nlpviewer_backend/migrations/0007_project_config.py b/simple-backend/stave_backend/migrations/0007_project_config.py
similarity index 85%
rename from simple-backend/nlpviewer_backend/migrations/0007_project_config.py
rename to simple-backend/stave_backend/migrations/0007_project_config.py
index d87400d..b7b91b8 100644
--- a/simple-backend/nlpviewer_backend/migrations/0007_project_config.py
+++ b/simple-backend/stave_backend/migrations/0007_project_config.py
@@ -6,7 +6,7 @@
 class Migration(migrations.Migration):
 
     dependencies = [
-        ('nlpviewer_backend', '0006_auto_20201203_0206'),
+        ('stave_backend', '0006_auto_20201203_0206'),
     ]
 
     operations = [
diff --git a/simple-backend/nlpviewer_backend/migrations/0008_auto_20201203_0317.py b/simple-backend/stave_backend/migrations/0008_auto_20201203_0317.py
similarity index 86%
rename from simple-backend/nlpviewer_backend/migrations/0008_auto_20201203_0317.py
rename to simple-backend/stave_backend/migrations/0008_auto_20201203_0317.py
index c1dad79..524f39c 100644
--- a/simple-backend/nlpviewer_backend/migrations/0008_auto_20201203_0317.py
+++ b/simple-backend/stave_backend/migrations/0008_auto_20201203_0317.py
@@ -6,7 +6,7 @@
 class Migration(migrations.Migration):
 
     dependencies = [
-        ('nlpviewer_backend', '0007_project_config'),
+        ('stave_backend', '0007_project_config'),
     ]
 
     operations = [
diff --git a/simple-backend/nlpviewer_backend/migrations/0008_crossdoc.py b/simple-backend/stave_backend/migrations/0008_crossdoc.py
similarity index 85%
rename from simple-backend/nlpviewer_backend/migrations/0008_crossdoc.py
rename to simple-backend/stave_backend/migrations/0008_crossdoc.py
index 0c7f1ea..7b2fffb 100644
--- a/simple-backend/nlpviewer_backend/migrations/0008_crossdoc.py
+++ b/simple-backend/stave_backend/migrations/0008_crossdoc.py
@@ -7,7 +7,7 @@
 class Migration(migrations.Migration):
 
     dependencies = [
-        ('nlpviewer_backend', '0007_auto_20210111_1741'),
+        ('stave_backend', '0007_auto_20210111_1741'),
     ]
 
     operations = [
@@ -17,7 +17,7 @@ class Migration(migrations.Migration):
                 ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                 ('name', models.CharField(max_length=200)),
                 ('textPack', models.TextField()),
-                ('project', models.ForeignKey(blank=True, default='', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='crossdocs', to='nlpviewer_backend.Project')),
+                ('project', models.ForeignKey(blank=True, default='', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='crossdocs', to='stave_backend.Project')),
             ],
         ),
     ]
diff --git a/simple-backend/nlpviewer_backend/migrations/0009_auto_20201203_0318.py b/simple-backend/stave_backend/migrations/0009_auto_20201203_0318.py
similarity index 86%
rename from simple-backend/nlpviewer_backend/migrations/0009_auto_20201203_0318.py
rename to simple-backend/stave_backend/migrations/0009_auto_20201203_0318.py
index 71b4530..60865fc 100644
--- a/simple-backend/nlpviewer_backend/migrations/0009_auto_20201203_0318.py
+++ b/simple-backend/stave_backend/migrations/0009_auto_20201203_0318.py
@@ -6,7 +6,7 @@
 class Migration(migrations.Migration):
 
     dependencies = [
-        ('nlpviewer_backend', '0008_auto_20201203_0317'),
+        ('stave_backend', '0008_auto_20201203_0317'),
     ]
 
     operations = [
diff --git a/simple-backend/nlpviewer_backend/migrations/0010_merge_20210113_2148.py b/simple-backend/stave_backend/migrations/0010_merge_20210113_2148.py
similarity index 62%
rename from simple-backend/nlpviewer_backend/migrations/0010_merge_20210113_2148.py
rename to simple-backend/stave_backend/migrations/0010_merge_20210113_2148.py
index 423a21a..1fa91ee 100644
--- a/simple-backend/nlpviewer_backend/migrations/0010_merge_20210113_2148.py
+++ b/simple-backend/stave_backend/migrations/0010_merge_20210113_2148.py
@@ -6,8 +6,8 @@
 class Migration(migrations.Migration):
 
     dependencies = [
-        ('nlpviewer_backend', '0009_auto_20201203_0318'),
-        ('nlpviewer_backend', '0008_crossdoc'),
+        ('stave_backend', '0009_auto_20201203_0318'),
+        ('stave_backend', '0008_crossdoc'),
     ]
 
     operations = [
diff --git a/simple-backend/nlpviewer_backend/migrations/0011_auto_20210113_2148.py b/simple-backend/stave_backend/migrations/0011_auto_20210113_2148.py
similarity index 85%
rename from simple-backend/nlpviewer_backend/migrations/0011_auto_20210113_2148.py
rename to simple-backend/stave_backend/migrations/0011_auto_20210113_2148.py
index 55077dc..d84ec7f 100644
--- a/simple-backend/nlpviewer_backend/migrations/0011_auto_20210113_2148.py
+++ b/simple-backend/stave_backend/migrations/0011_auto_20210113_2148.py
@@ -6,7 +6,7 @@
 class Migration(migrations.Migration):
 
     dependencies = [
-        ('nlpviewer_backend', '0010_merge_20210113_2148'),
+        ('stave_backend', '0010_merge_20210113_2148'),
     ]
 
     operations = [
diff --git a/simple-backend/nlpviewer_backend/migrations/0012_remove_project_multi_ontology.py b/simple-backend/stave_backend/migrations/0012_remove_project_multi_ontology.py
similarity index 83%
rename from simple-backend/nlpviewer_backend/migrations/0012_remove_project_multi_ontology.py
rename to simple-backend/stave_backend/migrations/0012_remove_project_multi_ontology.py
index fc31d88..0c9d8ce 100644
--- a/simple-backend/nlpviewer_backend/migrations/0012_remove_project_multi_ontology.py
+++ b/simple-backend/stave_backend/migrations/0012_remove_project_multi_ontology.py
@@ -6,7 +6,7 @@
 class Migration(migrations.Migration):
 
     dependencies = [
-        ('nlpviewer_backend', '0011_auto_20210113_2148'),
+        ('stave_backend', '0011_auto_20210113_2148'),
     ]
 
     operations = [
diff --git a/simple-backend/nlpviewer_backend/migrations/0013_job.py b/simple-backend/stave_backend/migrations/0013_job.py
similarity index 78%
rename from simple-backend/nlpviewer_backend/migrations/0013_job.py
rename to simple-backend/stave_backend/migrations/0013_job.py
index 3561a7f..4cb6d32 100644
--- a/simple-backend/nlpviewer_backend/migrations/0013_job.py
+++ b/simple-backend/stave_backend/migrations/0013_job.py
@@ -7,7 +7,7 @@
 class Migration(migrations.Migration):
 
     dependencies = [
-        ('nlpviewer_backend', '0012_remove_project_multi_ontology'),
+        ('stave_backend', '0012_remove_project_multi_ontology'),
     ]
 
     operations = [
@@ -17,10 +17,10 @@ class Migration(migrations.Migration):
                 ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                 ('assigner', models.CharField(default='auto', max_length=200)),
                 ('assignee', models.CharField(max_length=200)),
-                ('pack_table', models.CharField(default='nlpviewer_backend_document', max_length=200)),
+                ('pack_table', models.CharField(default='stave_backend_document', max_length=200)),
                 ('job_content', models.TextField(default='')),
                 ('status', models.CharField(default='pending', max_length=200)),
-                ('document', models.ForeignKey(blank=True, default='', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='jobs', to='nlpviewer_backend.project')),
+                ('document', models.ForeignKey(blank=True, default='', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='jobs', to='stave_backend.project')),
             ],
         ),
     ]
diff --git a/simple-backend/nlpviewer_backend/migrations/0014_auto_20210322_1412.py b/simple-backend/stave_backend/migrations/0014_auto_20210322_1412.py
similarity index 83%
rename from simple-backend/nlpviewer_backend/migrations/0014_auto_20210322_1412.py
rename to simple-backend/stave_backend/migrations/0014_auto_20210322_1412.py
index 4fac5b5..23a3286 100644
--- a/simple-backend/nlpviewer_backend/migrations/0014_auto_20210322_1412.py
+++ b/simple-backend/stave_backend/migrations/0014_auto_20210322_1412.py
@@ -7,13 +7,13 @@
 class Migration(migrations.Migration):
 
     dependencies = [
-        ('nlpviewer_backend', '0013_job'),
+        ('stave_backend', '0013_job'),
     ]
 
     operations = [
         migrations.AlterField(
             model_name='job',
             name='document',
-            field=models.ForeignKey(blank=True, default='', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='jobs', to='nlpviewer_backend.document'),
+            field=models.ForeignKey(blank=True, default='', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='jobs', to='stave_backend.document'),
         ),
     ]
diff --git a/simple-backend/nlpviewer_backend/migrations/0015_remove_job_document.py b/simple-backend/stave_backend/migrations/0015_remove_job_document.py
similarity index 82%
rename from simple-backend/nlpviewer_backend/migrations/0015_remove_job_document.py
rename to simple-backend/stave_backend/migrations/0015_remove_job_document.py
index 718efb2..5ed01ce 100644
--- a/simple-backend/nlpviewer_backend/migrations/0015_remove_job_document.py
+++ b/simple-backend/stave_backend/migrations/0015_remove_job_document.py
@@ -6,7 +6,7 @@
 class Migration(migrations.Migration):
 
     dependencies = [
-        ('nlpviewer_backend', '0014_auto_20210322_1412'),
+        ('stave_backend', '0014_auto_20210322_1412'),
     ]
 
     operations = [
diff --git a/simple-backend/nlpviewer_backend/migrations/0016_auto_20210331_1848.py b/simple-backend/stave_backend/migrations/0016_auto_20210331_1848.py
similarity index 91%
rename from simple-backend/nlpviewer_backend/migrations/0016_auto_20210331_1848.py
rename to simple-backend/stave_backend/migrations/0016_auto_20210331_1848.py
index 35a95b4..afa1a8a 100644
--- a/simple-backend/nlpviewer_backend/migrations/0016_auto_20210331_1848.py
+++ b/simple-backend/stave_backend/migrations/0016_auto_20210331_1848.py
@@ -6,7 +6,7 @@
 class Migration(migrations.Migration):
 
     dependencies = [
-        ('nlpviewer_backend', '0015_remove_job_document'),
+        ('stave_backend', '0015_remove_job_document'),
     ]
 
     operations = [
diff --git a/simple-backend/nlpviewer_backend/migrations/0017_auto_20210331_2026.py b/simple-backend/stave_backend/migrations/0017_auto_20210331_2026.py
similarity index 90%
rename from simple-backend/nlpviewer_backend/migrations/0017_auto_20210331_2026.py
rename to simple-backend/stave_backend/migrations/0017_auto_20210331_2026.py
index cf7149d..a37d4bc 100644
--- a/simple-backend/nlpviewer_backend/migrations/0017_auto_20210331_2026.py
+++ b/simple-backend/stave_backend/migrations/0017_auto_20210331_2026.py
@@ -6,7 +6,7 @@
 class Migration(migrations.Migration):
 
     dependencies = [
-        ('nlpviewer_backend', '0016_auto_20210331_1848'),
+        ('stave_backend', '0016_auto_20210331_1848'),
     ]
 
     operations = [
diff --git a/simple-backend/nlpviewer_backend/migrations/__init__.py b/simple-backend/stave_backend/migrations/__init__.py
similarity index 100%
rename from simple-backend/nlpviewer_backend/migrations/__init__.py
rename to simple-backend/stave_backend/migrations/__init__.py
diff --git a/simple-backend/nlpviewer_backend/models.py b/simple-backend/stave_backend/models.py
similarity index 97%
rename from simple-backend/nlpviewer_backend/models.py
rename to simple-backend/stave_backend/models.py
index 63e5a59..aabe96b 100644
--- a/simple-backend/nlpviewer_backend/models.py
+++ b/simple-backend/stave_backend/models.py
@@ -72,7 +72,7 @@ class Job(models.Model):
     assignee = models.CharField(max_length=200)
 
     pack_table = models.CharField(
-        max_length=200, default='nlpviewer_backend_document')
+        max_length=200, default='stave_backend_document')
 
     job_content = models.TextField(default='')
 
diff --git a/simple-backend/nlpviewer_backend/sample_projects/eliza/.project_meta.json b/simple-backend/stave_backend/sample_projects/eliza/.project_meta.json
similarity index 100%
rename from simple-backend/nlpviewer_backend/sample_projects/eliza/.project_meta.json
rename to simple-backend/stave_backend/sample_projects/eliza/.project_meta.json
diff --git a/simple-backend/nlpviewer_backend/sample_projects/eliza/eliza.json.0.json b/simple-backend/stave_backend/sample_projects/eliza/eliza.json.0.json
similarity index 100%
rename from simple-backend/nlpviewer_backend/sample_projects/eliza/eliza.json.0.json
rename to simple-backend/stave_backend/sample_projects/eliza/eliza.json.0.json
diff --git a/simple-backend/nlpviewer_backend/sample_projects/project_1_example/.project_meta.json b/simple-backend/stave_backend/sample_projects/project_1_example/.project_meta.json
similarity index 100%
rename from simple-backend/nlpviewer_backend/sample_projects/project_1_example/.project_meta.json
rename to simple-backend/stave_backend/sample_projects/project_1_example/.project_meta.json
diff --git a/simple-backend/nlpviewer_backend/sample_projects/project_1_example/project1-doc1-example.0.json b/simple-backend/stave_backend/sample_projects/project_1_example/project1-doc1-example.0.json
similarity index 100%
rename from simple-backend/nlpviewer_backend/sample_projects/project_1_example/project1-doc1-example.0.json
rename to simple-backend/stave_backend/sample_projects/project_1_example/project1-doc1-example.0.json
diff --git a/simple-backend/nlpviewer_backend/sample_projects/project_2_example/.project_meta.json b/simple-backend/stave_backend/sample_projects/project_2_example/.project_meta.json
similarity index 100%
rename from simple-backend/nlpviewer_backend/sample_projects/project_2_example/.project_meta.json
rename to simple-backend/stave_backend/sample_projects/project_2_example/.project_meta.json
diff --git a/simple-backend/nlpviewer_backend/sample_projects/project_2_example/project2-doc1-example.0.json b/simple-backend/stave_backend/sample_projects/project_2_example/project2-doc1-example.0.json
similarity index 100%
rename from simple-backend/nlpviewer_backend/sample_projects/project_2_example/project2-doc1-example.0.json
rename to simple-backend/stave_backend/sample_projects/project_2_example/project2-doc1-example.0.json
diff --git a/simple-backend/nlpviewer_backend/settings.py b/simple-backend/stave_backend/settings.py
similarity index 95%
rename from simple-backend/nlpviewer_backend/settings.py
rename to simple-backend/stave_backend/settings.py
index 8086527..73b5b14 100644
--- a/simple-backend/nlpviewer_backend/settings.py
+++ b/simple-backend/stave_backend/settings.py
@@ -1,5 +1,5 @@
 """
-Django settings for nlpviewer_backend project.
+Django settings for stave_backend project.
 
 Generated by 'django-admin startproject' using Django 2.1.7.
 
@@ -31,7 +31,7 @@
 # Application definition
 
 INSTALLED_APPS = [
-    'nlpviewer_backend',
+    'stave_backend',
     'django.contrib.admin',
     'django.contrib.auth',
     'django.contrib.contenttypes',
@@ -56,7 +56,7 @@
     'guardian.backends.ObjectPermissionBackend',
 )
 
-ROOT_URLCONF = 'nlpviewer_backend.urls'
+ROOT_URLCONF = 'stave_backend.urls'
 
 TEMPLATES = [
     {
@@ -74,7 +74,7 @@
     },
 ]
 
-WSGI_APPLICATION = 'nlpviewer_backend.wsgi.application'
+WSGI_APPLICATION = 'stave_backend.wsgi.application'
 
 
 # Database
diff --git a/simple-backend/nlpviewer_backend/urls.py b/simple-backend/stave_backend/urls.py
similarity index 96%
rename from simple-backend/nlpviewer_backend/urls.py
rename to simple-backend/stave_backend/urls.py
index fa54dc9..93f0ef6 100644
--- a/simple-backend/nlpviewer_backend/urls.py
+++ b/simple-backend/stave_backend/urls.py
@@ -1,4 +1,4 @@
-"""nlpviewer_backend URL Configuration
+"""stave_backend URL Configuration
 
 The `urlpatterns` list routes URLs to views. For more information please see:
     https://docs.djangoproject.com/en/2.1/topics/http/urls/
@@ -16,7 +16,7 @@
 from django.contrib import admin
 from django.urls import include, path
 
-from nlpviewer_backend.handlers import session, user, document, project, nlp, crossdoc
+from stave_backend.handlers import session, user, document, project, nlp, crossdoc
 
 urlpatterns = [
     path('login', session.login),
diff --git a/simple-backend/nlpviewer_backend/wsgi.py b/simple-backend/stave_backend/wsgi.py
similarity index 70%
rename from simple-backend/nlpviewer_backend/wsgi.py
rename to simple-backend/stave_backend/wsgi.py
index de2d558..b087165 100644
--- a/simple-backend/nlpviewer_backend/wsgi.py
+++ b/simple-backend/stave_backend/wsgi.py
@@ -1,5 +1,5 @@
 """
-WSGI config for nlpviewer_backend project.
+WSGI config for stave_backend project.
 
 It exposes the WSGI callable as a module-level variable named ``application``.
 
@@ -11,6 +11,6 @@
 
 from django.core.wsgi import get_wsgi_application
 
-os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'nlpviewer_backend.settings')
+os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'stave_backend.settings')
 
 application = get_wsgi_application()


Test patch:
diff --git a/simple-backend/test.py b/simple-backend/test.py
index 8218a55..025f725 100644
--- a/simple-backend/test.py
+++ b/simple-backend/test.py
@@ -1,5 +1,5 @@
 from django.test import TestCase
-from nlpviewer_backend.models import Document, Project
+from stave_backend.models import Document, Project
 
 class DocumentTestCase(TestCase):
     def setUp(self):