generated from usnistgov/opensource-repo
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
00e9a4f
commit 38b6710
Showing
3 changed files
with
136 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
NIST Software | ||
|
||
This software was developed by employees of the National Institute of Standards | ||
and Technology (NIST), an agency of the Federal Government and is being made | ||
available as a public service. Pursuant to title 17 United States Code Section | ||
105, works of NIST employees are not subject to copyright protection in the | ||
United States. This software may be subject to foreign copyright. Permission | ||
in the United States and in foreign countries, to the extent that NIST may hold | ||
copyright, to use, copy, modify, create derivative works, and distribute this | ||
software and its documentation without fee is hereby granted on a non-exclusive | ||
basis, provided that this notice and disclaimer of warranty appears in all copies. | ||
|
||
THE SOFTWARE IS PROVIDED 'AS IS' WITHOUT ANY WARRANTY OF ANY KIND, EITHER EXPRESSED | ||
, IMPLIED, OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, ANY WARRANTY THAT THE SOFTWARE | ||
WILL CONFORM TO SPECIFICATIONS, ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR | ||
A PARTICULAR PURPOSE, AND FREEDOM FROM INFRINGEMENT, AND ANY WARRANTY THAT THE | ||
DOCUMENTATION WILL CONFORM TO THE SOFTWARE, OR ANY WARRANTY THAT THE SOFTWARE WILL BE | ||
ERROR FREE. IN NO EVENT SHALL NIST BE LIABLE FOR ANY DAMAGES, INCLUDING, BUT NOT | ||
LIMITED TO, DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES, ARISING OUT OF, | ||
RESULTING FROM, OR IN ANY WAY CONNECTED WITH THIS SOFTWARE, WHETHER OR NOT BASED UPON | ||
WARRANTY, CONTRACT, TORT, OR OTHERWISE, WHETHER OR NOT INJURY WAS SUSTAINED BY PERSONS | ||
OR PROPERTY OR OTHERWISE, AND WHETHER OR NOT LOSS WAS SUSTAINED FROM, OR AROSE OUT OF | ||
THE RESULTS OF, OR USE OF, THE SOFTWARE OR SERVICES PROVIDED HEREUNDER. |
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,74 @@ | ||
# E3 | ||
|
||
![GitHub repo size](https://img.shields.io/github/repo-size/usnistgov/E3) | ||
![GitHub contributors](https://img.shields.io/github/contributors/usnistgov/E3) | ||
![GitHub stars](https://img.shields.io/github/stars/usnistgov/E3?style=social) | ||
![GitHub forks](https://img.shields.io/github/forks/usnistgov/E3?style=social) | ||
|
||
E3, a project at NIST, is an API that performs complex economic analysis. | ||
|
||
|
||
### Run with Docker | ||
Ensure that docker and docker-compose are installed on your system. | ||
|
||
Run with docker-compose: | ||
|
||
$ docker-compose build | ||
$ docker-compose up | ||
|
||
This will run the django development server at http://localhost:8000/. PostgreSQL | ||
will be used as the database and RabbitMQ and a worker will be created for API | ||
requests. | ||
|
||
|
||
Note: If you are _running it for the first time_, you need to create a superuser: | ||
|
||
1. Run the following command: | ||
``` | ||
docker ps | ||
``` | ||
2. From the output list, find your CONTAINER ID for the IMAGE `e3_api`. Then run the following commands: | ||
``` | ||
docker exec -it [CONTAINER ID] bash | ||
python manage.py makemigrations | ||
python manage.py migrate | ||
python manage.py createsuperuser | ||
``` | ||
3. Enter your email and password when prompted. | ||
|
||
4. Go to `localhost:8000/login`, and login with your email and password. | ||
|
||
|
||
5. Obtain your *unique API key* (Please COPY and store somewhere safe - you will only be shown this once). | ||
|
||
6. Finally, navigate to: | ||
``` | ||
http://localhost:8000/api/v1/analysis/?key=[YOUR_API_KEY] | ||
``` | ||
|
||
You can now select 'media type', and paste your inputs in the 'contents' box, to send data to E3. | ||
|
||
## Getting Started | ||
Clone the repository from [Github](https://github.com/usnistgov/E3.git). | ||
|
||
$ git clone https://github.com/usnistgov/E3.git | ||
$ cd e3_django | ||
|
||
|
||
### Run Locally | ||
Activate the virtualenv for your project. | ||
|
||
Install project dependencies: | ||
|
||
$ pip install -r requirements.txt | ||
|
||
Then simply apply the migrations: | ||
|
||
$ python manage.py migrate | ||
|
||
You can now run the development server: | ||
|
||
$ python manage.py runserver | ||
|
||
## Technologies used | ||
Python, Django, PostgreSQL, Docker |
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,39 @@ | ||
# NIST Opensource Portql repositories categories and themes. | ||
# | ||
# Chose at least one category and as many themes as you think | ||
# adequate your opensource repository. | ||
# You are also able to provide futher details on the choices. | ||
# For example you could do: | ||
# categories: | ||
# - scientific-software: | ||
# - quantum-computing | ||
# - theory | ||
# The same applies to themes. | ||
# Since scientific-software is most common it is left as default. | ||
# Feel free to comment it with a dash if not appropriate. | ||
# You are able to pick multiple categories and themes. | ||
# Unlike categories there is no default theme. | ||
# Note: Make sure to remove unwanted categories in the repository | ||
# topics. The final topics are produced from this file and the topics. | ||
|
||
categories: | ||
- scientific-software | ||
#- simulation | ||
#- visualization | ||
#- ai-ml | ||
#- build-tools | ||
#- hpc-workflow | ||
themes: | ||
# - Advanced communications | ||
# - Optical communications | ||
# - Quantum communications | ||
# - Bioscience | ||
# - Buildings and Construction | ||
# - Chemistry | ||
# - Electronics | ||
# - Energy | ||
# - Environment | ||
# - Fire | ||
# - Forensic Science | ||
# - Health | ||
# - Information technology |