Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REQUEST] Add bash script to test the different scenarios for ixbrl-viewer #414

Open
sagesmith-wf opened this issue May 3, 2023 · 0 comments
Labels
request New feature or request

Comments

@sagesmith-wf
Copy link
Contributor

What should we change and why?

We should add a bash script to automate generating the different scenarios that should be tested for ixbrl-viewer

git add testviewer.sh
git commit -m "Fix"
git clean -df

mkdir viewerDirectoryTest
python arelleCmdLine.py --plugins=/Users/sagesmith/code/wk/ixbrl-viewer/iXBRLViewerPlugin -f /Users/sagesmith/Downloads/filing_documents.zip  --save-viewer /Users/sagesmith/code/wk/Arelle/viewerDirectoryTest --viewer-url /Users/sagesmith/code/wk/ixbrl-viewer/iXBRLViewerPlugin/viewer/dist/ixbrlviewer.js
echo ""
echo "Viewer directory test"
echo "$(ls viewerDirectoryTest)"

mkdir viewerFileTest
python arelleCmdLine.py --plugins=/Users/sagesmith/code/wk/ixbrl-viewer/iXBRLViewerPlugin -f /Users/sagesmith/Downloads/filing_documents.zip  --save-viewer /Users/sagesmith/code/wk/Arelle/viewerFileTest/ixbrlviewer.html --viewer-url /Users/sagesmith/code/wk/ixbrl-viewer/iXBRLViewerPlugin/viewer/dist/ixbrlviewer.js
echo ""
echo "Viewer file test"
echo "$(ls viewerFileTest)"

mkdir viewerDirectoryZipTest
python arelleCmdLine.py --plugins=/Users/sagesmith/code/wk/ixbrl-viewer/iXBRLViewerPlugin -f /Users/sagesmith/Downloads/filing_documents.zip  --save-viewer /Users/sagesmith/code/wk/Arelle/viewerDirectoryZipTest --viewer-url /Users/sagesmith/code/wk/ixbrl-viewer/iXBRLViewerPlugin/viewer/dist/ixbrlviewer.js --zip-viewer-output
echo ""
echo "Viewer directory zip test"
echo "$(ls viewerDirectoryZipTest)"

mkdir viewerFileZipTest
python arelleCmdLine.py --plugins=/Users/sagesmith/code/wk/ixbrl-viewer/iXBRLViewerPlugin -f /Users/sagesmith/Downloads/filing_documents.zip  --save-viewer /Users/sagesmith/code/wk/Arelle/viewerFileZipTest/ixbrlviewer.zip --viewer-url /Users/sagesmith/code/wk/ixbrl-viewer/iXBRLViewerPlugin/viewer/dist/ixbrlviewer.js --zip-viewer-output
echo ""
echo "Viewer file zip test"
echo "$(ls viewerFileZipTest)"

mkdir viewerDirectoryTestInlineDoc
python arelleCmdLine.py --plugins=/Users/sagesmith/code/wk/ixbrl-viewer/iXBRLViewerPlugin -f /Users/sagesmith/Downloads/biggaap-20230123.htm  --save-viewer /Users/sagesmith/code/wk/Arelle/viewerDirectoryTestInlineDoc --viewer-url /Users/sagesmith/code/wk/ixbrl-viewer/iXBRLViewerPlugin/viewer/dist/ixbrlviewer.js
echo ""
echo "Viewer directory test"
echo "$(ls viewerDirectoryTestInlineDoc)"

mkdir viewerFileTestInlineDoc
python arelleCmdLine.py --plugins=/Users/sagesmith/code/wk/ixbrl-viewer/iXBRLViewerPlugin -f /Users/sagesmith/Downloads/biggaap-20230123.htm  --save-viewer /Users/sagesmith/code/wk/Arelle/viewerFileTestInlineDoc/ixbrlviewer.html --viewer-url /Users/sagesmith/code/wk/ixbrl-viewer/iXBRLViewerPlugin/viewer/dist/ixbrlviewer.js
echo ""
echo "Viewer file test"
echo "$(ls viewerFileTestInlineDoc)"

mkdir viewerDirectoryZipTestInlineDoc
python arelleCmdLine.py --plugins=/Users/sagesmith/code/wk/ixbrl-viewer/iXBRLViewerPlugin -f /Users/sagesmith/Downloads/biggaap-20230123.htm  --save-viewer /Users/sagesmith/code/wk/Arelle/viewerDirectoryZipTestInlineDoc --viewer-url /Users/sagesmith/code/wk/ixbrl-viewer/iXBRLViewerPlugin/viewer/dist/ixbrlviewer.js --zip-viewer-output
echo ""
echo "Viewer directory zip test"
echo "$(ls viewerDirectoryZipTestInlineDoc)"

mkdir viewerFileZipTestInlineDoc
python arelleCmdLine.py --plugins=/Users/sagesmith/code/wk/ixbrl-viewer/iXBRLViewerPlugin -f /Users/sagesmith/Downloads/biggaap-20230123.htm  --save-viewer /Users/sagesmith/code/wk/Arelle/viewerFileZipTestInlineDoc/ixbrlviewer.zip --viewer-url /Users/sagesmith/code/wk/ixbrl-viewer/iXBRLViewerPlugin/viewer/dist/ixbrlviewer.js --zip-viewer-output
echo ""
echo "Viewer file zip test"
echo "$(ls viewerFileZipTestInlineDoc)"

mkdir viewerIXDSZipTestZipToFile
python arelleCmdLine.py --plugins '/Users/sagesmith/code/wk/ixbrl-viewer/iXBRLViewerPlugin|inlineXbrlDocumentSet' -f '[{"ixds":[{"file":"/Users/sagesmith/Downloads/ixds.zip/ixbrlviewertest-20230502.htm"},{"file":"/Users/sagesmith/Downloads/ixds.zip/ixbrlviewertest-20230502_d2.htm"}]}]'  --save-viewer /Users/sagesmith/code/wk/Arelle/viewerIXDSZipTestZipToFile/ixbrlviewer.zip --viewer-url /Users/sagesmith/code/wk/ixbrl-viewer/iXBRLViewerPlugin/viewer/dist/ixbrlviewer.js --zip-viewer-output
echo ""
echo "Viewer file zip test"
echo "$(ls viewerIXDSZipTestZipToFile)"

mkdir viewerIXDSZipTestZipToDir
python arelleCmdLine.py --plugins '/Users/sagesmith/code/wk/ixbrl-viewer/iXBRLViewerPlugin|inlineXbrlDocumentSet' -f '[{"ixds":[{"file":"/Users/sagesmith/Downloads/ixds.zip/ixbrlviewertest-20230502.htm"},{"file":"/Users/sagesmith/Downloads/ixds.zip/ixbrlviewertest-20230502_d2.htm"}]}]'  --save-viewer /Users/sagesmith/code/wk/Arelle/viewerIXDSZipTestZipToDir --viewer-url /Users/sagesmith/code/wk/ixbrl-viewer/iXBRLViewerPlugin/viewer/dist/ixbrlviewer.js --zip-viewer-output
echo ""
echo "Viewer file zip test"
echo "$(ls viewerIXDSZipTestZipToDir)"

mkdir viewerIXDSZipTestSaveToDir
python arelleCmdLine.py --plugins '/Users/sagesmith/code/wk/ixbrl-viewer/iXBRLViewerPlugin|inlineXbrlDocumentSet' -f '[{"ixds":[{"file":"/Users/sagesmith/Downloads/ixds.zip/ixbrlviewertest-20230502.htm"},{"file":"/Users/sagesmith/Downloads/ixds.zip/ixbrlviewertest-20230502_d2.htm"}]}]'  --save-viewer /Users/sagesmith/code/wk/Arelle/viewerIXDSZipTestSaveToDir --viewer-url /Users/sagesmith/code/wk/ixbrl-viewer/iXBRLViewerPlugin/viewer/dist/ixbrlviewer.js
echo ""
echo "Viewer file zip test"
echo "$(ls viewerIXDSZipTestSaveToDir)"

mkdir viewerIXDSTestZipToFile
python arelleCmdLine.py --plugins '/Users/sagesmith/code/wk/ixbrl-viewer/iXBRLViewerPlugin|inlineXbrlDocumentSet' -f '[{"ixds":[{"file":"/Users/sagesmith/Downloads/ixds/ixbrlviewertest-20230502.htm"},{"file":"/Users/sagesmith/Downloads/ixds/ixbrlviewertest-20230502_d2.htm"}]}]'  --save-viewer /Users/sagesmith/code/wk/Arelle/viewerIXDSTestZipToFile/ixbrlviewer.zip --viewer-url /Users/sagesmith/code/wk/ixbrl-viewer/iXBRLViewerPlugin/viewer/dist/ixbrlviewer.js --zip-viewer-output
echo ""
echo "Viewer file zip test"
echo "$(ls viewerIXDSTestZipToFile)"

mkdir viewerIXDSTestZipToDir
python arelleCmdLine.py --plugins '/Users/sagesmith/code/wk/ixbrl-viewer/iXBRLViewerPlugin|inlineXbrlDocumentSet' -f '[{"ixds":[{"file":"/Users/sagesmith/Downloads/ixds/ixbrlviewertest-20230502.htm"},{"file":"/Users/sagesmith/Downloads/ixds/ixbrlviewertest-20230502_d2.htm"}]}]'  --save-viewer /Users/sagesmith/code/wk/Arelle/viewerIXDSTestZipToDir --viewer-url /Users/sagesmith/code/wk/ixbrl-viewer/iXBRLViewerPlugin/viewer/dist/ixbrlviewer.js --zip-viewer-output
echo ""
echo "Viewer file zip test"
echo "$(ls viewerIXDSTestZipToDir)"

mkdir viewerIXDSTestSaveToDir
python arelleCmdLine.py --plugins '/Users/sagesmith/code/wk/ixbrl-viewer/iXBRLViewerPlugin|inlineXbrlDocumentSet' -f '[{"ixds":[{"file":"/Users/sagesmith/Downloads/ixds/ixbrlviewertest-20230502.htm"},{"file":"/Users/sagesmith/Downloads/ixds/ixbrlviewertest-20230502_d2.htm"}]}]'  --save-viewer /Users/sagesmith/code/wk/Arelle/viewerIXDSTestSaveToDir --viewer-url /Users/sagesmith/code/wk/ixbrl-viewer/iXBRLViewerPlugin/viewer/dist/ixbrlviewer.js
echo ""
echo "Viewer file zip test"
echo "$(ls viewerIXDSTestSaveToDir)"

git status

Something like this could be a good starting point

@sagesmith-wf sagesmith-wf added the request New feature or request label May 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
request New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant