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
1 change: 0 additions & 1 deletion .github/workflows/bar-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,3 @@ jobs:
uses: codecov/codecov-action@v2
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
2 changes: 1 addition & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ alabaster==0.7.12
Babel==2.9.1
beautifulsoup4==4.10.0
certifi==2021.10.8
charset-normalizer==2.0.8
charset-normalizer==2.0.9
docutils==0.17.1
furo==2021.11.23
idna==3.3
Expand Down
55 changes: 54 additions & 1 deletion docs/source/developer_guide.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,57 @@
Developer Guide
===============

Coming soon ...
Basic Requirements
------------------
Developers need to learn Python 3 programming language (tutorial: `Python3`_ ) and GitHub.

Core Dependencies
-----------------

**Flask**: The BAR API uses Python Flask (tutorial: `Flask`_). We use a class based approach to organize code.

**Flask-restx**: Flask RestX is used to create endpoints and generate swagger fontend (tutorial: `Flask-restx`_ ).

**Flask-Caching**: This module is used to cache queries (tutorial: `Flask-Caching`_). We used Redis as a key-value store.

**Flask-Limiter**: This module is used to rate-limit the usage of API end points. This will prevent server from overloading (tutorial: `Flask-Limiter`_ )

**Marshmallow**: This module is only used to validate JSON schema for POST requests (tutorial: `Marshmallow`_).

**MarkupSafe**: This is used to validate GET request inputs (tutorial: `MarkupSafe`_).

**Flask-SQLAlchemy**: This is used to provide database connectivity and queries (tutorial: `Flask-SQLAlchemy`_). This is based on Python SQLAlchemy (tutorial: `SQLAlchemy`_)

**Flake8**: This is used to see if there are no style errors in code. Just run ``flake8`` command.

**Pytest**: This module (tutorial: `Pytest`_) along with Flask testing framework (tutorial: `Flask-Testing`_) is used to unit test API endpoints.

**Coverage**: This module show the test code coverage, that is what parts of code are tested by unit tests (tutorial: `Coverage`_)

**Black**: This module is used to format and clean up code. Just run ``black .`` command.

Online CI/CD Pipeline
---------------------

**GitHub Actions**: This runs automated testing on GitHub (tutorial: `GitHub-Actions`_).

**LGTM**: This is for code quality testing.

**Codecov**: This report code coverage.

**Read the Docs**: This hosts documentation (tutorial: `readthedocs`_).

.. _Python3: https://docs.python.org/3/tutorial/index.html
.. _Flask: https://flask.palletsprojects.com/en/2.0.x/quickstart/
.. _Flask-Caching: https://flask-caching.readthedocs.io/en/latest/index.html
.. _Flask-Limiter: https://flask-limiter.readthedocs.io/en/master/#using-flask-pluggable-views
.. _Flask-restx: https://flask-restx.readthedocs.io/en/latest/
.. _Marshmallow: https://marshmallow.readthedocs.io/en/stable/quickstart.html
.. _MarkupSafe: https://pypi.org/project/MarkupSafe/
.. _Flask-SQLAlchemy: https://flask-sqlalchemy.palletsprojects.com/en/2.x/
.. _SQLAlchemy: https://docs.sqlalchemy.org/en/14/
.. _Pytest: https://docs.pytest.org/en/latest/getting-started.html
.. _Flask-Testing: https://flask.palletsprojects.com/en/2.0.x/testing/
.. _Coverage: https://coverage.readthedocs.io/en/6.2/
.. _GitHub-Actions: https://docs.github.com/en/actions/quickstart
.. _readthedocs: https://docs.readthedocs.io/en/stable/tutorial/