arelle.utils.PluginHooks¶
See COPYRIGHT.md for copyright information.
Module Contents¶
Classes¶
These hooks are called at different stages of validation, but all provide a common interface (ValidateXbrl is the first param). |
|
API¶
- class arelle.utils.PluginHooks.ValidationHook¶
Bases:
enum.EnumThese hooks are called at different stages of validation, but all provide a common interface (ValidateXbrl is the first param).
- COMPLETE¶
‘Validate.Complete’
- FILESOURCE¶
‘Validate.FileSource’
- XBRL_START¶
‘Validate.XBRL.Start’
- XBRL_FINALLY¶
‘Validate.XBRL.Finally’
- XBRL_DTS_DOCUMENT¶
‘Validate.XBRL.DTS.document’
- FINALLY¶
‘Validate.Finally’
- class arelle.utils.PluginHooks.PluginHooks¶
Bases:
abc.ABC- abstractmethod static cntlrCmdLineFilingStart(cntlr: arelle.CntlrCmdLine.CntlrCmdLine, options: arelle.RuntimeOptions.RuntimeOptions, filesource: arelle.FileSource.FileSource | None, entrypoints: list[dict[str, Any]] | None = None, sourceZipStream: BinaryIO | None = None, responseZipStream: BinaryIO | None = None, *args: Any, **kwargs: Any) None¶
Plugin hook:
CntlrCmdLine.Filing.StartThis hook is triggered after entrypoints have been discovered and parsed, but before models have been loaded.
Example:
timeAtStart = time.time() myOptionEnabled = options.myOption
- Parameters:
cntlr – The CntlrCmdLine that is currently running.
options – Parsed options object.
filesource – FileSource, if available.
entrypoints – A list of entrypoint configurations.
sourceZipStream – The source zip stream if the model was loaded from a zip that was POSTed to the webserver.
responseZipStream – The response zip stream if loaded from the webserver and the user requested a zip response.
args – Argument capture to ensure new parameters don’t break plugin hook.
kwargs – Argument capture to ensure new named parameters don’t break plugin hook.
- Returns:
None
- abstractmethod static cntlrCmdLineOptions(parser: optparse.OptionParser, *args: Any, **kwargs: Any) None¶
Plugin hook:
CntlrCmdLine.OptionsThis hook is used to add plugin specific options to the command line.
Example:
parser.add_option( "--my-option", dest="myOption", help="My custom option", )
- Parameters:
parser – the parser class to add options to.
args – Argument capture to ensure new parameters don’t break plugin hook.
kwargs – Argument capture to ensure new named parameters don’t break plugin hook.
- Returns:
None
- abstractmethod static cntlrCmdLineUtilityRun(cntlr: arelle.Cntlr.Cntlr, options: arelle.RuntimeOptions.RuntimeOptions, *args: Any, **kwargs: Any) None¶
Plugin hook:
CntlrCmdLine.Utility.RunThis hook is triggered after command line options have been parsed. It can be used to handle values for parameters configured in
cntlrCmdLineOptions.Example:
if options.myOption: myOptionEnabled = True
- Parameters:
cntlr – The Cntlr being initialized.
options – Parsed options object.
args – Argument capture to ensure new parameters don’t break plugin hook.
kwargs – Argument capture to ensure new named parameters don’t break plugin hook.
- Returns:
None
- abstractmethod static cntlrCmdLineXbrlLoaded(cntlr: arelle.CntlrCmdLine.CntlrCmdLine, options: arelle.RuntimeOptions.RuntimeOptions, modelXbrl: arelle.ModelXbrl.ModelXbrl, entrypoint: dict[str, str] | None = None, responseZipStream: BinaryIO | None = None, *args: Any, **kwargs: Any) None¶
Plugin hook:
CntlrCmdLine.Xbrl.LoadedThis hook is triggered after loading, but prior to validation (if requested) and loading views. It’s useful if you need to perform operations with the XBRL model prior to rendering views.
- Parameters:
cntlr – The Cntlr being initialized.
options – Parsed options object.
modelXbrl – The loaded ModelXbrl.
entrypoint – The entrypoint that was parsed to load the model.
responseZipStream – The response zip stream if loaded from the webserver and the user requested a zip response.
args – Argument capture to ensure new parameters don’t break plugin hook.
kwargs – Argument capture to ensure new named parameters don’t break plugin hook.
- Returns:
None
- abstractmethod static cntlrCmdLineXbrlRun(cntlr: arelle.CntlrCmdLine.CntlrCmdLine, options: arelle.RuntimeOptions.RuntimeOptions, modelXbrl: arelle.ModelXbrl.ModelXbrl, entrypoint: dict[str, str] | None = None, sourceZipStream: BinaryIO | None = None, responseZipStream: BinaryIO | None = None, *args: Any, **kwargs: Any) None¶
Plugin hook:
CntlrCmdLine.Xbrl.RunThis hook is triggered after loading and validation if requested. It’s useful for generating reports or exporting the XBRL model to other formats.
- Parameters:
cntlr – The Cntlr being initialized.
options – Parsed options object.
modelXbrl – The loaded ModelXbrl.
entrypoint – The entrypoint that was parsed to load the model.
sourceZipStream – The source zip stream if the model was loaded from a zip that was POSTed to the webserver.
responseZipStream – The response zip stream if loaded from the webserver and the user requested a zip response.
args – Argument capture to ensure new parameters don’t break plugin hook.
kwargs – Argument capture to ensure new named parameters don’t break plugin hook.
- Returns:
None
- abstractmethod static cntlrInit(cntlr: arelle.Cntlr.Cntlr, *args: Any, **kwargs: Any) None¶
Plugin hook:
Cntlr.InitThis hook is called while the Cntlr is being initialized and after logging has been setup.
- Parameters:
cntlr – The Cntlr being initialized.
args – Argument capture to ensure new parameters don’t break plugin hook.
kwargs – Argument capture to ensure new named parameters don’t break plugin hook.
- Returns:
None
- abstractmethod static cntlrWebMainStartWebServer(app: bottle.Bottle, cntlr: arelle.CntlrCmdLine.CntlrCmdLine, host: str, port: str, server: str, *args: Any, **kwargs: Any) str | None¶
Plugin hook:
CntlrWebMain.StartWebServerThis hook is for adding routes to the webserver.
Only routes from a single plugin will be applied.
Example:
app.route('/rest/my-test', "GET", my_test) app.route('/rest/my-run/<file:path>', ("GET", "POST"), my_run)
- Parameters:
app – The Bottle server.
cntlr – The controller for the server.
host – The webserver host.
port – The webserver port.
server – The webserver path.
args – Argument capture to ensure new parameters don’t break plugin hook.
kwargs – Argument capture to ensure new named parameters don’t break plugin hook.
- Returns:
None, a string ofskip-routesorskip-run. Example:# Block default Arelle routes. return "skip-routes" # Block default webserver startup. return "skip-run" # Block default Arelle routes and webserver startup. return "skip-routes|skip-run" # Normal routes will be combined with plugin routes and app started. return None
- abstractmethod static cntlrWinMainFilingStart(cntlr: arelle.CntlrWinMain.CntlrWinMain, filesource: arelle.FileSource.FileSource | None, entrypoints: list[dict[str, Any]] | None = None, *args: Any, **kwargs: Any) None¶
Plugin hook:
CntlrWinMain.Filing.StartThis hook is triggered after entrypoints have been discovered and parsed, but before models have been loaded.
Example:
timeAtStart = time.time()
- Parameters:
cntlr – The CntlrWinMain that is currently running.
filesource – FileSource, if available.
entrypoints – A list of entrypoint configurations.
args – Argument capture to ensure new parameters don’t break plugin hook.
kwargs – Argument capture to ensure new named parameters don’t break plugin hook.
- Returns:
None
- abstractmethod static cntlrWinMainMenuHelp(cntlr: arelle.CntlrWinMain.CntlrWinMain, menu: tkinter.Menu, *args: Any, **kwargs: Any) None¶
Plugin hook:
CntlrWinMain.Menu.HelpHook for adding items to the Arelle GUI help menu.
Example:
menu.add_command(label="Plugin documentation URL", command=self.openHelpDocumentation)
- Parameters:
cntlr – The CntlrWinMain instance that the request is coming from.
menu – The tkinter help menu to extend.
args – Argument capture to ensure new parameters don’t break plugin hook.
kwargs – Argument capture to ensure new named parameters don’t break plugin hook.
- Returns:
None
- abstractmethod static cntlrWinMainMenuTools(cntlr: arelle.CntlrWinMain.CntlrWinMain, menu: tkinter.Menu, *args: Any, **kwargs: Any) None¶
Plugin hook:
CntlrWinMain.Menu.ToolsHook for adding items to the Arelle GUI tools menu.
Example:
menu.add_command(label="Plugin Option", command=self.doSomething)
- Parameters:
cntlr – The CntlrWinMain instance that the request is coming from.
menu – The tkinter tools menu to extend.
args – Argument capture to ensure new parameters don’t break plugin hook.
kwargs – Argument capture to ensure new named parameters don’t break plugin hook.
- Returns:
None
- abstractmethod static cntlrWinMainMenuValidation(cntlr: arelle.CntlrWinMain.CntlrWinMain, menu: tkinter.Menu, *args: Any, **kwargs: Any) None¶
Plugin hook:
CntlrWinMain.Menu.ValidationHook for adding items to the Arelle GUI validation menu.
Example:
menu.add_command(label="Plugin validation option", command=self.validationOptions)
- Parameters:
cntlr – The CntlrWinMain instance that the request is coming from.
menu – The tkinter validation menu to extend.
args – Argument capture to ensure new parameters don’t break plugin hook.
kwargs – Argument capture to ensure new named parameters don’t break plugin hook.
- Returns:
None
- abstractmethod static cntlrWinMainMenuView(cntlr: arelle.CntlrWinMain.CntlrWinMain, menu: tkinter.Menu, *args: Any, **kwargs: Any) None¶
Plugin hook:
CntlrWinMain.Menu.ViewHook for adding items to the Arelle GUI view menu.
Example:
menu.add_command(label="My Plugin Option", command=self.doSomething)
- Parameters:
cntlr – The CntlrWinMain instance that the request is coming from.
menu – The tkinter view menu to extend.
args – Argument capture to ensure new parameters don’t break plugin hook.
kwargs – Argument capture to ensure new named parameters don’t break plugin hook.
- Returns:
None
- abstractmethod static disclosureSystemConfigURL(disclosureSystem: arelle.DisclosureSystem.DisclosureSystem, *args: Any, **kwargs: Any) str¶
Plugin hook:
DisclosureSystem.ConfigURLFor validation plugins this provides a path to the disclosure system config file. See arelle/config/disclosuresystems.xml for examples.
- Parameters:
disclosureSystem – The DisclosureSystem instance that the config will be applied to.
args – Argument capture to ensure new parameters don’t break plugin hook.
kwargs – Argument capture to ensure new named parameters don’t break plugin hook.
- Returns:
A relative path to a disclosure system XML config file. Example:
return str(Path(__file__).parent / "resources" / "config.xml")
- abstractmethod static disclosureSystemTypes(disclosureSystem: arelle.DisclosureSystem.DisclosureSystem, *args: Any, **kwargs: Any) tuple[tuple[str, str], ...]¶
Plugin hook:
DisclosureSystem.TypesFor validation plugins this should return a tuple of tuples containing:
a validation type (matching a validation type from a disclosure system config.
a test type property that’s applied to the DisclosureSystem. It will be set to
Trueif the disclosure system for the validation type above is selected andfalseotherwise.
- Parameters:
disclosureSystem – The DisclosureSystem instance that the types will be applied to.
args – Argument capture to ensure new parameters don’t break plugin hook.
kwargs – Argument capture to ensure new named parameters don’t break plugin hook.
- Returns:
A tuple of two item tuples containing a validation type and test property. Example:
return (("ESEF", "ESEFplugin"),)
- abstractmethod static fileSourceExists(cntlr: arelle.Cntlr.Cntlr, filepath: str, *args: Any, **kwargs: Any) bool | None¶
Plugin hook:
FileSource.ExistsThis hook can be used to override FileSource existence checks. For instance for a plugin that encrypts files, creating a copy with a different file extension, and the filepath should be transformed accordingly.
- Parameters:
cntlr – The controller the current request is running from.
filepath – The path which Arelle is checking for the existence of a file.
args – Argument capture to ensure new parameters don’t break plugin hook.
kwargs – Argument capture to ensure new named parameters don’t break plugin hook.
- Returns:
None or boolean value indicating if the file exists. Example:
# Defer to other plugins and/or default behavior. return None # Indicate file exists. return True # Indicate file does not exist. return False
- abstractmethod static fileSourceFile(cntlr: arelle.Cntlr.Cntlr, filepath: str, binary: bool, stripDeclaration: bool, *args: Any, **kwargs: Any) tuple[io.BytesIO | None] | tuple[io.TextIOWrapper, str]¶
Plugin hook:
FileSource.FilefileResult = pluginMethod(self.cntlr, filepath, binary, stripDeclaration)
This hook can be used to override FileSource file open operations.
- Parameters:
cntlr – The controller the current request is running from.
filepath – The path of the file to open.
binary – Indicates if the file should be opened as binary.
stripDeclaration – Indicates if XML declaration should be stripped.
args – Argument capture to ensure new parameters don’t break plugin hook.
kwargs – Argument capture to ensure new named parameters don’t break plugin hook.
- Returns:
tuple of text IO and encoding, or binary io and None Example:
# Binary IO return (io.BytesIO(b),) # Text IO return return (io.TextIOWrapper(io.BytesIO(b), encoding="utf-8"), "utf-8")
- abstractmethod static modelDocumentIsPullLoadable(modelXbrl: arelle.ModelXbrl.ModelXbrl, mappedUri: str, normalizedUri: str, filepath: str, isEntry: bool, namespace: str, *args: Any, **kwargs: Any) bool¶
Plugin hook:
ModelDocument.IsPullLoadablePlugin hook to signal files which can be opened by the plugin that otherwise would not be supported by Arelle. For instance a plugin that enables opening and loading data from json files.
- Parameters:
modelXbrl – The ModelXbrl being constructed.
mappedUri – The path of the document. May be the same as the
normalizedUrior a path to a file in a taxonomy package.normalizedUri – The normalized path of the document. This can be a URL or local file system path.
filepath – The path of the document. May be the same as the
normalizedUrior a path to a file in the local cache.isEntry – Boolean value indicating if the document is an entrypoint.
namespace – The target namespace if the document has one.
args – Argument capture to ensure new parameters don’t break plugin hook.
kwargs – Argument capture to ensure new named parameters don’t break plugin hook.
- Returns:
Trueif the plugin can load the file orFalseif not. Example:return Path(filepath).suffix == ".json"
- abstractmethod static modelDocumentPullLoader(modelXbrl: arelle.ModelXbrl.ModelXbrl, normalizedUri: str, filepath: str, isEntry: bool, namespace: str | None, *args: Any, **kwargs: Any) arelle.ModelDocument.ModelDocument | arelle.ModelDocument.LoadingException | None¶
Plugin hook:
ModelDocument.PullLoaderThis plugin hook can be used to override ModelDocument construction.
For instance for a plugin that enables opening and loading data from Excel files.
This hook can also be used to log an initial error and/or return a LoadingException if the XBRL report doesn’t match a naming requirement.
- Parameters:
modelXbrl – The ModelXbrl being constructed.
normalizedUri – The normalized path of the document. This can be a URL or local file system path.
filepath – The path of the document. May be the same as the
normalizedUrior a path to a file in the local cache.isEntry – Boolean value indicating if the document is an entrypoint.
namespace – The target namespace if the document has one.
args – Argument capture to ensure new parameters don’t break plugin hook.
kwargs – Argument capture to ensure new named parameters don’t break plugin hook.
- Returns:
A ModelDocument, a [LoadingException](#arelle.ModelDocument.LoadingException], or
None. Example:# Defer to other plugins and/or default behavior. return None # Override ModelDocument construction from plugin. return ModelDocument(...) # Signal that document can't be constructed. return LoadingException("Invalid document")
- abstractmethod static modelManagerLoad(manager: arelle.ModelManager.ModelManager, fileSource: arelle.FileSource.FileSource, *args: Any, **kwargs: Any) arelle.ModelXbrl.ModelXbrl | None¶
Plugin hook:
ModelManager.LoadHook to override default ModelXbrl loading. Return
Noneto defer to other plugins of default loading.- Parameters:
manager – The ModelManager the request is coming from.
fileSource – The FileSource to load.
args – Argument capture to ensure new parameters don’t break plugin hook.
kwargs – Argument capture to ensure new named parameters don’t break plugin hook.
- Returns:
Either a ModelXbrl instance or
Noneto defer to default loading.
- abstractmethod static modelXbrlInit(modelXbrl: arelle.ModelXbrl.ModelXbrl, *args: Any, **kwargs: Any) None¶
Plugin hook:
ModelXbrl.InitThis plugin hook is called as the last step of the ModelXbrl constructor which is prior to ModelDocument loading.
- Parameters:
modelXbrl – The XBRL model being constructed.
args – Argument capture to ensure new parameters don’t break plugin hook.
kwargs – Argument capture to ensure new named parameters don’t break plugin hook.
- Returns:
None
- abstractmethod static modelXbrlLoadComplete(modelXbrl: arelle.ModelXbrl.ModelXbrl, *args: Any, **kwargs: Any) None¶
Plugin hook:
ModelXbrl.LoadCompleteThis plugin hook is called after the ModelXbrl and ModelDocument loading is complete.
- Parameters:
modelXbrl – The constructed ModelXbrl.
args – Argument capture to ensure new parameters don’t break plugin hook.
kwargs – Argument capture to ensure new named parameters don’t break plugin hook.
- Returns:
None
- abstractmethod static validateComplete(cntlr: arelle.Cntlr.Cntlr, fileSource: arelle.FileSource.FileSource, *args: Any, **kwargs: Any) None¶
Plugin hook:
Validate.CompleteHook for executing controller-level validation rules after model-level validation is complete. This can be useful for validating multi-instance filings when a rule requires information that is only available after all instances have been parsed and validated.
Example:
unusedFilepaths = pluginData.getExistingFilepaths() - pluginData.getUsedFilepaths() if len(unusedSubdirectoryFilepaths) > 0: yield Validation.error(codes="0.0.0", msg="Unused files exist.")
- Parameters:
cntlr – The Cntlr instance.
fileSource – The FileSource involved in loading the entrypoint files.
args – Argument capture to ensure new parameters don’t break plugin hook.
kwargs – Argument capture to ensure new named parameters don’t break plugin hook.
- Returns:
None
- abstractmethod static validateFileSource(cntlr: arelle.Cntlr.Cntlr, fileSource: arelle.FileSource.FileSource, *args: Any, **kwargs: Any) None¶
Plugin hook:
Validate.FileSourceHook for validating FileSource. This is useful for validations that apply to the filesource and not the XBRL models loaded from it.
Example:
size = fileSource.getBytesSize() if size is None: return if size > 100_000_000: yield Validation.error(codes="0.0.0", msg="File size exceeds 100MB.")
- Parameters:
cntlr – The Cntlr instance.
fileSource – The FileSource to validate.
args – Argument capture to ensure new parameters don’t break plugin hook.
kwargs – Argument capture to ensure new named parameters don’t break plugin hook.
- Returns:
None
- abstractmethod static validateFinally(val: arelle.ValidateXbrl.ValidateXbrl, *args: Any, **kwargs: Any) None¶
Plugin hook:
Validate.FinallyThis plugin hook is called after formula processing and other XBRL validation. This hook is useful for logging errors or warnings based on other errors or warnings that were triggered.
Example:
if "XYZ.01.01" in val.modelXbrl.errors and "XYZ.21.02" not in val.modelXbrl.errors: modelXbrl.error("XYZ.52.04", "Incompatible data reported.")
- Parameters:
val – The ValidateXBRL instance.
args – Argument capture to ensure new parameters don’t break plugin hook.
kwargs – Argument capture to ensure new named parameters don’t break plugin hook.
- Returns:
None
- abstractmethod static validateFormulaCompiled(modelXbrl: arelle.ModelXbrl.ModelXbrl, xpathContext: arelle.formula.XPathContext.XPathContext, *args: Any, **kwargs: Any) None¶
Plugin hook:
ValidateFormula.CompiledHook executed after formula rules are compiled, but before they’re executed.
- Parameters:
modelXbrl – The ModelXbrl.
xpathContext – The formula evaluation XPathContext.
args – Argument capture to ensure new parameters don’t break plugin hook.
kwargs – Argument capture to ensure new named parameters don’t break plugin hook.
- Returns:
None
- abstractmethod static validateFormulaFinished(val: arelle.ValidateXbrl.ValidateXbrl, *args: Any, **kwargs: Any) None¶
Plugin hook:
ValidateFormula.FinishedHook executed after formula evaluation.
- Parameters:
val – The ValidateXBRL instance.
args – Argument capture to ensure new parameters don’t break plugin hook.
kwargs – Argument capture to ensure new named parameters don’t break plugin hook.
- Returns:
None
- abstractmethod static validateXbrlDtsDocument(val: arelle.ValidateXbrl.ValidateXbrl, modelDocument: arelle.ModelDocument.ModelDocument, isFilingDocument: bool, *args: Any, **kwargs: Any) None¶
Plugin hook:
Validate.XBRL.DTS.documentValidation hook for implementing DTS validation rules. Useful for implementing validation rules related to extension taxonomies.
Example:
if ( modelDocument.type == ModelDocument.Type.SCHEMA and modelDocument.targetNamespace is not None and len(modelDocument.targetNamespace) > 100 ): val.modelXbrl.error( codes="XYZ.1.9.13", msg="TargetNamespace is too long.", )
- Parameters:
val – The ValidateXBRL instance.
modelDocument – The ModelDocument to validate.
isFilingDocument – Indicates if document is part of filing or external reference.
args – Argument capture to ensure new parameters don’t break plugin hook.
kwargs – Argument capture to ensure new named parameters don’t break plugin hook.
- Returns:
None
- abstractmethod static validateXbrlFinally(val: arelle.ValidateXbrl.ValidateXbrl, *args: Any, **kwargs: Any) None¶
Plugin hook:
Validate.XBRL.FinallyHook for executing validation rules after other XBRL validations, but prior to formula processing.
Example:
if "Cash" not in val.modelXbrl.factsByLocalName: val.modelXbrl.error(codes="01.01", msg="Cash must be reported.") if "Assets" not in val.modelXbrl.factsByLocalName: val.modelXbrl.warning(codes=("01.02", "13.04"), msg="Assets should be reported.")
- Parameters:
val – The ValidateXBRL instance.
args – Argument capture to ensure new parameters don’t break plugin hook.
kwargs – Argument capture to ensure new named parameters don’t break plugin hook.
- Returns:
None
- abstractmethod static validateXbrlStart(val: arelle.ValidateXbrl.ValidateXbrl, parameters: dict[Any, Any], *args: Any, **kwargs: Any) None¶
Plugin hook:
Validate.XBRL.StartHook for executing validation rules prior to other XBRL validations.
Example:
if "Cash" not in val.modelXbrl.factsByLocalName: val.modelXbrl.error(codes="01.01", msg="Cash must be reported.") if "Assets" not in val.modelXbrl.factsByLocalName: val.modelXbrl.warning(codes=("01.02", "13.04"), msg="Assets should be reported.")
- Parameters:
val – The ValidateXBRL instance.
parameters – dictionary of validation parameters.
args – Argument capture to ensure new parameters don’t break plugin hook.
kwargs – Argument capture to ensure new named parameters don’t break plugin hook.
- Returns:
None
- abstractmethod static modelTestcaseVariationReportPackageIxdsOptions(val: arelle.ValidateXbrl.ValidateXbrl, rptPkgIxdsOptions: dict[str, bool], *args: Any, **kwargs: Any) None¶
Plugin hook:
ModelTestcaseVariation.ReportPackageIxdsOptionsHook for other plugins to specify IXDS testcase variation options which will be passed to the inlineXbrlDocumentSet plugin.
Example:
rptPkgIxdsOptions["lookOutsideReportsDirectory"] = True rptPkgIxdsOptions["combineIntoSingleIxds"] = True
- Parameters:
val – The ValidateXBRL instance.
rptPkgIxdsOptions – the dict to set IXDS options on.
args – Argument capture to ensure new parameters don’t break plugin hook.
kwargs – Argument capture to ensure new named parameters don’t break plugin hook.
- Returns:
None
- abstractmethod static testcaseVariationValidated(testcaseDTS: arelle.ModelXbrl.ModelXbrl, testInstanceDTS: arelle.ModelXbrl.ModelXbrl, extraErrors: list[str], inputDTSes: dict[str, arelle.ModelXbrl.ModelXbrl], *args: Any, **kwargs: Any) None¶
Plugin hook:
TestcaseVariation.ValidatedTestcase validation hook which can be used to log additional test case errors or perform post validation operations.
- Parameters:
testcaseDTS – The ModelXbrl of the testcase file.
testInstanceDTS – The ModelXbrl of the instance being tested.
extraErrors – A list that the plugin may append to to log additional errors.
inputDTSes – The dict of testcase input DTSes.
args – Argument capture to ensure new parameters don’t break plugin hook.
kwargs – Argument capture to ensure new named parameters don’t break plugin hook.
- Returns:
None
- abstractmethod static saveLoadableOimSave(modelXbrl: arelle.ModelXbrl.ModelXbrl, oimFile: str, *args: Any, **kwargs: Any) None¶
Plugin hook:
SaveLoadableOim.SaveHook that can be called by other plugins to save the provided model to disk using an OIM file format. The OIM format is controlled by the requested file extension (json or csv.)
- Parameters:
modelXbrl – The ModelXbrl to save.
oimFile – The file path to save the model to. The extension controls which OIM format to use.
args – Argument capture to ensure new parameters don’t break plugin hook.
kwargs – Argument capture to ensure new named parameters don’t break plugin hook.
- Returns:
None
- abstractmethod static webCacheTransformUrl(cntlr: arelle.CntlrCmdLine.CntlrCmdLine, url: str | None, base: str | None, *args: Any, **kwargs: Any) tuple[str | None, bool]¶
Plugin hook:
WebCache.TransformURLThis hook is triggered before the web cache maps a URL to a file path. It’s useful if you need to map certain URLs to a location other than the web cache.
- Parameters:
cntlr – The Cntlr being initialized.
url – The URL to transform.
base – The base URL.
args – Argument capture to ensure new parameters don’t break plugin hook.
kwargs – Argument capture to ensure new named parameters don’t break plugin hook.
- Returns:
Tuple of transformed URL or filepath and a boolean indicating if the URL should be returned as the final filename.