1
0
Fork 0
Commit graph

59 commits

Author SHA1 Message Date
Lance Edgar 4c51189d41 fix: move model base class out of model subpkg
and other things, used by other packages (rattail)

otherwise when rattail imports them, the whole WJ model comes along
with it and it can interfere with sqlalchemy-continuum versioning
2024-08-30 20:30:09 -05:00
Lance Edgar 2fa82bee8c fix: add basic support for wutta-continuum data versioning/history
not much "support" per se in here, mostly some stubs to allow for
smooth operation if/when it is installed
2024-08-27 20:26:22 -05:00
Lance Edgar 2edeac0d83 fix: add common DataTestCase for use in other packages 2024-08-27 19:11:26 -05:00
Lance Edgar 7ee8398718 test: skip some tests if mako not installed
also change corresponding tox env to 'nox' to reflect its "bare-bones"
nature and not just a lack of 'db'
2024-08-26 14:34:35 -05:00
Lance Edgar 131ad88a16 feat: add basic email handler support
still no way to define "profiles" for admin in web app yet
2024-08-26 14:20:54 -05:00
Lance Edgar b401fac04f feat: add util.resource_path() function
need that now that we have configurable mako template paths
2024-08-26 10:12:52 -05:00
Lance Edgar 94868bbaa9 feat: add app handler method, get_appdir() 2024-08-25 12:33:52 -05:00
Lance Edgar 4b9db13b8f feat: add basic support for progress indicators 2024-08-24 17:19:50 -05:00
Lance Edgar 110ff69d6d feat: add table/model for app upgrades 2024-08-24 10:20:05 -05:00
Lance Edgar 1744e8706c fix: add app handler methods: get_node_title(), get_node_type() 2024-08-20 22:13:33 -05:00
Lance Edgar 9ad5dca2ad feat: add util function get_class_hierarchy() 2024-08-15 20:18:54 -05:00
Lance Edgar 08689f494f feat: add dict-like behavior to model class instances 2024-08-11 15:23:14 -05:00
Lance Edgar 1c762e5767 feat: add app handler methods save_setting(), delete_setting() 2024-08-06 18:52:34 -05:00
Lance Edgar 8068c26327 test: skip some tests for nodb scenario 2024-08-05 22:41:58 -05:00
Lance Edgar b5884ff6ca test: fix more tests for python 3.10
not sure why only that one had problems; this seems to fix
2024-08-05 22:39:45 -05:00
Lance Edgar afa3352c83 test: fix tests for AppHandler.get_version() 2024-08-05 22:25:43 -05:00
Lance Edgar 2a21e70ff1 feat: add AppHandler methods, get_distribution() and get_version() 2024-08-05 21:48:45 -05:00
Lance Edgar a38a69afa2 fix: add AuthHandler.user_is_admin() method 2024-08-05 15:08:16 -05:00
Lance Edgar 739dd285aa fix: add AppHandler.make_title() convenience method 2024-08-05 15:08:14 -05:00
Lance Edgar c424a6cd8a fix: add check_user_password() method for auth handler 2024-07-18 10:27:31 -05:00
Lance Edgar 86997397de fix: make AuthHandler.get_user() do lookups for uuid, username 2024-07-17 17:46:13 -05:00
Lance Edgar e899d06151 feat: flesh out the auth handler; add people handler
can handle the basics now: authentication, perm checks etc.
2024-07-14 23:22:11 -05:00
Lance Edgar 43ca404837 feat: add model for Person; tie to User 2024-07-14 15:47:39 -05:00
Lance Edgar 60d3fcd13b fix: add migration for auth tables
having now fixed the constraint naming convention
2024-07-14 14:45:52 -05:00
Lance Edgar b4d6cfb0ed fix: always use 'wutta' prefix for provider entry points
otherwise not all providers will be discoverable, for custom appname

also add `appname` prop for GenericHandler, AppProvider
2024-07-14 10:45:13 -05:00
Lance Edgar 639b0de8b1 feat: add basic "auth" data models: user/role/perm
not really tested yet though, other than unit tests
2024-07-13 23:29:09 -05:00
Lance Edgar ef5b13a297 fix: add AppHandler.load_object() method 2024-07-11 19:32:44 -05:00
Lance Edgar ae973881af fix: add WuttaConfig.production() method 2024-07-11 18:23:43 -05:00
Lance Edgar 375d0be638 feat: add basic data model support
wuttjamaican will provide a default data model with minimal tables;
it's assumed each custom app will extend this model with other tables
2024-07-11 12:55:55 -05:00
Lance Edgar a76cbf29e9 feat: remove legacy command system
typer is the recommended approach, but any could be used.  we have
nothing significant to offer so better to just not.
2024-07-04 14:35:29 -05:00
Lance Edgar fd76766f56 fix: use more explicit import in config constructor 2024-07-04 11:37:37 -05:00
Lance Edgar f5825e964c test: add 'nodb' test runner
ensure things work as expected if sqlalchemy is not installed
2024-07-04 08:00:42 -05:00
Lance Edgar a25712ef54 fix: let config class specify default app handler, engine maker
this avoids the need for a config subclass to use `setdefault()` hacks
to specify default app handler for instance, since that approach must
compete with config extensions who also may wish to do that.

similar concept for the engine maker; notably the rattail project
needs to override this function somewhat and we need a way to allow
for that without (re-)introducing the app handler here.
2024-07-04 07:24:07 -05:00
Lance Edgar c3efbfbf7b fix: ensure config has no app when constructor finishes
had to move `make_engine_from_config()` out of app handler and define
as a separate function, so that `get_engines()` did not need to
instantiate the app handler.  because if it did, then config
extensions would lose the ability to set a default app handler - er,
they could do it but it would be ignored
2024-07-04 06:21:38 -05:00
Lance Edgar f654906029 fix: fallback to importlib_metadata when loading entry points
since `pkg_resources` is deprecated for this purpose, per
https://setuptools.pypa.io/en/latest/pkg_resources.html
2024-06-14 17:27:22 -05:00
Lance Edgar 6777f02e06 Fix bug when default config paths do not exist
when fetching initial path listing, to create config object.  should
only affect situations where default file paths are needed, i.e. when
caller does not specify
2024-05-28 22:57:19 -05:00
Lance Edgar a552e6c471 Raise AttributeError if no app provider has it
whoops, super().__getattr__() is not really defined
2024-05-15 14:22:45 -05:00
Lance Edgar 24a86ffeb4 Make WuttaConfig.get_list() return None by default
instead of empty list `[]`
2024-04-14 14:59:32 -05:00
Lance Edgar 49edece2f2 Fix test if local config file exists 2023-11-25 18:05:52 -06:00
Lance Edgar d73ff274df Add generic handler base class, tests, docs 2023-11-25 16:28:37 -06:00
Lance Edgar 3a8bd1fce9 Add app providers, tests, docs 2023-11-24 23:11:26 -06:00
Lance Edgar b59e83907c Add config extension class, tests, docs 2023-11-24 18:45:10 -06:00
Lance Edgar af4c28b286 Add a large chunk of the docs for command line interface
will have to finish subcommands later
2023-11-22 21:40:26 -06:00
Lance Edgar e2963403fe Add date-organize subcommand 2023-11-22 12:26:27 -06:00
Lance Edgar c3914738d5 Move cli framework to wuttjamaican.cmd subpackage
deprecate `wuttjamaican.commands`
2023-11-22 11:13:39 -06:00
Lance Edgar 5c4dcb09f3 Add --stdout and --stderr args for base Command class
also refactor its `run()` method to allow more customizing ability
2023-11-22 09:11:36 -06:00
Lance Edgar 13472a5ab5 Add wutta make-appdir subcommand 2023-11-22 00:10:40 -06:00
Lance Edgar 1431555605 Allow factory override in make_config()
also add `winsvc` param for `get_config_paths()` to support
RattailFileMonitor service on windows
2023-11-21 22:25:45 -06:00
Lance Edgar ed6a5db452 Add Subcommand.make_arg_parser() method
split that out for clarity
2023-11-21 20:48:44 -06:00
Lance Edgar ea9a9ade57 Change entry point group naming for subcommands
and use fallback to find subcommands registered via legacy naming
2023-11-21 14:08:26 -06:00