rename to execlib, update package details

This commit is contained in:
Sam G. 2024-05-14 22:05:02 -07:00
parent e7b97e8b8c
commit 54327432fa
28 changed files with 60 additions and 81 deletions

View File

@ -1,5 +1,5 @@
# Overview
`execlog` is a lightweight multi-threaded job framework written in Python. It implements a
`execlib` is a lightweight multi-threaded job framework written in Python. It implements a
simple event-based model over core Python utilities like `ThreadPoolExecutor` to
facilitate reactivity and manage concurrent responses.

View File

@ -6,7 +6,7 @@
# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
project = 'execlog'
project = 'execlib'
copyright = '2024, Sam Griesemer'
author = 'Sam Griesemer'

View File

@ -1,4 +1,4 @@
# `execlog` package docs
# `execlib` package docs
{ref}`genindex`
{ref}`modindex`
{ref}`search`
@ -10,18 +10,18 @@
:nosignatures:
:recursive:
execlog.Handler
execlog.Listener
execlog.Router
execlog.Server
execlog.listeners
execlib.Handler
execlib.Listener
execlib.Router
execlib.Server
execlib.listeners
```
## Auto-reference contents
```{toctree}
:maxdepth: 3
_autoref/execlog.rst
_autoref/execlib.rst
```
```{toctree}

10
execlib/__init__.py Normal file
View File

@ -0,0 +1,10 @@
from execlib import util
from execlib import routers
from execlib import syncers
from execlib import listeners
from execlib.server import Server
from execlib.handler import Handler
from execlib.listener import Listener
from execlib.event import Event, FileEvent
from execlib.router import Router, ChainRouter, Event, RouterBuilder, route

View File

@ -5,7 +5,7 @@ See also:
'''
import threading
from execlog.event import Event
from execlib.event import Event
class Listener[E: Event](threading.Thread):

View File

@ -0,0 +1 @@
from execlib.listeners.path import PathListener

View File

@ -8,10 +8,10 @@ from collections import defaultdict
from colorama import Fore, Back, Style
from inotify_simple import INotify, Event as iEvent, flags as iflags, masks as imasks
from execlog import util
from execlog.util.generic import color_text
from execlog.event import FileEvent
from execlog.listener import Listener
from execlib import util
from execlib.util.generic import color_text
from execlib.event import FileEvent
from execlib.listener import Listener
logger = logging.getLogger(__name__)

View File

@ -18,9 +18,9 @@ from concurrent.futures import ThreadPoolExecutor, wait, as_completed
from tqdm.auto import tqdm
from execlog.event import Event
from execlog.listener import Listener
from execlog.util.generic import color_text, get_func_name
from execlib.event import Event
from execlib.listener import Listener
from execlib.util.generic import color_text, get_func_name
logger = logging.getLogger(__name__)

View File

@ -0,0 +1 @@
from execlib.routers.path import PathRouter

View File

@ -2,10 +2,10 @@ import logging
from pathlib import Path
from typing import Callable
from execlog.router import Router
from execlog.event import FileEvent
from execlog.util.path import glob_match
from execlog.listeners.path import PathListener
from execlib.router import Router
from execlib.event import FileEvent
from execlib.util.path import glob_match
from execlib.listeners.path import PathListener
logger = logging.getLogger(__name__)

View File

@ -26,8 +26,8 @@ from inotify_simple import flags
from fastapi import FastAPI, WebSocket
from fastapi.staticfiles import StaticFiles
from execlog.routers.path import PathRouter
from execlog.handler import Handler as LREndpoint
from execlib.routers.path import PathRouter
from execlib.handler import Handler as LREndpoint
logger = logging.getLogger(__name__)

View File

@ -0,0 +1 @@
from execlib.syncers.router import PathDiffer, PathRouterSyncer

View File

@ -10,10 +10,10 @@ from inotify_simple import flags as iflags
from co3.resources import DiskResource
from co3 import Differ, Syncer, Database
from execlog.event import Event
from execlog.router import CancelledFrameError
from execlog.routers import PathRouter
from execlog.util.generic import color_text
from execlib.event import Event
from execlib.router import CancelledFrameError
from execlib.routers import PathRouter
from execlib.util.generic import color_text
logger = logging.getLogger(__name__)

2
execlib/util/__init__.py Normal file
View File

@ -0,0 +1,2 @@
from execlib.util import path
from execlib.util import generic

View File

@ -46,8 +46,8 @@ class ColorFormatter(logging.Formatter):
formatter = self.FORMATS[submodule]
name = record.name
if package == 'execlog':
name = f'execlog.{subsubmodule}'
if package == 'execlib':
name = f'execlib.{subsubmodule}'
limit = 26
name = name[:limit]

View File

@ -1,10 +0,0 @@
from execlog import util
from execlog import routers
from execlog import syncers
from execlog import listeners
from execlog.server import Server
from execlog.handler import Handler
from execlog.listener import Listener
from execlog.event import Event, FileEvent
from execlog.router import Router, ChainRouter, Event, RouterBuilder, route

View File

@ -1 +0,0 @@
from execlog.listeners.path import PathListener

View File

@ -1 +0,0 @@
from execlog.routers.path import PathRouter

View File

@ -1 +0,0 @@
from execlog.syncers.router import PathDiffer, PathRouterSyncer

View File

@ -1,2 +0,0 @@
from execlog.util import path
from execlog.util import generic

View File

@ -12,7 +12,7 @@ description = "Lightweight multi-threaded job framework"
readme = "README.md"
requires-python = ">=3.12"
dynamic = ["version"]
license = {file = "LICENSE"}
#license = {file = "LICENSE"}
authors = [
{ name="Sam Griesemer", email="samgriesemer+git@gmail.com" },
]
@ -45,12 +45,12 @@ docs = [
]
[project.urls]
Homepage = "https://doc.olog.io/execlog"
Documentation = "https://doc.olog.io/execlog"
Repository = "https://git.olog.io/olog/execlog"
Issues = "https://git.olog.io/olog/execlog/issues"
Homepage = "https://doc.olog.io/execlib"
Documentation = "https://doc.olog.io/execlib"
Repository = "https://git.olog.io/olog/execlib"
Issues = "https://git.olog.io/olog/execlib/issues"
[tool.setuptools.packages.find]
include = ["execlog*"] # pattern to match package names
include = ["execlib*"] # pattern to match package names

View File

@ -1,21 +0,0 @@
# -- package-specific --
fastapi
starlette
uvicorn
inotify_simple
tqdm
wcmatch
websockets
# -- logging --
colorama
# -- sphinx docs --
sphinx
sphinx-togglebutton
furo
myst-parser
sphinx-autodoc-typehints
# -- testing ---
pytest

View File

@ -3,10 +3,10 @@ import logging
from pathlib import Path
from functools import partial
from execlog import util
from execlog import ChainRouter, Event
from execlog.routers import PathRouter
from execlog.listeners import PathListener
from execlib import util
from execlib import ChainRouter, Event
from execlib.routers import PathRouter
from execlib.listeners import PathListener
logger = logging.getLogger()

View File

@ -3,10 +3,10 @@ from pathlib import Path
from functools import partial
from concurrent.futures import wait
from execlog import util
from execlog import ChainRouter, Event
from execlog.routers import PathRouter
from execlog.listeners import PathListener
from execlib import util
from execlib import ChainRouter, Event
from execlib.routers import PathRouter
from execlib.listeners import PathListener
logger = logging.getLogger()

View File

@ -4,8 +4,8 @@ import threading
import logging
from pathlib import Path
from execlog import Server
from execlog.routers import PathRouter
from execlib import Server
from execlib.routers import PathRouter
logger = logging.getLogger()