-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(project): Updated docker image; added project details
- Loading branch information
Showing
4 changed files
with
73 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# dbmisvc-starter | ||
|
||
This repository is a simple starting point for developing and deploying a | ||
service utilizing the various HMS DBMI managed infrastructure and tools. | ||
|
||
## 1. Getting Started | ||
|
||
1. Setup development environment by checking out repository: `git clone https://github.com/hms-dbmi/dbmisvc-starter && cd dbmisvc-starter` | ||
|
||
2. Installing development requirements: `pip install -r requirements-dev.txt` | ||
|
||
3. Install pre-commit hooks: `pre-commit install` | ||
|
||
4. Build and run stack: `docker-compose up -d` | ||
|
||
## 2. Deploying |
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,2 @@ | ||
-r requirements.txt | ||
pre-commit==2.* |
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,53 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
"""dbmisvc-starter setup.""" | ||
|
||
import os | ||
import re | ||
from setuptools import setup, find_packages | ||
|
||
|
||
def read_file(filename): | ||
"""Read a file into a string.""" | ||
path = os.path.abspath(os.path.dirname(__file__)) | ||
filepath = os.path.join(path, filename) | ||
try: | ||
return open(filepath).read() | ||
except IOError: | ||
return "" | ||
|
||
|
||
def get_readme(): | ||
"""Return the README file contents. Supports text,rst, and markdown.""" | ||
for name in ("README", "README.rst", "README.md"): | ||
if os.path.exists(name): | ||
return read_file(name) | ||
return "" | ||
|
||
|
||
def get_version(package): | ||
"""Return package version as listed in `__version__` in `init.py`.""" | ||
init_py = open( | ||
os.path.join( | ||
os.path.dirname(os.path.abspath(__file__)), | ||
os.path.join(package, "starter", "__init__.py"), | ||
) | ||
).read() | ||
return re.search("__version__ = ['\"]([^'\"]+)['\"]", init_py).group(1) | ||
|
||
|
||
DESC = "A starter application for a DBMI service" | ||
setup( | ||
name="dbmisvc-starter", | ||
version=get_version(), | ||
url="https://github.com/hms-dbmi/dbmisvc-starter", | ||
author="HMS DBMI - Techcore", | ||
author_email="bryan_larson@hms.harvard.edu", | ||
description=DESC, | ||
long_description=get_readme(), | ||
packages=find_packages(), | ||
include_package_data=True, | ||
classifiers=[ | ||
"Framework :: Django", | ||
], | ||
) |