GithubHelp home page GithubHelp logo

pypas / stem-diverse-tv Goto Github PK

View Code? Open in Web Editor NEW

This project forked from anitab-org/stem-diverse-tv

0.0 0.0 0.0 1.4 MB

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.

Home Page: https://stem-diverse-tv.herokuapp.com/

License: GNU General Public License v3.0

JavaScript 6.29% Python 83.40% CSS 1.73% Makefile 0.38% HTML 7.51% Dockerfile 0.65% Procfile 0.04%

stem-diverse-tv's Introduction

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.

stem-diverse-tv's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.