ManifoldMarketManager.rule.github
Contains rules that reference GitHub.
- class ManifoldMarketManager.rule.github.GitHubIssueMixin(owner: str, repo: str, number: int)[source]
Bases:
object
Mixin class to represent a GitHub issue.
- f_issue() Future[Issue] [source]
Return a Future object which resolves to the relevant Issue object.
- f_pr() Future[PullRequest] [source]
Return a Future object which resolves to the relevant PullRequest object.
- number: int
- owner: str
- repo: str
- class ManifoldMarketManager.rule.github.ResolveToPR(owner: str, repo: str, number: int)[source]
Bases:
ResolutionValueRule
,GitHubIssueMixin
Resolve to True if the PR is merged, otherwise False.
- _abc_impl = <_abc_data object>
- _is_protocol = False
- explain_abstract(indent: int = 0, **kwargs: Any) str
Explain how the market will resolve and decide to resolve.
- explain_specific(market: Market, indent: int = 0, sig_figs: int = 4) str
Explain why the market is resolving the way that it is.
- f_issue() Future[Issue]
Return a Future object which resolves to the relevant Issue object.
- f_pr() Future[PullRequest]
Return a Future object which resolves to the relevant PullRequest object.
- classmethod from_dict(env: ModJSONDict) T
Take a dictionary and return an instance of the associated class.
- logger: Logger
- number: int
- owner: str
- repo: str
- tags_used: set[str]
- class ManifoldMarketManager.rule.github.ResolveToPRDelta(owner: str, repo: str, number: int, start: datetime)[source]
Bases:
ResolutionValueRule
,GitHubIssueMixin
Resolve to the fractional number of days between start and merged date or, if not merged, MAX.
- _abc_impl = <_abc_data object>
- _is_protocol = False
- explain_abstract(indent: int = 0, **kwargs: Any) str
Explain how the market will resolve and decide to resolve.
- explain_specific(market: Market, indent: int = 0, sig_figs: int = 4) str
Explain why the market is resolving the way that it is.
- f_issue() Future[Issue]
Return a Future object which resolves to the relevant Issue object.
- f_pr() Future[PullRequest]
Return a Future object which resolves to the relevant PullRequest object.
- classmethod from_dict(env: ModJSONDict) T
Take a dictionary and return an instance of the associated class.
- logger: Logger
- number: int
- owner: str
- repo: str
- start: datetime
- tags_used: set[str]
- class ManifoldMarketManager.rule.github.ResolveWithPR(owner: str, repo: str, number: int)[source]
Bases:
DoResolveRule
,GitHubIssueMixin
Return True if the specified PR was merged in the past.
- _abc_impl = <_abc_data object>
- _is_protocol = False
- _value(**kwargs: Any) T
- explain_abstract(indent: int = 0, **kwargs: Any) str
Explain how the market will resolve and decide to resolve.
- explain_specific(market: Market, indent: int = 0, sig_figs: int = 4) str
Explain why the market is resolving the way that it is.
- f_issue() Future[Issue]
Return a Future object which resolves to the relevant Issue object.
- f_pr() Future[PullRequest]
Return a Future object which resolves to the relevant PullRequest object.
- classmethod from_dict(env: ModJSONDict) T
Take a dictionary and return an instance of the associated class.
- logger: Logger
- number: int
- owner: str
- repo: str
- tags_used: set[str]