STEM Diverse TV is a project which gather and provide inspiring, motivating, informative, educational and supportive videos about diversity in STEM. This is the backend of the project.
Table of Contents
To setup the project locally follow the instructions:
Please make a virtual environment and run the following commands.
virtualenv venv --python=python3
source ./venv/bin/activate
pip3 install -r requirements.txt
- Please download Firebase Admin SDK service json file from Firebase Console and put that in project's root directory. Rename file to firebase_cred.json
- Make .env file from given .env.template file and add details like API_KEY, which is a web api key from firebase. Find your project's web api key in project's overview tab on firebase console.
Use .env.template file to make a new .env file and add the following details:
API_KEY=<firebase-project-web-api-key>
EMAIL_USER=<Email-Address>
EMAIL_PASS=<Password>
After this, execute:
python run.py
or
python3 run.py
Database setup:
- if you take a look into
.env.template
you will see that there are multiple config environments (the easiest for the use is local, no database setup) - for the ones where the database is necessary, you will need to provide the DB details in the
.env
file
PostgreSQL is the database that we are going to use in the deployed version. Here is the script that will help you create the Postgres user and and database. Of course. you need to have PostgreSQL installed on your local machine.
# CREATEDB for the privilege to create it's own DB
CREATE USER <stem_diverse> WITH PASSWORD 'examplepassword' CREATEDB;
CREATE DATABASE <database_name> WITH OWNER <stem_diverse> ENCODING 'UTF8' LC_COLLATE = 'en_US.UTF-8' LC_CTYPE = 'en_US.UTF-8';
Note: This is only needed if you want to contribute to the project.
If you want to contribute to the project you will have to create your own copy of the project on GitHub. You can do this by clicking the Fork button that can be found on the top right corner of the landing page of the repository.
Note: For this you need to install git on your machine. You can download the git tool from here.
-
If you have forked the project, run the following command -
git clone https://github.com/YOUR_GITHUB_USER_NAME/stem-diverse-tv
where
YOUR_GITHUB_USER_NAME
is your GitHub handle. -
If you haven't forked the project, run the following command -
git clone https://github.com/anitab-org/stem-diverse-tv
-
Now after you cloned the repository, get into the anitab-org.github.io directory by -
cd stem-diverse-tv
Note: This is only needed if you want to contribute to the project.
When a repository is cloned, it has a default remote named origin
that points to your fork on GitHub, not the original repository it was forked from. To keep track of the original repository, you should add another remote named upstream. For this project it can be done by running the following command -
git remote add upstream https://github.com/anitab-org/stem-diverse-tv
You can check that the previous command worked by running git remote -v
. You should see the following output:
$ git remote -v
origin https://github.com/YOUR_GITHUB_USER_NAME/stem-diverse-tv (fetch)
origin https://github.com/YOUR_GITHUB_USER_NAME/stem-diverse-tv (push)
upstream https://github.com/anitab-org/stem-diverse-tv (fetch)
upstream https://github.com/anitab-org/stem-diverse-tv (push)
Steps
- You need a Google Account to access the Google API Console, request an API key, and register your application.
- Create a project in the Google Developers Console and obtain authorization credentials so your application can submit API requests.
- After creating your project, make sure the YouTube Data API is one of the services that your application is registered to use:
- Go to the API Console and select the project that you just registered.
- Visit the Enabled APIs page. In the list of APIs, make sure the status is ON for the YouTube Data API v3
- If your application will use any API methods that require user authorization, read the authentication guide to learn how to implement OAuth 2.0 authorization.
- Select a client library to simplify your API implementation.
- Familiarize yourself with the core concepts of the JSON (JavaScript Object Notation) data format. JSON is a common, language-independent data format that provides a simple text representation of arbitrary data structures. For more information, see json.org.
This project is under active development
Please read our Contributing Guidelines, Code of Conduct and Reporting Guidelines thoroughly.
If you have any questions or want to discuss something about this repo, feel free to reach out to our team on our Zulip channel #Design-team. If you are a new contributor, head over to this project's stream (https://anitab-org.zulipchat.com/#narrow/stream/225705-STEM-diverse-tv) on Zulip to see ongoing discussions.
The project is licensed under the GNU General Public License v3.0. Learn more about it in the LICENSE file.