Skip to content

Commit

Permalink
Merge remote-tracking branch '22/main' into rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
shank03 committed Sep 30, 2023
2 parents a91120d + c0a01a7 commit 669fb5e
Show file tree
Hide file tree
Showing 181 changed files with 70,105 additions and 2,603 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/django.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Django-Automated-Testing

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build:

runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
python-version: [3.9]

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run Tests
run: |
python manage.py test
- name: Running Flake8
run: |
python -m pip install flake8
flake8
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ helper_images/

node_modules
.idea/
.DS_Store

#static file
/static

# Byte-compiled / optimized / DLL files
__pycache__/
Expand Down Expand Up @@ -113,6 +115,7 @@ celerybeat.pid
*.sage.py

# Environments
prod.env
.env
.venv
env/
Expand Down
39 changes: 39 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, nationality, personal appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at computer.club@mnnit.ac.in . The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
70 changes: 70 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# ContriHUB - 22

ContriHUB is an event where we are expecting to get more and more people involved in Open Source activities.


## How to run locally?
* [Install Python](https://www.wikihow.com/Install-Python)
* Clone this repository
```
git clone https://github.com/ContriHUB/ContriHUB-22.git
```
* Create Virtual Environment
```
python -m venv <env_name>
```
* Activate the environment
* On Windows, run: `.\<env_name>\Scripts\activate`
* On Linux/Mac, run: `source <env_name>/bin/activate`
* Install the dependencies
```
pip install -r requirements.txt
```
* Change directory to *ContriHUB-22*
```
cd ContriHUB-22
```
* Create a **.env** file
* In Windows, Right Click, Open Git Bash here, and run: `touch .env`
* In Linux/Mac, run: `touch .env`
* Fill the contents of **.env** by following the format given in *sample_env_file.txt*
* You can use [this](https://stackoverflow.com/a/16630719/11671368) to generate **SECRET_KEY**, otherwise just remove that from **.env** file and it should work fine.
* You will need to create a [Github OAuth App](https://docs.github.com/en/developers/apps/building-oauth-apps/creating-an-oauth-app) in order to fill **SOCIAL_AUTH_GITHUB_KEY** and **SOCIAL_AUTH_GITHUB_SECRET** fields.
* Put both *Homepage URL* and *Authorization callback URL* as `http://127.0.0.1:8000/`.
* If you want to work on Email Sending Issue, you also need to fill you Email (GMail) in **EMAIL_HOST_USER** and your Email password in **EMAIL_HOST_PASSWORD**. (*Now you know why you should never push .env file to remote*).
* You will also need to **Allow Access to Less Secure Apps** in your GMail Account.
* You can also create a new G-Mail account to avoid using your personal account.
* To apply the migrations run,
```
python manage.py migrate
```
* Now to run the server, and visit `http://127.0.0.1:8000/`.
```
python manage.py runserver
```
* To access admin panel, you need to be superuser. Follow [this](https://www.geeksforgeeks.org/how-to-create-superuser-in-django/) link for instructions.

## Points to keep in mind

* SMTP protocol will not work with proxy. Kindly use mobile data while requesting an assignment/ submitting PR link/ testing out email functionality.
* Every python project will be following some linting rules - Flake8 in this case. Kindly run Flake8 tests before submitting your code.
To install Flake8, run this command:
```
python<version> -m pip install flake8
```

To run Flake8 tests on a file, run this command:
```
flake8 path/to/your_code/main.py #check particular file
```
or for an entire repository, run this command:
```
flake8 path/to/your_project/ #check the entire project repo
```

# Maintainers

- [Priyav K Kaneria](https://github.com/PriyavKaneria)

### CAUTION: Website is currently under development.
9 changes: 9 additions & 0 deletions ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
### Expected behavior

### Actual behavior

### Your working environment and MDB template version information

### Resources (screenshots, code snippets etc.)

For every **question of technical nature**, in order to get the most detailed answer as soon as possible, ask on our dedicated [Support Forum](https://gitter.im/ContriHUB/Lobby#)
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2018 ContriHUB

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
1 change: 0 additions & 1 deletion Procfile
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
release: python manage.py migrate
web: gunicorn contrihub.wsgi --log-file -
173 changes: 118 additions & 55 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,55 +1,118 @@
# ContriHUB - 21

ContriHUB is an event where we are expecting to get more and more people involved in Open Source activities.


## How to run locally?
* [Install Python](https://www.wikihow.com/Install-Python)
* Clone this repository
```
git clone https://github.com/ContriHUB/ContriHUB-21.git
```
* Create Virtual Environment
```
python -m venv <env_name>
```
* Activate the environment
* On Windows -
* If you have `Scripts` folder inside `<env_name>`, run: `<env_name>\Scripts\activate` (in Command Prompt)
* If you have `bin` folder inside `<env_name>`, run: `<env_name>\bin\Activate.ps1` (in Powershell).
* On POSIX (Linux/Mac), run: `source <env_name>/bin/activate`
* Change directory to *ContriHUB-21*
```
cd ContriHUB-21
```
* Install the dependencies
```
pip install -r requirements.txt
```

* Create a **.env** file
* In Windows, Right Click, Open Git Bash here, and run: `touch .env`
* In Linux/Mac, run: `touch .env`
* Fill the contents of **.env** by following the format given in *sample_env_file.txt*
* You can use [this](https://stackoverflow.com/a/16630719/11671368) to generate **SECRET_KEY**, otherwise just remove that from **.env** file and it should work fine.
* You will need to create a [Github OAuth App](https://docs.github.com/en/developers/apps/building-oauth-apps/creating-an-oauth-app) in order to fill **SOCIAL_AUTH_GITHUB_KEY** and **SOCIAL_AUTH_GITHUB_SECRET** fields.
* Put both *Homepage URL* and *Authorization callback URL* as `http://127.0.0.1:8000/`.
* If you want to work on Email Sending Issue, you also need to fill you Email (GMail) in **EMAIL_HOST_USER** and your Email password in **EMAIL_HOST_PASSWORD**. (*Now you know why you should never push .env file to remote*).
* You will also need to **Allow Access to Less Secure Apps** in your GMail Account.
* You can also create a new GMail account to avoid using your personal account.
* To apply the migrations run,
```
python manage.py migrate
```
* Now to run the server, and visit `http://127.0.0.1:8000/`.
```
python manage.py runserver
```
* To access admin panel, you need to be superuser. Follow [this](https://www.geeksforgeeks.org/how-to-create-superuser-in-django/) link for instructions.

## Mentors
You can reach out to us if you need help.
* [Ankit Sangwan](https://contrihub21.herokuapp.com/profile/user/ankitsangwan1999/)
* [Kshitiz Srivastava](https://contrihub21.herokuapp.com/profile/user/pirateksh/)

### CAUTION: Website is currently under development.
# ContriHUB Official Website

Hello Noobs :wave:

Join us by getting involved in the open source community :octocat: solving some interesting tasks along the way.

All repositories which are part of ContriHUB can be accessed here -
[ContriHUB](https://github.com/ContriHUB/)

**Make sure to get your GitHub Student Pack here:** [https://education.github.com/pack](https://education.github.com/pack)

## What is ContriHUB?

A month long contest starting from October 7th to get people involved in [Open Source](https://github.com/open-source). This repo is just the guide to get started on GitHub. We have a lot of different projects coming up. So start contributing and while you are at it, keep checking for more projects as they are added!

Choose any project and start fixing the issues. Every issue you fix will fetch you some points according to the difficulty. There are goodies waiting for you :P. So, Stay tuned and keep checking the repos [here](https://github.com/ContriHUB) for more projects and issues :smiley:

So, if you want to contribute to a particular project by either fixing an issue or adding a feature, all you have to do is

- Fork the project
- Create a new branch
- Add a fix to the issue
- Create a Pull Request
- Submit the link to your Pull Request [here](https://contrihub21.herokuapp.com/)
- Wait for it to accept and grab your points :smiley:

Also, please make sure to follow the proper formatting such as

```markdown
fixes #1
```

if you want your PR to be approved. The correct formatting should be followed.

If you don't know what the above means, just keep reading ... you'll get there.

We will not be accepting more PR's until the formatting of the current files is fixed. Please fix those, referencing the issues present. Also note that the issues and the PR have common # numbers , so the first issue might not be #1 but could be #138 . Please check this before referencing the issue. Incorrect # numbers will not be merged.

## How to contribute to this project

Here is a quick and painless way to contribute to this project:

- Add your name to the `CONTRIBUTORS.md` file.

Choose one or both, make a pull request for your work and wait for it to be merged!

## Getting Started

- Fork this repository (click the Fork button in the top right of this page, click your Profile Image)
- Clone your fork down to your local machine

```markdown
git clone https://github.com/your-username/XXXXX.git
```

- Create a branch

```markdown
git checkout -b branch-name
```

- Make your changes (choose from any task below)
- Commit and push

```markdown
git add .
git commit -m 'Commit message'
git push origin branch-name
```

- Create a new pull request from your forked repository (click the `New Pull Request` button located at the top of your repo)
- Wait for your PR review and merge approval!
- **Star this repository** :star: if you had fun!

## Choose from these tasks

### 1. Add your name

Add your name to the `CONTRIBUTORS.md` file using the below convention:

```markdown
#### Name: [YOUR NAME](Your Profile Link)

- Place: City, State, Country
- Bio: Who are you?
- GitHub: [Github account link](GitHub link)
```

## Reference links

Here is a great tutorial for creating your first pull request by [Roshan Jossey](https://github.com/Roshanjossey):
[https://github.com/Roshanjossey/first-contributions](https://github.com/Roshanjossey/first-contributions)

Managing your Forked Repo: [https://help.github.com/articles/fork-a-repo/](https://help.github.com/articles/fork-a-repo/)

Syncing a Fork: [https://help.github.com/articles/syncing-a-fork/](https://help.github.com/articles/syncing-a-fork/)

Keep Your Fork Synced: [https://gist.github.com/CristinaSolana/1885435](https://gist.github.com/CristinaSolana/1885435)

Checkout this list for README examples - Awesome README [![Awesome](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)](https://github.com/sindresorhus/awesome)

Github-Flavored Markdown [https://guides.github.com/features/mastering-markdown/](https://guides.github.com/features/mastering-markdown/)

## Contacts

For any query head on to dedicated Gitter Channel - [ContriHUB](https://gitter.im/ContriHUB/Lobby#)

If you still have more doubts then feel free to ping any of the student co-ordinator.

Team-2023 -

- [Priyav K Kaneria](https://github.com/PriyavKaneria)

- [Shashank Verma](https://github.com/shank03)

- [Amit Kumar](https://github.com/hackeramitkumar)

- [Sanskar Omar](https://github.com/sanskaromar)
9 changes: 5 additions & 4 deletions config.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
APIS={
'api_contrihub':"https://api.github.com/repos/ContriHUB/",
api_endpoint = {
'contrihub_api_1': 'https://api.github.com/repos/ContriHUB/',
'contrihub_api_2': 'https://api.github.com/repos/contrihub/',
}

URIS={
'uri_html': "https://github.com/ContriHUB/",
html_endpoint = {
'contrihub_html': 'https://github.com/ContriHUB/',
}
Loading

0 comments on commit 669fb5e

Please sign in to comment.