-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
release: code formatting and 0.1.0 version release
- Loading branch information
0 parents
commit d12437f
Showing
59 changed files
with
1,901 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# http://editorconfig.org | ||
|
||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 4 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
charset = utf-8 | ||
end_of_line = lf | ||
|
||
[*.yml] | ||
indent_size = 2 | ||
|
||
[Makefile] | ||
indent_style = tab |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# These are supported funding model platforms | ||
custom: https://www.buymeacoffee.com/frankie567 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
title: '' | ||
labels: bug | ||
assignees: '' | ||
|
||
--- | ||
|
||
## Describe the bug | ||
|
||
A clear and concise description of what the bug is. | ||
|
||
## To Reproduce | ||
|
||
Steps to reproduce the behavior: | ||
1. Go to '...' | ||
2. Click on '....' | ||
3. Scroll down to '....' | ||
4. See error | ||
|
||
## Expected behavior | ||
|
||
A clear and concise description of what you expected to happen. | ||
|
||
## Configuration | ||
- Python version : | ||
- FastAPI version : | ||
- FastAPI Users version : | ||
|
||
### FastAPI Users configuration | ||
|
||
```py | ||
# Please copy/paste your FastAPI Users configuration here. | ||
``` | ||
|
||
## Additional context | ||
|
||
Add any other context about the problem here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
contact_links: | ||
- name: I have a question 🤔 | ||
url: https://github.com/fastapi-users/fastapi-users/discussions | ||
about: If you have any question about the usage of FastAPI Users that's not clearly a bug, please open a discussion first. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: pip | ||
directory: "/" | ||
schedule: | ||
interval: daily | ||
time: "04:00" | ||
open-pull-requests-limit: 10 | ||
reviewers: | ||
- frankie567 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Number of days of inactivity before an issue becomes stale | ||
daysUntilStale: 14 | ||
# Number of days of inactivity before a stale issue is closed | ||
daysUntilClose: 7 | ||
# Issues with these labels will never be considered stale | ||
exemptLabels: | ||
- pinned | ||
- security | ||
- bug | ||
- enhancement | ||
- documentation | ||
# Label to use when marking an issue as stale | ||
staleLabel: stale | ||
# Comment to post when marking an issue as stale. Set to `false` to disable | ||
markComment: > | ||
This issue has been automatically marked as stale because it has not had | ||
recent activity. It will be closed if no further activity occurs. Thank you | ||
for your contributions. | ||
# Comment to post when closing a stale issue. Set to `false` to disable | ||
closeComment: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: Build | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
|
||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python_version: [3.7, 3.8, 3.9, '3.10'] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{ matrix.python_version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install flit | ||
flit install --deps develop | ||
- name: Test with pytest | ||
env: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
run: | | ||
pytest --cov=fastapiusers_edgedb/ | ||
codecov | ||
- name: Build and install it on system host | ||
run: | | ||
flit build | ||
flit install --python $(which python) | ||
python test_build.py | ||
release: | ||
runs-on: ubuntu-latest | ||
needs: test | ||
if: startsWith(github.ref, 'refs/tags/') | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: 3.7 | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install flit | ||
flit install --deps develop | ||
- name: Release on PyPI | ||
env: | ||
FLIT_USERNAME: ${{ secrets.FLIT_USERNAME }} | ||
FLIT_PASSWORD: ${{ secrets.FLIT_PASSWORD }} | ||
run: | | ||
flit publish |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
env/ | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
wheels/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
|
||
# 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/ | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*.cover | ||
.hypothesis/ | ||
.pytest_cache/ | ||
junit/ | ||
junit.xml | ||
test*.db* | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# Django stuff: | ||
*.log | ||
local_settings.py | ||
|
||
# Flask stuff: | ||
instance/ | ||
.webassets-cache | ||
|
||
# Scrapy stuff: | ||
.scrapy | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# PyBuilder | ||
target/ | ||
|
||
# Jupyter Notebook | ||
.ipynb_checkpoints | ||
|
||
# pyenv | ||
.python-version | ||
|
||
# celery beat schedule file | ||
celerybeat-schedule | ||
|
||
# SageMath parsed files | ||
*.sage.py | ||
|
||
# dotenv | ||
.env | ||
|
||
# virtualenv | ||
.venv | ||
venv/ | ||
ENV/ | ||
|
||
# Spyder project settings | ||
.spyderproject | ||
.spyproject | ||
|
||
# Rope project settings | ||
.ropeproject | ||
|
||
# mkdocs documentation | ||
/site | ||
|
||
# mypy | ||
.mypy_cache/ | ||
|
||
# .vscode | ||
.vscode/ | ||
|
||
# OS files | ||
.DS_Store | ||
|
||
# .idea | ||
.idea/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2023 Mohamed Saif | ||
|
||
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
install: | ||
python -m pip install --upgrade pip | ||
pip install flit | ||
flit install --deps develop | ||
|
||
isort: | ||
isort ./fastapiusers_edgedb ./tests | ||
|
||
format: isort | ||
black . | ||
|
||
test: | ||
pytest --cov=fastapiusers_edgedb/ --cov-report=term-missing --cov-fail-under=100 | ||
|
||
bumpversion-major: | ||
bumpversion major | ||
|
||
bumpversion-minor: | ||
bumpversion minor | ||
|
||
bumpversion-patch: | ||
bumpversion patch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
# FastAPI Users - Database adapter for EdgeDB | ||
|
||
<p align="center"> | ||
<img src="https://raw.githubusercontent.com/frankie567/fastapi-users/master/logo.svg?sanitize=true" alt="FastAPI Users"> | ||
</p> | ||
|
||
<p align="center"> | ||
<em>Ready-to-use and customizable users management for FastAPI</em> | ||
</p> | ||
|
||
[//]: # ([![build](https://github.com/fastapi-users/fastapi-users-db-edgedb/workflows/Build/badge.svg)](https://github.com/fastapi-users/fastapi-users/actions)) | ||
[//]: # ([![codecov](https://codecov.io/gh/fastapi-users/fastapi-users-db-edgedb/branch/master/graph/badge.svg)](https://codecov.io/gh/fastapi-users/fastapi-users-db-edgedb)) | ||
[//]: # ([![PyPI version](https://badge.fury.io/py/fastapi-users-db-edgedb.svg)](https://badge.fury.io/py/fastapi-users-db-edgedb)) | ||
[//]: # ([![Downloads](https://pepy.tech/badge/fastapi-users-db-edgedb)](https://pepy.tech/project/fastapi-users-db-edgedb)) | ||
|
||
--- | ||
|
||
**Documentation**: <a href="https://fastapi-users.github.io/fastapi-users/" target="_blank">https://fastapi-users.github.io/fastapi-users/</a> | ||
|
||
**Source Code**: <a href="https://github.com/fastapi-users/fastapi-users" target="_blank">https://github.com/fastapi-users/fastapi-users</a> | ||
|
||
--- | ||
|
||
Add quickly a registration and authentication system to your [FastAPI](https://fastapi.tiangolo.com/) project. **FastAPI Users** is designed to be as customizable and adaptable as possible. | ||
|
||
**Sub-package for EdgeDB support in FastAPI Users.** | ||
|
||
## Development | ||
|
||
### Setup environment | ||
|
||
You should create a virtual environment and activate it: | ||
|
||
```bash | ||
python -m venv venv/ | ||
``` | ||
|
||
```bash | ||
source venv/bin/activate | ||
``` | ||
|
||
And then install the development dependencies: | ||
|
||
```bash | ||
make install | ||
``` | ||
|
||
### Run unit tests | ||
|
||
You can run all the tests with: | ||
|
||
```bash | ||
make test | ||
``` | ||
|
||
Alternatively, you can run `pytest` yourself: | ||
|
||
```bash | ||
pytest | ||
``` | ||
|
||
There are quite a few unit tests, so you might run into ulimit issues where there are too many open file descriptors. You may be able to set a new, higher limit temporarily with: | ||
|
||
```bash | ||
ulimit -n 2048 | ||
``` | ||
|
||
### Format the code | ||
|
||
Execute the following command to apply `isort` and `black` formatting: | ||
|
||
```bash | ||
make format | ||
``` | ||
|
||
## License | ||
|
||
This project is licensed under the terms of the MIT license. |
Oops, something went wrong.