[build-system]
requires = ["setuptools>=80.9,<81", "wheel>=0.45,<1", "setuptools_scm[toml]>=9.2,<10"]
build-backend = "setuptools.build_meta"

[project]
name = "arelle-release"
dynamic = ['version']
readme = "README.md"
license = "Apache-2.0"
description = "An open source XBRL platform."
authors = [
    {name = "arelle.org", email = "support@arelle.org"}
]
keywords = ["xbrl"]
classifiers = [
    'Development Status :: 5 - Production/Stable',
    'Intended Audience :: End Users/Desktop',
    'Intended Audience :: Developers',
    'Natural Language :: English',
    'Programming Language :: Python :: 3',
    'Programming Language :: Python :: 3.9',
    'Programming Language :: Python :: 3.10',
    'Programming Language :: Python :: 3.11',
    'Programming Language :: Python :: 3.12',
    'Programming Language :: Python :: 3.13',
    'Operating System :: OS Independent',
    'Topic :: Text Processing :: Markup :: XML'
]
requires-python = ">=3.9,<3.14"
dependencies = [
    'bottle>=0.13,<0.14',
    'certifi',
    'filelock',
    'isodate>=0,<1',
    'jaconv>=0,<1',
    'jsonschema>=4,<5',
    'lxml>=4,<7,!=6.0.0',
    'numpy>=1,<3',
    'openpyxl>=3,<4',
    'pillow>=10,<12',
    'pyparsing>=3,<4',
    'python-dateutil>=2,<3',
    'regex',
    'truststore>=0,<1; python_version>"3.9"',
    'typing-extensions>=4,<5',
]

[project.optional-dependencies]
Crypto = [
    'pycryptodome>=3,<4',
]
DB = [
    'pg8000>=1,<2',
    'PyMySQL>=1,<2',
    'pyodbc>=4,<6',
    'rdflib>=5,<8',
]
EFM = [
    'aniso8601>=10,<11',
    'holidays>=0,<1',
    'matplotlib>=3,<4',
    'pytz',
]
ESEF = [
    'tinycss2>=1,<2',
]
ObjectMaker = [
    'graphviz>=0,<1',
]
WebServer = [
    'cheroot>=8,<12',
    'tornado>=6,<7',
]
XULE = [
    'aniso8601>=10,<11',
]

[project.scripts]
arelleCmdLine = "arelle.CntlrCmdLine:main"

[project.gui-scripts]
arelleGUI = "arelle.CntlrWinMain:main"

[project.urls]
"Homepage" = "https://arelle.org/"
"Downloads" = "https://arelle.org/arelle/pub/"
"Documentation" = "https://arelle.org/arelle/documentation/"
"Blog" = "https://arelle.org/arelle/blog/"
"Source Code" = "https://github.com/Arelle/Arelle/"
"Bug Reports" = "https://github.com/Arelle/Arelle/issues/"
"Support" = "https://groups.google.com/g/arelle-users/"

[tool.setuptools]
platforms = ["any"]

[tool.setuptools.packages.find]
include = ["arelle*"]

[tool.setuptools_scm]
tag_regex = "^(?:[\\w-]+-?)?(?P<version>[vV]?\\d+(?:\\.\\d+){0,2}[^\\+]*)(?:\\+.*)?$"
write_to = "arelle/_version.py"

[tool.pytest.ini_options]
xfail_strict = true
empty_parameter_set_mark = "fail_at_collect"
addopts = "--strict-markers"
markers = [
    "fast: mark automatically applied to tests which don't have the \"slow\" mark applied (deselect with '-m \"not fast\"')",
    "slow: marks tests as slow (deselect with '-m \"not slow\"')",
]

[tool.mypy]
# Warn when a # type: ignore comment does not specify any error codes
enable_error_code = "ignore-without-code"
python_version = "3.13"
show_error_codes = true
strict = true
# Others are not included in repo, but commonly copied into working directory by devs.
exclude = '''(?x)(
    ^arelle/plugin/EDGAR
    | ^arelle/plugin/FERC
    | ^arelle/plugin/iXBRLViewerPlugin
    | ^arelle/plugin/semanticHash.py
    | ^arelle/plugin/serializer
    | ^arelle/plugin/SimpleXBRLModel
    | ^arelle/plugin/validate/DQC.py
    | ^arelle/plugin/validate/eforms.py
    | ^arelle/plugin/validate/ESEF-DQC.py
    | ^arelle/plugin/xendr
    | ^arelle/plugin/Xince.py
    | ^arelle/plugin/xodel
    | ^arelle/plugin/xule
    | ^arelle/resources
    | ^tests/resources
)'''

# --- ignore modules ---
# remove from list below as each module is updated with type hinting
[[tool.mypy.overrides]]
module = [
    'arelle.Aspect',
    'arelle.CntlrCmdLine',
    'arelle.CntlrComServer',
    'arelle.CntlrProfiler',
    'arelle.CntlrQuickBooks',
    'arelle.CntlrWinMain',
    'arelle.CntlrWinTooltip',
    'arelle.DialogAbout',
    'arelle.DialogArcroleGroup',
    'arelle.DialogFind',
    'arelle.DialogFormulaParameters',
    'arelle.DialogLanguage',
    'arelle.DialogNewFactItem',
    'arelle.DialogOpenArchive',
    'arelle.DialogPackageManager',
    'arelle.DialogPluginManager',
    'arelle.DialogRssWatch',
    'arelle.DialogURL',
    'arelle.DialogUserPassword',
    'arelle.DisclosureSystem',
    'arelle.FunctionCustom',
    'arelle.FunctionFn',
    'arelle.FunctionIxt',
    'arelle.FunctionUtil',
    'arelle.FunctionXfi',
    'arelle.FunctionXs',
    'arelle.HashUtil',
    'arelle.InstanceAspectsEvaluator',
    'arelle.LocalViewer',
    'arelle.ModelDocument',
    'arelle.ModelDtsObject',
    'arelle.ModelFormulaObject',
    'arelle.ModelInstanceObject',
    'arelle.ModelManager',
    'arelle.ModelRelationshipSet',
    'arelle.ModelRenderingObject',
    'arelle.ModelRssItem',
    'arelle.ModelRssObject',
    'arelle.ModelTestcaseObject',
    'arelle.ModelVersObject',
    'arelle.ModelVersReport',
    'arelle.PackageManager',
    'arelle.PluginManager',
    'arelle.PrototypeDtsObject',
    'arelle.PrototypeInstanceObject',
    'arelle.PythonUtil',
    'arelle.rendering.RenderingEvaluator',
    'arelle.rendering.RenderingLayout',
    'arelle.rendering.RenderingResolution',
    'arelle.TableStructure',
    'arelle.TkTableWrapper',
    'arelle.UITkTable',
    'arelle.UiUtil',
    'arelle.Validate',
    'arelle.ValidateFilingText',
    'arelle.ValidateInfoset',
    'arelle.ValidateUtr',
    'arelle.ValidateVersReport',
    'arelle.ValidateXbrlCalcs',
    'arelle.ValidateXbrlDTS',
    'arelle.ValidateXbrlDimensions',
    'arelle.Version',
    'arelle.ViewFile',
    'arelle.ViewFileConcepts',
    'arelle.ViewFileDTS',
    'arelle.ViewFileFactList',
    'arelle.ViewFileFactTable',
    'arelle.ViewFileFormulae',
    'arelle.ViewFileRelationshipSet',
    'arelle.ViewFileRenderedGrid',
    'arelle.ViewFileRenderedLayout',
    'arelle.ViewFileRenderedStructure',
    'arelle.ViewFileRoleTypes',
    'arelle.ViewFileRssFeed',
    'arelle.ViewFileTests',
    'arelle.ViewUtil',
    'arelle.ViewUtilFormulae',
    'arelle.ViewWinConcepts',
    'arelle.ViewWinDTS',
    'arelle.ViewWinDiffs',
    'arelle.ViewWinFactGrid',
    'arelle.ViewWinFactList',
    'arelle.ViewWinFactTable',
    'arelle.ViewWinFormulae',
    'arelle.ViewWinGrid',
    'arelle.ViewWinList',
    'arelle.ViewWinPane',
    'arelle.ViewWinProperties',
    'arelle.ViewWinRelationshipSet',
    'arelle.ViewWinRenderedGrid',
    'arelle.ViewWinRoleTypes',
    'arelle.ViewWinRssFeed',
    'arelle.ViewWinTests',
    'arelle.ViewWinTkTable',
    'arelle.ViewWinTree',
    'arelle.ViewWinTupleGrid',
    'arelle.ViewWinVersReport',
    'arelle.ViewWinXml',
    'arelle.WatchRss',
    'arelle.WebCache',
    'arelle.XhtmlValidate',
    'arelle.XmlValidateParticles',
    'arelle.archive.CustomLogger',
    'arelle.archive.LoadEFMvalidate',
    'arelle.archive.LoadSavePreLbCsv',
    'arelle.archive.LoadValidate',
    'arelle.archive.SaveTableToExelle',
    'arelle.archive.TR3toTR4',
    'arelle.archive.plugin.bigInstance',
    'arelle.archive.plugin.cmdWebServerExtension',
    'arelle.archive.plugin.crashTest',
    'arelle.archive.plugin.functionsXmlCreation',
    'arelle.archive.plugin.hello_i18n',
    'arelle.archive.plugin.importTestChild1',
    'arelle.archive.plugin.importTestChild2',
    'arelle.archive.plugin.importTestGrandchild1',
    'arelle.archive.plugin.importTestGrandchild2',
    'arelle.archive.plugin.importTestImported1',
    'arelle.archive.plugin.importTestImported11',
    'arelle.archive.plugin.importTestParent',
    'arelle.archive.plugin.instanceInfo',
    'arelle.archive.plugin.loadFromOIM-2018',
    'arelle.archive.plugin.objectmaker',
    'arelle.archive.plugin.packagedImportTest',
    'arelle.archive.plugin.packagedImportTest.importTestChild1',
    'arelle.archive.plugin.packagedImportTest.importTestChild2',
    'arelle.archive.plugin.packagedImportTest.importTestGrandchild1',
    'arelle.archive.plugin.packagedImportTest.importTestGrandchild2',
    'arelle.archive.plugin.packagedImportTest.importTestImported1',
    'arelle.archive.plugin.packagedImportTest.importTestImported11',
    'arelle.archive.plugin.packagedImportTest.subdir.importTestImported111',
    'arelle.archive.plugin.packagedImportTest.subdir.subsubdir.importTestImported1111',
    'arelle.archive.plugin.sakaCalendar',
    'arelle.archive.plugin.saveInstanceInfoset',
    'arelle.archive.plugin.sphinx',
    'arelle.archive.plugin.sphinx.FormulaGenerator',
    'arelle.archive.plugin.sphinx.SphinxContext',
    'arelle.archive.plugin.sphinx.SphinxEvaluator',
    'arelle.archive.plugin.sphinx.SphinxMethods',
    'arelle.archive.plugin.sphinx.SphinxMethods',
    'arelle.archive.plugin.sphinx.SphinxParser',
    'arelle.archive.plugin.sphinx.SphinxValidator',
    'arelle.archive.plugin.streamingExtensions',
    'arelle.archive.plugin.transforms.tester',
    'arelle.archive.plugin.updateTableLB',
    'arelle.archive.plugin.validate.GFM',
    'arelle.archive.plugin.validate.SBRnl',
    'arelle.archive.plugin.validate.SBRnl.CustomLoader',
    'arelle.archive.plugin.validate.SBRnl.DTS',
    'arelle.archive.plugin.validate.SBRnl.Dimensions',
    'arelle.archive.plugin.validate.SBRnl.Document',
    'arelle.archive.plugin.validate.SBRnl.Filing',
    'arelle.archive.plugin.validate.USBestPractices',
    'arelle.archive.plugin.validate.USCorpAction',
    'arelle.archive.plugin.validate.USSecTagging',
    'arelle.archive.plugin.validate.XDC',
    'arelle.archive.plugin.validate.XFsyntax',
    'arelle.archive.plugin.validate.XFsyntax.xf',
    'arelle.archive.plugin.validate.calc2',
    'arelle.archive.plugin.validateSchemaLxml',
    'arelle.archive.plugin.validateTableInfoset',
    'arelle.examples.plugin.formulaSuiteConverter',
    'arelle.examples.plugin.functionsCustom',
    'arelle.examples.plugin.hello_dolly',
    'arelle.examples.plugin.rssSaveOim',
    'arelle.formula.FormulaConsisAsser',
    'arelle.formula.FormulaEvaluator',
    'arelle.formula.ValidateFormula',
    'arelle.oim.Load',
    'arelle.plugin.CacheBuilder',
    'arelle.plugin.EdgarRendererAllReports',
    'arelle.plugin.SECCorrespondenceLoader',
    'arelle.plugin.TDnetLoader',
    'arelle.plugin.UKCompaniesHouseLoader',
    'arelle.plugin.formulaLoader',
    'arelle.plugin.formulaSaver',
    'arelle.plugin.formulaXPathChecker',
    'arelle.plugin.inlineXbrlDocumentSet',
    'arelle.plugin.internet.proxyNTLM',
    'arelle.plugin.internet.proxyNTLM.HTTPNtlmAuthHandler',
    'arelle.plugin.internet.proxyNTLM.U32',
    'arelle.plugin.internet.proxyNTLM.des',
    'arelle.plugin.internet.proxyNTLM.des_c',
    'arelle.plugin.internet.proxyNTLM.des_data',
    'arelle.plugin.internet.proxyNTLM.ntlm',
    'arelle.plugin.loadFromExcel',
    'arelle.plugin.logging.dpmSignature',
    'arelle.plugin.logging.dqcParameters',
    'arelle.plugin.logging.saveMessages',
    'arelle.plugin.OimTaxonomy',
    'arelle.plugin.OimTaxonomy.ModelValueMore',
    'arelle.plugin.OimTaxonomy.ValidateDTS',
    'arelle.plugin.OimTaxonomy.ViewXbrlTxmyObj',
    'arelle.plugin.OimTaxonomy.XbrlAbstract',
    'arelle.plugin.OimTaxonomy.XbrlConcept',
    'arelle.plugin.OimTaxonomy.XbrlConst',
    'arelle.plugin.OimTaxonomy.XbrlCube',
    'arelle.plugin.OimTaxonomy.XbrlDimension',
    'arelle.plugin.OimTaxonomy.XbrlDts',
    'arelle.plugin.OimTaxonomy.XbrlEntity',
    'arelle.plugin.OimTaxonomy.XbrlGroup',
    'arelle.plugin.OimTaxonomy.XbrlImportedTaxonomy',
    'arelle.plugin.OimTaxonomy.XbrlLabel',
    'arelle.plugin.OimTaxonomy.XbrlNetwork',
    'arelle.plugin.OimTaxonomy.XbrlProperty',
    'arelle.plugin.OimTaxonomy.XbrlReference',
    'arelle.plugin.OimTaxonomy.XbrlReport',
    'arelle.plugin.OimTaxonomy.XbrlTableTemplate',
    'arelle.plugin.OimTaxonomy.XbrlTaxonomy',
    'arelle.plugin.OimTaxonomy.XbrlTaxonomyObject',
    'arelle.plugin.OimTaxonomy.XbrlTransform',
    'arelle.plugin.OimTaxonomy.XbrlTypes',
    'arelle.plugin.OimTaxonomy.XbrlUnit',
    'arelle.plugin.profileCmdLine',
    'arelle.plugin.profileFormula',
    'arelle.plugin.saveCHComponentFile',
    'arelle.plugin.saveDTS',
    'arelle.plugin.saveLoadableExcel',
    'arelle.plugin.saveLoadableOIM',
    'arelle.plugin.saveOIMTaxonomy',
    'arelle.plugin.saveSKOS',
    'arelle.plugin.saveSampleInstance',
    'arelle.plugin.security.cryptAES_CBC',
    'arelle.plugin.security.cryptAES_EAX',
    'arelle.plugin.streamingExtensions',
    'arelle.plugin.transforms.tester',
    'arelle.plugin.unpackSecEisFile',
    'arelle.plugin.validate.CIPC',
    'arelle.plugin.validate.EBA',
    'arelle.plugin.validate.FERC',
    'arelle.plugin.validate.ROS.*',
    'arelle.plugin.validate.UK',
    'arelle.plugin.xbrlDB',
    'arelle.plugin.xbrlDB.DialogRssWatchExtender',
    'arelle.plugin.xbrlDB.SqlDb',
    'arelle.plugin.xbrlDB.XbrlDpmSqlDB',
    'arelle.plugin.xbrlDB.XbrlOpenSqlDB',
    'arelle.plugin.xbrlDB.XbrlPublicPostgresDB',
    'arelle.plugin.xbrlDB.XbrlSemanticGraphDB',
    'arelle.plugin.xbrlDB.XbrlSemanticJsonDB',
    'arelle.plugin.xbrlDB.XbrlSemanticRdfDB',
    'arelle.plugin.xbrlDB.XbrlSemanticSqlDB',
    'arelle.plugin.xbrlDB.entityInformation',
    'arelle.plugin.xbrlDB.ext.china',
    'arelle.plugin.xbrlDB.ext.edgar',
    'arelle.plugin.xbrlDB.ext.xdc',
    'arelle.plugin.xbrlDB.primaryDocumentFacts',
    'arelle.plugin.xbrlDB.tableFacts',
    'arelle.plugin.xuleSaver',
    'arelle.utils.EntryPointDetection',
    'arelle.webserver.bottle',
    'tests.*',
]
ignore_errors = true

# --- Modules lacking stubs ---
# Add any module missing library stubs or not having
# the py.typed marker here
[[tool.mypy.overrides]]
module = [
    'google.appengine.api.*',
    'gtk',
    'isodate.*',
    'win32clipboard',
    'win32gui',
    'win32process',
]
ignore_missing_imports = true
