Skip to content

Commit

Permalink
Update Arelle
Browse files Browse the repository at this point in the history
- peg to v2.0.0

- move Arelle install to environment.yml

- update instructions cell, comment out pip install and about Arelle print command
  • Loading branch information
davidtauriello committed Oct 12, 2022
1 parent dfd4b63 commit 1a15740
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 21 deletions.
12 changes: 1 addition & 11 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,12 @@ name: xbrl_api_playground

dependencies:
- python=3.9
- numpy
- pandas
- requests
- xlrd
- openpyxl
- regex
- tabulate
- lxml>=4.6.3
- isodate==0.6.0
- aniso8601==9.0.1
- holidays==0.11.1
- pyparsing==2.4.7
- pip
- pip:
- lxml
- isodate
- aniso8601
- holidays
- pyparsing
- Arelle-release==2.0.0
23 changes: 13 additions & 10 deletions sample.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,33 @@
"cells": [
{
"cell_type": "markdown",
"id": "d3986a04",
"metadata": {},
"source": [
"## Running XULE in Arelle \n",
"This sample Python code installs Arelle and the XULE plugin ([plus dependencies](https://raw.githubusercontent.com/xbrlus/xule/main/environment.yml)) and runs an expression for a report. Click in each code cell to bring it in focus, then click the run button above to execute the commands. The first cell below installs the latest version of Arelle _quietly_ (in about a minute), with **the asterisk indicating the cell is queue/processing**. When the code finishes, the cell will display the Arelle's about text and the path where XULE will be installed. If the about or path details are not displayed, move the # from line 5 to the beginning of line 4 in the cell and re-run it."
"This sample Python code copies the XULE plugin to a working environment with Arelle 2.0.0 ([plus dependencies](https://raw.githubusercontent.com/xbrlus/xule/main/environment.yml)) and runs an expression for a report. Click in each code cell to bring it in focus, then click the run button above to execute the commands in the cell. \n",
"\n",
"The commented install rows in the cell below can be used to change the installed version of Arelle in about a minute: remove the \"#\" at the head of one of the install commands and re-run the cell. **The asterisk to the left of the cell indicates the cell is queued/processing**. When the code finishes, the cell will display the path where XULE will be copied."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "916bd6da",
"metadata": {},
"outputs": [],
"source": [
"import os, sys\n",
"import site; site.getsitepackages()\n",
"!{sys.executable} -m pip -q install git+https://git@github.com/Arelle/arelle.git@master#egg=Arelle-release\n",
"#!{sys.executable} -m pip -q install git+ https://git@github.com/DataQualityCommittee/arelle.git@master # this is an alternate location for a working version of Arelle\n",
"#!{sys.executable} -m pip -q install arelle-release==2.0.0 # this is the installed Arelle version\n",
"#!{sys.executable} -m pip -q install git+https://git@github.com/Arelle/arelle.git@2.0.0 # Arelle release on GitHub (replace 2.0.0 with master for the development version of Arelle)\n",
"\n",
"plugindir = site.getsitepackages()[0] + '/arelle/plugin/'\n",
"os.chdir(plugindir)\n",
"\n",
"print('\\nAbout Arelle:')\n",
"!arelleCmdLine -a\n",
"print('\\nBelow is the path to Arelle\\'s plugin directory, where the XULE plugin will be added in the next step:\\n')\n",
"print(plugindir)"
"print(plugindir)\n",
"#print('\\nAbout Arelle:') # remove the \"#\" at the beginning of this line AND the one below to get information about Arelle\n",
"#!arelleCmdLine -a"
]
},
{
Expand Down Expand Up @@ -119,7 +122,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3.9.13 64-bit",
"display_name": "Python 3.8.3 64-bit",
"language": "python",
"name": "python3"
},
Expand All @@ -133,11 +136,11 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.13"
"version": "3.8.10"
},
"vscode": {
"interpreter": {
"hash": "8e284ee3255a07ad8bf76694974743c4c81cb57e7c969474d752d949b11d721e"
"hash": "1e3d2864960cda1cc89e7405ec595e77e7ac30692c1b4230c1dcf8d9a5036813"
}
}
},
Expand Down

0 comments on commit 1a15740

Please sign in to comment.