Skip to content

Commit

Permalink
Update __init__.py files
Browse files Browse the repository at this point in the history
  • Loading branch information
ciioprof0 committed Aug 17, 2024
1 parent c1c1498 commit d2e44f7
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 1 deletion.
4 changes: 4 additions & 0 deletions __init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# stixd/__init__.py

"""This file is used to ensure that the stixd directory is in the Python path."""

import sys
Expand Down
4 changes: 4 additions & 0 deletions ling508/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# stixd/ling508/__init__.py

"""This file is used to add the necessary directories to sys.path so that the
modules in the app, db, model, tests, and web directories can be imported"""

Expand Down
4 changes: 4 additions & 0 deletions ling508/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,14 @@

import logging # Log unexpected errors
import os # Create directories for logs
import sys # Add the project directory to the path
from flask import Flask, request, jsonify # Create the API
from requests.exceptions import RequestException # Catch HTTP request errors
from pymysql import MySQLError # Catch specific MySQL errors
from werkzeug.exceptions import BadRequest # Catch Flask request errors

sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..')))

from ling508.app.clex_importer import ClexImporter # Import Clex entries
from ling508.db.mysql_repository import MySQLRepository # Access the MySQL db

Expand Down
3 changes: 3 additions & 0 deletions ling508/app/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# stixd/ling508/app/__init__.py
3 changes: 3 additions & 0 deletions ling508/db/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# stixd/ling508/db/__init__.py
6 changes: 5 additions & 1 deletion ling508/demos/demo_clex_importer.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@
"# Demonstration of STIX-D's Clex Importer Tool\n",
"\n",
"- Slides: \n",
"- Speaker Notes: "
" - HTML: https://github.com/ciioprof0/stixd/raw/main/ling508/demos/demo_clex_importer.slides.html\n",
" - PDF:\n",
"- Speaker Notes:\n",
" - HTML: https://github.com/ciioprof0/stixd/raw/main/ling508/demos/demo_clex_importer.html\n",
" - PDF: https://github.com/ciioprof0/stixd/blob/main/ling508/demos/demo_clex_importer.pdf"
]
},
{
Expand Down
3 changes: 3 additions & 0 deletions ling508/model/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# stixd/ling508/model/__init__.py
3 changes: 3 additions & 0 deletions ling508/tests/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# stixd/ling508/tests/__init__.py

0 comments on commit d2e44f7

Please sign in to comment.