Contributing to ARgorithm¶
First off, thanks for taking the time to contribute!
The following is a set of guidelines for contributing to ARgorithm Server, which are hosted in the ARgorithm Organization on GitHub. These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request.
Table of contents
Code of conduct¶
You can read the code of conduct here
How can I contribute¶
We love your input! There are many ways to be contributor to our project:
- Reporting a bug
- Discussing the current state of the code
- Submitting a fix
- Proposing new features
- Becoming a maintainer
About ARgorithm¶
You can read more about our project here
You can read more about the internal workings of ARgorithm Project in the wiki
Getting Started¶
Prerequisites
- REST API
- FastAPI
- Asynchronous programming
- Docker
- MongoDB
- SQLite
- PostgresSQL
- Prometheus
Environment Setup¶
Download docker and docker-compose
Download docker and docker-compose on your PC as most of the server functionalities and tests revolve around docker. You can see how to here
Python Environment
check your python version
$ python version
Python 3.7.6
Python version 3.7 and 3.8 are currently verified to be working properly so it's recommended to use those. Once you activate your environment
$ git clone https://github.com/ARgorithm/Server.git
Cloning into 'Server'
---> 100%
$ cd Server/app
$ pip install -r requirements.txt
---> 100%
Successfully installed packages
Application Structure¶
-
app/
The app directory contains the REST API made using FastAPI as theapp
module. It also contains therequirements.txt
file with the application dependecies. Thetest/
subdirectory contains tests written for FastAPI written with the help of PyTest. Thestatic/
folder contains static assets used in the web pages. Theapp
module has the following submodules: -
api
: contains the API routes which the REST API provides the endpoints core
: manages the database integrations, data managers, security and other 3rd party extensionsmodel
: contains the data models as well as the execution system for ARgorithmsmonitoring
: creates prometheus based monitoring metricsmigrations
: manages database migrations-
templates
: webpages and email templates -
docs/
Server documentation using mkdocs with a Makefile for ease of use -
grafana/
Grafana configuration along with a dashboard designed specifically for ARgorithm -
Docker image files
-
Dockerfile
-
.dockerignore
-
start.sh
Has the script to start ARgorithm Server instance withing image -
gunicorn_conf.py
Gunicorn is used to run the production server so this file is used to configure that in the image. -
Docker compose files Docker compose files can be used to check how the application behaves with different configurations in different environments. Read more here
-
Prometheus conf Files These files are used for setting up prometheus and alertmanager for Server instance
-
prometheus.yml
alertmanager.yml
alert.rules.yml
You can find more information in the docs or get in touch with us.
Creating Issues¶
Issues are divided into 3 types for simplicity
Bug report¶
Before submitting a bug report, check for similar bug reports
Explain the problem and include additional details to help maintainers reproduce the problem:
- Use the bug report template
- Use a clear and descriptive title for the issue to identify the problem.
- Describe the exact steps which reproduce the problem in as many details as possible. For example, start by explaining how you used ARgorithm, e.g. which command exactly you used in the terminal. When listing steps, don't just say what you did, but explain how you did it.
- Provide specific examples to demonstrate the steps. Include links to files or GitHub projects, or copy/pasteable snippets, which you use in those examples. If you're providing snippets in the issue, use Markdown code blocks.
- Describe the behavior you observed after following the steps and point out what exactly is the problem with that behavior.
- Explain which behavior you expected to see instead and why.
- Include screenshots and animated GIFs which show you following the described steps and clearly demonstrate the problem. You can use this tool to record GIFs on macOS and Windows, and this tool or this tool on Linux.
- If you're reporting that Server crashed, include a crash report with a stack trace.
- If the problem is related to performance or memory, include a CPU profile capture with your report.
- If the problem wasn't triggered by a specific action, describe what you were doing before the problem happened and share more information using the guidelines below.
Provide more context by answering these questions:
- Did the problem start happening recently (e.g. after updating to a new version of ARgorithm) or was this always a problem?
- Can you reliably reproduce the issue? If not, provide details about how often the problem happens and under which conditions it normally happens.
Include details about your configuration and environment:
- Which version of dependencies are you using? You can get that by using your python package manager
- If not using the Docker image, What's the name and version of the OS you're using?
- Which packages do you have installed? You can get that list by running
pip list
.
Feature request¶
Before creating enhancement suggestions, please check for similar already existing requests as you might find out that you don't need to create one. When you are creating an enhancement suggestion, please include as many details as possible. Fill in the template, including the steps that you imagine you would take if the feature you're requesting existed.
- Use the feature request template
- Use a clear and descriptive title for the issue to identify the suggestion.
- Provide a step-by-step description of the suggested enhancement in as many details as possible.
- Provide specific examples to demonstrate the steps. Include copy/pasteable snippets which you use in those examples, as Markdown code blocks.
- Describe the current behavior and explain which behavior you expected to see instead and why.
- Include screenshots and animated GIFs which help you demonstrate the steps or point out the part of Atom which the suggestion is related to. You can use this tool to record GIFs on macOS and Windows, and this tool or this tool on Linux.
- Explain why this enhancement would be useful to most ARgorithm users
Question¶
Question issues are so that users to ask how to use different features of ARgorithm toolkit
Before creating question issues check for existing questions. Keep the following in mind when creating question issues:
- Use the question template
- Use a clear and descriptive title for the issue to identify the question
- Provide a explanation of what you want to do. Include examples, input/output descriptions etc.
- Describe your system to understand your environment better
You may later mention this question in the discord help channel to get better insights about your problem as well
Creating Pull Requests¶
All pull requests should be linked to an issue pertaining to a bug or a feature enhancement, This is important as it prevents duplication of work. Early contributors can find issues to work on that have the good first issue tag.
We request you to use the Pull request template to
- Maintain ARgorithm Server's quality
- Fix problems that are important to users
- Engage the community in working toward the best possible ARgorithm
- Enable a sustainable system for maintainers to review contributions
Contact¶
Current Maintainers
Join our discord server to get in touch with us and fellow contributors