Skip to content

Commit

Permalink
Complete cli script.
Browse files Browse the repository at this point in the history
  • Loading branch information
mkelley committed Feb 26, 2023
1 parent 850d75c commit 497a98c
Show file tree
Hide file tree
Showing 13 changed files with 328 additions and 355 deletions.
58 changes: 0 additions & 58 deletions .env-template

This file was deleted.

14 changes: 0 additions & 14 deletions .gunicorn.config.py

This file was deleted.

2 changes: 1 addition & 1 deletion _activate
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env false

if [ ! -f $PWD/.env ]; then
echo -e "No .env file found!!!"
echo -e "No .env file found. Generate with '_sbnsis env' then edit."
return 1
fi
source .env
Expand Down
17 changes: 1 addition & 16 deletions _develop_apis
Original file line number Diff line number Diff line change
@@ -1,17 +1,2 @@
#! /bin/bash

clear

echo """
==============================================
Running flask API in development mode.
API will be refreshed on code changes.
Logging is to console.
==============================================
"""

sleep 2

nodemon -w 'sbn_survey_image_service/**' -e py,yaml --exec python3 -m sbn_survey_image_service.api.app
_sbnsis start --dev
136 changes: 0 additions & 136 deletions _gunicorn_manager

This file was deleted.

2 changes: 1 addition & 1 deletion _initial_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

### 0. Load vars defined in .env
if [ ! -f $PWD/.env ]; then
echo -e "No .env file found!!!"
echo -e "No .env file found. Generate with '_sbnsis env' then edit."
return 1
fi
source .env
Expand Down
2 changes: 2 additions & 0 deletions _sbnsis
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
./.venv/bin/python3 -m sbn_survey_image_service.scripts.sbnsis $*
3 changes: 2 additions & 1 deletion logging/logrotate.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"*.log" {
rotate 32
ifempty
createolddir 770
createolddir 660
olddir old-logs
missingok
}
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ pds4_tools==1.2
sqlalchemy==1.3.5
python-dotenv==0.14.0
pytest-remotedata==0.3.2
pytest-cov
pytest-cov==3.0
https://github.com/mkelley/pds3/archive/v0.2.3.tar.gz#egg=pds3
10 changes: 5 additions & 5 deletions sbn_survey_image_service/__init__.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Licensed under a 3-clause BSD style license - see LICENSE.rst
"""SBN Survey Image Service"""
from . import models
from . import services
from . import env
from . import exceptions

# make cache directory, as needed
# make cache directory set umask
from . import exceptions
from . import env
from . import services
from . import models
import os
os.system(f'mkdir -p {env.ENV.SBNSIS_CUTOUT_CACHE}')
del os
Loading

0 comments on commit 497a98c

Please sign in to comment.