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

V2 #683

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open

V2 #683

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 8 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
# Pull base image
FROM jupyter/base-notebook:python-3.7.6
FROM jupyter/base-notebook:python-3.10

ENV NEXUS_USER ${NEXUS_USER}
ENV NEXUS_PASSWORD ${NEXUS_PASSWORD}
ENV FBN_SECRETS_PATH ${FBN_SECRETS_PATH}

RUN mkdir -p /tmp/working
COPY requirements.txt /tmp/working
COPY .packages/ /tmp/packages/

RUN pip install -r /tmp/working/requirements.txt

RUN pip install -r /tmp/working/requirements.txt \
&& pip install /tmp/packages/finbourne_sdk_utilities-2.0.0-py3-none-any.whl --force-reinstall \
&& pip install /tmp/packages/lusid-0.11.5415-py3-none-any.whl --force-reinstall \
&& pip install /tmp/packages/lusidtools-2.0.0-py3-none-any.whl --force-reinstall

# Set the theme
RUN jt -ofs 12 -t chesterish

EXPOSE 8888

# Start the Jupyter notebook
CMD ["jupyter", "notebook", "--port=8888", "--no-browser", "--ip=0.0.0.0"]
CMD ["jupyter", "notebook", "--port=8888", "--no-browser", "--ip=0.0.0.0"]
21 changes: 11 additions & 10 deletions demo/bitemporal-reconciliation/bitemporal.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"# These are the core lusid packages for interacting with the API via Python\n",
"import lusid\n",
"import lusid.models as models\n",
"from lusid.utilities import ApiClientFactory\n",
"import fbnsdkutilities.utilities as utils\n",
"from lusidtools.cocoon.utilities import create_scope_id\n",
"from lusidjam.refreshing_token import RefreshingToken\n",
"from lusidtools.pandas_utils.lusid_pandas import lusid_response_to_data_frame\n",
Expand All @@ -35,7 +35,8 @@
"secrets_path = os.getenv(\"FBN_SECRETS_PATH\")\n",
"\n",
"# Initiate an API Factory which is the client side object for interacting with LUSID APIs\n",
"api_factory = lusid.utilities.ApiClientFactory(\n",
"api_factory = utils.ApiClientFactory(\n",
" lusid,\n",
" token=RefreshingToken(),\n",
" api_secrets_filename = secrets_path,\n",
" app_name=\"LusidJupyterNotebook\")"
Expand Down Expand Up @@ -202,22 +203,22 @@
"</div>"
],
"text/plain": [
" portfolio_code portfolio_name portfolio_base_currency \\\n",
"0 EQUITY_FUND LUSID's top 10 FTSE stock portfolio GBP \n",
" portfolio_code portfolio_name portfolio_base_currency \n",
"0 EQUITY_FUND LUSID's top 10 FTSE stock portfolio GBP \\\n",
"1 EQUITY_FUND LUSID's top 10 FTSE stock portfolio GBP \n",
"2 EQUITY_FUND LUSID's top 10 FTSE stock portfolio GBP \n",
"3 EQUITY_FUND LUSID's top 10 FTSE stock portfolio GBP \n",
"4 EQUITY_FUND LUSID's top 10 FTSE stock portfolio GBP \n",
"\n",
" instrument_type instrument_id name txn_id txn_type txn_trade_date \\\n",
"0 equity EQ_1234 Aviva trd_0001 Buy 01/04/2020 \n",
" instrument_type instrument_id name txn_id txn_type txn_trade_date \n",
"0 equity EQ_1234 Aviva trd_0001 Buy 01/04/2020 \\\n",
"1 equity EQ_1236 Barclays trd_0002 Buy 01/04/2020 \n",
"2 equity EQ_1237 BP trd_0003 Buy 01/04/2020 \n",
"3 equity EQ_1237 BP trd_0004 Buy 01/04/2020 \n",
"4 cash GBP GBP Cash cash_001 FundsIn 01/04/2020 \n",
"\n",
" txn_settle_date txn_units txn_price txn_consideration currency \\\n",
"0 03/04/2020 10000 1 10000 GBP \n",
" txn_settle_date txn_units txn_price txn_consideration currency \n",
"0 03/04/2020 10000 1 10000 GBP \\\n",
"1 03/04/2020 10000 1 10000 GBP \n",
"2 03/04/2020 20000 1 20000 GBP \n",
"3 03/04/2020 10000 1 10000 GBP \n",
Expand Down Expand Up @@ -283,7 +284,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -297,7 +298,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.3"
"version": "3.10.10"
}
},
"nbformat": 4,
Expand Down