A REST backend for F/NLF's applications built on Eve
Download or clone the repository
git clone https://github.com/fnlf/fnlf-backend.git
Then use virtualenv
virtualenv fnlf-backend
cd fnlf-backend
source bin/activate
Note: Make sure you are using a supported python version, most likely your system has multiple python versions installed. To specify version:
virtualenv -p /usr/bin/python3.3 fnlf-backend
pip install -r requirements.txt
Note: No database nor any Melwin integration is supplied here since this contains private information. To download visit F/NLF Wiki You will need access to the developer pages for this project.
Restore latest database dump (production)
mongorestore --drop -d fnlf dump/fnlf
scf.py needs to be moved to ext/scf.py
Optionally configure settings.py
to suit your environment but the default should be fine
python run.py
The REST api is now available on http://localhost:8080/api/v1
Note: Issues describe some common issues with the 3rd party modules
You should also install the frontend.
Eve is currently running 0.7-dev branch
The frontend/client is located at fnlf-client
This project utilizes the power and flexibility of Eve and Flask, the following ...
See http://localhost:8080/api/v1/docs for the autogenerated documentation of the api
Use cUrl, Postman for Chrome or the Eve client to test the api
Discovered a bug? Please create an issue here on GitHub!
https://github.com/fnlf/fnlf-backend/issues
For transparency and insight into our release cycle, releases will be numbered with the follow format:
<major>.<minor>.<patch>
And constructed with the following guidelines:
For more information on semantic versioning, please visit http://semver.org/.
Tests are written using Eve Mocker. To run the tests run python tests.py
with a running instance of the REST api
If you plan on contributing to this project, be sure to read the contributing guidelines.
These contributing guidelines were proudly stolen from the Flight project
Looking to contribute something? Here's how you can help.
A bug is a demonstrable problem that is caused by the code in the repository. Good bug reports are extremely helpful – thank you!
Guidelines for bug reports:
Use the GitHub issue search — check if the issue has already been reported.
Check if the issue has been fixed — try to reproduce it using the
latest master
or integration branch in the repository.
Isolate the problem — ideally create a reduced test case and a live example.
Please try to be as detailed as possible in your report. Include specific information about the environment – operating system and version, browser and version, version of fnlf-backend – and steps required to reproduce the issue.
Feature requests are welcome. But take a moment to find out whether your idea fits with the scope and aims of the project. It's up to you to make a strong case for the inclusion of your feature. Please provide as much detail and context as possible.
Contribution enquiries should take place before any significant pull request, otherwise you risk spending a lot of time working on something that we might have good reasons for rejecting.
Good pull requests – patches, improvements, new features – are a fantastic help. They should remain focused in scope and avoid containing unrelated commits.
Make sure to adhere to the coding conventions used throughout the codebase (indentation, accurate comments, etc.) and any other requirements (such as test coverage).
Please follow this process; it's the best way to get your work included in the project:
Fork the project, clone your fork, and configure the remotes:
Note: You should clone this into a virtualenv directory
# Clone your fork of the repo into the current directory
git clone https://github.com/<your-username>/fnlf-backend
# Navigate to the newly cloned directory
cd <repo-name>
# Assign the original repo to a remote called "upstream"
git remote add upstream git://github.com/fnlf/fnlf-backend
If you cloned a while ago, get the latest changes from upstream:
git checkout master
git pull upstream master
Install the dependencies , and create a new topic branch (off the main project development branch) to contain your feature, change, or fix:
pip install requirements.txt
git checkout -b <topic-branch-name>
Make sure to update, or add to the tests when appropriate. Patches and
features will not be accepted without tests. Run python tests.py
to check that
all tests pass after you've made changes.
Commit your changes in logical chunks. Provide clear and explanatory commit messages. Use Git's interactive rebase feature to tidy up your commits before making them public.
Locally merge (or rebase) the upstream development branch into your topic branch:
git pull [--rebase] upstream master
Push your topic branch up to your fork:
git push origin <topic-branch-name>
Open a Pull Request with a clear title and description.
If you are asked to amend your changes before they can be merged in, please
use git commit --amend
(or rebasing for multi-commit Pull Requests) and
force push to your remote feature branch. You may also be asked to squash
commits.
Thanks for assistance and contributions:
Copyright F/NLF.
Licensed under the MIT License