Compare commits

...

8 commits

Author SHA1 Message Date
Lance Edgar d3794e7782 docs: update intersphinx doc links per server migration 2025-02-18 12:16:00 -06:00
Lance Edgar 65ac2baf43 fix: update project source links, kallithea -> forgejo 2024-09-14 12:54:50 -05:00
Lance Edgar da526824f9 docs: use markdown for readme file 2024-09-13 17:59:13 -05:00
Lance Edgar 02697de1e5 fix: avoid deprecated base class for config extension 2024-08-16 10:15:14 -05:00
Lance Edgar b172612680 bump: version 0.2.2 → 0.2.3 2024-08-06 23:23:44 -05:00
Lance Edgar 6576946ae1 fix: define app_dist instead of app_package for Theo
for use with `app.get_version()` calls
2024-08-06 10:41:01 -05:00
Lance Edgar 2fda18c6cc fix: update menu config per wuttaweb 2024-07-14 11:48:13 -05:00
Lance Edgar a13747582a fix: update config for default app model
per rattail changes
2024-07-13 09:48:32 -05:00
12 changed files with 57 additions and 51 deletions

View file

@ -5,6 +5,14 @@ All notable changes to tailbone-theo will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
## v0.2.3 (2024-08-06)
### Fix
- define `app_dist` instead of `app_package` for Theo
- update menu config per wuttaweb
- update config for default app model
## v0.2.2 (2024-07-05)
### Fix

View file

@ -1,6 +1,5 @@
tailbone-theo
=============
# tailbone-theo
This is an experimental project, as of this writing. Its purpose is 2-fold:
@ -10,6 +9,4 @@ This is an experimental project, as of this writing. Its purpose is 2-fold:
This may also attempt certain aspects of "curbside" and/or "delivery" orders at
some point, we'll see. Nobody should be holding their breath maybe.
See the `Rattail Project`_ for more info.
.. _`Rattail Project`: https://rattailproject.org/
See the [Rattail Project](https://rattailproject.org/) for more info.

View file

@ -40,7 +40,7 @@ extensions = [
]
intersphinx_mapping = {
'rattail-manual': ('https://rattailproject.org/docs/rattail-manual/', None),
'rattail-manual': ('https://docs.wuttaproject.org/rattail-manual/', None),
}
# Add any paths that contain templates here, relative to this directory.

View file

@ -12,8 +12,8 @@ Rattail and Tailbone are the 2 main packages, responsible for the
Usually there are also some POS integration packages involved; see
:ref:`pos-integration` for links to those.
Source code for *all* packages is hosted on the rattailproject.org
server, specifically under https://kallithea.rattailproject.org/
Source code for *all* packages is hosted on
https://forgejo.wuttaproject.org/rattail/
You can request an account there, and then "fork" anything as you
like. Or skip the account and just clone whatever.

View file

@ -28,9 +28,9 @@ you just want the latest releases:
Or if you want to run from source then you can clone/install these:
* https://kallithea.rattailproject.org/rattail-project/pycorepos
* https://kallithea.rattailproject.org/rattail-project/rattail-corepos
* https://kallithea.rattailproject.org/rattail-project/tailbone-corepos
* https://forgejo.wuttaproject.org/rattail/pycorepos
* https://forgejo.wuttaproject.org/rattail/rattail-corepos
* https://forgejo.wuttaproject.org/rattail/tailbone-corepos
But then just in case, do also run the above command as well, to
ensure all dependencies are got.

View file

@ -80,9 +80,9 @@ e.g.::
Then clone any packages you don't yet have, e.g.::
git clone https://kallithea.rattailproject.org/rattail-project/rattail
git clone https://kallithea.rattailproject.org/rattail-project/tailbone
git clone https://kallithea.rattailproject.org/rattail-project/theo
git clone https://forgejo.wuttaproject.org/rattail/rattail.git
git clone https://forgejo.wuttaproject.org/rattail/tailbone.git
git clone https://forgejo.wuttaproject.org/rattail/theo.git
Finally install all packages to your virtual environment, e.g.::
@ -122,8 +122,8 @@ just made above.
We'll do the more complicated ones first. You can grab copies of them
from Theo source code:
* `rattail.conf <https://kallithea.rattailproject.org/rattail-project/theo/rawfile/master/dev/rattail.conf>`_
* `web.conf <https://kallithea.rattailproject.org/rattail-project/theo/rawfile/master/dev/web.conf>`_
* `rattail.conf <https://forgejo.wuttaproject.org/rattail/theo/src/branch/master/dev/rattail.conf>`_
* `web.conf <https://forgejo.wuttaproject.org/rattail/theo/src/branch/master/dev/web.conf>`_
Put each copy in your Theo "app" folder and edit as needed, in
particular replacing ``<ENVDIR>`` and similar strings (e.g. ``<SEP>``

View file

@ -11,7 +11,7 @@ Clone the source code for Theo wherever you like, e.g. ``~/src/theo``::
mkdir -p ~/src
cd ~/src
git clone https://kallithea.rattailproject.org/rattail-project/theo
git clone https://forgejo.wuttaproject.org/rattail/theo.git
Your local PostgreSQL service should be available, and user (named ``rattail``)
and DB (named ``theo``) created::

View file

@ -72,11 +72,11 @@ env.restricted_pypi_username = 'username'
env.restricted_pypi_password = 'password'
# these credentials are used to access the Rattail Project source code on
# Kallithea (https://kallithea.rattailproject.org/). they are only needed if
# Forgejo (https://forgejo.wuttaproject.org/rattail/). they are only needed if
# you are integrating with a proprietary POS system, and running from source
# instead of released packages; i.e. a typical stage setup.
env.kallithea_username = 'username'
env.kallithea_password = 'password'
env.forgejo_username = 'username'
env.forgejo_password = 'password'
##############################

View file

@ -47,6 +47,10 @@ def bootstrap_base(c):
# rattail user + common config
make_system_user(c, 'rattail', home='/var/lib/rattail', shell='/bin/bash')
postfix.alias(c, 'rattail', 'root')
# c.sudo('git config --global credential.helper store',
# user='rattail')
# c.sudo('git config --global credential.https://forgejo.wuttaproject.org.username MYUSERNAME',
# user='rattail')
mkdir(c, '/etc/rattail', use_sudo=True)
deploy(c, 'rattail/rattail.conf.mako', '/etc/rattail/rattail.conf',
use_sudo=True, context={'env': env})
@ -313,30 +317,25 @@ def install_theo_source(c, envroot):
# catapult
elif env.theo_integrates_with == 'catapult':
install_source_package(c, envroot, 'onager', restricted=True)
install_source_package(c, envroot, 'rattail-onager', restricted=True)
install_source_package(c, envroot, 'tailbone-onager', restricted=True)
install_source_package(c, envroot, 'onager')
install_source_package(c, envroot, 'rattail-onager')
install_source_package(c, envroot, 'tailbone-onager')
# locsms
elif env.theo_integrates_with == 'locsms':
install_source_package(c, envroot, 'luckysmores', restricted=True)
install_source_package(c, envroot, 'rattail-luckysmores', restricted=True)
install_source_package(c, envroot, 'tailbone-locsms', restricted=True)
install_source_package(c, envroot, 'luckysmores')
install_source_package(c, envroot, 'rattail-luckysmores')
install_source_package(c, envroot, 'tailbone-locsms')
# theo
install_source_package(c, envroot, 'theo')
def install_source_package(c, envroot, name, restricted=False):
def install_source_package(c, envroot, name):
if not exists(c, '{}/src/{}'.format(envroot, name)):
if restricted:
c.sudo('git clone https://{0}:{1}@kallithea.rattailproject.org/rattail-restricted/{2} {3}/src/{2}'.format(
env.kallithea_username, env.kallithea_password, name, envroot),
user='rattail', echo=False)
else:
c.sudo('git clone https://kallithea.rattailproject.org/rattail-project/{0} {1}/src/{0}'.format(name, envroot),
user='rattail')
c.sudo("bash -c 'PIP_CONFIG_FILE={0}/pip.conf cd {0} && bin/pip install -e src/{1}'".format(envroot, name),
c.sudo(f'git clone https://forgejo.wuttaproject.org/rattail/{name} {envroot}/src/{name}',
user='rattail')
c.sudo(f"bash -c 'PIP_CONFIG_FILE={envroot}/pip.conf cd {envroot} && bin/pip install -e src/{name}'",
user='rattail')

View file

@ -6,9 +6,9 @@ build-backend = "hatchling.build"
[project]
name = "tailbone-theo"
version = "0.2.2"
version = "0.2.3"
description = "Theo, the order system"
readme = "README.rst"
readme = "README.md"
authors = [{name = "Lance Edgar", email = "lance@edbob.org"}]
license = {text = "GNU GPL v3+"}
classifiers = [
@ -66,10 +66,10 @@ theo = "theo.config:TheoConfig"
[project.urls]
Homepage = "https://redmine.rattailproject.org/projects/theo"
Repository = "https://kallithea.rattailproject.org/rattail-project/theo"
Issues = "https://redmine.rattailproject.org/projects/theo/issues"
Changelog = "https://kallithea.rattailproject.org/rattail-project/theo/files/master/CHANGELOG.md"
Homepage = "https://rattailproject.org"
Repository = "https://forgejo.wuttaproject.org/rattail/theo"
Issues = "https://forgejo.wuttaproject.org/rattail/theo/issues"
Changelog = "https://forgejo.wuttaproject.org/rattail/theo/src/branch/master/CHANGELOG.md"
[tool.commitizen]

View file

@ -24,10 +24,10 @@
Configuration for Theo
"""
from rattail.config import ConfigExtension
from wuttjamaican.conf import WuttaConfigExtension
class TheoConfig(ConfigExtension):
class TheoConfig(WuttaConfigExtension):
"""
Rattail config extension for Theo
"""
@ -37,16 +37,18 @@ class TheoConfig(ConfigExtension):
# this is the "Theo" app
config.setdefault('rattail', 'app_title', "Theo")
config.setdefault('rattail', 'app_package', 'theo')
config.setdefault('tailbone.menus', 'handler', 'theo.web.menus:TheoMenuHandler')
config.setdefault('rattail', 'app_dist', 'tailbone-theo')
config.setdefault('tailbone.static_libcache.module', 'theo.web.static')
# menus
config.setdefault('rattail.web.menus.handler_spec', 'theo.web.menus:TheoMenuHandler')
# Trainwreck model is same regardless of POS
config.setdefault('rattail.trainwreck', 'model', 'rattail.trainwreck.db.model.defaults')
# do we integrate w/ CORE-POS?
if integrate_corepos(config):
config.setdefault('rattail', 'model', 'theo.db.model_corepos')
config.setdefault('rattail', 'model_spec', 'theo.db.model_corepos')
config.setdefault('rattail', 'settings', 'theo.appsettings.theo')
config.setdefault('rattail', 'products.handler', 'rattail_corepos.products:CoreProductsHandler')
config.setdefault('rattail.batch', 'vendor_catalog.handler.spec', 'rattail_corepos.batch.vendorcatalog:VendorCatalogHandler')
@ -55,13 +57,13 @@ class TheoConfig(ConfigExtension):
# do we integrate w/ Catapult?
elif integrate_catapult(config):
config.setdefault('rattail', 'model', 'theo.db.model_catapult')
config.setdefault('rattail', 'model_spec', 'theo.db.model_catapult')
config.setdefault('rattail', 'settings', 'theo.appsettings.theo, theo.appsettings.catapult')
config.setdefault('rattail.importing', 'versions.handler', 'theo.importing.versions_catapult:FromTheoToTheoVersions')
# do we integrate w/ LOC SMS?
elif integrate_locsms(config):
config.setdefault('rattail', 'model', 'theo.db.model_locsms')
config.setdefault('rattail', 'model_spec', 'theo.db.model_locsms')
config.setdefault('rattail', 'settings', 'theo.appsettings.theo')
config.setdefault('rattail.importing', 'versions.handler', 'theo.importing.versions_locsms:FromTheoToTheoVersions')

View file

@ -2,7 +2,7 @@
################################################################################
#
# Rattail -- Retail Software Framework
# Copyright © 2010-2023 Lance Edgar
# Copyright © 2010-2024 Lance Edgar
#
# This file is part of Rattail.
#
@ -27,7 +27,7 @@ Web Menus
from tailbone import menus as base
class TheoMenuHandler(base.MenuHandler):
class TheoMenuHandler(base.TailboneMenuHandler):
"""
Theo menu handler
"""
@ -36,4 +36,4 @@ class TheoMenuHandler(base.MenuHandler):
kwargs['include_worksheets'] = True
return super(TheoMenuHandler, self).make_reports_menu(request, **kwargs)
return super().make_reports_menu(request, **kwargs)