-
Notifications
You must be signed in to change notification settings - Fork 5
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
Showing
86 changed files
with
11,141 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,66 @@ | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
env/ | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
|
||
# PyInstaller | ||
# Usually these files are written by a python script from a template | ||
# before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
*.manifest | ||
*.spec | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*,cover | ||
.hypothesis/ | ||
venv/ | ||
.venv/ | ||
.python-version | ||
.pytest_cache | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# Django stuff: | ||
*.log | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# PyBuilder | ||
target/ | ||
|
||
#Ipython Notebook | ||
.ipynb_checkpoints |
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,24 @@ | ||
# ref: https://docs.gitlab.com/ee/ci/README.html | ||
|
||
stages: | ||
- test | ||
|
||
.tests: | ||
stage: test | ||
script: | ||
- pip install -r requirements.txt | ||
- pip install -r test-requirements.txt | ||
- pytest --cov=cloudharness_model | ||
|
||
test-3.6: | ||
extends: .tests | ||
image: python:3.6-alpine | ||
test-3.7: | ||
extends: .tests | ||
image: python:3.7-alpine | ||
test-3.8: | ||
extends: .tests | ||
image: python:3.8-alpine | ||
test-3.9: | ||
extends: .tests | ||
image: python:3.9-alpine |
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,35 @@ | ||
# OpenAPI Generator Ignore | ||
# Generated by openapi-generator https://github.com/openapitools/openapi-generator | ||
|
||
# Use this file to prevent files from being overwritten by the generator. | ||
# The patterns follow closely to .gitignore or .dockerignore. | ||
|
||
# As an example, the C# client generator defines ApiClient.cs. | ||
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: | ||
#ApiClient.cs | ||
|
||
# You can match any string of characters against a directory, file or extension with a single asterisk (*): | ||
#foo/*/qux | ||
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux | ||
|
||
# You can recursively match patterns against a directory, file or extension with a double asterisk (**): | ||
#foo/**/qux | ||
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux | ||
|
||
# You can also negate patterns with an exclamation (!). | ||
# For example, you can ignore all files in a docs folder with the file extension .md: | ||
#docs/*.md | ||
# Then explicitly reverse the ignore rule for a single file: | ||
#!docs/README.md | ||
test/* | ||
**/controllers/* | ||
Dockerfile | ||
**/__main__.py | ||
**/openapi/* | ||
setup.py | ||
**/test/* | ||
.dockerignore | ||
*/__init__.py | ||
encoder.py | ||
*.sh | ||
util.py |
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,14 @@ | ||
# ref: https://docs.travis-ci.com/user/languages/python | ||
language: python | ||
python: | ||
- "3.2" | ||
- "3.3" | ||
- "3.4" | ||
- "3.5" | ||
- "3.6" | ||
- "3.7" | ||
- "3.8" | ||
# command to install dependencies | ||
install: "pip install -r requirements.txt" | ||
# command to run tests | ||
script: nosetests |
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,49 @@ | ||
# OpenAPI generated server | ||
|
||
## Overview | ||
This server was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the | ||
[OpenAPI-Spec](https://openapis.org) from a remote server, you can easily generate a server stub. This | ||
is an example of building a OpenAPI-enabled Flask server. | ||
|
||
This example uses the [Connexion](https://github.com/zalando/connexion) library on top of Flask. | ||
|
||
## Requirements | ||
Python 3.5.2+ | ||
|
||
## Usage | ||
To run the server, please execute the following from the root directory: | ||
|
||
``` | ||
pip3 install -r requirements.txt | ||
python3 -m cloudharness_model | ||
``` | ||
|
||
and open your browser to here: | ||
|
||
``` | ||
http://localhost:8080/ui/ | ||
``` | ||
|
||
Your OpenAPI definition lives here: | ||
|
||
``` | ||
http://localhost:8080/openapi.json | ||
``` | ||
|
||
To launch the integration tests, use tox: | ||
``` | ||
sudo pip install tox | ||
tox | ||
``` | ||
|
||
## Running with Docker | ||
|
||
To run the server on a Docker container, please execute the following from the root directory: | ||
|
||
```bash | ||
# building the image | ||
docker build -t cloudharness_model . | ||
|
||
# starting up a container | ||
docker run -p 8080:8080 cloudharness_model | ||
``` |
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 @@ | ||
from .models import * |
Oops, something went wrong.