Skip to content

Commit

Permalink
🔨 Updated readme (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
emZubair authored Apr 1, 2024
1 parent 99229d6 commit 36f72ae
Show file tree
Hide file tree
Showing 12 changed files with 321 additions and 2 deletions.
46 changes: 46 additions & 0 deletions .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# 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, level of experience, 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, wiki edits, 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 [email protected]. 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.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]

[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
21 changes: 21 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: Bug report
about: Create a report to help us improve

---

### What I'm trying to achieve

### Steps to reproduce the problem
1.
2.

### What I expected to happen

### Screenshots
<!-- If applicable, add screenshots to help explain your problem. -->

**System information**
Operating system:
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: 💬 Spectrum
url: https://spectrum.chat/saleor
about: If you have a support question or need help getting Saleor to work, please use our Spectrum.
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: Feature request
about: Suggest an idea for this project

---

### What I'm trying to achieve

### Describe a proposed solution
...

### Other solutions I've tried and won't work

### Screenshots or mockups
<!-- Please provide any illustrations that could help others understand the problem or the proposed solution. -->
1 change: 1 addition & 0 deletions .github/badges/twitter.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
### [RH-](https://shopraha.atlassian.net/browse/RH-) title_here

## What does this do?



## Why?
Binary file added .github/workflows/.DS_Store
Binary file not shown.
27 changes: 27 additions & 0 deletions .github/workflows/auto-upgrade.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Auto update Python dependencies
on:
schedule:
# runs At 00:01 on day-of-month 1 and 15.
- cron: '1 0 1,15 * *'
workflow_dispatch:

jobs:
auto-update:
runs-on: ubuntu-latest

steps:
- name: Checkout the head commit of the branch
uses: actions/checkout@v4
with:
ref: staging

- uses: actions/setup-python@v4
with:
python-version: '3.11'

- name: Run auto dependency update
uses: emZubair/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
pr-branch: "staging"
update-command: "'make upgrade'"
15 changes: 15 additions & 0 deletions .github/workflows/auto_author_assign.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# .github/workflows/auto-author-assign.yml
name: Automation

on:
pull_request_target:
types: [ opened, reopened ]

permissions:
pull-requests: write

jobs:
assign-author:
runs-on: ubuntu-latest
steps:
- uses: toshimaru/[email protected]
121 changes: 121 additions & 0 deletions .github/workflows/quality.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
name: Quality

on:
# Trigger workflow on pull request, but only for PRs
# merging into staging
pull_request:
types: [ opened, synchronize, reopened ]
branches:
- staging

permissions:
contents: write
pull-requests: write

jobs:
pylint:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- uses: technote-space/get-diff-action@v4
with:
PATTERNS: |
**/*.py
!**/migrations/*
!**/tests/*
!**/test*.py
!**/urls.py
!**/fixtures.py
!**/envs/*
!common/**/etree.py
DOT: '...'
DIFF_FILTER: 'AMRC'

- uses: actions/setup-python@v4
with:
python-version: '3.11'

- run: pip install -r requirements/quality.txt

- name: Creating PyLint report
id: pylint-report
continue-on-error: true
run: |
pylint ${{ env.GIT_DIFF }} 2>&1 | tee report_pylint.txt
body=$(cat report_pylint.txt)
body="${body//'%'/'%25'}"
body="${body//$'\n'/'%0A'}"
body="${body//$'\r'/'%0D'}"
echo ::set-output name=icon::":x:"
[[ $body == *".py:"* || $body == *"***********"* ]] && title="**Please fix following pylint issues:**"
[[ ${body:5} == "-----"* ]] && score="Good Job, Pylint Score:" && echo ::set-output name=status::success \
&& echo ::set-output name=icon::":white_check_mark:" && echo ::set-output name=value::10
echo ::set-output name=score::$score
echo ::set-output name=title::$title
echo ::set-output name=body::$body
if: env.GIT_DIFF

- name: Creating iSort report
id: isort-report
continue-on-error: true
run: |
isort ${{ env.GIT_DIFF }} -c 2>&1 | tee report_isort.txt
sed -i 's#/home/runner/work/ShopRaha-BE/ShopRaha-BE##g' report_isort.txt
body=$(cat report_isort.txt)
body="${body//'%'/'%25'}"
body="${body//$'\n'/'%0A'}"
body="${body//$'\r'/'%0D'}"
echo ::set-output name=icon::":x:"
title="**Please fix following iSort issues:**"
[[ ${#body} == 0 ]] && echo ::set-output name=icon::":white_check_mark:" && \
echo ::set-output name=status::success || (body="\`\`\` %0A $body %0A \`\`\`" \
&& echo ::set-output name=title::$title && echo ::set-output name=body::$body)
if: env.GIT_DIFF

- name: Post report on PR
uses: mshick/add-pr-comment@v1
with:
message: |
**pylint:** ${{ steps.pylint-report.outputs.icon }}
${{ steps.pylint-report.outputs.title }}
```
${{ steps.pylint-report.outputs.score }}${{ steps.pylint-report.outputs.body }}
```
**iSort:** ${{ steps.isort-report.outputs.icon }}
${{ steps.isort-report.outputs.title }}
${{ steps.isort-report.outputs.body }}
repo-token: ${{ secrets.GITHUB_TOKEN }}
repo-token-user-login: 'github-actions[bot]'
if: env.GIT_DIFF


- name: No py file, post comment on PR
uses: mshick/add-pr-comment@v1
with:
message: |
No python file from included pattern in this PR . **Looks good** :+1:
repo-token: ${{ secrets.GITHUB_TOKEN }}
repo-token-user-login: 'github-actions[bot]'
if: env.GIT_DIFF == ''

- name: Check pylint score

uses: actions/github-script@v3
with:
script: |
core.setFailed('Pylint score is not up to the mark! Report-value= ${{ steps.pylint-report.outputs.value }}')
if: ${{ env.GIT_DIFF != '' && steps.pylint-report.outputs.value != 10 }}

- name: Check isort report

uses: actions/github-script@v3
with:
script: |
core.setFailed('Isort report has error(s), please fix!')
if: ${{ env.GIT_DIFF != '' && contains(steps.isort-report.outputs.body, 'ERROR:') }}
59 changes: 59 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
*.py[cod]
.DS_Store
!.babelrc
!.circleci
!.codeclimate.yml
!.coveragerc
!.dockerignore
!.eslintrc.json
!.flowconfig
!.github
!.gitignore
!.gqlconfig
!.npmrc
!.nvmrc
!.plop
!.pylintrc
!.testcafe
!.travis*
!.tx
!.aws
*.css
*.log
*.pot
*.pyc
local_settings.py
local.py
__pycache__/
build/
coverage/
dist/
*\.egg*
# data
/media/
/node_modules/
/static/
/src/

# Exported results file
django-queries-results.html

env
local.env

/tmp/celerybeat.pid
/tmp/celerybeat-schedule

### VisualStudioCode ###
.vscode/**/*
*.code-workspace
!.vscode/launch.json

### idea
.idea/

shopraha_models.png
latest.sql
.envrc
.coverage*
shopraha_logs.txt
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# .github
Raha community health files
# Shop Raha community health files
Raha community health files as described in [GitHub's Creating a default community health file](https://docs.github.com/en/communities/setting-up-your-project-for-healthy-contributions/creating-a-default-community-health-file).

0 comments on commit 36f72ae

Please sign in to comment.