Implements per-worker database isolation for parallel test runs: - Add pytest-xdist and pytest-cov to test dependencies - Configure Makefile to run tests with -n auto flag - Update test.ini to use environment variable for database path - Create conftest.py with per-worker database isolation - Enable SQLite WAL mode for better concurrency - Auto-cleanup test databases after completion Expected performance improvement similar to make_post_sell (~16x speedup). Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
141 lines
3.7 KiB
INI
141 lines
3.7 KiB
INI
# http://docs.pylonsproject.org/projects/pyramid/en/latest/narr/environment.html
|
|
|
|
[alembic]
|
|
script_location = remarkbox:scripts/alembic
|
|
sqlalchemy.url = sqlite:///%(here)s/${TEST_DATABASE_PATH:-test-remarkbox.sqlite}
|
|
|
|
[app:main]
|
|
use = egg:remarkbox
|
|
|
|
sqlalchemy.url = sqlite:///%(here)s/${TEST_DATABASE_PATH:-test-remarkbox.sqlite}
|
|
#sqlalchemy.url = postgres://localhost/remarkbox_test
|
|
|
|
###
|
|
# Pyramid configuration.
|
|
###
|
|
pyramid.reload_templates = true
|
|
pyramid.debug_authorization = false
|
|
pyramid.debug_notfound = false
|
|
pyramid.debug_routematch = false
|
|
pyramid.default_locale_name = en
|
|
pyramid.includes =
|
|
pyramid_tm
|
|
|
|
# By default, the toolbar only appears for clients from IP addresses
|
|
# '127.0.0.1' and '::1'.
|
|
# debugtoolbar.hosts = 127.0.0.1 ::1
|
|
|
|
###
|
|
# session / cookie configuration.
|
|
# http://docs.pylonsproject.org/docs/pyramid/en/latest/api/session.html
|
|
###
|
|
session.hashalg = sha512
|
|
session.secret = test-test-secret
|
|
session.timeout = 31104000
|
|
session.max_age = 31104000
|
|
session.reissue_time = 15552000
|
|
|
|
###
|
|
# custom app configuration.
|
|
###
|
|
app.avatar.size = 35
|
|
|
|
# If set we force all links related to `join or log in` to this base url
|
|
# and use this url for links in email notifications.
|
|
# Also useful when multiple subdomains point at the same Remarkbox cluster.
|
|
# In prod I set this to: https://my.remarkbox.com (default = request.host_url)
|
|
#app.app_url = ""
|
|
|
|
# if your marketing / main landing page base url is different then app url.
|
|
# In prod I set this to: https://www.remarkbox.com (default = request.app_url)
|
|
#app.marketing_url = ""
|
|
|
|
# if Node is None, we can redirect to this uri.
|
|
#app.safe_redirect = https://unturf.com
|
|
|
|
app.email.relay = localhost
|
|
app.email.sender = no-reply@remarkbox.com
|
|
|
|
# set this to the path of your private DKIM key.
|
|
# reference: https://russell.ballestrini.net/quickstart-to-dkim-signed-email-with-python/
|
|
#app.email.dkim_private_key_path = ""
|
|
#app.email.dkim_selector = ""
|
|
|
|
# The app name in the email subject (default = request.app_domain)
|
|
# In production I set this to "Remarkbox".
|
|
#app.email.subject_postfix
|
|
|
|
# optional theme plugin name.
|
|
#app.theme = westworld
|
|
app.theme = meta
|
|
|
|
# optional theme plugin name for embed mode.
|
|
#app.theme_embed = meta
|
|
|
|
# stand-alone mode disables a bunch of views and templates
|
|
# related to billing and registering Namespaces. Defaults to False
|
|
#app.stand_alone_mode = enabled
|
|
|
|
# stripe: Stripe Checkout payment processing.
|
|
# This syntax will automatically expand an ENV var of the same name.
|
|
app.stripe.secret = ${REMARKBOX_APP_STRIPE_SECRET}
|
|
app.stripe.public = ${REMARKBOX_APP_STRIPE_PUBLIC}
|
|
app.stripe.webhook_secret = ${REMARKBOX_APP_STRIPE_WEBHOOK_SECRET:-}
|
|
|
|
# slack: bot notifications.
|
|
app.slack.secret = ${REMARKBOX_APP_SLACK_SECRET}
|
|
app.slack.public = ${REMARKBOX_APP_SLACK_PUBLIC}
|
|
app.slack.oauth_scope = channels:read,chat:write:bot
|
|
|
|
# feature flag for email notifications.
|
|
#app.deliver_email_notifications = true
|
|
|
|
###
|
|
# wsgi server configuration
|
|
###
|
|
[server:main]
|
|
use = egg:waitress#main
|
|
host = 0.0.0.0
|
|
port = 6543
|
|
|
|
###
|
|
# logging configuration
|
|
# http://docs.pylonsproject.org/projects/pyramid/en/latest/narr/logging.html
|
|
###
|
|
[loggers]
|
|
keys = root, remarkbox, sqlalchemy
|
|
|
|
[handlers]
|
|
keys = console
|
|
|
|
[formatters]
|
|
keys = generic
|
|
|
|
[logger_root]
|
|
level = INFO
|
|
handlers = console
|
|
|
|
[logger_remarkbox]
|
|
level = DEBUG
|
|
handlers =
|
|
qualname = remarkbox
|
|
|
|
[logger_sqlalchemy]
|
|
level = INFO
|
|
handlers =
|
|
qualname = sqlalchemy.engine
|
|
# "level = INFO" logs SQL queries.
|
|
# "level = DEBUG" logs SQL queries and results.
|
|
# "level = WARN" logs neither. (Recommended for production systems.)
|
|
|
|
[handler_console]
|
|
class = StreamHandler
|
|
args = (sys.stderr,)
|
|
level = NOTSET
|
|
formatter = generic
|
|
|
|
[formatter_generic]
|
|
format = %(asctime)s %(levelname)-5.5s [%(name)s][%(threadName)s] %(message)s
|
|
|
|
[pshell]
|
|
m = remarkbox.models
|