Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Ignoring shape predictor
app/data/classifiers/*.dat

# redis dump db
dump.rdb

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand Down
13 changes: 13 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
dist: xenial
language: python

cache: pip
python:
- '3.7'

install:
- pip install -r requirements.txt
- pip freeze

script:
- pytest
138 changes: 131 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,68 @@
# Contributing to CSSI REST API

We would love for you to contribute to CSSI API and help make it even better than it is
today!
We would love for you to contribute to CSSI REST API and help make
it even better than it is today!. As a contributor, here are the
guidelines for you to follow:

### Type
- [Commit Message Guidelines](#commit)
- [Branch Naming Conventions](#branch-naming)

## <a name="commit"></a> Commit Message Guidelines

We have used `semantic git commits` through out the application and would like to keep them consistent. Please follow the following specified rules when committing your code.

### Commit Message Format
Each commit message consists of a **header**, a **body** and a **footer**. The header has a special
format that includes a **type**, a **scope** and a **subject**:

```
<type>(<scope>): <subject>
<BLANK LINE>
<body>
<BLANK LINE>
<footer>
```

The **header** is mandatory and the **scope** of the header is optional.

Any line of the commit message cannot be longer 100 characters! This allows the message to be easier
to read on GitHub as well as in various git tools.

The footer should contain a reference to a bug(issue) if any.

Samples:

```
docs(readme): update readme
```
```
ci(travis): update travis config

With this change, trvis will run the unit tests before building the project.

Fixes #125
Closes #168

PR Close #456
```
### Emojis

Feel free to spice up the git messages with `emojis`. Use the [gitmoji](https://gitmoji.carloscuesta.me/) guide by Carlos Cuesta to create awesome commits.

Samples:

```
docs: update README :memo:

refactor(docs): remove RELEASE guidelines :fire:

fix(build): fix bazel build issue :bug:
```

### Revert
If the commit reverts a previous commit, it should begin with `revert: `, followed by the header of the reverted commit. In the body it should say: `This reverts commit <hash>.`, where the hash is the SHA of the commit being reverted.

### Type
Must be one of the following:

- **build**: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
Expand All @@ -18,11 +76,9 @@ Must be one of the following:
- **test**: Adding missing tests or correcting existing tests

### Scope
The scope should be the name of the component affected.

The scope should be the name of the npm package affected (as perceived by the person reading the changelog generated from commit messages.

The following is the list of supported scopes:

Follow these `<scope>` values:
- **core**
- **common**
- **app**
Expand All @@ -34,3 +90,71 @@ The following is the list of supported scopes:
- **deps**
- **migrations**
- **config**
- **scripts**

* none/empty string: useful for `style`, `test` and `refactor` changes that are done across all packages (e.g. `style: add missing semicolons`)

### Subject
The subject contains a clear description of the change:

* use the imperative, present tense: "change" not "changed" nor "changes"
* don't capitalize the first letter
* no dot (.) at the end

### Body
Just as in the **subject**, use the imperative, present tense: "change" not "changed" nor "changes".
The body should include the motivation for the change and contrast this with previous behavior.

### Footer
The footer should contain any information about **Breaking Changes** and is also the place to
reference GitHub issues that this commit **Closes**.

**Breaking Changes** should start with the word `BREAKING CHANGE:` with a space or two newlines. The rest of the commit message is then used for this.

## <a name="branch-naming"></a> Branch Naming Convention

Please follow the following convention when creating new branches.

```
<type>/<name>
```

### Types

<table>
<thead>
<tr>
<th>Prefix</th>
<th>Use case</th>
</tr>
</thead>
<tbody>
<tr>
<td>feature</td>
<td>New feature</td>
</tr>
<tr>
<td>fix</td>
<td>Code change linked to a bug</td>
</tr>
<tr>
<td>hotfix</td>
<td>Quick fixes to the codebase</td>
</tr>
<tr>
<td>release</td>
<td>Code-base releases</td>
</tr>
</tbody>
</table>

### Name
Always use dashes to separate words, and keep it short.

##### Examples
```
feature/config-support
hotfix/upload-size
fix/incorrect-upload-progress
release/1.0.x
```
4 changes: 2 additions & 2 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2019 Brion Mario
Copyright (c) 2019 CSSI

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
SOFTWARE.
59 changes: 45 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,35 @@
<p align="center">
<img style="display:block;text-align:center" src="./docs/logos/cssi-logo-rest-api.svg" alt="logo-text" width="600" />
<p align="center" style="font-size: 1.2rem;">RESTful API for the CSSI Platform</p>
<p align="left">
<img style="display:block;text-align:center" src="./docs/logo/cssi-logo-rest-api.svg" alt="logo-text" width="600" />
<p style="font-size: 1.2rem;">RESTful API for the CSSI Platform</p>
</p>

<!-- Badges -->
<p align="center">
<a href="https://app.fossa.io/projects/git%2Bgithub.com%2Fproject-cssi%2Fcssi-api?ref=badge_shield" alt="FOSSA Status"><img src="https://app.fossa.io/api/projects/git%2Bgithub.com%2Fproject-cssi%2Fcssi-api.svg?type=shield"/></a>
<p align="left">
<a href="https://travis-ci.org/project-cssi/cssi-api" alt="Travis">
<img src="https://travis-ci.org/project-cssi/cssi-api.svg?branch=master"/>
</a>
<a href="https://github.com/project-cssi/cssi-api/graphs/contributors" alt="Contributors">
<img src="https://img.shields.io/github/contributors/project-cssi/cssi-api.svg?logo=github"/>
</a>
<a href="LICENSE.md">
<img src="https://img.shields.io/badge/License-MIT-blue.svg" alt="License: MIT" height="18">
<img src="https://img.shields.io/badge/License-MIT-blue.svg" alt="License: MIT" height="18">
</a>
<a href="https://requires.io/github/project-cssi/cssi-api/requirements/?branch=master">
<img src="https://requires.io/github/project-cssi/cssi-api/requirements.svg?branch=master" alt="Requirements Status" height="18">
</a>
<a href="https://github.com/project-cssi/cssi-api/stargazers">
<img src="https://img.shields.io/github/stars/project-cssi/cssi-api.svg?logo=github" alt="Github stars" height="18">
</a>
<a href="https://github.com/project-cssi/cssi-api/network/members">
<img src="https://img.shields.io/github/forks/project-cssi/cssi-api.svg?logo=github" alt="Github forks" height="18">
</a>
<a href="https://twitter.com/brion_mario">
<img src="https://img.shields.io/twitter/follow/brion_mario.svg?label=brion_mario&style=flat&logo=twitter&logoColor=4FADFF" alt="Twitter" height="18">
</a>
<a href="https://app.fossa.io/projects/git%2Bgithub.com%2Fproject-cssi%2Fcssi-api?ref=badge_shield" alt="FOSSA Status">
<img src="https://app.fossa.io/api/projects/git%2Bgithub.com%2Fproject-cssi%2Fcssi-api.svg?type=shield"/>
</a>

</p>

# Getting Started
Expand Down Expand Up @@ -42,14 +63,18 @@ python manage.py runserver

# Built With

<a href="https://www.python.org/" title="Python"><img src="./docs/technologies/python.svg" alt="python" height="30" /></a>&nbsp;&nbsp;
<a href="http://flask.pocoo.org/" title="Flask"><img src="./docs/technologies/flask.svg" alt="flask" height="30" /></a>&nbsp;&nbsp;
<a href="https://flask-socketio.readthedocs.io/en/latest/" title="Flask SocketIO"><img src="./docs/technologies/flask-socketio.png" alt="redux" height="30" /></a>&nbsp;&nbsp;
<a href="https://flask-sqlalchemy.palletsprojects.com/en/2.x/" title="Flask SQL Alchemy"><img src="./docs/technologies/flask-sqlalchemy.png" alt="lodash" height="30" /></a>&nbsp;&nbsp;
<a href="http://www.celeryproject.org/" title="Celery"><img src="./docs/technologies/celery.png" alt="celery" height="50" /></a>&nbsp;&nbsp;
<a href="https://marshmallow.readthedocs.io/en/3.0/" title="Marshmallow"><img src="./docs/technologies/marshmallow.png" alt="marshmallow" height="50" /></a>&nbsp;&nbsp;
<a href="https://www.mysql.com/" title="MySQL"><img src="./docs/technologies/mysql.svg" alt="sass" height="50" /></a>&nbsp;&nbsp;
<a href="https://redis.io/" title="Redis"><img src="./docs/technologies/redis.png" alt="redis" height="30" /></a>&nbsp;&nbsp;
<a href="https://www.python.org/" title="Python"><img src="./docs/readme-resources/technologies/python.svg" alt="python" height="30" /></a>&nbsp;&nbsp;
<a href="http://flask.pocoo.org/" title="Flask"><img src="./docs/readme-resources/technologies/flask.svg" alt="flask" height="30" /></a>&nbsp;&nbsp;
<a href="https://flask-socketio.readthedocs.io/en/latest/" title="Flask SocketIO"><img src="./docs/readme-resources/technologies/flask-socketio.png" alt="redux" height="30" /></a>&nbsp;&nbsp;
<a href="https://flask-sqlalchemy.palletsprojects.com/en/2.x/" title="Flask SQL Alchemy"><img src="./docs/readme-resources/technologies/flask-sqlalchemy.png" alt="lodash" height="30" /></a>&nbsp;&nbsp;
<a href="http://www.celeryproject.org/" title="Celery"><img src="./docs/readme-resources/technologies/celery.png" alt="celery" height="50" /></a>&nbsp;&nbsp;
<a href="https://marshmallow.readthedocs.io/en/3.0/" title="Marshmallow"><img src="./docs/readme-resources/technologies/marshmallow.png" alt="marshmallow" height="50" /></a>&nbsp;&nbsp;
<a href="https://www.mysql.com/" title="MySQL"><img src="./docs/readme-resources/technologies/mysql.svg" alt="sass" height="50" /></a>&nbsp;&nbsp;
<a href="https://redis.io/" title="Redis"><img src="./docs/readme-resources/technologies/redis.png" alt="redis" height="30" /></a>&nbsp;&nbsp;

# Releases

Please read the [RELEASES.md](./docs/RELEASES.md) guideline to learn about the process for releasing the project.

# Changelog

Expand All @@ -59,6 +84,12 @@ Please refer [CHANGELOG.md](CHANGELOG.md) to learn about the latest improvements

Please read [CONTRIBUTING.md](CONTRIBUTING.md) for contributing guidelines and to learn about our code of conduct.

# Contributors

<a href="https://github.com/project-cssi/cssi-api/graphs/contributors">
<img src="https://contributors-img.firebaseapp.com/image?repo=project-cssi/cssi-api" />
</a>

# License

[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fproject-cssi%2Fcssi-api.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fproject-cssi%2Fcssi-api?ref=badge_large)
1 change: 1 addition & 0 deletions VERSION.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0,1,0,alpha,1,0,0
6 changes: 3 additions & 3 deletions app/routes/v1/application.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

# (c) Copyright 2019 Brion Mario.
# (c) Copyright 2019 CSSI.
# (c) This file is part of the CSSI REST API and is made available under MIT license.
# (c) For more information, see https://github.com/brionmario/cssi-api/blob/master/LICENSE.txt
# (c) Please forward any queries to the given email address. email: brion@apareciumlabs.com
# (c) For more information, see https://github.com/project-cssi/cssi-api/blob/master/LICENSE.md
# (c) Please forward any queries to the given email address. email: opensource@apareciumlabs.com

"""Application routes module
Expand Down
6 changes: 3 additions & 3 deletions app/routes/v1/questionnaire.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

# (c) Copyright 2019 Brion Mario.
# (c) Copyright 2019 CSSI.
# (c) This file is part of the CSSI REST API and is made available under MIT license.
# (c) For more information, see https://github.com/brionmario/cssi-api/blob/master/LICENSE.txt
# (c) Please forward any queries to the given email address. email: brion@apareciumlabs.com
# (c) For more information, see https://github.com/project-cssi/cssi-api/blob/master/LICENSE.md
# (c) Please forward any queries to the given email address. email: opensource@apareciumlabs.com

"""Application routes module

Expand Down
6 changes: 3 additions & 3 deletions app/routes/v1/session.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

# (c) Copyright 2019 Brion Mario.
# (c) Copyright 2019 CSSI.
# (c) This file is part of the CSSI REST API and is made available under MIT license.
# (c) For more information, see https://github.com/brionmario/cssi-api/blob/master/LICENSE.txt
# (c) Please forward any queries to the given email address. email: brion@apareciumlabs.com
# (c) For more information, see https://github.com/project-cssi/cssi-api/blob/master/LICENSE.md
# (c) Please forward any queries to the given email address. email: opensource@apareciumlabs.com

"""Session routes module

Expand Down
6 changes: 3 additions & 3 deletions config/config.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

# (c) Copyright 2019 Brion Mario.
# (c) Copyright 2019 CSSI.
# (c) This file is part of the CSSI REST API and is made available under MIT license.
# (c) For more information, see https://github.com/brionmario/cssi-api/blob/master/LICENSE.txt
# (c) Please forward any queries to the given email address. email: brion@apareciumlabs.com
# (c) For more information, see https://github.com/project-cssi/cssi-api/blob/master/LICENSE.md
# (c) Please forward any queries to the given email address. email: opensource@apareciumlabs.com

"""Configurations for the CSSI REST API

Expand Down
Loading