[build-system]
requires = ["setuptools~=73.0", "wheel~=0.44", "setuptools_scm[toml]~=8.1"]
build-backend = "setuptools.build_meta"

[project]
name = "arelle-release"
dynamic = ['version']
readme = "README.md"
license = {text = "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',
    'License :: OSI Approved :: Apache Software License',
    'Natural Language :: English',
    'Programming Language :: Python :: 3',
    'Programming Language :: Python :: 3.8',
    'Programming Language :: Python :: 3.9',
    'Programming Language :: Python :: 3.10',
    'Programming Language :: Python :: 3.11',
    'Programming Language :: Python :: 3.12',
    'Operating System :: OS Independent',
    'Topic :: Text Processing :: Markup :: XML'
]
requires-python = ">=3.8"
dependencies = [
    'certifi',
    'filelock',
    'isodate==0.*',
    'lxml>=4,<6',
    'numpy>=1,<3',
    'openpyxl==3.*',
    'pillow==10.*',
    'pyparsing==3.*',
    'python-dateutil==2.*',
    'regex',
]

[project.optional-dependencies]
Crypto = [
    'pycryptodome==3.*',
]
DB = [
    'pg8000==1.*',
    'PyMySQL==1.*',
    'pyodbc>=4,<6',
    'rdflib>=5,<8',
]
EFM = [
    'holidays==0.*',
    'pytz',
]
ESEF = [
    'tinycss2==1.*',
]
ObjectMaker = [
    'graphviz==0.*',
]
WebServer = [
    'cheroot>=8,<11',
    'CherryPy==18.*',
    'tornado==6.*',
]

[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]
namespaces = false

[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.12"
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/validate/DQC.py
    | ^arelle/plugin/validate/eforms.py
    | ^arelle/plugin/validate/ESEF-DQC.py
    | ^arelle/plugin/xendr
    | ^arelle/plugin/Xince.py
    | ^arelle/plugin/xule
)'''

# --- 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.HtmlUtil',
    '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.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.profileCmdLine',
    'arelle.plugin.profileFormula',
    'arelle.plugin.saveCHComponentFile',
    'arelle.plugin.saveDTS',
    'arelle.plugin.saveHtmlEBAtables',
    'arelle.plugin.saveLoadableExcel',
    'arelle.plugin.saveLoadableOIM',
    '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.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
