Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
dhakar66 authored Jan 2, 2025
0 parents commit 21c0630
Show file tree
Hide file tree
Showing 24 changed files with 619 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: CI

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

permissions:
contents: read

jobs:
test:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set up Python 3.8
uses: actions/setup-python@v3
with:
python-version: "3.8"

- name: Install dependencies
run: |
pip install -U pip
pip install .
pip install .[dev]
- name: Test with pytest
run: PYTHONPATH=src pytest

- name: Test Coverage
run: PYTHONPATH=src pytest --cov project_name
16 changes: 16 additions & 0 deletions .github/workflows/set-default-branch-protection.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Set Default Branch Protection Rules

on:
push:
branches:
- main # Trigger this workflow on pushes to the main branch

jobs:
set-protection:
runs-on: ubuntu-latest
steps:
- name: Set Main Branch Protection Rule
if: ${{ github.run_number == 1 }}
run: |
git clone https://github.com/OpenPecha/rules.git
python rules/set_branch_protection_rules.py $GITHUB_REPOSITORY main ${{ secrets.ADMIN_GITHUB_TOKEN }}
129 changes: 129 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
.python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/
44 changes: 44 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
default_stages: [commit]

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml

- repo: https://github.com/asottile/pyupgrade
rev: v2.37.3
hooks:
- id: pyupgrade
args: [--py38-plus]

- repo: https://github.com/psf/black
rev: 22.8.0
hooks:
- id: black

- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort

- repo: https://github.com/PyCQA/flake8
rev: 5.0.4
hooks:
- id: flake8
args: ["--config=setup.cfg"]
additional_dependencies: [flake8-isort]

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.982
hooks:
- id: mypy
additional_dependencies: [types-all]

# sets up .pre-commit-ci.yaml to ensure pre-commit dependencies stay up to date
ci:
autoupdate_schedule: weekly
skip: []
submodules: false
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) 2023 OpenPecha

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.
148 changes: 148 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
# README

> **Note:** This readme template is based on one from the [Good Docs Project](https://thegooddocsproject.dev). You can find it and a guide to filling it out [here](https://gitlab.com/tgdp/templates/-/tree/main/readme). (_Erase this note after filling out the readme._)
<h1 align="center">
<br>
<a href="https://openpecha.org"><img src="https://avatars.githubusercontent.com/u/82142807?s=400&u=19e108a15566f3a1449bafb03b8dd706a72aebcd&v=4" alt="OpenPecha" width="150"></a>
<br>
</h1>

## _Project Name_
_The project name should match its code's capability so that new users can easily understand what it does._

## Owner(s)

_Change to the owner(s) of the new repo. (This template's owners are:)_
- [@ngawangtrinley](https://github.com/ngawangtrinley)
- [@mikkokotila](https://github.com/mikkokotila)
- [@evanyerburgh](https://github.com/evanyerburgh)


## Table of contents
<p align="center">
<a href="#project-description">Project description</a> •
<a href="#who-this-project-is-for">Who this project is for</a> •
<a href="#project-dependencies">Project dependencies</a> •
<a href="#instructions-for-use">Instructions for use</a> •
<a href="#contributing-guidelines">Contributing guidelines</a> •
<a href="#additional-documentation">Additional documentation</a> •
<a href="#how-to-get-help">How to get help</a> •
<a href="#terms-of-use">Terms of use</a>
</p>
<hr>

## Project description
_Use one of these:_

With _Project Name_ you can _verb_ _noun_...

_Project Name_ helps you _verb_ _noun_...


## Who this project is for
This project is intended for _target user_ who wants to _user objective_.


## Project dependencies
Before using _Project Name_, ensure you have:
* python _version_
* _Prerequisite 2_
* _Prerequisite 3..._


## Instructions for use
Get started with _Project Name_ by _(write the first step a user needs to start using the project. Use a verb to start.)_.


### Install _Project Name_
1. _Write the step here._

_Explanatory text here_

_(Optional: Include a code sample or screenshot that helps your users complete this step.)_

2. _Write the step here._

a. _Substep 1_

b. _Substep 2_


### Configure _Project Name_
1. _Write the step here._
2. _Write the step here._


### Run _Project Name_
1. _Write the step here._
2. _Write the step here._


### Troubleshoot _Project Name_
1. _Write the step here._
2. _Write the step here._

<table>
<tr>
<td>
Issue
</td>
<td>
Solution
</td>
</tr>
<tr>
<td>
_Describe the issue here_
</td>
<td>
_Write solution here_
</td>
</tr>
<tr>
<td>
_Describe the issue here_
</td>
<td>
_Write solution here_
</td>
</tr>
<tr>
<td>
_Describe the issue here_
</td>
<td>
_Write solution here_
</td>
</tr>
</table>


Other troubleshooting supports:
* _Link to FAQs_
* _Link to runbooks_
* _Link to other relevant support information_


## Contributing guidelines
If you'd like to help out, check out our [contributing guidelines](/CONTRIBUTING.md).


## Additional documentation
_Include links and brief descriptions to additional documentation._

For more information:
* [Reference link 1](#)
* [Reference link 2](#)
* [Reference link 3](#)


## How to get help
* File an issue.
* Email us at openpecha[at]gmail.com.
* Join our [discord](https://discord.com/invite/7GFpPFSTeA).


## Terms of use
_Project Name_ is licensed under the [MIT License](/LICENSE.md).
Loading

0 comments on commit 21c0630

Please sign in to comment.