rename to execlib, update package details
This commit is contained in:
parent
e7b97e8b8c
commit
54327432fa
@ -1,5 +1,5 @@
|
|||||||
# Overview
|
# 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
|
simple event-based model over core Python utilities like `ThreadPoolExecutor` to
|
||||||
facilitate reactivity and manage concurrent responses.
|
facilitate reactivity and manage concurrent responses.
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
# -- Project information -----------------------------------------------------
|
# -- Project information -----------------------------------------------------
|
||||||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
|
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
|
||||||
|
|
||||||
project = 'execlog'
|
project = 'execlib'
|
||||||
copyright = '2024, Sam Griesemer'
|
copyright = '2024, Sam Griesemer'
|
||||||
author = 'Sam Griesemer'
|
author = 'Sam Griesemer'
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# `execlog` package docs
|
# `execlib` package docs
|
||||||
{ref}`genindex`
|
{ref}`genindex`
|
||||||
{ref}`modindex`
|
{ref}`modindex`
|
||||||
{ref}`search`
|
{ref}`search`
|
||||||
@ -10,18 +10,18 @@
|
|||||||
:nosignatures:
|
:nosignatures:
|
||||||
:recursive:
|
:recursive:
|
||||||
|
|
||||||
execlog.Handler
|
execlib.Handler
|
||||||
execlog.Listener
|
execlib.Listener
|
||||||
execlog.Router
|
execlib.Router
|
||||||
execlog.Server
|
execlib.Server
|
||||||
execlog.listeners
|
execlib.listeners
|
||||||
```
|
```
|
||||||
|
|
||||||
## Auto-reference contents
|
## Auto-reference contents
|
||||||
```{toctree}
|
```{toctree}
|
||||||
:maxdepth: 3
|
:maxdepth: 3
|
||||||
|
|
||||||
_autoref/execlog.rst
|
_autoref/execlib.rst
|
||||||
```
|
```
|
||||||
|
|
||||||
```{toctree}
|
```{toctree}
|
||||||
|
10
execlib/__init__.py
Normal file
10
execlib/__init__.py
Normal 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
|
@ -5,7 +5,7 @@ See also:
|
|||||||
'''
|
'''
|
||||||
import threading
|
import threading
|
||||||
|
|
||||||
from execlog.event import Event
|
from execlib.event import Event
|
||||||
|
|
||||||
|
|
||||||
class Listener[E: Event](threading.Thread):
|
class Listener[E: Event](threading.Thread):
|
1
execlib/listeners/__init__.py
Normal file
1
execlib/listeners/__init__.py
Normal file
@ -0,0 +1 @@
|
|||||||
|
from execlib.listeners.path import PathListener
|
@ -8,10 +8,10 @@ from collections import defaultdict
|
|||||||
from colorama import Fore, Back, Style
|
from colorama import Fore, Back, Style
|
||||||
from inotify_simple import INotify, Event as iEvent, flags as iflags, masks as imasks
|
from inotify_simple import INotify, Event as iEvent, flags as iflags, masks as imasks
|
||||||
|
|
||||||
from execlog import util
|
from execlib import util
|
||||||
from execlog.util.generic import color_text
|
from execlib.util.generic import color_text
|
||||||
from execlog.event import FileEvent
|
from execlib.event import FileEvent
|
||||||
from execlog.listener import Listener
|
from execlib.listener import Listener
|
||||||
|
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
@ -18,9 +18,9 @@ from concurrent.futures import ThreadPoolExecutor, wait, as_completed
|
|||||||
|
|
||||||
from tqdm.auto import tqdm
|
from tqdm.auto import tqdm
|
||||||
|
|
||||||
from execlog.event import Event
|
from execlib.event import Event
|
||||||
from execlog.listener import Listener
|
from execlib.listener import Listener
|
||||||
from execlog.util.generic import color_text, get_func_name
|
from execlib.util.generic import color_text, get_func_name
|
||||||
|
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
1
execlib/routers/__init__.py
Normal file
1
execlib/routers/__init__.py
Normal file
@ -0,0 +1 @@
|
|||||||
|
from execlib.routers.path import PathRouter
|
@ -2,10 +2,10 @@ import logging
|
|||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Callable
|
from typing import Callable
|
||||||
|
|
||||||
from execlog.router import Router
|
from execlib.router import Router
|
||||||
from execlog.event import FileEvent
|
from execlib.event import FileEvent
|
||||||
from execlog.util.path import glob_match
|
from execlib.util.path import glob_match
|
||||||
from execlog.listeners.path import PathListener
|
from execlib.listeners.path import PathListener
|
||||||
|
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
@ -26,8 +26,8 @@ from inotify_simple import flags
|
|||||||
from fastapi import FastAPI, WebSocket
|
from fastapi import FastAPI, WebSocket
|
||||||
from fastapi.staticfiles import StaticFiles
|
from fastapi.staticfiles import StaticFiles
|
||||||
|
|
||||||
from execlog.routers.path import PathRouter
|
from execlib.routers.path import PathRouter
|
||||||
from execlog.handler import Handler as LREndpoint
|
from execlib.handler import Handler as LREndpoint
|
||||||
|
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
1
execlib/syncers/__init__.py
Normal file
1
execlib/syncers/__init__.py
Normal file
@ -0,0 +1 @@
|
|||||||
|
from execlib.syncers.router import PathDiffer, PathRouterSyncer
|
@ -10,10 +10,10 @@ from inotify_simple import flags as iflags
|
|||||||
from co3.resources import DiskResource
|
from co3.resources import DiskResource
|
||||||
from co3 import Differ, Syncer, Database
|
from co3 import Differ, Syncer, Database
|
||||||
|
|
||||||
from execlog.event import Event
|
from execlib.event import Event
|
||||||
from execlog.router import CancelledFrameError
|
from execlib.router import CancelledFrameError
|
||||||
from execlog.routers import PathRouter
|
from execlib.routers import PathRouter
|
||||||
from execlog.util.generic import color_text
|
from execlib.util.generic import color_text
|
||||||
|
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
2
execlib/util/__init__.py
Normal file
2
execlib/util/__init__.py
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
from execlib.util import path
|
||||||
|
from execlib.util import generic
|
@ -46,8 +46,8 @@ class ColorFormatter(logging.Formatter):
|
|||||||
formatter = self.FORMATS[submodule]
|
formatter = self.FORMATS[submodule]
|
||||||
|
|
||||||
name = record.name
|
name = record.name
|
||||||
if package == 'execlog':
|
if package == 'execlib':
|
||||||
name = f'execlog.{subsubmodule}'
|
name = f'execlib.{subsubmodule}'
|
||||||
|
|
||||||
limit = 26
|
limit = 26
|
||||||
name = name[:limit]
|
name = name[:limit]
|
@ -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
|
|
@ -1 +0,0 @@
|
|||||||
from execlog.listeners.path import PathListener
|
|
@ -1 +0,0 @@
|
|||||||
from execlog.routers.path import PathRouter
|
|
@ -1 +0,0 @@
|
|||||||
from execlog.syncers.router import PathDiffer, PathRouterSyncer
|
|
@ -1,2 +0,0 @@
|
|||||||
from execlog.util import path
|
|
||||||
from execlog.util import generic
|
|
@ -12,7 +12,7 @@ description = "Lightweight multi-threaded job framework"
|
|||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
requires-python = ">=3.12"
|
requires-python = ">=3.12"
|
||||||
dynamic = ["version"]
|
dynamic = ["version"]
|
||||||
license = {file = "LICENSE"}
|
#license = {file = "LICENSE"}
|
||||||
authors = [
|
authors = [
|
||||||
{ name="Sam Griesemer", email="samgriesemer+git@gmail.com" },
|
{ name="Sam Griesemer", email="samgriesemer+git@gmail.com" },
|
||||||
]
|
]
|
||||||
@ -45,12 +45,12 @@ docs = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
[project.urls]
|
[project.urls]
|
||||||
Homepage = "https://doc.olog.io/execlog"
|
Homepage = "https://doc.olog.io/execlib"
|
||||||
Documentation = "https://doc.olog.io/execlog"
|
Documentation = "https://doc.olog.io/execlib"
|
||||||
Repository = "https://git.olog.io/olog/execlog"
|
Repository = "https://git.olog.io/olog/execlib"
|
||||||
Issues = "https://git.olog.io/olog/execlog/issues"
|
Issues = "https://git.olog.io/olog/execlib/issues"
|
||||||
|
|
||||||
|
|
||||||
[tool.setuptools.packages.find]
|
[tool.setuptools.packages.find]
|
||||||
include = ["execlog*"] # pattern to match package names
|
include = ["execlib*"] # pattern to match package names
|
||||||
|
|
||||||
|
@ -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
|
|
@ -3,10 +3,10 @@ import logging
|
|||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from functools import partial
|
from functools import partial
|
||||||
|
|
||||||
from execlog import util
|
from execlib import util
|
||||||
from execlog import ChainRouter, Event
|
from execlib import ChainRouter, Event
|
||||||
from execlog.routers import PathRouter
|
from execlib.routers import PathRouter
|
||||||
from execlog.listeners import PathListener
|
from execlib.listeners import PathListener
|
||||||
|
|
||||||
|
|
||||||
logger = logging.getLogger()
|
logger = logging.getLogger()
|
||||||
|
@ -3,10 +3,10 @@ from pathlib import Path
|
|||||||
from functools import partial
|
from functools import partial
|
||||||
from concurrent.futures import wait
|
from concurrent.futures import wait
|
||||||
|
|
||||||
from execlog import util
|
from execlib import util
|
||||||
from execlog import ChainRouter, Event
|
from execlib import ChainRouter, Event
|
||||||
from execlog.routers import PathRouter
|
from execlib.routers import PathRouter
|
||||||
from execlog.listeners import PathListener
|
from execlib.listeners import PathListener
|
||||||
|
|
||||||
|
|
||||||
logger = logging.getLogger()
|
logger = logging.getLogger()
|
||||||
|
@ -4,8 +4,8 @@ import threading
|
|||||||
import logging
|
import logging
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
from execlog import Server
|
from execlib import Server
|
||||||
from execlog.routers import PathRouter
|
from execlib.routers import PathRouter
|
||||||
|
|
||||||
|
|
||||||
logger = logging.getLogger()
|
logger = logging.getLogger()
|
||||||
|
Loading…
Reference in New Issue
Block a user