angee.portfolio.models
Products, initiatives, reports, releases, and same-row planning donors.
Products are phasal subjects: their lifecycle carries no target date, health, or progress. Projects and initiatives are teleological and therefore own health reports. The project/task donors fold optional portfolio placement onto the upstream rows only when this addon is composed.
ProductLifecycle
class ProductLifecycle(models.TextChoices)Phases in a Product's existence, never progress toward completion.
InitiativeStatus
class InitiativeStatus(models.TextChoices)Coarse fulfillment lifecycle for strategic initiatives.
InitiativeHealth
class InitiativeHealth(models.TextChoices)Latest reported health denormalized onto an Initiative.
InitiativeDateResolution
class InitiativeDateResolution(models.TextChoices)Precision carried by an Initiative target date.
UpdateHealth
class UpdateHealth(models.TextChoices)Health assertion required from every portfolio Update.
ReleaseStatus
class ReleaseStatus(models.TextChoices)Lifecycle of a Product release artifact.
WorkspaceVisibleMixin
class WorkspaceVisibleMixin(models.Model)Persist the R11 wildcard-reader tuple for a portfolio row.
Workspace visibility is posture data, so every one of the addon's five persisted resource definitions carries an explicit reader@auth/user:* tuple. Deployments may replace that tuple strategy without changing schema.
Meta
class Meta()Django options for the tuple-reconciliation mixin.
save
def save(*args: Any, **kwargs: Any) -> NonePersist the row and idempotently reconcile its wildcard reader.
ProductManager
class ProductManager(AngeeManager)Own the idempotent Project-to-Product maturation write.
from_project
def from_project(project: models.Model) -> models.ModelReturn the one Product promoted from project with provenance.
Promotion deliberately requires both Project write and portfolio_admin: R11 strategy curation wins over owner prerogative at the Product rung.
Product
class Product(WorkspaceVisibleMixin, AuditMixin, AngeeDataModel)A perpetual subject passing through phases rather than toward fulfillment.
Meta
class Meta()Django options for phasal products.
__str__
def __str__() -> strReturn the Product name.
Initiative
class Initiative(WorkspaceVisibleMixin, HierarchyMixin, AuditMixin,
AngeeDataModel)A tree-shaped long-horizon intent whose pushes can be fulfilled.
Meta
class Meta(HierarchyMixin.Meta)Django options carrying the hierarchy index and parent-rank invariant.
save
def save(*args: Any, **kwargs: Any) -> NonePersist the Initiative, rejecting ancestry-unsafe subtree moves.
__str__
def __str__() -> strReturn the Initiative name.
InitiativeProject
class InitiativeProject(WorkspaceVisibleMixin, AuditMixin, AngeeDataModel)An ordered Project placement on an ancestry-safe Initiative tree.
Meta
class Meta()Django options for unique placement and per-Initiative ranks.
clean
def clean() -> NoneReject a second Project placement on the same ancestry path.
save
def save(*args: Any, **kwargs: Any) -> NonePersist only after serializing the ancestry-path validation.
after_resource_load
@classmethod
def after_resource_load(cls,
instances: Iterable[Any],
*,
tier: str,
source: str,
publish: bool = False) -> NoneSeed one idempotent report for each side of demo placements.
UpdateManager
class UpdateManager(AngeeManager)Own target validation, authorization, and health-report creation.
target_relation
@classmethod
def target_relation(cls, target: models.Model) -> strReturn the Update relation for one allowed teleological target.
target_model
@classmethod
def target_model(cls, model_label: str) -> type[models.Model]Return the installed model for one allowed target label.
report
def report(*,
target: models.Model,
health: str | UpdateHealth,
body: str = "") -> models.ModelCreate one report on a writable Project or Initiative.
Update
class Update(WorkspaceVisibleMixin, AuditMixin, RecordRefMixin,
AngeeDataModel)A required-health report on a Project or Initiative, never a Product.
Meta
class Meta()Django options for target-addressed health reports.
clean
def clean() -> NoneRequire health and a teleological target.
save
def save(*args: Any, **kwargs: Any) -> NonePersist the report, its target relation, and the latest-health denorm.
delete
def delete(*args: Any, **kwargs: Any) -> tuple[int, dict[str, int]]Delete the report and restore its target's surviving latest health.
__str__
def __str__() -> strReturn a readable target-qualified health assertion.
Release
class Release(WorkspaceVisibleMixin, AuditMixin, AngeeDataModel)The named artifact a ship Project leaves on a Product timeline.
Meta
class Meta()Django options for Product-scoped release names.
__str__
def __str__() -> strReturn the Product-qualified release name.
ProjectPortfolio
class ProjectPortfolio(AngeeModel)Same-row portfolio placement folded into projects.Project.
Placement (product, priority, and sort_order) is deliberately project-side.
Meta
class Meta()Abstract donor options folded into the concrete Project table.
promote_to_product
def promote_to_product() -> models.ModelReturn the one Product matured from this Project.
TaskPortfolio
class TaskPortfolio(AngeeModel)Same-row release attribution folded into projects.Task.
Meta
class Meta()Abstract donor options folded into the concrete Task table.
PortfolioRole
Table-less REBAC anchor for the const-backed portfolio-admin namespace.