-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #257 from AkshatBajaj/feature/recent-master
FEATURE: Merge recent master changes to main
- Loading branch information
Showing
9 changed files
with
156 additions
and
250 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
FROM a2i2/{project_name}:latest | ||
|
||
RUN pip3 install jupyter -U && pip3 install jupyterlab | ||
|
||
EXPOSE 8888 | ||
|
||
# TODO: Remove token and password settings for production deployment | ||
CMD ["jupyter", "lab","--allow-root", "--ip=0.0.0.0", "--no-browser","--NotebookApp.token=''","--NotebookApp.password=''"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
{{ | ||
"cells": [ | ||
{{ | ||
"cell_type": "code", | ||
"execution_count": 1, | ||
"metadata": {{}}, | ||
"outputs": [], | ||
"source": [ | ||
"# Magic commands\n", | ||
"%load_ext autoreload\n", | ||
"%autoreload 2\n", | ||
"\n", | ||
"# Set up paths to access project module\n", | ||
"import sys\n", | ||
"import os\n", | ||
"sys.path.append('/app')\n", | ||
"os.chdir('/app')" | ||
] | ||
}}, | ||
{{ | ||
"cell_type": "code", | ||
"execution_count": 2, | ||
"metadata": {{}}, | ||
"outputs": [], | ||
"source": [ | ||
"# Package imports\n", | ||
"from surround import Config\n", | ||
"from {project_name}.file_system_runner import FileSystemRunner\n", | ||
"\n", | ||
"config = Config(auto_load=True)\n", | ||
"data = FileSystemRunner().load_data(None, config)" | ||
] | ||
}} | ||
], | ||
"metadata": {{ | ||
"kernelspec": {{ | ||
"display_name": "Python 3", | ||
"language": "python", | ||
"name": "python3" | ||
}}, | ||
"language_info": {{ | ||
"codemirror_mode": {{ | ||
"name": "ipython", | ||
"version": 3 | ||
}}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.6.5" | ||
}} | ||
}}, | ||
"nbformat": 4, | ||
"nbformat_minor": 4 | ||
}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,24 @@ | ||
""" | ||
This file is required for the project to be considered a python package. | ||
This file is needed to make Python treat this directory as a package | ||
""" | ||
|
||
import logging | ||
import os | ||
|
||
from logging.handlers import RotatingFileHandler | ||
|
||
from surround import has_config | ||
|
||
@has_config | ||
def setup(config): | ||
|
||
os.makedirs(config["output_path"], exist_ok=True) | ||
|
||
# Initialise logging | ||
level = logging.INFO | ||
log_file = os.path.join(config["output_path"], "output.log") | ||
file_handler = RotatingFileHandler(log_file, maxBytes=1048576, backupCount=5) | ||
handlers = [file_handler, logging.StreamHandler()] | ||
logging.basicConfig(level=level, handlers=handlers) | ||
|
||
setup(config=None) |
Oops, something went wrong.