scitex_affairs
Business and personal affairs: catalogs, actuals, scenarios, reports, and plots.
- class scitex_affairs.AffairsConfig(schema_version, organization, currency, fiscal_year_start_month, catalog, scenarios, pricing_policies, sources=())[source]
Bases:
objectValidated single source of truth for business design facts.
-
catalog:
Mapping[str,CatalogItem]
-
catalog:
- class scitex_affairs.CatalogItem(id, name, direction, model, price, description='', category='', status='draft', automated=None, attributes=None)[source]
Bases:
objectOne revenue or expense item.
- exception scitex_affairs.ConfigError[source]
Bases:
ValueErrorThe business design document is inconsistent or incomplete.
- class scitex_affairs.DiscountPhase(start, end, percent, status, label='')[source]
Bases:
objectA dated discount phase shared through a pricing policy.
- class scitex_affairs.Price(amount, interval, unit, kind='fixed', list_amount=None, discount_percent=0.0, markup_percent=None, policy='', discount_schedule=())[source]
Bases:
objectA catalog price in the configuration’s currency.
-
discount_schedule:
tuple[DiscountPhase,...]
-
discount_schedule:
- class scitex_affairs.Scenario(id, label, status, start_date, end_date, series)[source]
Bases:
objectAn explicitly optional set of hypothetical time series.
- scitex_affairs.catalog_frame(config)[source]
Return the catalog as a stable, renderer-independent DataFrame.
- Return type:
- scitex_affairs.financial_statement(report)[source]
Reduce an item-level report to revenue, expense, and net by period.
- Return type:
- scitex_affairs.load_config(source=None)[source]
Load a mapping or resolved YAML config.
Path precedence is explicit argument,
SCITEX_AFFAIRS_CONFIG, then$SCITEX_DIR/affairs/config.yaml(normally~/.scitex/affairs/config.yaml). Project-scope resolution is provided by the ecosystem-widescitex_configlocal-state primitive.- Return type:
- scitex_affairs.resolve_config_path(source=None)[source]
Resolve explicit, environment, then canonical SciTeX config paths.
- Return type:
- scitex_affairs.monthly_report(config, scenario_id)[source]
Calculate the canonical monthly ledger for one optional scenario.
- Return type:
- scitex_affairs.summarize(monthly, frequency='month', fiscal_year_start_month=1)[source]
Aggregate the canonical monthly ledger without losing stock semantics.
- Return type:
Configuration
Resolve, load, and validate the reviewable business design document.
- exception scitex_affairs.config.ConfigError[source]
The business design document is inconsistent or incomplete.
- class scitex_affairs.config.DiscountPhase(start, end, percent, status, label='')[source]
A dated discount phase shared through a pricing policy.
- class scitex_affairs.config.Price(amount, interval, unit, kind='fixed', list_amount=None, discount_percent=0.0, markup_percent=None, policy='', discount_schedule=())[source]
A catalog price in the configuration’s currency.
-
discount_schedule:
tuple[DiscountPhase,...]
-
discount_schedule:
- class scitex_affairs.config.CatalogItem(id, name, direction, model, price, description='', category='', status='draft', automated=None, attributes=None)[source]
One revenue or expense item.
- class scitex_affairs.config.Scenario(id, label, status, start_date, end_date, series)[source]
An explicitly optional set of hypothetical time series.
- class scitex_affairs.config.AffairsConfig(schema_version, organization, currency, fiscal_year_start_month, catalog, scenarios, pricing_policies, sources=())[source]
Validated single source of truth for business design facts.
-
catalog:
Mapping[str,CatalogItem]
-
catalog:
- scitex_affairs.config.resolve_config_path(source=None)[source]
Resolve explicit, environment, then canonical SciTeX config paths.
- Return type:
- scitex_affairs.config.load_config(source=None)[source]
Load a mapping or resolved YAML config.
Path precedence is explicit argument,
SCITEX_AFFAIRS_CONFIG, then$SCITEX_DIR/affairs/config.yaml(normally~/.scitex/affairs/config.yaml). Project-scope resolution is provided by the ecosystem-widescitex_configlocal-state primitive.- Return type:
Scenarios
Scenario calculation with explicit stock/flow time semantics.
Descriptions and rendering
Pandas-first descriptions of catalogs and calculated ledgers.
- scitex_affairs.describe.catalog_frame(config)[source]
Return the catalog as a stable, renderer-independent DataFrame.
- Return type:
- scitex_affairs.describe.summarize(monthly, frequency='month', fiscal_year_start_month=1)[source]
Aggregate the canonical monthly ledger without losing stock semantics.
- Return type:
- scitex_affairs.describe.financial_statement(report)[source]
Reduce an item-level report to revenue, expense, and net by period.
- Return type:
Replaceable text and file renderers for pandas business reports.