Skip to content

Commit 3348493

Browse files
authored
Merge pull request #1 from codePerfectPlus/test-cases
intial version created
2 parents 9d74f30 + 4062d05 commit 3348493

22 files changed

+313
-48
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: bug
6+
assignees: ''
7+
8+
---
9+
**Are you using latest code**
10+
11+
**Describe the bug**
12+
A clear and concise description of what the bug is.
13+
14+
15+
**Expected behavior**
16+
A clear and concise description of what you expected to happen.
17+
18+
**Screenshots**
19+
If applicable, add screenshots to help explain your problem.
20+
21+
**Pythonversion**
22+
- Python version
23+
24+
**Additional context**
25+
Add any other context about the problem here.
+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: enhancement
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
name: Update Documentation
3+
about: Describe this issue template's purpose here.
4+
title: ''
5+
labels: documentation, enhancement
6+
assignees: ''
7+
8+
---
9+
10+
**Short introduction what you want to change in README.md **
11+
example:- code change, outdated Readme

.github/PULL_REQUEST_TEMPLATE.md

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
2+
# Pull Request Template
3+
4+
**script name** -
5+
6+
**What have you Changed**
7+
8+
what you changed in the codebase.write here
9+
10+
11+
### Issue no.(must) - #
12+
13+
### Self Check(Tick After Making pull Request)
14+
15+
- [ ] This issue was assigned to me.
16+
- [x] One Change in one Pull Request
17+
- [x] My file is in proper folder
18+
- [x] I am following clean code and Documentation and my code is well linted with flake8.
19+
- [ ] I have added README.md and requirements.txt with my script
20+
21+
If issue was not assigned to you Please don't make a PR. It will marked as invalid.
22+
23+
Join Us on Discord:- https://discord.gg/JfbK3bS
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# GitHub Action that uses close-issue auto-close empty issues after they are opened.
2+
# If the issue body text is empty the Action auto-closes it and sends a notification.
3+
# Otherwise if the issue body is not empty, it does nothing and the issue remains open.
4+
# https://github.com/marketplace/actions/close-issue
5+
6+
name: auto_close_empty_issues
7+
on:
8+
issues:
9+
types: [opened]
10+
jobs:
11+
check-issue-body-not-empty:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- if: github.event.issue.body == 0
15+
name: Close Issue
16+
uses: peter-evans/close-issue@v1
17+
with:
18+
comment: |
19+
Issue body must contain content.
20+
Auto-closing this issue.

.github/workflows/codeql-analysis.yml

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: "CodeQL"
2+
on:
3+
push:
4+
branches: [main]
5+
pull_request:
6+
branches: [main]
7+
schedule:
8+
- cron: '0 9 * * 5'
9+
10+
jobs:
11+
analyze:
12+
name: Analyze
13+
runs-on: ubuntu-latest
14+
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
# Override automatic language detection by changing the below list
19+
# Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
20+
language: ['python']
21+
# Learn more...
22+
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection
23+
24+
steps:
25+
- name: Checkout repository
26+
uses: actions/checkout@v2
27+
28+
# Initializes the CodeQL tools for scanning.
29+
- name: Initialize CodeQL
30+
uses: github/codeql-action/init@v1
31+
with:
32+
languages: ${{ matrix.language }}
33+
# If you wish to specify custom queries, you can do so here or in a config file.
34+
# By default, queries listed here will override any specified in a config file.
35+
# Prefix the list here with "+" to use these queries and those in the config file.
36+
# queries: ./path/to/local/query, your-org/your-repo/queries@main
37+
38+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
39+
# If this step fails, then you should remove it and run the build manually (see below)
40+
- name: Autobuild
41+
uses: github/codeql-action/autobuild@v1
42+
43+
# ℹ️ Command-line programs to run using the OS shell.
44+
# 📚 https://git.io/JvXDl
45+
46+
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
47+
# and modify them (or add more) to build your code if your project
48+
# uses a compiled language
49+
50+
#- run: |
51+
# make bootstrap
52+
# make release
53+
54+
- name: Perform CodeQL Analysis
55+
uses: github/codeql-action/analyze@v1

.github/workflows/publish.yml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Publish package to PyPI
2+
on: push
3+
jobs:
4+
build-and-publish:
5+
name: Build and Publish to PyPI
6+
runs-on: ubuntu-latest
7+
if: startsWith(github.ref, 'refs/tags')
8+
steps:
9+
- uses: actions/checkout@v2
10+
- name: Use Python 3.8
11+
uses: actions/setup-python@v2
12+
with:
13+
python-version: 3.8
14+
- name: Run setup
15+
run: >-
16+
python setup.py sdist
17+
- name: Publish distribution to PyPI
18+
uses: pypa/gh-action-pypi-publish@master
19+
with:
20+
user: __token__
21+
password: ${{ secrets.pypi_password }}

.github/workflows/run-pytest.yaml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Run Pytest
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
8+
runs-on: ubuntu-latest
9+
strategy:
10+
matrix:
11+
python-version: ["3.10"]
12+
13+
steps:
14+
- uses: actions/checkout@v3
15+
- name: Set up Python ${{ matrix.python-version }}
16+
uses: actions/setup-python@v4
17+
with:
18+
python-version: ${{ matrix.python-version }}
19+
- name: Install dependencies
20+
run: |
21+
sudo apt-get update
22+
sudo apt install libespeak-dev
23+
python -m pip install --upgrade pip
24+
pip install flake8 pytest
25+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
26+
- name: Lint with flake8
27+
run: |
28+
# stop the build if there are Python syntax errors or undefined names
29+
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
30+
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
31+
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=200 --statistics
32+
- name: Test with pytest
33+
run: |
34+
pytest

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -127,3 +127,5 @@ dmypy.json
127127

128128
# Pyre type checker
129129
.pyre/
130+
*.json
131+
test_db.py

CHANGELOG.md

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
4+
5+
## [Initial Release]
6+
7+
- Initial release with basic database features++
8+
- Initial documentation++
9+
- Initial tests++

README.md

-5
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,6 @@ You can install python-db using pip:
2323

2424
pip install python-db
2525

26-
or you can install it from source:
27-
28-
git clone
29-
cd python-db
30-
python setup.py install
3126

3227
## Usage
3328

db.json

-1
This file was deleted.

docs/conf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from datetime import datetime
22

3-
project = 'python-db'
3+
project = 'quickDB'
44
release = '0.0.1'
55
templates_path = ['_templates']
66
source_suffix = ".rst"

docs/index.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
.. rst-class:: hide-header
33

4-
Welcome to python-db's documentation!
4+
Welcome to QuickDB's documentation!
55
=====================================
66

77
![Download badge](http://pepy.tech/badge/pickledb)

quickdb_/__init__.py

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from quickdb.main import QuickDB
2+
3+
__all__ = ['QuickDB']

quickdb_/cli.py

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from quickdb.main import QuickDB
2+
import argparse
3+

0 commit comments

Comments
 (0)