Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
529 commits
Select commit Hold shift + click to select a range
ab448fd
Update portfolio_view.py
tehcoderer Feb 6, 2023
a7642d4
Merge branch 'OpenBBTerminal-main' into feature/plots-backend
tehcoderer Feb 6, 2023
3b4a7af
Merge branch 'develop' into feature/plots-backend
tehcoderer Feb 7, 2023
8fe54f8
mypy 1.0 test
tehcoderer Feb 7, 2023
86b320b
Merge branch 'feature/plots-backend' of https://github.com/tehcoderer…
tehcoderer Feb 7, 2023
e9b8fb9
Update helpers.py
tehcoderer Feb 7, 2023
aa48f26
black
tehcoderer Feb 7, 2023
de0bfb7
ruff
tehcoderer Feb 7, 2023
c9f3230
Update thought_of_the_day.py
tehcoderer Feb 7, 2023
071a17a
isort
tehcoderer Feb 7, 2023
87820f0
Update portfolio_view.py
tehcoderer Feb 7, 2023
31dce9f
Update business_insider_view.py
tehcoderer Feb 7, 2023
e22d6d8
funds,bt,ca,fa view updates
tehcoderer Feb 7, 2023
0bff445
economy,etf,futures view updates
tehcoderer Feb 7, 2023
461a58e
Merge branch 'OpenBBTerminal-main' into feature/plots-backend
tehcoderer Feb 7, 2023
858f31d
econometrics regression
tehcoderer Feb 7, 2023
e359730
Merge branch 'develop' into feature/plots-backend
tehcoderer Feb 7, 2023
3ffbba3
mypy
tehcoderer Feb 7, 2023
bc0a9fd
Merge branch 'develop' into feature/plots-backend
tehcoderer Feb 8, 2023
3eca334
reports notebooks, PlotlyTA class adjustments, crypto finbrain view
tehcoderer Feb 8, 2023
c33c210
Merge branch 'feature/plots-backend' of https://github.com/tehcoderer…
tehcoderer Feb 8, 2023
462526c
Merge branch 'develop' into feature/plots-backend
tehcoderer Feb 8, 2023
3b2769c
crypto views updates
tehcoderer Feb 8, 2023
bd16b4d
Merge branch 'feature/plots-backend' of https://github.com/tehcoderer…
tehcoderer Feb 8, 2023
7f75728
Merge branch 'develop' into feature/plots-backend
tehcoderer Feb 8, 2023
d1d6fb0
Merge branch 'feature/plots-backend' of https://github.com/tehcoderer…
tehcoderer Feb 8, 2023
265266a
crypto views done?, ba, econometrics, funds, reports
tehcoderer Feb 8, 2023
11e3b74
update docstrings
tehcoderer Feb 8, 2023
b7e1bda
Update sec_view.py
tehcoderer Feb 8, 2023
dc475be
portfolio reports
tehcoderer Feb 8, 2023
b928afa
Update equity.ipynb
tehcoderer Feb 8, 2023
d1b5433
Merge branch 'OpenBBTerminal-main' into feature/plots-backend
tehcoderer Feb 8, 2023
3299bab
ruff
tehcoderer Feb 9, 2023
ef33738
mypy + equity reports
tehcoderer Feb 9, 2023
2231cb3
Update yahoo_finance_view.py
tehcoderer Feb 9, 2023
e611f5f
Update economy_controller.py
tehcoderer Feb 9, 2023
a3ab5a5
clean up returns
tehcoderer Feb 9, 2023
3f3c3fe
mypy
tehcoderer Feb 9, 2023
06ef9ef
finished dashboards/reports templates
tehcoderer Feb 9, 2023
516318d
update some tests
tehcoderer Feb 9, 2023
d2d4e41
Merge branch 'OpenBBTerminal-main' into feature/plots-backend
tehcoderer Feb 9, 2023
a92c36a
Update common.py
tehcoderer Feb 9, 2023
0a31d83
Update account_controller.py
tehcoderer Feb 9, 2023
8320c82
Update banner.txt
tehcoderer Feb 9, 2023
4747960
update tests
tehcoderer Feb 9, 2023
4905325
tests
tehcoderer Feb 9, 2023
74191f3
Update helpers_denomination.py
tehcoderer Feb 9, 2023
3786ad1
tests
tehcoderer Feb 9, 2023
ef8dd19
Merge branch 'OpenBBTerminal-main' into feature/plots-backend
tehcoderer Feb 9, 2023
7aaf2e7
tests
tehcoderer Feb 9, 2023
a54c955
Merge branch 'OpenBBTerminal-main' into feature/plots-backend
tehcoderer Feb 9, 2023
e4a23c0
Merge branch 'OpenBBTerminal-main' into feature/plots-backend
tehcoderer Feb 10, 2023
affe54b
Merge branch 'develop' into feature/plots-backend
tehcoderer Feb 10, 2023
fb696e6
finished tests, refactor add_histplot/add_corr_plot
tehcoderer Feb 10, 2023
c7a81c4
Merge branch 'feature/plots-backend' of https://github.com/tehcoderer…
tehcoderer Feb 10, 2023
42c218e
ruff
tehcoderer Feb 10, 2023
ee56d92
Update backend.py
tehcoderer Feb 10, 2023
319aa1b
mypy
tehcoderer Feb 10, 2023
b55233e
Merge branch 'develop' into feature/plots-backend
tehcoderer Feb 10, 2023
05ee3e0
Update backend.py
tehcoderer Feb 10, 2023
7330df0
pywry linux libs for tests
tehcoderer Feb 10, 2023
76113d8
Merge branch 'develop' into feature/plots-backend
tehcoderer Feb 10, 2023
1771253
pywry version bump
tehcoderer Feb 10, 2023
77e1190
Merge branch 'feature/plots-backend' of https://github.com/tehcoderer…
tehcoderer Feb 10, 2023
9b81129
Merge branch 'develop' into feature/plots-backend
tehcoderer Feb 10, 2023
2128542
Merge branch 'feature/plots-backend' of https://github.com/tehcoderer…
tehcoderer Feb 10, 2023
5fd571f
OpenBBFIgure import changes
tehcoderer Feb 11, 2023
8133554
Update business_insider_view.py
tehcoderer Feb 11, 2023
a105f2c
Update backend.py
tehcoderer Feb 11, 2023
0d223f5
tests
tehcoderer Feb 11, 2023
3bde2d3
bump pywry version
tehcoderer Feb 11, 2023
beced6d
forecast plot_explainability converted to plotly
tehcoderer Feb 12, 2023
7b1f4ea
Update helpers.py
tehcoderer Feb 12, 2023
73a28da
tests
tehcoderer Feb 12, 2023
c2809f2
Update helpers.py
tehcoderer Feb 12, 2023
dfbeacf
tests
tehcoderer Feb 12, 2023
5da70fc
Update helpers.py
tehcoderer Feb 12, 2023
af120ef
Update helpers.py
tehcoderer Feb 12, 2023
8419805
default plotly annotation `showarrow` to false
tehcoderer Feb 12, 2023
957d894
Update backend.py
tehcoderer Feb 12, 2023
c67dedf
fixes
tehcoderer Feb 13, 2023
577974d
Merge branch 'OpenBBTerminal-main' into feature/plots-backend
tehcoderer Feb 13, 2023
fc183c8
Update poetry.lock
tehcoderer Feb 13, 2023
742210e
Merge branch 'OpenBBTerminal-main' into feature/plots-backend
tehcoderer Feb 13, 2023
241a8c7
Merge branch 'develop' into feature/plots-backend
tehcoderer Feb 13, 2023
8b7e09e
docker
tehcoderer Feb 13, 2023
c2726a8
Update openbb.dockerfile
tehcoderer Feb 13, 2023
98ece54
Merge branch 'feature/plots-backend' of https://github.com/tehcoderer…
tehcoderer Feb 13, 2023
884356b
up
tehcoderer Feb 13, 2023
1e087f1
Merge branch 'develop' into feature/plots-backend
tehcoderer Feb 13, 2023
15a00e9
Update style.css
tehcoderer Feb 13, 2023
84b9f58
Merge branch 'feature/plots-backend' of https://github.com/tehcoderer…
tehcoderer Feb 13, 2023
c7bea38
bump pywry version
tehcoderer Feb 13, 2023
aab1c21
Update unit-test.yml
tehcoderer Feb 14, 2023
be4a2d9
Update unit-test.yml
tehcoderer Feb 14, 2023
8a8e42b
figure to image/pdf export
tehcoderer Feb 14, 2023
ec306d2
Merge branch 'OpenBBTerminal-main' into feature/plots-backend
tehcoderer Feb 14, 2023
f5e1f53
requirements txt files, pywry version bump
tehcoderer Feb 14, 2023
40893e8
Merge branch 'develop' into feature/plots-backend
tehcoderer Feb 14, 2023
e553811
mypy, pylint
tehcoderer Feb 14, 2023
5547657
cleanup
tehcoderer Feb 14, 2023
89d34d3
Update covid_view.py
tehcoderer Feb 14, 2023
7819e18
Update helper_funcs.py
tehcoderer Feb 14, 2023
bbd700e
Update backend.py
tehcoderer Feb 14, 2023
6cf92f0
updates
tehcoderer Feb 14, 2023
d430876
Update backend.py
tehcoderer Feb 14, 2023
0b2124f
Merge branch 'develop' into feature/plots-backend
tehcoderer Feb 14, 2023
892005c
Update backend.py
tehcoderer Feb 14, 2023
3383919
bump pywry version
tehcoderer Feb 15, 2023
89da50a
Merge branch 'develop' into feature/plots-backend
tehcoderer Feb 15, 2023
1830386
Merge branch 'OpenBBTerminal-main' into feature/plots-backend
tehcoderer Feb 15, 2023
778c337
Update poetry.lock
tehcoderer Feb 15, 2023
4699c98
Update trailmap.py
tehcoderer Feb 15, 2023
ad0d09b
Merge branch 'develop' into feature/plots-backend
tehcoderer Feb 15, 2023
5929188
update reports
tehcoderer Feb 16, 2023
bae1ff0
Update custom_indicators_plugin.py
tehcoderer Feb 16, 2023
893d676
Update momentum_plugin.py
tehcoderer Feb 16, 2023
42b4661
equity report
tehcoderer Feb 16, 2023
28b4b56
Merge branch 'OpenBBTerminal-main' into feature/plots-backend
tehcoderer Feb 16, 2023
6883cde
reqs files
tehcoderer Feb 16, 2023
0877f3b
Update fred_view.py
tehcoderer Feb 16, 2023
1f70a4b
ruff
tehcoderer Feb 16, 2023
e8cd27c
Update po_view.py
tehcoderer Feb 16, 2023
4bb3deb
bump pywry version
tehcoderer Feb 16, 2023
cacd5b3
reqs txt files
tehcoderer Feb 16, 2023
44cc7be
Merge branch 'OpenBBTerminal-main' into feature/plots-backend
tehcoderer Feb 17, 2023
aaef928
fix installer icons for mac
tehcoderer Feb 17, 2023
fc521bf
Merge branch 'OpenBBTerminal-main' into feature/plots-backend
tehcoderer Feb 17, 2023
5719c6a
test updated torch/darts/pyinstaller on mac
tehcoderer Feb 17, 2023
b3ace33
Update dashboards_controller.py
tehcoderer Feb 17, 2023
407ddce
Update terminal.py
tehcoderer Feb 17, 2023
7c155bd
Update terminal.spec
tehcoderer Feb 17, 2023
67f2375
Update terminal.spec
tehcoderer Feb 17, 2023
e3c7d5f
test
tehcoderer Feb 17, 2023
6b29a69
Update poetry.lock
tehcoderer Feb 17, 2023
b213d6d
Merge branch 'develop' into feature/plots-backend
tehcoderer Feb 18, 2023
e735e25
Report adjustments, improved dashboard subprocesses termination
tehcoderer Feb 18, 2023
c3dd0bf
pylint
tehcoderer Feb 18, 2023
29d8637
Update plotly_helper.py
tehcoderer Feb 18, 2023
afbfd34
Update plotly_helper.py
tehcoderer Feb 18, 2023
18b0ac0
pylint
tehcoderer Feb 18, 2023
1db1d81
revert darts
tehcoderer Feb 18, 2023
0afead3
test
tehcoderer Feb 18, 2023
705148d
test
tehcoderer Feb 18, 2023
1b56089
fix
tehcoderer Feb 18, 2023
9201f7e
improve shap scatter plot
tehcoderer Feb 19, 2023
22aedef
Update helpers.py
tehcoderer Feb 19, 2023
f62113d
Update helpers.py
tehcoderer Feb 19, 2023
8df3903
cleanup
tehcoderer Feb 19, 2023
3e772a5
Update runa_view.py
tehcoderer Feb 19, 2023
35bfd47
more cleanupp
tehcoderer Feb 19, 2023
b9979f2
fixes
tehcoderer Feb 20, 2023
1bc0a57
Merge branch 'OpenBB-finance:develop' into feature/plots-backend
tehcoderer Feb 20, 2023
0cc5841
update tests
tehcoderer Feb 20, 2023
d3fa3d7
Merge branch 'develop' into feature/plots-backend
tehcoderer Feb 20, 2023
5289584
Update intrinio_view.py
tehcoderer Feb 20, 2023
b3980d7
Update intrinio_view.py
tehcoderer Feb 20, 2023
b7086ac
Update intrinio_view.py
tehcoderer Feb 20, 2023
040fbe0
Merge branch 'OpenBBTerminal-main' into feature/plots-backend
tehcoderer Feb 20, 2023
4b42d36
reqs files, poetry lock
tehcoderer Feb 20, 2023
6b1c576
Update backend.py
tehcoderer Feb 20, 2023
68cbc07
test for new icon
tehcoderer Feb 20, 2023
67b4d37
Merge branch 'OpenBBTerminal-main' into feature/plots-backend
tehcoderer Feb 21, 2023
ee7d39c
Update fmp_view.py
tehcoderer Feb 21, 2023
b8ef118
updates
tehcoderer Feb 21, 2023
1d95357
Merge branch 'OpenBBTerminal-main' into feature/plots-backend
tehcoderer Feb 21, 2023
bc413db
Update plotly_helper.py
tehcoderer Feb 21, 2023
a0c9a59
Update businessinsider_view.py
tehcoderer Feb 21, 2023
67661e4
ruff
tehcoderer Feb 21, 2023
73ebd6d
pylint
tehcoderer Feb 21, 2023
9691b3b
fix previous merge
tehcoderer Feb 21, 2023
b204a3b
Update plotly_helper.py
tehcoderer Feb 21, 2023
9331d9f
update reqs files
tehcoderer Feb 21, 2023
bc6d9c7
Update directories.py
tehcoderer Feb 21, 2023
5cdc003
fix alt covid
tehcoderer Feb 21, 2023
614fa0c
Merge branch 'develop' into feature/plots-backend
tehcoderer Feb 21, 2023
4a53529
fix display_candle data is None load being unreachable, get covid vie…
tehcoderer Feb 21, 2023
0589e06
Update covid_view.py
tehcoderer Feb 21, 2023
c3c8ce0
refactor cleanup
tehcoderer Feb 21, 2023
c9eb530
plotly_ta adjustments
tehcoderer Feb 21, 2023
27ebf91
Merge branch 'develop' into feature/plots-backend
tehcoderer Feb 22, 2023
83419ff
Merge branch 'develop' into feature/plots-backend
tehcoderer Feb 22, 2023
08e7aa6
terminal wide ignore print_table if export
tehcoderer Feb 22, 2023
d48bc95
Merge branch 'feature/plots-backend' of https://github.com/tehcoderer…
tehcoderer Feb 22, 2023
ac92f9a
Update plotly_helper.py
tehcoderer Feb 22, 2023
1a7e724
forgot to save a few
tehcoderer Feb 22, 2023
1bca0d3
added edge case fallback if figures are in queue before backend fail
tehcoderer Feb 22, 2023
5e82886
Update ta_class.py
tehcoderer Feb 23, 2023
f4f67c3
Rename env variable name required to return plotly json
piiq Feb 23, 2023
f2d3f05
Resolve pydocstyle warnings
piiq Feb 23, 2023
fd47b2c
Resolve linting errors
piiq Feb 23, 2023
92e8d0a
revert forecasting/pyinstaller versions
tehcoderer Feb 23, 2023
42e7742
Merge branch 'feature/plots-backend' of https://github.com/tehcoderer…
tehcoderer Feb 23, 2023
87bcc13
Update terminal.spec
tehcoderer Feb 23, 2023
544a168
finished incoming fixedincome menu, improve get_ecb_yield_curve speed…
tehcoderer Feb 23, 2023
a55c60b
Merge branch 'OpenBBTerminal-main' into feature/plots-backend
tehcoderer Feb 23, 2023
6ab84fa
update deps
tehcoderer Feb 23, 2023
88c69e7
Update backend.py
tehcoderer Feb 23, 2023
b6a37c3
fix fred model/view from switch to DataFrame, improve ecb_model
tehcoderer Feb 23, 2023
db6163f
Update config_terminal.py
tehcoderer Feb 23, 2023
066a57d
Update backend.py
tehcoderer Feb 23, 2023
7d62b91
black
tehcoderer Feb 23, 2023
327ec98
clean up
tehcoderer Feb 23, 2023
0098c0f
Update fred_view.py
tehcoderer Feb 23, 2023
c94dc7e
Update ta_class.py
tehcoderer Feb 23, 2023
457e8ae
Update ta_class.py
tehcoderer Feb 23, 2023
7963ddd
Update plotly_helper.py
tehcoderer Feb 24, 2023
a3c7f07
sync fixedincome
tehcoderer Feb 24, 2023
624f5d3
Update ecb_model.py
tehcoderer Feb 24, 2023
b9452b5
convert excel to csv for faster processing
tehcoderer Feb 24, 2023
5371abc
cleanup
tehcoderer Feb 24, 2023
4b6e6a7
Merge branch 'OpenBBTerminal-main' into feature/plots-backend
tehcoderer Feb 24, 2023
ac539e0
remove excel files
tehcoderer Feb 24, 2023
b963774
Merge branch 'OpenBBTerminal-main' into feature/plots-backend
tehcoderer Feb 24, 2023
aa9110a
Update terminal_controller.py
tehcoderer Feb 24, 2023
11d5437
update tests
tehcoderer Feb 24, 2023
b628552
adjustments/missed figs in export_data
tehcoderer Feb 25, 2023
26f6dfe
Update cryptocurrency_helpers.py
tehcoderer Feb 25, 2023
d255f40
fixes
tehcoderer Feb 25, 2023
1514ba4
account for volume column with no volume when plotting indicators , i…
tehcoderer Feb 25, 2023
e2c082c
Update plotly_helper.py
tehcoderer Feb 25, 2023
45bce8b
Update etf_controller.py
tehcoderer Feb 25, 2023
0e9f06c
Update etf_controller.py
tehcoderer Feb 25, 2023
31c3b1b
margin arg for export_data func figures, some plot adjustments
tehcoderer Feb 26, 2023
38617ba
logic for numpy array for plotly helper `get_dateindex` function
tehcoderer Feb 26, 2023
23d5b69
cleanup
tehcoderer Feb 26, 2023
e649925
Merge branch 'develop' into feature/plots-backend
Chavithra Feb 26, 2023
7dc0764
update
tehcoderer Feb 27, 2023
5a68ae2
Merge branch 'feature/plots-backend' of https://github.com/tehcoderer…
tehcoderer Feb 27, 2023
3b83dec
Merge branch 'OpenBBTerminal-main' into feature/plots-backend
tehcoderer Feb 27, 2023
57b3b94
req file updates
tehcoderer Feb 27, 2023
03b56fc
views
tehcoderer Feb 27, 2023
f8e8fce
Merge branch 'develop' into feature/plots-backend
tehcoderer Feb 27, 2023
730dd7c
Update backend.py
tehcoderer Feb 27, 2023
cbcc948
Merge branch 'feature/plots-backend' of https://github.com/tehcoderer…
tehcoderer Feb 27, 2023
d80e8e9
update tests
tehcoderer Feb 27, 2023
d2f2364
Merge branch 'develop' into feature/plots-backend
tehcoderer Feb 27, 2023
20a8b6e
Update test_load_none[btc-usd].yaml
tehcoderer Feb 27, 2023
2f1a48b
Merge branch 'OpenBBTerminal-main' into feature/plots-backend
tehcoderer Feb 28, 2023
1e7c152
convert merged cpi chart
tehcoderer Feb 28, 2023
9e88562
linting
tehcoderer Feb 28, 2023
39f566d
Merge branch 'develop' into feature/plots-backend
tehcoderer Feb 28, 2023
c02e151
Merge branch 'OpenBBTerminal-main' into feature/plots-backend
tehcoderer Mar 1, 2023
89774aa
Merge branch 'OpenBBTerminal-main' into feature/plots-backend
tehcoderer Mar 1, 2023
ac02818
updates
tehcoderer Mar 2, 2023
4faa7a8
clean
tehcoderer Mar 2, 2023
f82cb79
tests
tehcoderer Mar 2, 2023
73bf626
Update openbb.dockerfile
tehcoderer Mar 2, 2023
ec558ee
remove test docker in root
tehcoderer Mar 2, 2023
9b1aa82
Update CONTRIBUTING.md
tehcoderer Mar 2, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
41 changes: 41 additions & 0 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,28 @@ jobs:
virtualenvs-create: true
virtualenvs-in-project: true

- name: Install nightly rust
run: curl --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain nightly

- name: Setup sudo apt installs for ubuntu-latest
run: |
sudo apt-get update
sudo apt-get install -y \
build-essential \
libgtk-3-dev \
libsoup-3.0-dev \
libssl-dev \
curl \
wget \
squashfs-tools \
gcc \
g++ \
make \
file \
librsvg2-dev \
libwebkit2gtk-4.1-dev \
libayatana-appindicator3-dev

- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v3
Expand Down Expand Up @@ -131,6 +153,25 @@ jobs:
virtualenvs-create: true
virtualenvs-in-project: true

- name: Setup sudo apt installs for ubuntu-latest
run: |
sudo apt-get update
sudo apt-get install -y \
build-essential \
libgtk-3-dev \
libsoup-3.0-dev \
libssl-dev \
curl \
wget \
squashfs-tools \
gcc \
g++ \
make \
file \
librsvg2-dev \
libwebkit2gtk-4.1-dev \
libayatana-appindicator3-dev

- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v3
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ website/functions
*_sdk_audit.csv
website/terminaltest
!build/docker/compose.env
openbb_terminal/core/plots/assets/plotly*.js
openbb_terminal/core/plots/plotly_temp.html
openbb_terminal/core/plots/table_temp.html
.dccache

# pyinstaller artifacts
Expand Down
20 changes: 10 additions & 10 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -761,16 +761,14 @@ def display_data(..., export: str = "", ...):
export_data(export, os.path.dirname(os.path.abspath(__file__)), "func", data)
```

List of external axes to include in a plot : `external_axes` *(Optional[List[plt.Axes]])*
Whether to display plot or return figure *(False: display, True: return)* : `external_axes` *(bool)*

```python
def display_data(..., external_axes: Optional[List[plt.Axes]] = None, ...):
def display_data(..., external_axes: bool = False, ...):
...
if external_axes is None:
_, ax = plt.subplots(figsize=plot_autoscale(), dpi=PLOT_DPI)
else:
ax = external_axes[0]
ax.plot(...)
fig = OpenBBFigure()
fig.add_scatter(...)
return fig.show(external=external_axes)
```

Field by which to sort : `sortby` *(str), e.g. "Volume"*
Expand Down Expand Up @@ -1218,7 +1216,8 @@ In the `_view.py` files it is common having at the end of each function `export_
export,
os.path.dirname(os.path.abspath(__file__)),
"contracts",
df_contracts
df_contracts,
figure=fig_contracts,
)
```

Expand All @@ -1227,12 +1226,13 @@ Let's go into each of these arguments:
- `export` corresponds to the type of file we are exporting.
- If the user doesn't has anything selected, then this function doesn't do anything.
- The user can export multiple files and even name the files.
- The allowed type of files `json,csv,xlsx` for raw data and `jpg,png,svg` for figures depends on the `export_allowed` variable defined in `parse_known_args_and_warn`.
- The allowed type of files `json,csv,xlsx` for raw data and `jpg,pdf,png,svg` for figures depends on the `export_allowed` variable defined in `parse_known_args_and_warn`.
- `os.path.dirname(os.path.abspath(__file__))` corresponds to the directory path
- This is important when `export folder` selected is the default because the data gets stored based on where it is called.
- If this is called from a `common` folder, we can use `os.path.dirname(os.path.abspath(__file__)).replace("common", "stocks")` insteaad
- `"contracts"` corresponds to the name of the exported file (+ unique datetime) if the user doesn't provide one
- `df_contracts` corresponds to the dataframe with data. Although we don't call this function with the figure reference, because it is open, we can use `plt.savefig` to achieve that.
- `df_contracts` corresponds to the dataframe with data.
- `figure=fig_contracts` corresponds to the figure to be exported as an image or pdf.

If `export_allowed=EXPORT_BOTH_RAW_DATA_AND_FIGURES` in `parse_known_args_and_warn`, valid examples are:

Expand Down
10 changes: 10 additions & 0 deletions build/docker/openbb.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ RUN apt-get -y install --no-install-recommends \
libxt6 \
libgl1-mesa-glx \
libpng16-16 \
libwebkit2gtk-4.0-dev \
build-essential \
libssl-dev \
libgtk-3-dev \
libayatana-appindicator3-dev \
librsvg2-dev \
ffmpeg \
python3-tk

Expand All @@ -38,8 +44,12 @@ WORKDIR /home/python
# SETUP POETRY IMAGE
FROM debian as poetry

RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain nightly

ENV PATH="/home/python/.cargo/bin:${PATH}"
ENV PATH="/home/python/.local/bin:${PATH}"

RUN /bin/bash -c "source $HOME/.cargo/env"
RUN pip install --upgrade pip wheel
RUN pip install poetry==1.3.2

Expand Down
2 changes: 2 additions & 0 deletions build/pyinstaller/build4mac.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ mkdir DMG
cp -r build/pyinstaller/macOS_package_assets/* DMG/
mv dist/OpenBBTerminal DMG/"$DISK_IMAGE_NAME"/.OpenBB

osascript build/pyinstaller/setup_icons_post.applescript

# Create a DMG with create-dmg
#
# NOTE:
Expand Down
20 changes: 20 additions & 0 deletions build/pyinstaller/setup_icons_post.applescript
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
use framework "Foundation"
use framework "AppKit"
use scripting additions

-- Get script location
tell application "Finder"
set current_path to POSIX path of (container of (path to me) as alias)
end tell

-- Set OpenBB Terminal launcher icon in folder relative to script location
set sourcePath to current_path & "../../images/openbb.icns"
set destPath to current_path & "../../DMG/OpenBB Terminal/.OpenBB/OpenBBTerminal"
set imageData to (current application's NSImage's alloc()'s initWithContentsOfFile:sourcePath)
(current application's NSWorkspace's sharedWorkspace()'s setIcon:imageData forFile:destPath options:2)

-- Set OpenBB OpenBBPlotsBackend icon relative to script location
set sourcePath to current_path & "../../images/openbb.icns"
set destPath to current_path & "../../DMG/OpenBB Terminal/.OpenBB/OpenBBPlotsBackend"
set imageData to (current application's NSImage's alloc()'s initWithContentsOfFile:sourcePath)
(current application's NSWorkspace's sharedWorkspace()'s setIcon:imageData forFile:destPath options:2)
72 changes: 67 additions & 5 deletions build/pyinstaller/terminal.spec
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# -*- mode: python ; coding: utf-8 -*-
# -*- mode: python ; coding: utf-8 -*- # noqa
import os
import shutil
import subprocess
import sys
from pathlib import Path
Expand Down Expand Up @@ -56,6 +57,10 @@ set_key(default_env_file, "OPENBB_LOGGING_COMMIT_HASH", str(commit_hash))
# Files that are explicitly pulled into the bundle
added_files = [
(os.path.join(os.getcwd(), "openbb_terminal"), "openbb_terminal"),
(
os.path.join(os.getcwd(), "openbb_terminal", "core", "plots"),
"openbb_terminal/core/plots",
),
(os.path.join(pathex, "property_cached"), "property_cached"),
(os.path.join(pathex, "user_agent"), "user_agent"),
(os.path.join(pathex, "vaderSentiment"), "vaderSentiment"),
Expand All @@ -77,7 +82,11 @@ added_files = [
(".env", "."),
(os.path.join(pathex, "blib2to3", "Grammar.txt"), "blib2to3"),
(os.path.join(pathex, "blib2to3", "PatternGrammar.txt"), "blib2to3"),
(shutil.which("voila"), "."),
(shutil.which("jupyter-lab"), "."),
(shutil.which("streamlit"), "."),
]

if is_win:
added_files.extend(
[
Expand Down Expand Up @@ -108,6 +117,7 @@ hidden_imports = [
"_sysconfigdata__darwin_darwin",
"prophet",
"debugpy",
"pywry.pywry",
"scipy.sparse.linalg._isolve._iterative",
"whisper",
"transformers",
Expand Down Expand Up @@ -138,6 +148,53 @@ analysis_kwargs = dict(
a = Analysis(**analysis_kwargs)
pyz = PYZ(a.pure, a.zipped_data, cipher=analysis_kwargs["cipher"])

# Executable icon
if is_win:
exe_icon = (os.path.join(os.getcwd(), "images", "openbb_icon.ico"),)
if is_darwin:
exe_icon = (os.path.join(os.getcwd(), "images", "openbb.icns"),)

block_cipher = None
# PyWry
pywry_a = Analysis(
[os.path.join(pathex, "pywry", "backend.py")],
pathex=[],
binaries=[],
datas=[],
hiddenimports=[],
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False,
)
pywry_pyz = PYZ(pywry_a.pure, pywry_a.zipped_data, cipher=block_cipher)


# PyWry EXE
pywry_exe = EXE(
pywry_pyz,
pywry_a.scripts,
[],
exclude_binaries=True,
name="OpenBBPlotsBackend",
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
upx_exclude=[],
console=True,
disable_windowed_traceback=False,
target_arch="x86_64",
codesign_identity=None,
entitlements_file=None,
icon=exe_icon,
)


exe_args = [
pyz,
a.scripts,
Expand All @@ -156,6 +213,7 @@ exe_kwargs = dict(
target_arch="x86_64",
codesign_identity=None,
entitlements_file=None,
icon=exe_icon,
)


Expand Down Expand Up @@ -189,12 +247,16 @@ if is_win:
text_color="white",
)
exe_args += [splash, splash.binaries]
exe_kwargs["icon"] = (os.path.join(os.getcwd(), "images", "openbb_icon.ico"),)

if is_darwin:
exe_kwargs["icon"] = (os.path.join(os.getcwd(), "images", "openbb.icns"),)

exe = EXE(*exe_args, **exe_kwargs)
pywry_collect_args = [
pywry_a.binaries,
pywry_a.zipfiles,
pywry_a.datas,
]

if build_type == "folder":
coll = COLLECT(*([exe] + collect_args), **collect_kwargs)
coll = COLLECT(
*([exe] + collect_args + [pywry_exe] + pywry_collect_args), **collect_kwargs
)
13 changes: 12 additions & 1 deletion openbb_terminal/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,13 @@
# flake8: noqa
from . import common, cryptocurrency, economy, etf, forex, portfolio, reports, stocks
from . import (
common,
cryptocurrency,
economy,
etf,
forex,
portfolio,
reports,
stocks,
fixedincome,
)
from .core.plots.plotly_helper import OpenBBFigure, plots_backend, theme, TerminalStyle
Loading