Skip to content

STEM Diverse TV is a project which gather and provide inspiring, motivating, informative, educational and supportive videos about diversity in STEM. This is a backend which provide content for multiple frontend applications build with Applicaster Zapp platform.

License

Notifications You must be signed in to change notification settings

anitab-org/stem-diverse-tv

Repository files navigation

STEM Diverse TV

project chat project chat Javascript Python HTML

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. Documentation of the project is hosted here

Tech Requirements

Setup and run

To setup the project locally follow the instructions:

  1. Please make a virtual environment and run the following commands.
virtualenv venv --python=python3
source ./venv/bin/activate
pip3 install -r requirements.txt
  1. Please download Firebase Admin SDK service json file from Firebase Console, You can download the file by following below steps:

    1. Go to Project Settings/Service accounts
    2. Click on Generate New Primary Key
    3. Place the file in project's root directory and rename it to google-credentials.json
  2. 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.

  3. 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>

  1. After this, execute:
python run.py

or

python3 run.py

Database setup:

  1. 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)
  2. 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';

Fork

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.

Clone

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, move to stem-diverse-tv directory by -

    cd stem-diverse-tv

Remote

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)

Run tests

To run the unitests run the following command in the terminal (while the virtual environment is activated):

python -m unittest discover tests

Auto-formatting with black

We use Black to format code automatically so that we don't have to worry about clean and readable code. To install Black:

pip install black

To run black:

black .

YouTube Data API Enabling

Steps

  1. You need a Google Account to access the Google API Console, request an API key, and register your application.

  2. Create a project in the Google Developers Console and obtain authorization credentials so your application can submit API requests.

  3. 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

Contributing

This project is under active development

Please read our Contributing Guidelines, Code of Conduct and Reporting Guidelines thoroughly.

Contributors

Thanks goes to these people (emoji key):


Anna Bauza

💻 🚧 ⚠️ 📖 🎨

This project follows the all-contributors specification. Contributions of any kind welcome!

Contact

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.

License

The project is licensed under the GNU General Public License v3.0. Learn more about it in the LICENSE file.

About

STEM Diverse TV is a project which gather and provide inspiring, motivating, informative, educational and supportive videos about diversity in STEM. This is a backend which provide content for multiple frontend applications build with Applicaster Zapp platform.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published