diff --git a/.gitignore b/.gitignore index 63ed8ea8d2b..85867164489 100644 --- a/.gitignore +++ b/.gitignore @@ -20,15 +20,11 @@ openbb_terminal/config_plot.py openbb_terminal/config_terminal.py openbb_terminal/feature_flags.py openbb_terminal/reports/stored/* -openbb_terminal/dashboards/.ipynb_checkpoints -openbb_terminal/custom_reports/*/.ipynb_checkpoints -openbb_terminal/reports/.ipynb_checkpoints -openbb_terminal/reports/widgets/.ipynb_checkpoints !openbb_terminal/reports/stored/.gitkeep !openbb_terminal/dashboards/*.ipynb !openbb_terminal/reports/*.ipynb openbb_terminal/portfolio/portfolios/* -.ipynb_checkpoints/* +**/.ipynb_checkpoints *.swp *.http bots/interactive/*.html @@ -40,6 +36,8 @@ bots/interactive/*.html dist/* build/terminal build/nsis/app +DMG/* +*.dmg # Jupyter Lab Extension build files jupyterlab/*/*.bundle.* diff --git a/LICENSE b/LICENSE index c3ddb31fb53..b366787995e 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2021 Didier Rodrigues Lopes +Copyright (c) 2021-2022 OpenBB Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/build/pyinstaller/build4mac.sh b/build/pyinstaller/build4mac.sh index bd841bad191..8159341362b 100755 --- a/build/pyinstaller/build4mac.sh +++ b/build/pyinstaller/build4mac.sh @@ -13,20 +13,48 @@ rm -rf openbb_terminal/logs pyinstaller build/pyinstaller/terminal.spec +# Assign icons to the built folder and launcher +osascript build/pyinstaller/setup_icons.applescript + # Create the folder that is used for packaging mkdir DMG # Copy relevant artifacts to the packaging folder cp -r build/pyinstaller/macOS_package_assets/* DMG/ -mv dist/OpenBBTerminal DMG/"$DISK_IMAGE_NAME"/OpenBB +mv dist/OpenBBTerminal DMG/"$DISK_IMAGE_NAME"/.OpenBB + +# Create a DMG with create-dmg +# +# NOTE: +# Code signing and notarization requires adding the following: +# +# --codesign "Common name of the Developer certificate" +# --format UDIF +# --notarize "Notarization identity " see: +# https://developer.apple.com/documentation/security/notarizing_macos_software_before_distribution/customizing_the_notarization_workflow + +if ! command -v create-dmg &> /dev/null +then + echo "create could not be found" + echo "install create-dmg from brew or github" + exit +fi + +create-dmg \ + --volname "OpenBB Terminal" \ + --volicon "images/dmg_volume.icns" \ + --background "images/openbb_dmg_background.png" \ + --icon "OpenBB Terminal" 190 250 \ + --window-pos 190 120 \ + --window-size 800 400 \ + --icon-size 100 \ + --text-size 14 \ + --app-drop-link 600 250 \ + --eula LICENSE \ + --format UDZO \ + --no-internet-enable \ + "OpenBB Terminal".dmg DMG -# Copy launcher and other artifacts to the DMG -hdiutil create \ - -volname "$DISK_IMAGE_NAME" \ - -srcfolder DMG \ - -ov \ - -format UDZO \ - "$DISK_IMAGE_NAME".dmg # Clean Up artifacts from this build rm -rf build/terminal && rm -rf dist && rm -rf DMG diff --git a/build/pyinstaller/macOS_package_assets/OpenBB Terminal/OpenBB Terminal b/build/pyinstaller/macOS_package_assets/OpenBB Terminal/OpenBB Terminal index 0a7ee1b600f..5503832bff9 100755 --- a/build/pyinstaller/macOS_package_assets/OpenBB Terminal/OpenBB Terminal +++ b/build/pyinstaller/macOS_package_assets/OpenBB Terminal/OpenBB Terminal @@ -3,7 +3,7 @@ clear SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" -xattr -r -d com.apple.quarantine "$SCRIPTDIR"/OpenBB +xattr -r -d com.apple.quarantine "$SCRIPTDIR"/.OpenBB echo " _ _ _ " echo " | | | (_) " @@ -19,4 +19,4 @@ The boot up process might take a while. Please be patient... " echo "$BOOTUP_MESSAGE" -"$SCRIPTDIR"/OpenBB/OpenBBTerminal +"$SCRIPTDIR"/.OpenBB/OpenBBTerminal diff --git a/build/pyinstaller/setup_icons.applescript b/build/pyinstaller/setup_icons.applescript new file mode 100644 index 00000000000..8bbce2b5471 --- /dev/null +++ b/build/pyinstaller/setup_icons.applescript @@ -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 folder icon relative to script location +set sourcePath to current_path & "../../images/openbb_folder_icon.icns" +set destPath to current_path & "macOS_package_assets/OpenBB Terminal" +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 Terminal launcher icon relative to script location +set sourcePath to current_path & "../../images/openbb.icns" +set destPath to current_path & "macOS_package_assets/OpenBB Terminal/OpenBB Terminal" +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) diff --git a/build/pyinstaller/terminal.spec b/build/pyinstaller/terminal.spec index acf568bd267..1b3ba0ed7a6 100644 --- a/build/pyinstaller/terminal.spec +++ b/build/pyinstaller/terminal.spec @@ -29,6 +29,7 @@ set_key(default_env_file, "OPENBB_LOGGING_COMMIT_HASH", str(commit_hash)) added_files = [ (os.path.join(os.getcwd(), "openbb_terminal"), "openbb_terminal"), (os.path.join(os.getcwd(), "routines"), "routines"), + (os.path.join(os.getcwd(), "portfolio"), "portfolio"), (os.path.join(os.getcwd(), "i18n"), "i18n"), (os.path.join(os.getcwd(), "styles"), "styles"), (os.path.join(pathex, "property_cached"), "property_cached"), diff --git a/images/dmg_volume.icns b/images/dmg_volume.icns new file mode 100644 index 00000000000..255d73c02aa Binary files /dev/null and b/images/dmg_volume.icns differ diff --git a/images/openbb_dmg_background.png b/images/openbb_dmg_background.png new file mode 100644 index 00000000000..12894a59ad5 Binary files /dev/null and b/images/openbb_dmg_background.png differ diff --git a/images/openbb_dmg_background@2x.png b/images/openbb_dmg_background@2x.png new file mode 100644 index 00000000000..ee38fefa1bf Binary files /dev/null and b/images/openbb_dmg_background@2x.png differ diff --git a/images/openbb_folder_icon.icns b/images/openbb_folder_icon.icns new file mode 100644 index 00000000000..cf4b7e36087 Binary files /dev/null and b/images/openbb_folder_icon.icns differ diff --git a/openbb_terminal/jupyter/reports/stored/20220404_092139_crypto_market.html b/openbb_terminal/jupyter/reports/stored/20220404_092139_crypto_market.html deleted file mode 100644 index 62fb3feafee..00000000000 --- a/openbb_terminal/jupyter/reports/stored/20220404_092139_crypto_market.html +++ /dev/null @@ -1,15253 +0,0 @@ - - - - - -20220404_092139_crypto_market - - - - - - - - - - - - - - - - - - - - -
- -
- -
- -
- -
- - - - -
- -
-
-
- - -
-
- -
- - - - -
- -
-
-
- - -
-
- -
- - - - -
- -
-
-
- - -
-
- -
- - - - -
- -
-
-
- - -
-
- -
- - - - -
- -
-
-
- - -
-
- -
- - - - -
- -
-
-
- - -
-
- -
- - - - -
- -
-
-
- - -
-
- -
- - - - -
- -
-
-
- - -
-
- -
- - - - -
- -
-
-
- - -
-
- -
- - - - -
- -
- -
- - - - - - - - - diff --git a/openbb_terminal/jupyter/reports/stored/20220404_100708_crypto_market.html b/openbb_terminal/jupyter/reports/stored/20220404_100708_crypto_market.html deleted file mode 100644 index 1c66d70ac3b..00000000000 --- a/openbb_terminal/jupyter/reports/stored/20220404_100708_crypto_market.html +++ /dev/null @@ -1,15220 +0,0 @@ - - - - - -20220404_100708_crypto_market - - - - - - - - - - - - - - - - - - - - -
- -
- -
- -
- -
- - - - -
- -
-
-
- - -
-
- -
- - - - -
- -
-
-
- - -
-
- -
- - - - -
- -
-
-
- - -
-
- -
- - - - -
- -
-
-
- - -
-
- -
- - - - -
- -
-
-
- - -
-
- -
- - - - -
- -
-
-
- - -
-
- -
- - - - -
- -
-
-
- - -
-
- -
- - - - -
- -
-
-
- - -
-
- -
- - - - -
- -
-
-
- - -
-
- -
- - - - -
- -
- -
- - - - - - - - - diff --git a/pyproject.toml b/pyproject.toml index 9c8912b5005..1a14c8c7f68 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ # https://python-poetry.org/docs/dependency-specification/ [tool.poetry] name = "OpenBBTerminal" -version = "1.4.0" +version = "1.5.0" description = "" authors = ["Didier Rodrigues Lopes"] packages = [ diff --git a/terminal.py b/terminal.py index a256a8ca07e..babc214e79c 100644 --- a/terminal.py +++ b/terminal.py @@ -309,7 +309,11 @@ class TerminalController(BaseController): if ns_parser_exe: if ns_parser_exe.path: if ns_parser_exe.path in self.ROUTINE_CHOICES: - path = f"routines/{ns_parser_exe.path}" + path = os.path.join( + os.path.abspath(os.path.dirname(__file__)), + "routines", + ns_parser_exe.path, + ) else: path = ns_parser_exe.path @@ -673,7 +677,7 @@ def main( return test_files = [] for path in paths: - if "openbb" in path: + if path.endswith(".openbb"): file = os.path.join(os.path.abspath(os.path.dirname(__file__)), path) test_files.append(file) else: @@ -695,9 +699,11 @@ def main( console.print("[green]OpenBB Terminal Integrated Tests:\n[/green]") for file in test_files: file = file.replace("//", "/") - file_name = file[file.rfind(REPO_DIR.name) :].replace( # noqa: E203 - "\\", "/" - ) + repo_path_position = file.rfind(REPO_DIR.name) + if repo_path_position >= 0: + file_name = file[repo_path_position:].replace("\\", "/") + else: + file_name = file console.print(f"{file_name} {((i/length)*100):.1f}%") try: if not os.path.isfile(file): @@ -711,9 +717,11 @@ def main( if fails: console.print("\n[red]Failures:[/red]\n") for key, value in fails.items(): - file_name = key[key.rfind(REPO_DIR.name) :].replace( # noqa: E203 - "\\", "/" - ) + repo_path_position = key.rfind(REPO_DIR.name) + if repo_path_position >= 0: + file_name = key[repo_path_position:].replace("\\", "/") + else: + file_name = key logger.error("%s: %s failed", file_name, value) console.print(f"{file_name}: {value}\n") console.print( diff --git a/website/content/_index.md b/website/content/_index.md index 31418270f9d..4466a5d9389 100644 --- a/website/content/_index.md +++ b/website/content/_index.md @@ -85,8 +85,8 @@ Navigate through 750+ terminal features using fast shortcuts and leverage auto-c ## Accessing the OpenBB Terminal -The OpenBB Terminal can be directly installed on your computer via our installation program. Within this section, you -are guided through the installation process and how to launch the program. If you are a developer, please have a +The OpenBB Terminal can be directly installed on your computer via our installation program. Within this section, you +are guided through the installation process and how to launch the program. If you are a developer, please have a look here. If you struggle with the installation process, please don't hesitate to reach us on Discord or visit our contact page. @@ -95,9 +95,8 @@ or visit our contact pagethe following link -2. Click on the `Latest` release and scroll down -3. Click on the `.exe` file, this downloads the installation program +1. Go to [the openbb.co website](https://www.openbb.co/products/terminal#get-started) +2. Click on the `Download` button in the Windown Installer section When the file is downloaded, use the following steps to run the OpenBB Terminal: @@ -122,7 +121,7 @@ Proceed by following the steps. Do note that if you wish to install the applicat **Step 3: Double-click on the application that appeared on your Desktop, you are now able to run the OpenBB Terminal** -The first time this takes a bit longer to load, this can take up to a few minutes. +The first time this takes a bit longer to load, this can take up to a few minutes.

run_the_terminal

@@ -132,42 +131,38 @@ The first time this takes a bit longer to load, this can take up to a few minute The process starts off by downloading the installer, see below for how to download the most recent release: -1. Go to the following link -2. Click on the `Latest` release and scroll down -3. Click on the `.dmg` file, this downloads the installation program +1. Go to [the openbb.co website](https://www.openbb.co/products/terminal#get-started) +2. Click on the `Download` button in the macOS Installer section -When the file is downloaded, use the following steps to run the OpenBB Terminal: +When the DMG file is downloaded, use the following steps to run the OpenBB Terminal: {{< columns >}} -**Step 1: Open the downloaded file and move the folder inside your `Applications` folder** +**Step 1: Open the downloaded `OpenBB Terminal.dmg` and copy `OpenBB Terminal` folder into your `Applications`** -Open the .dmg file that got downloaded to your "Downloads" folder and drag the folder into your "Applications" folder. +Open the `OpenBB Terminal.dmg` file that got saved to your "Downloads" folder and drag the "OpenBB Terminal" folder into "Applications" folder. A link to the `Applications` folder is presented on the screen. Note that this should take some time as it is extracting the files from the .dmg file. -You can find the `Applications` folder on the left side of the Finder application (`⌥ + ⌘ + SPACEBAR`). Alternatively, -search for the Finder with `⌘ + SPACEBAR`. - -

mac_os_installation

+

image

<---> -**Step 2: Open the folder and click on the `OpenBB Terminal` file, this should run the application.** +**Step 2: Open the `OpenBB Terminal` app in the folder that you have just copied to your `Applications`.** -You will most likely receive a message that macOS was not able to check whether the application contains malicious software. This is because the installer is still in beta phase, and the team has not yet requested verification from Apple. See below how to correct for this. +During first launch if you get a message saying that the application can't be launched, do the following: +Right-Click the app and select `Open`. You will see a message saying that macOS was not able to check whether the application contains malicious software. Click `Open` to proceed. -

malicious_software_warning

- -<---> - -**Step 3: Allow the application to be run by going into your settings** - -Go to `System Preferences > Security & Privacy > General`. You should see a message at the bottom that says that the file "was blocked from use because it is not from an identified developer". Click on `Allow anyway` or `Open anyway`. - -

warning_fix

+

image

{{< /columns >}} +**Troubleshooting: Allow the application to run by going into your settings** + +If you have trouble launching the app because of security settings and the "Right-click and Open" approach from Step 2 of this instructions doesn't work, go to `System Preferences > Security & Privacy > General`. You should see a message at the bottom that says that the file "was blocked from use because it is not from an identified developer". Click on `Allow anyway` or `Open anyway`. + +

image

+ + ## Structure of the OpenBB Terminal The OpenBB Terminal is based off the Command Line Interface (CLI) @@ -204,12 +199,12 @@ Commands, depicted in Light Blue, exec the commands that you are able to use from any menu in the terminal (see Explanation of Menus) are as follows: - `cls`: clears the screen, by executing this command you are left with an empty screen. -- `help`, `h` or `?`: displays the menu that you are currently on. +- `help`, `h` or `?`: displays the menu that you are currently on. - `quit`, `q` or `..`: allows for navigation through the menu. E.g. if you type `stocks` press `ENTER` (⏎) and then use `q` and press `ENTER` (⏎) you return to where you started. Validate this by typing `?` and pressing `ENTER` (⏎). - `support`: allows you to submit bugs, questions and suggestions. -Continuing with the example mentioned at `quit`, revisit the `stocks` menu and look at the commands. At the top you +Continuing with the example mentioned at `quit`, revisit the `stocks` menu and look at the commands. At the top you will see a command named load. To understand what this command can do, you can use `load -h` followed by `ENTER` (⏎). The `-h` stands for `help` and every command will have this feature. This will return the following: ``` @@ -261,8 +256,8 @@ Company: Amazon.com, Inc. └─────────┴────────┴──────────┴──────────┴──────────┴─────────────────┴──────────────────┴────────────┘ ``` -The default values you see within `load -h` have been inputted here. E.g. the starting period is 2019-05-15. I can -decide to change these default values by calling the argument and inputting a different value. Let's change the starting +The default values you see within `load -h` have been inputted here. E.g. the starting period is 2019-05-15. I can +decide to change these default values by calling the argument and inputting a different value. Let's change the starting and ending period of the data that is being loaded in by doing the following: ``` @@ -341,8 +336,8 @@ To figure out where you can obtain the API key, you can enter the command (e.g. There is a large collection of (sub) menus available. Here, the asset class and other menus are described. To find a detailed description and explanation of its usage for each menu, click on the corresponding link to visit the introduction page. The asset class menus are as follows: - -- Introduction to Stocks: access historical pricing data, options, sector and + +- Introduction to Stocks: access historical pricing data, options, sector and industry analysis, and overall due diligence. - Introduction to Crypto: dive into onchain data, tokenomics, circulation supply, nfts and more. @@ -354,8 +349,8 @@ pairs and Oanda integration. sector weights. The other menus are as follows: - -- Introduction to Economy: explore global macroeconomic data including + +- Introduction to Economy: explore global macroeconomic data including interest and inflation rates, GDP and its components, futures, yield curves and treasury rates. - Introduction to Alternative: explore alternative datasets such as COVID and open source metrics. @@ -374,7 +369,7 @@ pretty tables. ## Obtaining support and/or giving feedback -Being an open source platform that wishes to tailor to the needs of any type of investor, we highly encourage anyone +Being an open source platform that wishes to tailor to the needs of any type of investor, we highly encourage anyone to share with us their experience and/or how we can further improve the OpenBB Terminal. This can be anything from a very small bug to a new feature to the implementation of a highly advanced Machine Learning model. @@ -387,7 +382,7 @@ question) and message in the form although this can also be set directly from in Support Command Alternatively, you can contact us via the following routes: - + - If you notice that a feature is missing inside the terminal, please fill in the Request a Feature form. - If you wish to report a bug, have a question/suggestion or anything else, please fill in the Support form. - If you wish to speak to us directly, please contact us via Discord. @@ -407,4 +402,4 @@ Alternatively, you can contact us via the following routes: [license-shield]: https://img.shields.io/github/license/OpenBB-finance/OpenBBTerminal.svg?style=for-the-badge [license-url]: https://github.com/OpenBB-finance/OpenBBTerminal/blob/main/LICENSE [twitter-shield]: https://img.shields.io/twitter/follow/openbb_finance?style=for-the-badge&color=blue -[twitter-url]: https://twitter.com/openbb_finance \ No newline at end of file +[twitter-url]: https://twitter.com/openbb_finance