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

Create OpenBB Platform Installer with conda constructor #6587

Merged
merged 163 commits into from
Oct 16, 2024
Merged
Show file tree
Hide file tree
Changes from 162 commits
Commits
Show all changes
163 commits
Select commit Hold shift + click to select a range
aae8d34
add snowflake integration video (#6339)
montezdesousa Apr 24, 2024
3970eb0
[HotFix] Fix broken URLs in docs page. (#6368)
deeleeramone May 7, 2024
a0f08ab
[Release] 4.2.0 (#6422)
montezdesousa May 15, 2024
b04216d
Release/4.2.1 (#6456)
hjoaquim May 22, 2024
fac368e
[Docs] Guides for Metadata and AnnotatedResult (#6457)
deeleeramone May 23, 2024
cd04f30
[Docs] Redirect contributing URL (#6460)
montezdesousa May 23, 2024
cdf0bef
[Release] 4.2.2 (#6480)
montezdesousa Jun 5, 2024
a114896
[Docs] Fix Broken URLs (#6494)
deeleeramone Jun 12, 2024
b7088a2
[Docs] Excel docs update (#6504)
montezdesousa Jun 14, 2024
2392a8a
Release/4.2.3 (#6517)
hjoaquim Jun 19, 2024
0202079
fix: openapi bug (#6525)
montezdesousa Jun 20, 2024
7a46f5e
Merge branch 'main' into feature/merge-main-into-develop
montezdesousa Jun 20, 2024
4bbf29c
Update pyproject.toml
montezdesousa Jun 20, 2024
c4110f2
undo biztoc lock changes
montezdesousa Jun 20, 2024
7744b14
Merge branch 'develop' into feature/merge-main-into-develop
montezdesousa Jun 20, 2024
bd63951
Merge branch 'develop' into feature/conda-distribution
piiq Jul 4, 2024
06b5aa2
Merge branch 'develop' into feature/conda-distribution
piiq Jul 15, 2024
d3c3cf3
Add conda constructor code and assets
piiq Jul 15, 2024
5124dbd
Unpin setuptools in cli
piiq Jul 15, 2024
fb56a49
Exclude construct.yaml from linting
piiq Jul 15, 2024
3fa1cd6
Try fixing regex in gha yaml linting
piiq Jul 15, 2024
56b901b
Don't regex gitignore
piiq Jul 15, 2024
688730a
Revert "Try fixing regex in gha yaml linting"
piiq Jul 15, 2024
4bf4006
Update requirements to use pypi vs local packages
piiq Jul 15, 2024
0e815e3
Merge branch 'develop' into feature/conda-distribution
deeleeramone Jul 16, 2024
b150dec
Update constructor specs
piiq Jul 17, 2024
62221c1
Add pro backend to the bundle
piiq Jul 17, 2024
9df5063
Update post install scripts and assets
piiq Jul 17, 2024
5641184
Merge branch 'develop' into feature/conda-distribution
deeleeramone Jul 17, 2024
d91364a
Merge branch 'develop' into feature/conda-distribution
deeleeramone Jul 18, 2024
969da59
Merge branch 'develop' into feature/conda-distribution
piiq Jul 19, 2024
e758249
Merge branch 'develop' into feature/conda-distribution
deeleeramone Jul 21, 2024
8d107a2
Replace pinned dependencies management with the latest pypi versions
piiq Jul 23, 2024
1152c9d
Windows Edits
IgorWounds Jul 23, 2024
8f37803
Merge branch 'develop' into feature/conda-distribution
deeleeramone Jul 24, 2024
e040458
Merge branch 'develop' into feature/conda-distribution
deeleeramone Jul 24, 2024
700dec7
merge branch develop
deeleeramone Jul 30, 2024
d24c19e
Merge branch 'develop' of https://github.com/OpenBB-finance/OpenBBTer…
deeleeramone Jul 30, 2024
82b2a56
Merge branch 'develop' into feature/conda-distribution
deeleeramone Aug 1, 2024
cb3c649
Merge branch 'develop' into feature/conda-distribution
deeleeramone Aug 6, 2024
d95d3c8
Merge branch 'develop' into feature/conda-distribution
deeleeramone Aug 8, 2024
acbf1c9
Merge branch 'develop' into feature/conda-distribution
deeleeramone Aug 9, 2024
791e4ec
Merge branch 'develop' into feature/conda-distribution
deeleeramone Aug 19, 2024
900d3cb
[Feature] Conda Installer (#6604)
deeleeramone Aug 20, 2024
467fc66
Remove redundant environment files
piiq Aug 20, 2024
c6f9d8d
Fix markdown formatting
piiq Aug 20, 2024
7bd52d6
Attribute the installer metapackage to openbb
piiq Aug 20, 2024
db170c2
notebook launch dir
deeleeramone Aug 21, 2024
154e93a
Merge branch 'develop' into feature/conda-distribution
deeleeramone Aug 21, 2024
2546096
Merge branch 'develop' into feature/conda-distribution
deeleeramone Aug 23, 2024
fc800db
update widgets script for breaking changes and separate api entry poi…
deeleeramone Aug 24, 2024
8f9e604
codespell
deeleeramone Aug 24, 2024
93842b3
add integration directory to openbb_platform_api
deeleeramone Aug 24, 2024
044e389
add Bls to 'to_caps'
deeleeramone Aug 24, 2024
86217a2
linters
deeleeramone Aug 24, 2024
f0a3fde
linters and typos
deeleeramone Aug 24, 2024
5ebba92
grammar police
deeleeramone Aug 24, 2024
001dcea
grammar police
deeleeramone Aug 24, 2024
fddb4b3
more linting
deeleeramone Aug 24, 2024
e499c38
mypy
deeleeramone Aug 24, 2024
7293e2b
pylint
deeleeramone Aug 24, 2024
88a1483
some fixes
deeleeramone Aug 24, 2024
fc6b865
pylint
deeleeramone Aug 24, 2024
d71afd9
Merge branch 'develop' into feature/conda-distribution
piiq Aug 26, 2024
5527ae3
duplicate text in welcome
deeleeramone Aug 26, 2024
0ed595e
add python basics notebook to examples
deeleeramone Aug 26, 2024
a9bfd21
Merge branch 'develop' into feature/conda-distribution
IgorWounds Aug 28, 2024
c03cc22
Improve wording and formatting in readme and installer text files
piiq Aug 28, 2024
54c1164
Rename OpenBB API to OpenBB Platform API to differentiate from our ho…
piiq Aug 28, 2024
1e0824c
Merge branch 'develop' into feature/conda-distribution
piiq Aug 28, 2024
f15ed85
Merge branch 'develop' into feature/conda-distribution
piiq Aug 28, 2024
7343309
Merge branch 'develop' into feature/conda-distribution
deeleeramone Aug 28, 2024
a283c17
Merge branch 'feature/conda-distribution' of https://github.com/OpenB…
deeleeramone Aug 28, 2024
72fa7d0
user_settings bug
deeleeramone Aug 28, 2024
55fcf37
Merge branch 'develop' of https://github.com/OpenBB-finance/OpenBB in…
deeleeramone Aug 29, 2024
2582820
update multiSelect
deeleeramone Aug 29, 2024
56550c9
label stuff
deeleeramone Aug 29, 2024
3a63dac
update readme
deeleeramone Aug 30, 2024
c792111
Merge branch 'develop' into feature/conda-distribution
piiq Sep 5, 2024
56f3925
Rename platform api extension folder to exclude openbb. Update packag…
piiq Sep 5, 2024
ed5a3bd
Expose a distinct endpoint per provider for each command
piiq Sep 5, 2024
eb92d9b
Refactor module files to reduce cognitive load
piiq Sep 6, 2024
24ff660
Minor code style improvement
piiq Sep 6, 2024
1aef150
Add package unit tests
piiq Sep 6, 2024
594a7a8
Update the constructor file after platform api wrapper refactoring
piiq Sep 9, 2024
62b4396
Merge branch 'develop' into feature/conda-distribution
deeleeramone Sep 10, 2024
131a536
Add support for get only routers
piiq Sep 11, 2024
bcb58df
Flatten out the logic of the main function
piiq Sep 11, 2024
ec6aa0a
Refactor package structure
piiq Sep 11, 2024
b65688b
Merge branch 'feature/conda-distribution' of https://github.com/OpenB…
deeleeramone Sep 11, 2024
e20f013
Update schema parsing and widget generation
piiq Sep 13, 2024
de8ed61
Return a lost function
piiq Sep 13, 2024
f64af83
Fix handling of parameters with optional boolean types
piiq Sep 16, 2024
21c22c2
Update tests
piiq Sep 16, 2024
f216f50
Remove unused string constants
piiq Sep 16, 2024
ae464a3
Merge pull request #6656 from OpenBB-finance/feature/endpoint-per-pro…
deeleeramone Sep 16, 2024
075ac3b
Merge branch 'develop' into feature/conda-distribution
deeleeramone Sep 16, 2024
8563913
Merge branch 'develop' into feature/conda-distribution
deeleeramone Sep 17, 2024
ae13293
exclude envs and pkgs folders from condarc
deeleeramone Sep 19, 2024
01d918e
Refactor Widgets Builder For columnsDefs (#6675)
deeleeramone Sep 19, 2024
21320cc
Merge branch 'develop' into feature/conda-distribution
deeleeramone Sep 19, 2024
89ce22e
fix some tests
deeleeramone Sep 19, 2024
2460e8a
Merge branch 'feature/conda-distribution' of https://github.com/OpenB…
deeleeramone Sep 19, 2024
38c0578
fix key error in test
deeleeramone Sep 19, 2024
e19226a
try fixing it another way
deeleeramone Sep 19, 2024
29f7874
Merge branch 'develop' into feature/conda-distribution
deeleeramone Sep 20, 2024
9e8c008
Merge branch 'develop' into feature/conda-distribution
deeleeramone Sep 24, 2024
c9be2b3
Merge branch 'develop' into feature/conda-distribution
deeleeramone Sep 30, 2024
d8a9798
Merge branch 'develop' of https://github.com/OpenBB-finance/OpenBB in…
deeleeramone Sep 30, 2024
e8afbec
fix column defs edge case
deeleeramone Oct 1, 2024
8c03778
Merge branch 'develop' of https://github.com/OpenBB-finance/OpenBB in…
deeleeramone Oct 1, 2024
907448f
Add implementation of widget filtering based on local json configurat…
piiq Oct 2, 2024
fd84801
Get openbb-platform-api from pypi versus local copy
piiq Oct 2, 2024
d681f5f
Fix tests
piiq Oct 2, 2024
5c1bd43
Bring back the macos build action
piiq Oct 2, 2024
09d52c2
Hack GHA to run the workflow right now
piiq Oct 2, 2024
8e0d2cc
Fix typo and revert run on push
piiq Oct 2, 2024
e62063a
Try build on push again
piiq Oct 2, 2024
2603a83
Specify minimum python and constructor versions
piiq Oct 2, 2024
58ab56a
Specify the constructor version
piiq Oct 2, 2024
49a6d69
Don't just use tar bz
piiq Oct 2, 2024
d77323e
Add missing packages to constructor dependencies
piiq Oct 2, 2024
f4673ac
Revert using only tar-bz
piiq Oct 2, 2024
5d7778f
Add entitlements for code signing
piiq Oct 2, 2024
d5f5e55
Try signing the pkg using constructors native tools
piiq Oct 2, 2024
6a3f3b5
Use codesigning identity name instead of ID
piiq Oct 2, 2024
a913efc
Get creds for James to debug
piiq Oct 2, 2024
4a597a0
platform api readme
deeleeramone Oct 2, 2024
5d7451c
Merge branch 'feature/conda-distribution' of https://github.com/OpenB…
deeleeramone Oct 2, 2024
7ebcf59
Add installer identity name
piiq Oct 2, 2024
7a00499
Merge remote-tracking branch 'upstream/feature/conda-distribution' in…
piiq Oct 2, 2024
85dc9ef
Fix typo in action file
piiq Oct 2, 2024
09f7982
codespell
deeleeramone Oct 2, 2024
a066d42
Merge branch 'feature/conda-distribution' of https://github.com/OpenB…
deeleeramone Oct 2, 2024
082ad53
Try signing _conda with application codesign id
piiq Oct 2, 2024
540d9a2
Merge remote-tracking branch 'upstream/feature/conda-distribution' in…
piiq Oct 2, 2024
02c2f3f
Separate signing and deep signing into 2 steps
piiq Oct 2, 2024
4138e78
Comment out the Intel build action
piiq Oct 2, 2024
0c12ab4
Change --options to -o and add verbosity
piiq Oct 2, 2024
8e97257
Add notarization identity name to construct
piiq Oct 2, 2024
e457e0a
Try using hash vs name for notarization
piiq Oct 2, 2024
a3fc666
Clean up
piiq Oct 2, 2024
c39ec66
Add Intel build
piiq Oct 2, 2024
a707574
Run build scripts only on dispatch
piiq Oct 2, 2024
6a03c82
Test if shorter widget name is working on pro
piiq Oct 4, 2024
08380aa
Merge branch 'develop' into feature/conda-distribution
deeleeramone Oct 4, 2024
ac5fd9b
Update tests
piiq Oct 4, 2024
8ab44c7
some updates
deeleeramone Oct 4, 2024
638e83b
Merge pull request #6738 from OpenBB-finance/patch/test-if-shorter-na…
deeleeramone Oct 4, 2024
9bbdb7e
patch openbb-platform-api
deeleeramone Oct 4, 2024
1f20540
clean up empty_model
deeleeramone Oct 4, 2024
30872a9
update url in root response message
deeleeramone Oct 4, 2024
bd643f7
silly one to build
andrewkenreich Oct 5, 2024
705ba4f
make it start
andrewkenreich Oct 5, 2024
8add648
make it not start :D
andrewkenreich Oct 5, 2024
51bf465
update 1 README detail
deeleeramone Oct 7, 2024
ea81298
Merge branch 'develop' into feature/conda-distribution
deeleeramone Oct 7, 2024
7b14a0e
Merge branch 'develop' into feature/conda-distribution
deeleeramone Oct 13, 2024
79f4a0c
fix boolean parsing from command line and turn off uvicorn colors for…
deeleeramone Oct 13, 2024
1d4763f
linting
deeleeramone Oct 14, 2024
9dbc003
codespell
deeleeramone Oct 14, 2024
eddfe76
lazy formatting in logger
deeleeramone Oct 14, 2024
d97202f
'%s'
deeleeramone Oct 14, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .codespell.skip
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
./tests
.git
*.bat
*.css
*.csv
*.html
Expand All @@ -8,6 +9,7 @@
*.js
*.json
*.lock
*.nsi
*.scss
*.txt
*.yaml
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ It consists of two jobs: `code-linting` and `markdown-link-check`.
The first job, `code-linting`, runs on an Ubuntu machine and performs several linting tasks on the code in the repository, including:

- Checking out the code from the repository
- Setting up Python 3.9
- Setting up Python 3.10
- Installing a number of Python packages necessary for the linting tasks
- Running `bandit` to check for security vulnerabilities
- Running `black` to check the code formatting
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/general-linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,6 @@ jobs:
- name: json-yaml-validate
id: json-yaml-validate
uses: GrantBirki/[email protected]
with:
yaml_exclude_regex: "construct.yaml"
use_gitignore: false
218 changes: 218 additions & 0 deletions .github/workflows/macos-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,218 @@
name: MacOS Build

env:
OPENBB_LOG_COLLECT: false
OPENBB_USE_PROMPT_TOOLKIT: false
OPENBB_FILE_OVERWRITE: true
PIP_DEFAULT_TIMEOUT: 100
PYTHONNOUSERSITE: 1

on: workflow_dispatch

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
M1-MacOs-Build:
name: M1 MacOS Build
runs-on: [self-hosted, macos, ARM64]
steps:
# Checkout repository main branch. this allows for the commit hashes to line up
- name: Checkout
uses: actions/checkout@v3
- name: Git Log
run: git log
# The following commands to clear previous PATHS and restore to defaults since we have to maintain the instance ourselves
- name: Clean Previous Path
run: |
export PATH=""
export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
echo $PATH
# Set up caching for conda env so that the workflow runs quickly after the first time
- name: Setup Conda Caching
uses: actions/cache@v3
with:
path: ~/conda_pkgs_dir
key: conda-macos-3-10-${{ hashFiles('build/conda/environments/constructor.yml') }}
# Set up miniconda using the environment yaml file within the repo
- name: Setup Miniconda
uses: conda-incubator/[email protected]
with:
miniconda-version: "latest"
auto-update-conda: true
channels: conda-forge,defaults
show-channel-urls: true
channel-priority: flexible
environment-file: build/conda/environments/constructor.yml
activate-environment: constructor
auto-activate-base: false

- name: Creating Application Keychain
env:
MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
MACOS_CERTIFICATE_PWD: ${{ secrets.MACOS_CERTIFICATE_PWD }}
MACOS_KEYCHAIN_PWD: ${{ secrets.MACOS_KEYCHAIN_PWD }}
MACOS_CODESIGN_IDENTITY: ${{ secrets.MACOS_CODESIGN_IDENTITY }}
run:
| # when pushing to main, make to generate new cert, and utilize secrets to store new password, and identity
echo "Ensuring Keychain with same name does not exist"
rm -rf /Users/openbb/Library/Keychains/build.keychain-db
echo "Decoding certificate"
echo $MACOS_CERTIFICATE | base64 --decode > certificate.p12
echo "Creating Keychain"
security create-keychain -p $MACOS_KEYCHAIN_PWD build.keychain
echo "Setting Default Keychain"
security default-keychain -s build.keychain
echo "Unlocking Keychain"
security unlock-keychain -p $MACOS_KEYCHAIN_PWD build.keychain
echo "Importing Keychain"
security import certificate.p12 -k build.keychain -P $MACOS_CERTIFICATE_PWD -T /usr/bin/codesign
echo "Setting Partition List"
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k $MACOS_KEYCHAIN_PWD build.keychain

- name: Create Signed Package
env:
MACOS_INSTALLER_KEYCHAIN_PWD: ${{ secrets.MACOS_INSTALLER_KEYCHAIN_PWD }}
MACOS_INSTALLER_SIGNING_IDENTITY_NAME: ${{ secrets.MACOS_CODESIGN_INSTALLER_IDENTITY_NAME }}
MACOS_APPLICATION_SIGNING_IDENTITY: ${{ secrets.MACOS_CODESIGN_IDENTITY }}
run: |
security unlock-keychain -p $MACOS_INSTALLER_KEYCHAIN_PWD install.keychain
echo "signing_identity_name: $MACOS_INSTALLER_SIGNING_IDENTITY_NAME" >> build/conda/installer/construct.yaml
echo "notarization_identity_name: $MACOS_APPLICATION_SIGNING_IDENTITY" >> build/conda/installer/construct.yaml
cd build/conda && constructor installer/. && cd ../../
mv build/conda/OpenBB-Platform-MacOSX-arm64.pkg OpenBB-Platform-MacOSX-arm64.pkg
shell: bash -l {0}

- name: Deleting Previous Keychain
run: |
echo "Deleting Previous Keychain to Clean Instance"
rm -rf /Users/openbb/Library/Keychains/build.keychain-db

- name: Clean up Build Artifacts
run: |
rm -rf build/conda/tmp

- name: Notarize DMG
env:
NOTARIZE_APPLE_ID: ${{ secrets.NOTARIZE_APPLE_ID }}
NOTARIZE_APPLE_PWD: ${{ secrets.NOTARIZE_APPLE_PWD }}
NOTARIZE_APPLE_TEAM_ID: ${{ secrets.NOTARIZE_APPLE_TEAM_ID }}
run: |
xcrun notarytool submit OpenBB-Platform-MacOSX-arm64.pkg --apple-id "$NOTARIZE_APPLE_ID" --password "$NOTARIZE_APPLE_PWD" --team-id "$NOTARIZE_APPLE_TEAM_ID" --wait

- name: Staple
run: |
xcrun stapler staple OpenBB-Platform-MacOSX-arm64.pkg

- name: Save Build Artifact PKG
uses: actions/upload-artifact@v3
with:
name: OpenBBM1.pkg
path: OpenBB-Platform-MacOSX-arm64.pkg

- name: Clean up Build Artifacts
run: |
rm OpenBB-Platform-MacOSX-arm64.pkg

# Job to build the MacOS Intel version of the Terminal===================================
Intel-MacOs-Build:
name: Intel MacOS Build
runs-on: [self-hosted, macos, x64]
steps:
# Checkout repository main branch. this allows for the commit hashes to line up
- name: Checkout
uses: actions/checkout@v3
- name: Git Log
run: git log
# The following commands to clear previous PATHS and restore to defaults since we have to maintain the instance ourselves
- name: Clean Previous Path
run: |
export PATH=""
export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
echo $PATH
# Set up caching for conda env so that the workflow runs quickly after the first time
- name: Setup Conda Caching
uses: actions/cache@v3
with:
path: ~/conda_pkgs_dir
key: conda-macos-3-10-${{ hashFiles('build/conda/environments/constructor.yml') }}
# Set up miniconda using the environment yaml file within the repo
- name: Setup Miniconda
uses: conda-incubator/[email protected]
with:
miniconda-version: "latest"
auto-update-conda: true
channels: conda-forge,defaults
show-channel-urls: true
channel-priority: flexible
environment-file: build/conda/environments/constructor.yml
activate-environment: constructor
auto-activate-base: false

- name: Creating Application Keychain
env:
MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
MACOS_CERTIFICATE_PWD: ${{ secrets.MACOS_CERTIFICATE_PWD }}
MACOS_KEYCHAIN_PWD: ${{ secrets.MACOS_KEYCHAIN_PWD }}
MACOS_CODESIGN_IDENTITY: ${{ secrets.MACOS_CODESIGN_IDENTITY }}
run:
| # when pushing to main, make to generate new cert, and utilize secrets to store new password, and identity
echo "Ensuring Keychain with same name does not exist"
rm -rf /Users/openbb/Library/Keychains/build.keychain-db
echo "Decoding certificate"
echo $MACOS_CERTIFICATE | base64 --decode > certificate.p12
echo "Creating Keychain"
security create-keychain -p $MACOS_KEYCHAIN_PWD build.keychain
echo "Setting Default Keychain"
security default-keychain -s build.keychain
echo "Unlocking Keychain"
security unlock-keychain -p $MACOS_KEYCHAIN_PWD build.keychain
echo "Importing Keychain"
security import certificate.p12 -k build.keychain -P $MACOS_CERTIFICATE_PWD -T /usr/bin/codesign
echo "Setting Partition List"
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k $MACOS_KEYCHAIN_PWD build.keychain

- name: Create Signed Package
env:
MACOS_INSTALLER_KEYCHAIN_PWD: ${{ secrets.MACOS_INSTALLER_KEYCHAIN_PWD }}
MACOS_INSTALLER_SIGNING_IDENTITY_NAME: ${{ secrets.MACOS_CODESIGN_INSTALLER_IDENTITY_NAME }}
MACOS_APPLICATION_SIGNING_IDENTITY: ${{ secrets.MACOS_CODESIGN_IDENTITY }}
run: |
security unlock-keychain -p $MACOS_INSTALLER_KEYCHAIN_PWD install.keychain
echo "signing_identity_name: $MACOS_INSTALLER_SIGNING_IDENTITY_NAME" >> build/conda/installer/construct.yaml
echo "notarization_identity_name: $MACOS_APPLICATION_SIGNING_IDENTITY" >> build/conda/installer/construct.yaml
cd build/conda && constructor installer/. && cd ../../
mv build/conda/OpenBB-Platform-MacOSX-x86_64.pkg OpenBB-Platform-MacOSX-x86_64.pkg
shell: bash -l {0}

- name: Deleting Previous Keychain
run: |
echo "Deleting Previous Keychain to Clean Instance"
rm -rf /Users/openbb/Library/Keychains/build.keychain-db

- name: Clean up Build Artifacts
run: |
rm -rf build/conda/tmp

- name: Notarize DMG
env:
NOTARIZE_APPLE_ID: ${{ secrets.NOTARIZE_APPLE_ID }}
NOTARIZE_APPLE_PWD: ${{ secrets.NOTARIZE_APPLE_PWD }}
NOTARIZE_APPLE_TEAM_ID: ${{ secrets.NOTARIZE_APPLE_TEAM_ID }}
run: |
xcrun notarytool submit OpenBB-Platform-MacOSX-x86_64.pkg --apple-id "$NOTARIZE_APPLE_ID" --password "$NOTARIZE_APPLE_PWD" --team-id "$NOTARIZE_APPLE_TEAM_ID" --wait

- name: Staple
run: |
xcrun stapler staple OpenBB-Platform-MacOSX-x86_64.pkg

- name: Save Build Artifact PKG
uses: actions/upload-artifact@v3
with:
name: OpenBBIntel.pkg
path: OpenBB-Platform-MacOSX-x86_64.pkg

- name: Clean up Build Artifacts
run: |
rm OpenBB-Platform-MacOSX-x86_64.pkg
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,9 @@ openbb_platform/openbb/package/*

# Dev Container env
obb/*

# OpenBB Distribution
!build/conda/installer/*.sh
*.pkg
*.exe
build/conda/tmp
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ repos:
rev: v4.4.0
hooks:
- id: check-yaml
exclude: 'construct.yaml'
- id: end-of-file-fixer
exclude_types: [css, markdown, text, svg]
- id: trailing-whitespace
Expand Down
38 changes: 38 additions & 0 deletions build/conda/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# OpenBB Platform Installer

The code in this folder creates a packaged installer for the OpenBB Platform, using Conda Constructor.

The installers can be created for Windows (.exe), MacOS (.pkg).

The installer is distributed with a Conda environment that contains Python and package management tools.

The dependencies required to run the application are installed from PyPI by the constructor's post_install script. They are installed by poetry and are defined in the `installer/assets/openbb_platform_installer/pyproject.toml` file.

The version of Python is defined in the `construct.yaml` file. It is set for 3.12.

## Build Instructions

**In order to build the installer, conda should be already installed and initialized your current shell profile.**

Navigate into the `build/conda` folder and then begin.

1. Create the Conda environment.
- `conda env create --file environments/constructor.yml`
2. Activate the environment.
- `conda activate constructor`
3. Build the installer.
- `constructor installer/.`

## For when we have a full NSIS

To check nsis file - run

```batch
miniconda3\envs\constructor\NSIS\makensis.exe /V2 assets\installer.nsi
```

gives better output for errors

```batch
miniconda3\envs\constructor\NSIS\makensis.exe /V4 assets\installer.nsi
```
10 changes: 10 additions & 0 deletions build/conda/environments/constructor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: constructor
channels:
- conda-forge
- defaults
dependencies:
- conda-build
- constructor>=3.9.3
- six
- urllib3
- requests
Loading
Loading