Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #1276 upgrade to python 312 use rye and show customer balance #1279

Merged
merged 22 commits into from
Jan 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
ae457be
wip Fix #1276 use python 3.12 using rye & update all packages
chrisjsimpson Dec 25, 2023
7f68225
wip #1276 upgrade markupsafe, remove before_app_first_request usage, …
chrisjsimpson Dec 25, 2023
7a6298e
wip Fix #1276 use python 3.12 using rye & update all packages
chrisjsimpson Dec 25, 2023
801a427
wip #1276 upgrade markupsafe, remove before_app_first_request usage, …
chrisjsimpson Dec 25, 2023
507f2d9
Merge branch '1276-upgrade-to-python-312-use-rye' of github.com:Subsc…
chrisjsimpson Jan 1, 2024
40f5c2d
#1276 set vassal virtualenv venv path to .venv (rye default)
chrisjsimpson Jan 1, 2024
a2ae12f
#1276 set vassal virtualenv venv path to .venv (rye default)
chrisjsimpson Jan 1, 2024
9d34264
Merge branch '1276-upgrade-to-python-312-use-rye' of github.com:Subsc…
chrisjsimpson Jan 5, 2024
e7633d9
Wip Fix #1039 use strictyaml for app settings
chrisjsimpson Jan 6, 2024
a0ac73a
#1276 remove unused packages python-dotenv, update .gitignore
chrisjsimpson Jan 7, 2024
e2d8d0a
#1276 calculate migrations directory using pathlib/__file__ so migrat…
chrisjsimpson Jan 7, 2024
fe5c4fd
#1276 get theme and static folders from package if configured does no…
chrisjsimpson Jan 7, 2024
a165e55
#1276 load seed.sql from package if not found in cwd
chrisjsimpson Jan 7, 2024
64616cf
#1276 use importlib.resources for datafiles import
chrisjsimpson Jan 8, 2024
0556066
#1276 update .envsubst.template for subscribie deployer
chrisjsimpson Jan 19, 2024
4993430
Ref #1276 remove MAIN_SERVER setting
chrisjsimpson Jan 19, 2024
ef292ef
downgrade stripe_api_key not set to a warning
chrisjsimpson Jan 29, 2024
6d8fa3c
#1276 bump minimal python version
chrisjsimpson Jan 30, 2024
d6187cb
tidy
chrisjsimpson Jan 30, 2024
e8585e8
#1276 python min version 3.12
chrisjsimpson Jan 30, 2024
ab1b54d
Fix #1282 include archived plans in calculating active subscribers
chrisjsimpson Jan 30, 2024
aed69c1
Fix #1282 Stats to include archived plans
chrisjsimpson Jan 31, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 0 additions & 88 deletions .env.example

This file was deleted.

15 changes: 4 additions & 11 deletions .envsubst.template
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
#Only values in uppercase are actually stored in the config object later on. So make sure to use uppercase letters for your config keys.

# Change FLASK_ENV=live for live
FLASK_ENV=${FLASK_ENV}

# Software as a service (SAAS)
Expand Down Expand Up @@ -39,6 +36,8 @@ SERVER_NAME=${SERVER_NAME}
#SESSION_COOKIE_HTTPONLY=True
#SESSION_COOKIE_SAMESITE=None

PERMANENT_SESSION_LIFETIME=${PERMANENT_SESSION_LIFETIME}

MAIL_DEFAULT_SENDER=${MAIL_DEFAULT_SENDER}

# Supported currencies
Expand All @@ -53,17 +52,9 @@ STRIPE_TEST_SECRET_KEY=${STRIPE_TEST_SECRET_KEY}
# Internal server where shop should send its stripe connect account id to. See https://github.com/Subscribie/subscribie/issues/352
STRIPE_CONNECT_ACCOUNT_ANNOUNCER_HOST=${STRIPE_CONNECT_ACCOUNT_ANNOUNCER_HOST}

# Google oauth (signin / up with Google
GOOGLE_CLIENT_ID=???.apps.googleusercontent.com
GOOGLE_CLIENT_SECRET=???
GOOGLE_REDIRECT_URI="http://127.0.0.1:5000/google-oauth2callback/"
GOOGLE_RESPONSE_TYPE=code
GOOGLE_SCOPE="email openid profile"

# For development:

HONEYCOMB_API_KEY=

# Python log levels: DEBUG, INFO, WARNING, ERROR, CRITICAL
# See https://docs.python.org/3/howto/logging.html
PYTHON_LOG_LEVEL=DEBUG
Expand All @@ -80,6 +71,8 @@ SUBSCRIBIE_DOMAIN="subscriby.shop"
PRIVATE_KEY="/tmp/private.pem"
PUBLIC_KEY="/tmp/public.pem"

ANTI_SPAM_SHOP_NAMES_MODEL_FULL_PATH=/changeme


# Optional
TELEGRAM_TOKEN=
Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7, 3.8]
python-version: [3.12]

steps:
- uses: actions/checkout@v2
Expand All @@ -30,17 +30,20 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install flake8 pytest coverage
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
pip install -r requirements.lock
- name: Lint with flake8
run: |
true
# stop the build if there are Python syntax errors or undefined names
#flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
#flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Copy .env.example to .env
- name: Copy settings.yaml.example to settings.yaml
run: |
cp .env.example .env
cp settings.yaml.example settings.yaml
- name: Create empty modules path
run: |
mkdir -p ./modules
- name: Migrate database using flask db upgrade
run: |
pwd
Expand Down
13 changes: 12 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
settings.yaml
settings.yml
*.pem
venv/
*.sql
.venv
*.swp
*.pyc
__pycache__/
Expand All @@ -16,6 +19,7 @@ subscribie.egg-info/*
build/*
dist/*
data.db
data.db*
modules/
*.db
*.pub
Expand All @@ -28,6 +32,7 @@ node_modules
*chromium.png
*webkit.png
.env
.env*
.env.docker
*.webm
public
Expand All @@ -42,3 +47,9 @@ tests/browser-automated-tests-playwright/worker*
tests/browser-automated-tests-playwright/e2e/*-snapshots
subscribie/static/*
subscribie/custom_pages/*
playwright-report
tests/browser-automated-tests-playwright
.terraform
*.pkl
emails
*.bk
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[email protected]
15 changes: 0 additions & 15 deletions Makefile

This file was deleted.

60 changes: 60 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
[project]
name = "subscribie"
version = "v0.1.181"
description = "Collect recurring payments online - subscription payments collection automation"
authors = [
{ name = "Karma Computing", email = "[email protected]" }
]
dependencies = [
"graphviz",
"graphlib",
"wheel",
"Flask",
"flask_cors",
"Flask-Reuploaded",
"Flask-WTF",
"email-validator",
"Flask-Mail",
"requests",
"blinker",
"stripe",
"GitPython",
"pathlib",
"pytest",
"Flask-SQLAlchemy",
"Flask-Migrate",
"Flask-Babel",
"pyjwt[crypto]",
"py-auth-header-parser",
"pydantic",
"backoff",
"coloredlogs",
"python-dateutil",
"currency-symbols",
"pycryptodome",
"pycountry",
"SQLAlchemy",
"scipy",
"pandas",
"scikit-learn",
"black",
"strictyaml",
]
readme = "README.md"
requires-python = ">= 3.12"

[project.scripts]

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[tool.rye]
managed = true
dev-dependencies = []

[tool.hatch.metadata]
allow-direct-references = true

[tool.hatch.build.targets.wheel]
packages = ["./"]
78 changes: 78 additions & 0 deletions requirements-dev.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# generated by rye
# use `rye lock` or `rye sync` to update this lockfile
#
# last locked with the following flags:
# pre: false
# features: []
# all-features: false

-e file:.
alembic==1.13.1
annotated-types==0.6.0
babel==2.14.0
backoff==2.2.1
black==23.12.1
blinker==1.7.0
certifi==2023.11.17
cffi==1.16.0
charset-normalizer==3.3.2
click==8.1.7
coloredlogs==15.0.1
cryptography==41.0.7
currency-symbols==2.0.3
dnspython==2.4.2
email-validator==2.1.0.post1
flask==3.0.0
flask-babel==4.0.0
flask-cors==4.0.0
flask-mail==0.9.1
flask-migrate==4.0.5
flask-reuploaded==1.4.0
flask-sqlalchemy==3.1.1
flask-wtf==1.2.1
gitdb==4.0.11
gitpython==3.1.40
graphlib==0.9.5
graphviz==0.20.1
greenlet==3.0.3
humanfriendly==10.0
idna==3.6
iniconfig==2.0.0
itsdangerous==2.1.2
jinja2==3.1.2
joblib==1.3.2
mako==1.3.0
markupsafe==2.1.3
mypy-extensions==1.0.0
numpy==1.26.2
packaging==23.2
pandas==2.1.4
pathlib==1.0.1
pathspec==0.12.1
platformdirs==4.1.0
pluggy==1.3.0
py-auth-header-parser==1.0.2
pycountry==23.12.11
pycparser==2.21
pycryptodome==3.19.0
pydantic==2.5.3
pydantic-core==2.14.6
pyjwt==2.8.0
pytest==7.4.3
python-dateutil==2.8.2
pytz==2023.3.post1
requests==2.31.0
scikit-learn==1.3.2
scipy==1.11.4
six==1.16.0
smmap==5.0.1
sqlalchemy==2.0.23
strictyaml==1.7.3
stripe==7.10.0
threadpoolctl==3.2.0
typing-extensions==4.9.0
tzdata==2023.3
urllib3==2.1.0
werkzeug==3.0.1
wheel==0.42.0
wtforms==3.1.1
Loading
Loading