Skip to content

Commit af7d420

Browse files
committed
Add initial documentation
Add initial docs that mostly just point to the source code for now Add changelog Add code of conduct
1 parent 9156080 commit af7d420

File tree

3 files changed

+245
-0
lines changed

3 files changed

+245
-0
lines changed

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# changelog
2+
3+
See also: [Github Release Page](https://github.com/enpaul/peewee-plus/releases).
4+
5+
## Version 1.0.0
6+
7+
View this release on: [Github](https://github.com/enpaul/peewee-plus/releases/tag/1.0.0),
8+
[PyPI](https://pypi.org/project/peewee-plus/1.0.0/)
9+
10+
- Add function for calculating SQLite batch size
11+
- Add constants for SQLite default parameters
12+
- Add field for storing JSON-serializable data
13+
- Add field for storing Enums
14+
- Add field for storing paths
15+
- Add field for storing floats with custom precision parameters

CODE_OF_CONDUCT.md

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

README.md

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,118 @@
11
# peewee+
22

33
Various extensions, helpers, and utilities for [Peewee](http://peewee-orm.com)
4+
5+
[![PyPI Version](https://img.shields.io/pypi/v/peewee-plus)](https://pypi.org/project/peewee-plus/)
6+
[![License](https://img.shields.io/pypi/l/peewee-plus)](https://opensource.org/licenses/MIT)
7+
[![Python Supported Versions](https://img.shields.io/pypi/pyversions/peewee-plus)](https://www.python.org)
8+
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
9+
10+
See the [Changelog](https://github.com/enpaul/peewee-plus/blob/devel/CHANGELOG.md) for
11+
release history.
12+
13+
## Documentation
14+
15+
*The documentation for this project is currently a work in progress. Please see the source code for complete docs*
16+
17+
- [Installing](#installing)
18+
- [Features](#features)
19+
- [For Developers](#for-developers)
20+
21+
## Installing
22+
23+
Peewee+ is [available on PyPI](https://pypi.org/project/peewee-plus/) and can be installed
24+
using Poetry, Pipenv, or Pip:
25+
26+
```bash
27+
# Using poetry
28+
poetry add peewee-plus
29+
30+
# Using pipenv
31+
pipenv install peewee-plus
32+
33+
# Using pip
34+
python -m venv peewee
35+
source peewee/bin/activate
36+
python -m pip install peewee-plus
37+
```
38+
39+
Once installed, Peewee+ can be imported like below:
40+
41+
```python
42+
import peewee_plus
43+
```
44+
45+
## Features
46+
47+
### Constants
48+
49+
`SQLITE_DEFAULT_PRAGMAS` - The default pragmas to use with an SQLite database connection,
50+
taken directly from the
51+
[Peewee docs](http://docs.peewee-orm.com/en/latest/peewee/database.html#recommended-settings).
52+
53+
`SQLITE_DEFAULT_VARIABLE_LIMIT` - The maximum number of variables an SQL query can use
54+
when using SQLite
55+
56+
### Functions
57+
58+
[`calc_batch_size`](https://github.com/enpaul/peewee-plus/blob/1.0.0/peewee_plus.py#L68) -
59+
Helper function for determining how to batch a create/update query with SQLite
60+
61+
### Classes
62+
63+
[`PathField`](https://github.com/enpaul/peewee-plus/blob/1.0.0/peewee_plus.py#134) - A
64+
Peewee database field for storing
65+
[Pathlib](https://docs.python.org/3/library/pathlib.html) objects, optionally relative to
66+
a runtime value.
67+
68+
[`PrecisionFloatField`](https://github.com/enpaul/peewee-plus/blob/1.0.0/peewee_plus.py#L192)
69+
\- A Peewee database field for storing floats while specifying the
70+
[MySQL precision parameters](https://dev.mysql.com/doc/refman/8.0/en/floating-point-types.html)
71+
`M` and `D`
72+
73+
[`JSONField`](https://github.com/enpaul/peewee-plus/blob/1.0.0/peewee_plus.py#L222) - A
74+
Peewee database field for storing arbitrary JSON-serializable data
75+
76+
[`EnumField`](https://github.com/enpaul/peewee-plus/blob/1.0.0/peewee_plus.py#L277) - A
77+
Peewee database field for storing Enums by name
78+
79+
## For Developers
80+
81+
All project contributors and participants are expected to adhere to the
82+
[Contributor Covenant Code of Conduct, v2](CODE_OF_CONDUCT.md) ([external link](https://www.contributor-covenant.org/version/2/0/code_of_conduct/)).
83+
84+
The `devel` branch has the latest (and potentially unstable) changes. The stable releases
85+
are tracked on [Github](https://github.com/enpaul/peewee-plus/releases),
86+
[PyPi](https://pypi.org/project/peewee-plus/#history), and in the
87+
[Changelog](CHANGELOG.md).
88+
89+
- To report a bug, request a feature, or ask for assistance, please
90+
[open an issue on the Github repository](https://github.com/enpaul/peewee-plus/issues/new).
91+
- To report a security concern or code of conduct violation, please contact the project
92+
author directly at **‌me \[at‌\] enp dot‎ ‌one**.
93+
- To submit an update, please
94+
[fork the repository](https://docs.github.com/en/enterprise/2.20/user/github/getting-started-with-github/fork-a-repo)
95+
and [open a pull request](https://github.com/enpaul/peewee-plus/compare).
96+
97+
Developing this project requires at least [Python 3.7](https://www.python.org/downloads/)
98+
and at least [Poetry 1.0](https://python-poetry.org/docs/#installation). GNU Make can
99+
optionally be used to quickly setup a local development environment, but this is not
100+
required.
101+
102+
To setup a local development environment:
103+
104+
```bash
105+
# Clone the repository...
106+
# ...over HTTPS
107+
git clone https://github.com/enpaul/peewee-plus.git
108+
# ...over SSH
109+
git clone [email protected]:enpaul/peewee-plus.git
110+
111+
cd peewee-plus/
112+
113+
# Create and configure the local dev environment
114+
make dev
115+
116+
# See additional make targets
117+
make help
118+
```

0 commit comments

Comments
 (0)