No project description provided
Project description
echofish-aws-resample-and-write-to-zarr-store-lambda
Setting up the Python Environment
MacOS
- Install pyenv (https://github.com/pyenv/pyenv#set-up-your-shell-environment-for-pyenv)
brew update
brew install pyenv
- In ~/.bashrc add
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"
brew install openssl readline sqlite3 xz zlib tcl-tk
- Install pyenv-virtualenv (https://github.com/pyenv/pyenv-virtualenv)
brew install pyenv-virtualenv
- In ~/.bashrc add
eval "$(pyenv virtualenv-init -)"
- Open a new terminal
- Install Python version
env PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install 3.9.16
- Optional: set global version of Python
env PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv global 3.9.16
- Create virtual env
pyenv virtualenv 3.9.16 echofish-aws-resample-and-write-to-zarr-store-lambda
- Set local version of python (if not done already)
- change directory to root of project
pyenv local echofish-aws-resample-and-write-to-zarr-store-lambda
Other OS
- Get a Mac
- See Above MacOS
Setting up IntelliJ
- Install the IntelliJ Python plugin
- Set up pyenv
- File -> Project Structure or CMD + ;
- SDKs -> + -> Add Python SDK -> Virtual Environment
- Select Existing Environment
- Choose ~/.pyenv/versions/echofish-aws-resample-and-write-to-zarr-store-lambda/bin/python
- Set up Python Facet (not sure if this is required)
- File -> Project Structure or CMD + ;
- Facets -> + -> Python
- Set interpreter
Installing Dependencies
- Add dependencies with versions to requirements.txt
pip install --upgrade pip && pip install -r requirements_dev.txt
Maven
This project can use Apache Maven to easily build this project. However, this is not required, but recommended. Maven can be easily installed by downloading it from the Maven site or using sdkman.
Build with Maven
After setting up your pyenv run:
mvn clean install
Functional Testing
To run a functional test, developer will need to save the associated environment variables in .env for the lambda to use. The ACCESS_KEY and SECRET_ACCESS_KEY can be generated in IAM, users, rudy-dev, security credentials, access keys, create access key. Copy other values as needed from deployed CloudFormation Template.
export OUTPUT_BUCKET=rudy-dev-echofish-118234403147-echofish-dev-output
export TABLE_NAME=rudy-dev-echofish-EchoFish-File-Info
export OUTPUT_BUCKET_ACCESS_KEY="XXX"
export OUTPUT_BUCKET_SECRET_ACCESS_KEY="YYY"
export TOPIC_ARN="arn:aws:sns:us-west-2:118234403147:rudy-dev-echofish-processing-finished"
Elastic Container Registry
Note that the main repository is built and curated in the mgg-dev account in us-west-2. The derived docker image is built and pushed to the echofish us-east-1 ECR. That image is then replicated to the echofish us-west-2 account. You will need to go to the echofish ECR -> Repositories -> [repo] -> Permissions and copy the values from an existing project (for both regions).
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 Distribution
Built Distribution
File details
Details for the file echofish-aws-resample-and-write-to-zarr-store-lambda-1.0.0.dev20230907183644.tar.gz
.
File metadata
- Download URL: echofish-aws-resample-and-write-to-zarr-store-lambda-1.0.0.dev20230907183644.tar.gz
- Upload date:
- Size: 12.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d915fccadcbe080fd83099ebdc48c201a188948cdfe3bdceb0e3cf19e87cec62 |
|
MD5 | 1e71733cba82506c0415bdd029d72d23 |
|
BLAKE2b-256 | 38ae1da3e73c2a3b0078b3937bc49c6bbe73cc9367e36204181ca0a4176954a4 |
File details
Details for the file echofish_aws_resample_and_write_to_zarr_store_lambda-1.0.0.dev20230907183644-py3-none-any.whl
.
File metadata
- Download URL: echofish_aws_resample_and_write_to_zarr_store_lambda-1.0.0.dev20230907183644-py3-none-any.whl
- Upload date:
- Size: 13.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6d1cd153de01ebb3ccfa951d6d9ddf7eed55acc9db107c903a5768210a791298 |
|
MD5 | 3dbe17ac1d4cbc9076b6ea46dcd3b94a |
|
BLAKE2b-256 | b7eb8aaf51998c22de24d2e16b23a7ef7b290bcbf721a902bef0ae0115c5e87e |