Skip to content

Commit

Permalink
Merge pull request #2171 from posit-dev/mm-update-test-deps
Browse files Browse the repository at this point in the history
Update test deps
  • Loading branch information
mmarchetti authored Aug 23, 2024
2 parents f17f0e5 + 8dbcda4 commit 1c88731
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 101 deletions.
2 changes: 1 addition & 1 deletion test/sample-content/quarto-proj-py/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
black==24.3.0
certifi==2023.7.22
certifi==2024.7.4
click==8.0.3
mypy-extensions==0.4.3
pathspec==0.9.0
Expand Down
19 changes: 19 additions & 0 deletions test/sample-content/stock-report-jupyter/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Stock Report

## About this example

This stock report is generated using Python and Jupyter Notebook. Stock prices are populated from Quandl to generate a stock performance summary intended to run daily after market close.


## Learn more

* [Jupyter Homepage](https://jupyter.org/)
* [Jupyter Documentation](https://jupyter.org/documentation)
* [Using Jupyter Notebooks in {systemDisplayName}](https://docs.posit.co/connect/user/jupyter-notebook/)
* [User Guide for rsconnect_jupyter](https://docs.posit.co/rsconnect-jupyter/)

## Requirements

* Python version 3.9 or higher

<!-- NOTE: this file is generated -->
103 changes: 9 additions & 94 deletions test/sample-content/stock-report-jupyter/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,95 +1,10 @@
anyio==3.6.2
appnope==0.1.3
argon2-cffi==21.3.0
argon2-cffi-bindings==21.2.0
arrow==1.2.3
asttokens==2.2.1
attrs==23.1.0
backcall==0.2.0
beautifulsoup4==4.12.2
bleach==6.0.0
cffi==1.15.1
comm==0.1.3
contourpy==1.0.7
cycler==0.11.0
debugpy==1.6.7
decorator==5.1.1
defusedxml==0.7.1
executing==1.2.0
fastjsonschema==2.16.3
fonttools==4.39.4
fqdn==1.5.1
idna==3.4
ipykernel==6.23.1
ipython==8.13.2
ipython-genutils==0.2.0
ipywidgets==8.0.6
isoduration==20.11.0
jedi==0.18.2
jinja2==3.1.2
jsonpointer==2.3
jsonschema[format-nongpl]==4.17.3
jupyter==1.0.0
jupyter-client==8.2.0
# jupyter
notebook==7.1.1
qtconsole==5.5.1
jupyter-console==6.6.3
jupyter-core==5.3.0
jupyter-events==0.6.3
jupyter-server==2.5.0
jupyter-server-terminals==0.4.4
jupyterlab-pygments==0.2.2
jupyterlab-widgets==3.0.7
kiwisolver==1.4.4
markupsafe==2.1.2
matplotlib==3.7.1
matplotlib-inline==0.1.6
mistune==2.0.5
nbclassic==1.0.0
nbclient==0.7.4
nbconvert==7.4.0
nbformat==5.8.0
nest-asyncio==1.5.6
notebook==6.5.4
notebook-shim==0.2.3
numpy==1.24.3
packaging==23.1
pandas==2.0.1
pandocfilters==1.5.0
parso==0.8.3
pexpect==4.8.0
pickleshare==0.7.5
pillow==9.5.0
platformdirs==3.5.1
prometheus-client==0.16.0
prompt-toolkit==3.0.38
psutil==5.9.5
ptyprocess==0.7.0
pure-eval==0.2.2
pycparser==2.21
pygments==2.15.1
pyparsing==3.0.9
pyrsistent==0.19.3
python-dateutil==2.8.2
python-json-logger==2.0.7
pytz==2023.3
pyyaml==6.0
pyzmq==25.0.2
qtconsole==5.4.3
qtpy==2.3.1
rfc3339-validator==0.1.4
rfc3986-validator==0.1.1
send2trash==1.8.2
six==1.16.0
sniffio==1.3.0
soupsieve==2.4.1
stack-data==0.6.2
terminado==0.17.1
tinycss2==1.2.1
tornado==6.3.2
traitlets==5.9.0
tzdata==2023.3
uri-template==1.2.0
wcwidth==0.2.6
webcolors==1.13
webencodings==0.5.1
websocket-client==1.5.1
widgetsnbextension==4.0.7
nbconvert==7.16.1
ipykernel==6.29.3
ipywidgets==8.1.2

matplotlib==3.8.3
pandas==2.2.1
Original file line number Diff line number Diff line change
Expand Up @@ -89,16 +89,17 @@
"\n",
"prices = pd.read_json(gzip.open('quandl-wiki-tsla.json.gz'), orient='split')\n",
"\n",
"latest = prices.last_valid_index()\n",
"data=[\n",
" [\n",
" prices.last('1d')['High'].values[0],\n",
" prices.last('1d')['Low'].values[0],\n",
" prices.last('1d')['Volume'].values[0].round(),\n",
" prices[latest:]['High'].values[0],\n",
" prices[latest:]['Low'].values[0],\n",
" prices[latest:]['Volume'].values[0].round(),\n",
" ],\n",
" [\n",
" prices.asfreq('D').rolling(window=52*7, min_periods=1).max().last('1d')['High'].values[0],\n",
" prices.asfreq('D').rolling(window=52*7, min_periods=1).min().last('1d')['Low'].values[0],\n",
" prices.asfreq('D').rolling(window=52*7, min_periods=1).mean().last('1d')['Volume'].values[0].round(),\n",
" prices.asfreq('D').rolling(window=52*7, min_periods=1).max()[latest:]['High'].values[0],\n",
" prices.asfreq('D').rolling(window=52*7, min_periods=1).min()[latest:]['Low'].values[0],\n",
" prices.asfreq('D').rolling(window=52*7, min_periods=1).mean()[latest:]['Volume'].values[0].round(),\n",
" ]\n",
"]\n",
"\n",
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 1c88731

Please sign in to comment.