Synthesized SDK
Project description
Downloading (for customers without access to this repo)
The SDK wheels can be downloaded from the publically available google cloud storage link: https://storage.googleapis.com/synthesized_sdk_builds/latest/synthesized-wheels.7z.
Using the provided password, the 7-Zip archive can be decrypted using p7zip
.
$ 7z x synthesized-wheels.7z -p'<ZIP_PASSWORD>'
Installation / Usage
macOS
0. Make sure you have brew installed.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
1. Download external python requirements.
Make sure latest command line tools are installed: 'xcode-select --install'/Software Update.
openssl
sqlite3
zlib
are required but already supplied by mac os. You can also install them if you are unsure.
brew update
brew install openssl readline sqlite3 xz bzip2
The following needs to be added into your shell profile:
# ~/.zprofile
export PATH="/usr/local/opt/llvm/bin:$PATH"
export LDFLAGS="-L/usr/local/opt/llvm/lib -L/usr/local/opt/zlib/lib -L/usr/local/opt/bzip2/lib"
export CPPFLAGS="-I/usr/local/opt/llvm/include -I/usr/local/opt/zlib/include -I/usr/local/opt/bzip2/include"
export PKG_CONFIG_PATH="/usr/local/opt/zlib/lib/pkgconfig"
Restart your terminal at this stage.
2. Install pyenv.
You may need to replace .zprofile
/.zshrc
with .profile
/.bashrc
if you don't use zshell.
brew install pyenv
echo 'eval "$(pyenv init --path)"' >> ~/.zprofile
echo 'eval "$(pyenv init -)"' >> ~/.zshrc
Restart your terminal again.
3. Install Python
Use the latest python 3.7, 3.8 or 3.9 if possible.
pyenv install 3.9.12
pyenv global 3.9.12
4. Clone the repo:
It's convienient to clone the repo to your home directory as done below.
cd ~
git clone git@github.com:synthesized-io/synthesized-sdk
cd synthesized-sdk
5. Create a virtual environment
Check your architecture! If your laptop has an intel CPU you will likely be using x86_64 architecture. If your laptop has a Mac M1 chip you will likely be on arm64 architecture.
For x86_64 architecture ONLY
python -m venv py39
source py39/bin/activate
For macOS arm64 architecture ONLY
Download and install openblas
and hdf5
using brew
.
brew install openblas hdf5
Update the following environment variables.
# ~/.zshrc
export HDF5_DIR="$(brew --prefix hdf5)"
export OPENBLAS="$(brew --prefix openblas)"
Create a virtual environment.
python -m venv py39
source py39/bin/activate
6. Install requirements
Dont forget to update pip!
pip install -U pip setuptools wheel
pip install -e ".[dev,test]"
7. Final bits!
Ask a team member how to get a synthesized key.
Set your SYNTHESIZED_KEY
.
mkdir -p ~/.synthesized
echo "ABC********" > ~/.synthesized/key
Configure git hooks:
pre-commit install
If you want to use jupyter this will create the correct "kernel" in the notebook:
pip install jupyter
ipython kernel install --name "synth" --user
8. Run tests.
Just to make sure everything is working you can run:
synth-validate
Building Synthesized
Synthesized can be built by tagging a commit or running the GH action build-wheels
locally with act
. When locally run, the wheels are saved to the path: {synthesized_repo_path}/wheelhouse/synthesized-*.whl
.
Installing act
You must install Docker Desktop and nektos/act
$ brew install docker --cask
$ brew install act
Before running them, you will need to add any missing secrets to a file called .secrets
in your local repo.
eg.
$ echo SYNTHESIZED_KEY=$(cat ~/.synthesized/key) >> .secrets
act
also has a root config file which should be configured to use the docker image that closely resembles github's default containers.
$ echo '-P ubuntu-latest=nektos/act-environments-ubuntu:18.04' >> ~/.actrc
The synthesized wheels can then be built with the command below.
$ act -bj build-wheels
Building Docs
To build the docs you need to install the docs dependencies - note these only work for Python 3.8+:
$ pip install ".[docs]"
Then cd into the docs directory, set the DOCS_VERSION and DOCS_ROOT environment variables, and run the make html command:
$ cd docs
$ export 'DOCS_VERSION='$(echo $(git rev-parse HEAD | cut -c 1-8))
$ export 'DOCS_ROOT='$(pwd)'/_build'
$ make html
The docs should be placed in synthesized-sdk/docs/_build/html
.
Contributing
Please follow the link to read about contributing guidlines.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Hashes for synthesized-2.1rc0-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 684fbad7b465ff578bf3670ba6c95a3a6767168f2319be5a0e6d48ae3868e05a |
|
MD5 | a9f618f843fe0649008c4b06a1f41a8d |
|
BLAKE2b-256 | 3977aaaa204f61d2e4308c83221e1f1909afc2aea734b0987618ab59032be91e |
Hashes for synthesized-2.1rc0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4de828d28555c5137995aa8994c502d80bfa05e658c0919a070988eaf7d0e127 |
|
MD5 | 0773f4820d3725931141bbe9eb096d8a |
|
BLAKE2b-256 | ae1a1574426c4454303839b21f003d57e28c2d7a619c8bd248762ccc6fb1a301 |
Hashes for synthesized-2.1rc0-cp39-cp39-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eecf7addffb43fd6d61e3f99bccbdda5b1a5dc23c2e56e8517472c9c76029693 |
|
MD5 | fe038d1a58245134e578f4d628c04cd4 |
|
BLAKE2b-256 | 29d7732c5aa0ffd3ffa1e7b3738f8eed054e30c11b6b9e41ce58b95394cf74af |
Hashes for synthesized-2.1rc0-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c2139991496ad8d5b6dc049f44515140f1238c76aea3887943cdb6e2e2579081 |
|
MD5 | 06ea90cd54072b5903a37f0256df9259 |
|
BLAKE2b-256 | 550ff1a29286c5df062cf36d7e2e845fa9820897030e567a4d139ed958f0eda3 |
Hashes for synthesized-2.1rc0-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4ec330583c948bee718d260dcf8e2500b651a9f3e8212e37788818cb097deb44 |
|
MD5 | 047b6569ebc09f69a420fbd27515d22d |
|
BLAKE2b-256 | 4702b07067418a51082e5ddd4d740807df19039c36816cbaf46f7f7d86a4bb0b |
Hashes for synthesized-2.1rc0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cbb6390877afb546cf4bb8b9edb31eca12c7da9bf39312eb0584e19b67cc28a6 |
|
MD5 | a740f6d9181bdd839f02919ecc0602a6 |
|
BLAKE2b-256 | f6116a8bbc2d7a20cd33b74b2d98a9827238b54ee2c0c1b234c863d8bcdd3cf7 |
Hashes for synthesized-2.1rc0-cp38-cp38-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6bac16f58c2219198a08673abdd45b15a2a9462ae899009a3b519c12ed2041a3 |
|
MD5 | 8a02dca5056411d296444beace2dab25 |
|
BLAKE2b-256 | 59caa1af8d8cceec26604cc5cee7c0b572f8a4deb2e5835d4aa38c6672e9aff1 |
Hashes for synthesized-2.1rc0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 30f3d6dc62a85644d3f8dfae07ecf7eedff03f2d60fab988dd4b22b08b325188 |
|
MD5 | 6a64eae9c5ebc71ab882df7ccfafac29 |
|
BLAKE2b-256 | a6f06a6b02d8e8ea1501e3b2256e5346c79932f3259bafa193c55a3a57fb1e66 |
Hashes for synthesized-2.1rc0-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c2f9073ee03ef2ead9b2798c3053684451849f15092d23bca844494cd30b86ed |
|
MD5 | 4f5bbce65ae188e2ef0fc46d7b43a68d |
|
BLAKE2b-256 | 292ebdaf8a0d3ec8bb61473fffdeb54d00eafaaa603e8f8f0cf3a00781549901 |
Hashes for synthesized-2.1rc0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d896dd0902c40bde93809d30f92019b063557a1e95ec7b470493836197ce630a |
|
MD5 | ec09cccccd83b63034758db7064444cd |
|
BLAKE2b-256 | 6d7b4120f0605303b581b87167adecd4c04e272e41f612e9c55fea1837c3cd13 |
Hashes for synthesized-2.1rc0-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f3a0905c8d419f3381aecd47c50e3d08fa9b67a4169031c79f5b69413f0a7bf3 |
|
MD5 | e9e6f4a97ac5e80fed513b63f76c6f4d |
|
BLAKE2b-256 | ad7ee73a7184e44d55e6a2444de2d0d896397281c17cc0e7914f2955f7b494d7 |