use poetry instead of pip
This commit is contained in:
parent
9aa460d47f
commit
351adc57f5
|
@ -22,15 +22,16 @@ jobs:
|
|||
|
||||
- uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
|
||||
path: ~/.cache/poetry
|
||||
key: ${{ runner.os }}-poetry-${{ hashFiles('**/peotry.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pip-
|
||||
${{ runner.os }}-poetry-
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install -r requirements.txt
|
||||
python -m pip install poetry==1.0.10
|
||||
poetry config virtualenvs.create false
|
||||
poetry install
|
||||
|
||||
- name: Test formatting
|
||||
run: |
|
||||
|
|
11
Dockerfile
11
Dockerfile
|
@ -4,16 +4,19 @@ WORKDIR /code
|
|||
COPY ./static/package*.json /code/static/
|
||||
RUN cd /code/static && npm install
|
||||
|
||||
|
||||
# Main image
|
||||
FROM python:3.7
|
||||
WORKDIR /code
|
||||
|
||||
# install some utility packages
|
||||
RUN apt update && apt install -y vim telnet
|
||||
|
||||
RUN pip3 install poetry==1.0.10
|
||||
|
||||
# install dependencies
|
||||
COPY ./requirements.txt ./
|
||||
RUN pip3 install --no-cache-dir -r requirements.txt
|
||||
WORKDIR /code
|
||||
COPY poetry.lock pyproject.toml ./
|
||||
RUN poetry config virtualenvs.create false \
|
||||
&& poetry install
|
||||
|
||||
# copy npm packages
|
||||
COPY --from=npm /code /code
|
||||
|
|
10
README.md
10
README.md
|
@ -591,10 +591,15 @@ All work on SimpleLogin happens directly on GitHub.
|
|||
|
||||
### Run code locally
|
||||
|
||||
The project uses Python 3.7+ and Node v10. First, install all dependencies by running the following command. Feel free to use `virtualenv` or similar tools to isolate development environment.
|
||||
The project uses
|
||||
- Python 3.7+ and [poetry](https://python-poetry.org/) to manage dependencies
|
||||
- Node v10 for front-end.
|
||||
|
||||
First, install all dependencies by running the following command.
|
||||
Feel free to use `virtualenv` or similar tools to isolate development environment.
|
||||
|
||||
```bash
|
||||
pip3 install -r requirements.txt
|
||||
poetry install
|
||||
```
|
||||
|
||||
You also need to install `gpg`, on Mac it can be done with:
|
||||
|
@ -603,7 +608,6 @@ You also need to install `gpg`, on Mac it can be done with:
|
|||
brew install gnupg
|
||||
```
|
||||
|
||||
|
||||
Then make sure all tests pass
|
||||
|
||||
```bash
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -16,3 +16,69 @@ exclude = '''
|
|||
)/
|
||||
)
|
||||
'''
|
||||
|
||||
[tool.poetry]
|
||||
name = "SimpleLogin"
|
||||
version = "0.1.0"
|
||||
description = "open-source email alias solution"
|
||||
authors = ["SimpleLogin <dev@simplelogin.io>"]
|
||||
license = "MIT"
|
||||
repository = "https://github.com/simple-login/app"
|
||||
keywords = ["email", "alias", "privacy", "oauth2", "openid"]
|
||||
|
||||
[tool.poetry.dependencies]
|
||||
python = "^3.7"
|
||||
flask = "^1.1.2"
|
||||
flask_sqlalchemy = "^2.4.4"
|
||||
flask_login = "^0.5.0"
|
||||
wtforms = "^2.3.3"
|
||||
unidecode = "^1.1.1"
|
||||
gunicorn = "^20.0.4"
|
||||
bcrypt = "^3.2.0"
|
||||
python-dotenv = "^0.14.0"
|
||||
ipython = "^7.18.1"
|
||||
sqlalchemy_utils = "^0.36.8"
|
||||
psycopg2-binary = "^2.8.6"
|
||||
sentry_sdk = "^0.18.0"
|
||||
blinker = "^1.4"
|
||||
arrow = "^0.16.0"
|
||||
Flask-WTF = "^0.14.3"
|
||||
boto3 = "^1.15.9"
|
||||
Flask-Migrate = "^2.5.3"
|
||||
flask_admin = "^1.5.6"
|
||||
flask-cors = "^3.0.9"
|
||||
watchtower = "^0.8.0"
|
||||
sqlalchemy-utils = "^0.36.8"
|
||||
jwcrypto = "^0.8"
|
||||
yacron = "^0.11.1"
|
||||
flask-debugtoolbar = "^0.11.0"
|
||||
requests_oauthlib = "^1.3.0"
|
||||
pyopenssl = "^19.1.0"
|
||||
aiosmtpd = "^1.2"
|
||||
dnspython = "^2.0.0"
|
||||
coloredlogs = "^14.0"
|
||||
pycryptodome = "^3.9.8"
|
||||
phpserialize = "^1.3"
|
||||
dkimpy = "^1.0.5"
|
||||
pyotp = "^2.4.0"
|
||||
flask_profiler = "^1.8.1"
|
||||
facebook-sdk = "^3.1.0"
|
||||
google-api-python-client = "^1.12.3"
|
||||
google-auth-httplib2 = "^0.0.4"
|
||||
python-gnupg = "^0.4.6"
|
||||
webauthn = "^0.4.7"
|
||||
pyspf = "^2.0.14"
|
||||
Flask-Limiter = "^1.4"
|
||||
memory_profiler = "^0.57.0"
|
||||
gevent = "^20.9.0"
|
||||
aiocontextvars = "^0.2.2"
|
||||
aiospamc = "^0.6.1"
|
||||
|
||||
[tool.poetry.dev-dependencies]
|
||||
pytest = "^6.1.0"
|
||||
black = "^20.8b1"
|
||||
pre-commit = "^2.7.1"
|
||||
|
||||
[build-system]
|
||||
requires = ["poetry>=0.12"]
|
||||
build-backend = "poetry.masonry.api"
|
||||
|
|
|
@ -1,49 +0,0 @@
|
|||
flask_sqlalchemy
|
||||
flask
|
||||
flask_login
|
||||
wtforms
|
||||
unidecode
|
||||
gunicorn
|
||||
pip-tools
|
||||
bcrypt
|
||||
python-dotenv
|
||||
ipython
|
||||
sqlalchemy_utils
|
||||
psycopg2-binary
|
||||
sentry_sdk
|
||||
blinker
|
||||
arrow
|
||||
Flask-WTF
|
||||
boto3
|
||||
Flask-Migrate
|
||||
flask_admin
|
||||
pytest
|
||||
flask-cors
|
||||
watchtower
|
||||
sqlalchemy-utils
|
||||
jwcrypto
|
||||
yacron
|
||||
flask-debugtoolbar
|
||||
requests_oauthlib
|
||||
pyopenssl
|
||||
aiosmtpd
|
||||
dnspython
|
||||
coloredlogs
|
||||
pycryptodome
|
||||
phpserialize
|
||||
dkimpy
|
||||
pyotp
|
||||
flask_profiler
|
||||
facebook-sdk
|
||||
google-api-python-client
|
||||
google-auth-httplib2
|
||||
python-gnupg
|
||||
webauthn
|
||||
pyspf
|
||||
Flask-Limiter
|
||||
memory_profiler
|
||||
gevent
|
||||
aiocontextvars
|
||||
aiospamc
|
||||
black
|
||||
pre-commit
|
146
requirements.txt
146
requirements.txt
|
@ -1,146 +0,0 @@
|
|||
#
|
||||
# This file is autogenerated by pip-compile
|
||||
# To update, run:
|
||||
#
|
||||
# pip-compile
|
||||
#
|
||||
aiocontextvars==0.2.2 # via -r requirements.in
|
||||
aiohttp==3.5.4 # via yacron
|
||||
aiosmtpd==1.2 # via -r requirements.in
|
||||
aiosmtplib==1.0.6 # via yacron
|
||||
aiospamc==0.6.1 # via -r requirements.in
|
||||
alembic==1.0.10 # via flask-migrate
|
||||
appdirs==1.4.4 # via black, virtualenv
|
||||
appnope==0.1.0 # via ipython
|
||||
arrow==0.14.2 # via -r requirements.in
|
||||
asn1crypto==0.24.0 # via cryptography
|
||||
async-timeout==3.0.1 # via aiohttp
|
||||
atomicwrites==1.3.0 # via pytest
|
||||
atpublic==1.0 # via aiosmtpd
|
||||
attrs==19.1.0 # via aiohttp, pytest
|
||||
backcall==0.1.0 # via ipython
|
||||
bcrypt==3.1.6 # via -r requirements.in
|
||||
black==20.8b1 # via -r requirements.in
|
||||
blinker==1.4 # via -r requirements.in, flask-debugtoolbar
|
||||
boto3==1.9.167 # via -r requirements.in, watchtower
|
||||
botocore==1.12.167 # via boto3, s3transfer
|
||||
cachetools==4.0.0 # via google-auth
|
||||
cbor2==5.1.0 # via webauthn
|
||||
certifi==2019.11.28 # via aiospamc, requests, sentry-sdk
|
||||
cffi==1.12.3 # via bcrypt, cryptography
|
||||
cfgv==3.2.0 # via pre-commit
|
||||
chardet==3.0.4 # via aiohttp, requests
|
||||
click==7.1.2 # via black, flask, pip-tools
|
||||
coloredlogs==10.0 # via -r requirements.in
|
||||
crontab==0.22.8 # via yacron
|
||||
cryptography==2.7 # via jwcrypto, pyopenssl, webauthn
|
||||
decorator==4.4.0 # via ipython, traitlets
|
||||
distlib==0.3.1 # via virtualenv
|
||||
dkimpy==1.0.1 # via -r requirements.in
|
||||
dnspython==1.16.0 # via -r requirements.in, dkimpy
|
||||
docutils==0.14 # via botocore
|
||||
facebook-sdk==3.1.0 # via -r requirements.in
|
||||
filelock==3.0.12 # via virtualenv
|
||||
flask-admin==1.5.3 # via -r requirements.in
|
||||
flask-cors==3.0.8 # via -r requirements.in
|
||||
flask-debugtoolbar==0.10.1 # via -r requirements.in
|
||||
flask-httpauth==3.3.0 # via flask-profiler
|
||||
flask-limiter==1.3.1 # via -r requirements.in
|
||||
flask-login==0.4.1 # via -r requirements.in
|
||||
flask-migrate==2.5.2 # via -r requirements.in
|
||||
flask-profiler==1.8.1 # via -r requirements.in
|
||||
flask-sqlalchemy==2.4.0 # via -r requirements.in, flask-migrate
|
||||
flask-wtf==0.14.2 # via -r requirements.in
|
||||
flask==1.0.3 # via -r requirements.in, flask-admin, flask-cors, flask-debugtoolbar, flask-httpauth, flask-limiter, flask-login, flask-migrate, flask-profiler, flask-sqlalchemy, flask-wtf
|
||||
future==0.18.2 # via webauthn
|
||||
gevent==20.6.2 # via -r requirements.in
|
||||
google-api-python-client==1.7.11 # via -r requirements.in
|
||||
google-auth-httplib2==0.0.3 # via -r requirements.in, google-api-python-client
|
||||
google-auth==1.11.2 # via google-api-python-client, google-auth-httplib2
|
||||
greenlet==0.4.16 # via gevent
|
||||
gunicorn==19.9.0 # via -r requirements.in
|
||||
httplib2==0.17.0 # via google-api-python-client, google-auth-httplib2
|
||||
humanfriendly==4.18 # via coloredlogs
|
||||
identify==1.5.0 # via pre-commit
|
||||
idna==2.8 # via requests, yarl
|
||||
importlib-metadata==0.18 # via pluggy, pytest
|
||||
ipython-genutils==0.2.0 # via traitlets
|
||||
ipython==7.5.0 # via -r requirements.in
|
||||
itsdangerous==1.1.0 # via flask, flask-debugtoolbar
|
||||
jedi==0.13.3 # via ipython
|
||||
jinja2==2.10.1 # via flask, yacron
|
||||
jmespath==0.9.4 # via boto3, botocore
|
||||
jwcrypto==0.6.0 # via -r requirements.in
|
||||
limits==1.5.1 # via flask-limiter
|
||||
mako==1.0.12 # via alembic
|
||||
markupsafe==1.1.1 # via jinja2, mako
|
||||
memory-profiler==0.57.0 # via -r requirements.in
|
||||
more-itertools==7.0.0 # via pytest
|
||||
multidict==4.5.2 # via aiohttp, yarl
|
||||
mypy-extensions==0.4.3 # via black
|
||||
nodeenv==1.5.0 # via pre-commit
|
||||
oauthlib==3.0.2 # via requests-oauthlib
|
||||
packaging==19.0 # via pytest
|
||||
parso==0.4.0 # via jedi
|
||||
pathspec==0.8.0 # via black
|
||||
pexpect==4.7.0 # via ipython
|
||||
phpserialize==1.3 # via -r requirements.in
|
||||
pickleshare==0.7.5 # via ipython
|
||||
pip-tools==5.3.1 # via -r requirements.in
|
||||
pluggy==0.12.0 # via pytest
|
||||
pre-commit==2.7.1 # via -r requirements.in
|
||||
prompt-toolkit==2.0.9 # via ipython
|
||||
psutil==5.7.0 # via memory-profiler
|
||||
psycopg2-binary==2.8.2 # via -r requirements.in
|
||||
ptyprocess==0.6.0 # via pexpect
|
||||
py==1.8.0 # via pytest
|
||||
pyasn1-modules==0.2.8 # via google-auth
|
||||
pyasn1==0.4.8 # via pyasn1-modules, rsa
|
||||
pycparser==2.19 # via cffi
|
||||
pycryptodome==3.9.4 # via -r requirements.in
|
||||
pygments==2.4.2 # via ipython
|
||||
pyopenssl==19.0.0 # via -r requirements.in, webauthn
|
||||
pyotp==2.3.0 # via -r requirements.in
|
||||
pyparsing==2.4.0 # via packaging
|
||||
pyspf==2.0.14 # via -r requirements.in
|
||||
pytest==4.6.3 # via -r requirements.in
|
||||
python-dateutil==2.8.0 # via alembic, arrow, botocore, strictyaml
|
||||
python-dotenv==0.10.3 # via -r requirements.in
|
||||
python-editor==1.0.4 # via alembic
|
||||
python-gnupg==0.4.5 # via -r requirements.in
|
||||
pytz==2020.1 # via yacron
|
||||
pyyaml==5.3.1 # via pre-commit
|
||||
regex==2020.7.14 # via black
|
||||
requests-oauthlib==1.2.0 # via -r requirements.in
|
||||
requests==2.22.0 # via facebook-sdk, requests-oauthlib
|
||||
rsa==4.0 # via google-auth
|
||||
ruamel.yaml==0.16.12 # via strictyaml
|
||||
s3transfer==0.2.1 # via boto3
|
||||
sentry-sdk==0.18.0 # via -r requirements.in, yacron
|
||||
simplejson==3.17.0 # via flask-profiler
|
||||
six==1.12.0 # via bcrypt, cryptography, flask-cors, flask-limiter, google-api-python-client, google-auth, limits, packaging, pip-tools, prompt-toolkit, pyopenssl, pytest, python-dateutil, sqlalchemy-utils, traitlets, virtualenv, webauthn
|
||||
sqlalchemy-utils==0.36.1 # via -r requirements.in
|
||||
sqlalchemy==1.3.19 # via alembic, flask-sqlalchemy, sqlalchemy-utils
|
||||
strictyaml==1.0.2 # via yacron
|
||||
toml==0.10.1 # via black, pre-commit
|
||||
traitlets==4.3.2 # via ipython
|
||||
typed-ast==1.4.1 # via black
|
||||
typing-extensions==3.7.4.3 # via black
|
||||
unidecode==1.0.23 # via -r requirements.in
|
||||
uritemplate==3.0.1 # via google-api-python-client
|
||||
urllib3==1.25.3 # via botocore, requests, sentry-sdk
|
||||
virtualenv==20.0.31 # via pre-commit
|
||||
watchtower==0.6.0 # via -r requirements.in
|
||||
wcwidth==0.1.7 # via prompt-toolkit, pytest
|
||||
webauthn==0.4.7 # via -r requirements.in
|
||||
werkzeug==0.15.4 # via flask, flask-debugtoolbar
|
||||
wtforms==2.2.1 # via -r requirements.in, flask-admin, flask-wtf
|
||||
yacron==0.11.1 # via -r requirements.in
|
||||
yarl==1.3.0 # via aiohttp
|
||||
zipp==0.5.1 # via importlib-metadata
|
||||
zope.event==4.4 # via gevent
|
||||
zope.interface==5.1.0 # via gevent
|
||||
|
||||
# The following packages are considered to be unsafe in a requirements file:
|
||||
# pip
|
||||
# setuptools
|
Loading…
Reference in New Issue