Skip to content

Commit 0ae5bb9

Browse files
committed
initialize standard python library
0 parents  commit 0ae5bb9

30 files changed

+796
-0
lines changed

.coveragerc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[run]
2+
branch = True
3+
omit =
4+
*/reserver/__main__.py
5+
[report]
6+
# Regexes for lines to exclude from consideration
7+
exclude_lines =
8+
pragma: no cover

.github/CODE_OF_CONDUCT.md

Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our
6+
community a harassment-free experience for everyone, regardless of age, body
7+
size, visible or invisible disability, ethnicity, sex characteristics, gender
8+
identity and expression, level of experience, education, socio-economic status,
9+
nationality, personal appearance, race, caste, color, religion, or sexual
10+
identity and orientation.
11+
12+
We pledge to act and interact in ways that contribute to an open, welcoming,
13+
diverse, inclusive, and healthy community.
14+
15+
## Our Standards
16+
17+
Examples of behavior that contributes to a positive environment for our
18+
community include:
19+
20+
* Demonstrating empathy and kindness toward other people
21+
* Being respectful of differing opinions, viewpoints, and experiences
22+
* Giving and gracefully accepting constructive feedback
23+
* Accepting responsibility and apologizing to those affected by our mistakes,
24+
and learning from the experience
25+
* Focusing on what is best not just for us as individuals, but for the overall
26+
community
27+
28+
Examples of unacceptable behavior include:
29+
30+
* The use of sexualized language or imagery, and sexual attention or advances of
31+
any kind
32+
* Trolling, insulting or derogatory comments, and personal or political attacks
33+
* Public or private harassment
34+
* Publishing others' private information, such as a physical or email address,
35+
without their explicit permission
36+
* Other conduct which could reasonably be considered inappropriate in a professional setting
37+
38+
## Enforcement Responsibilities
39+
40+
Community leaders are responsible for clarifying and enforcing our standards of
41+
acceptable behavior and will take appropriate and fair corrective action in
42+
response to any behavior that they deem inappropriate, threatening, offensive,
43+
or harmful.
44+
45+
Community leaders have the right and responsibility to remove, edit, or reject
46+
comments, commits, code, wiki edits, issues, and other contributions that are
47+
not aligned to this Code of Conduct, and will communicate reasons for moderation
48+
decisions when appropriate.
49+
50+
## Scope
51+
This Code of Conduct applies both within project spaces and in public spaces
52+
when an individual is representing the project or its community.
53+
Examples of representing our community include using an official e-mail address,
54+
posting via an official social media account, or acting as an appointed
55+
representative at an online or offline event.
56+
57+
## Enforcement
58+
59+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
60+
reported to the community leaders responsible for enforcement at
61+
62+
All complaints will be reviewed and investigated promptly and fairly.
63+
64+
All community leaders are obligated to respect the privacy and security of the
65+
reporter of any incident.
66+
67+
## Enforcement Guidelines
68+
69+
Community leaders will follow these Community Impact Guidelines in determining
70+
the consequences for any action they deem in violation of this Code of Conduct:
71+
72+
### 1. Correction
73+
74+
**Community Impact**: Use of inappropriate language or other behavior deemed
75+
unprofessional or unwelcome in the community.
76+
77+
**Consequence**: A private, written warning from community leaders, providing
78+
clarity around the nature of the violation and an explanation of why the
79+
behavior was inappropriate. A public apology may be requested.
80+
81+
### 2. Warning
82+
83+
**Community Impact**: A violation through a single incident or series of
84+
actions.
85+
86+
**Consequence**: A warning with consequences for continued behavior. No
87+
interaction with the people involved, including unsolicited interaction with
88+
those enforcing the Code of Conduct, for a specified period of time. This
89+
includes avoiding interactions in community spaces as well as external channels
90+
like social media. Violating these terms may lead to a temporary or permanent
91+
ban.
92+
93+
### 3. Temporary Ban
94+
95+
**Community Impact**: A serious violation of community standards, including
96+
sustained inappropriate behavior.
97+
98+
**Consequence**: A temporary ban from any sort of interaction or public
99+
communication with the community for a specified period of time. No public or
100+
private interaction with the people involved, including unsolicited interaction
101+
with those enforcing the Code of Conduct, is allowed during this period.
102+
Violating these terms may lead to a permanent ban.
103+
104+
### 4. Permanent Ban
105+
106+
**Community Impact**: Demonstrating a pattern of violation of community
107+
standards, including sustained inappropriate behavior, harassment of an
108+
individual, or aggression toward or disparagement of classes of individuals.
109+
110+
**Consequence**: A permanent ban from any sort of public interaction within the
111+
community.
112+
113+
## Attribution
114+
115+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
116+
version 2.1, available at
117+
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
118+
119+
Community Impact Guidelines were inspired by
120+
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
121+
122+
For answers to common questions about this code of conduct, see the FAQ at
123+
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
124+
[https://www.contributor-covenant.org/translations][translations].
125+
126+
[homepage]: https://www.contributor-covenant.org
127+
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
128+
[Mozilla CoC]: https://github.com/mozilla/diversity
129+
[FAQ]: https://www.contributor-covenant.org/faq
130+
[translations]: https://www.contributor-covenant.org/translations

.github/CONTRIBUTING.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Contribution
2+
3+
Changes and improvements are more than welcome! ❤️ Feel free to fork and open a pull request.
4+
5+
6+
Please consider the following :
7+
8+
9+
1. Fork it!
10+
2. Create your feature branch (under `dev` branch)
11+
3. Add your functions/methods to proper files
12+
4. Add standard `docstring` to your functions/methods
13+
5. Add tests for your functions/methods (`doctest` testcases in `test` folder)
14+
6. Pass all CI tests
15+
7. Update `CHANGELOG.md`
16+
- Describe changes under `[Unreleased]` section
17+
8. Submit a pull request into `dev` (please complete the pull request template)

.github/ISSUE_TEMPLATE.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#### Description
2+
3+
#### Steps/Code to Reproduce
4+
5+
#### Expected Behavior
6+
7+
#### Actual Behavior
8+
9+
#### Operating System
10+
11+
#### Python Version
12+
13+
#### Reserver Version (Use : `reserver.__version__`)

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#### Reference Issues/PRs
2+
3+
#### What does this implement/fix? Explain your changes.
4+
5+
#### Any other comments?
6+

.github/dependabot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: pip
4+
directory: "/"
5+
schedule:
6+
interval: weekly
7+
time: "01:30"
8+
open-pull-requests-limit: 10
9+
target-branch: dev
10+
assignees:
11+
- "AHReccese"

.github/workflows/publish_pypi.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# This workflow will upload a Python Package using Twine when a release is created
2+
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
3+
4+
name: Upload Python Package
5+
6+
on:
7+
push:
8+
# Sequence of patterns matched against refs/tags
9+
tags:
10+
- '*' # Push events to matching v*, i.e. v1.0, v20.15.10
11+
12+
jobs:
13+
deploy:
14+
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: actions/checkout@v2
19+
- name: Set up Python
20+
uses: actions/setup-python@v1
21+
with:
22+
python-version: '3.x'
23+
- name: Install dependencies
24+
run: |
25+
python -m pip install --upgrade pip
26+
pip install setuptools wheel twine
27+
- name: Build and publish
28+
env:
29+
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
30+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
31+
run: |
32+
python setup.py sdist bdist_wheel
33+
twine upload dist/*.tar.gz
34+
twine upload dist/*.whl

.github/workflows/test.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3+
4+
name: CI
5+
6+
on: [push, pull_request]
7+
8+
env:
9+
TEST_PYTHON_VERSION: 3.9
10+
TEST_OS: 'ubuntu-20.04'
11+
12+
jobs:
13+
build:
14+
runs-on: ${{ matrix.os }}
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
os: [ubuntu-20.04, windows-latest, macOS-latest]
19+
python-version: [3.6, 3.7, 3.8, 3.9, 3.10.0, 3.11.0, 3.12.0]
20+
steps:
21+
- uses: actions/checkout@v2
22+
- name: Set up Python ${{ matrix.python-version }}
23+
uses: actions/setup-python@v2
24+
with:
25+
python-version: ${{ matrix.python-version }}
26+
- name: Installation
27+
run: |
28+
python -m pip install --upgrade pip
29+
pip install .
30+
- name: Test requirements Installation
31+
run: |
32+
python otherfiles/requirements-splitter.py
33+
pip install --upgrade --upgrade-strategy=only-if-needed -r test-requirements.txt
34+
- name: Test with pytest
35+
run: |
36+
python -m pytest . --cov=reserver --cov-report=term
37+
- name: Upload coverage to Codecov
38+
uses: codecov/codecov-action@v3
39+
with:
40+
fail_ci_if_error: false
41+
if: matrix.python-version == env.TEST_PYTHON_VERSION && matrix.os == env.TEST_OS
42+
- name: Other tests
43+
run: |
44+
python -m vulture reserver/ otherfiles/ setup.py --min-confidence 65 --exclude=__init__.py --sort-by-size
45+
python -m bandit -r reserver -s B311
46+
python -m pydocstyle -v
47+
if: matrix.python-version == env.TEST_PYTHON_VERSION
48+
- name: Version check
49+
run: |
50+
python otherfiles/version_check.py
51+
if: matrix.python-version == env.TEST_PYTHON_VERSION

.gitignore

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
# Created by .ignore support plugin (hsz.mobi)
2+
### Python template
3+
# Byte-compiled / optimized / DLL files
4+
__pycache__/
5+
*.py[cod]
6+
*$py.class
7+
8+
# C extensions
9+
*.so
10+
11+
# Distribution / packaging
12+
.Python
13+
env/
14+
build/
15+
develop-eggs/
16+
dist/
17+
downloads/
18+
eggs/
19+
.eggs/
20+
lib/
21+
lib64/
22+
parts/
23+
sdist/
24+
var/
25+
*.egg-info/
26+
.installed.cfg
27+
*.egg
28+
29+
# PyInstaller
30+
# Usually these files are written by a python script from a template
31+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
32+
*.manifest
33+
*.spec
34+
35+
# Installer logs
36+
pip-log.txt
37+
pip-delete-this-directory.txt
38+
39+
# Unit test / coverage reports
40+
htmlcov/
41+
.tox/
42+
.coverage
43+
.coverage.*
44+
.cache
45+
nosetests.xml
46+
coverage.xml
47+
*,cover
48+
.hypothesis/
49+
50+
# Translations
51+
*.mo
52+
*.pot
53+
54+
# Django stuff:
55+
*.log
56+
local_settings.py
57+
58+
# Flask stuff:
59+
instance/
60+
.webassets-cache
61+
62+
# Scrapy stuff:
63+
.scrapy
64+
65+
# Sphinx documentation
66+
docs/_build/
67+
68+
# PyBuilder
69+
target/
70+
71+
# Jupyter Notebook
72+
.ipynb_checkpoints
73+
74+
# pyenv
75+
.python-version
76+
77+
# celery beat schedule file
78+
celerybeat-schedule
79+
80+
# dotenv
81+
.env
82+
83+
# virtualenv
84+
.venv/
85+
venv/
86+
ENV/
87+
88+
# Spyder project settings
89+
.spyderproject
90+
91+
# Rope project settings
92+
.ropeproject
93+
### Example user template template
94+
### Example user template
95+
96+
# IntelliJ project files
97+
.idea
98+
*.iml
99+
out
100+
gen
101+
102+
/tests/exported_linear_models
103+
/tests/exported_neural_networks
104+
/tests/exported_decision_trees
105+
/tests/exported_clusterings
106+
/.VSCodeCounter

.pydocstyle

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[pydocstyle]
2+
match_dir = ^(?!(tests|build)).*
3+
match = .*\.py
4+

0 commit comments

Comments
 (0)