This release is a pre-release and may not be stable for production use.
echofish-aws-raw-to-zarr-lambda
Setting up the Python Environment
MacOS
- Install pyenv (https://github.com/pyenv/pyenv#set-up-your-shell-environment-for-pyenv)
brew updatebrew 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-raw-to-zarr-lambda
- Set local version of python (if not done already)
- change directory to root of project
pyenv local echofish-aws-raw-to-zarr-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-raw-to-zarr-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
DOTENV
export AWS_DEFAULT_PROFILE=echofish
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"
Deploying new CodePipeline via Cloudformation
Build project w 'mvn clean install', navigate to the 'target/codepipeline' directory. You will need to create a private ECR repo in us-east-1 w name of the project for builds to push to. Then:
aws --profile mggdev cloudformation create-stack --stack-name build-echofish-aws-raw-to-zarr-lambda-trunk --template-body file://codepipeline.yaml --capabilities CAPABILITY_IAM CAPABILITY_AUTO_EXPAND
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).
In the echofish aws account:
IAM -> Roles -> AWSServiceRoleForECRReplication
Metadata
Release files for echofish-aws-raw-to-zarr-lambda 1.0.0.dev20230906215656
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| echofish-aws-raw-to-zarr-lambda-1.0.0.dev20230906215656.tar.gz | 12.2 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| echofish_aws_raw_to_zarr_lambda-1.0.0.dev20230906215656-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 24.8 kB
Release files / echofish-aws-raw-to-zarr-lambda-1.0.0.dev20230906215656.tar.gz
| Download URL | echofish-aws-raw-to-zarr-lambda-1.0.0.dev20230906215656.tar.gz |
|---|---|
| Size | 12.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
350cdbe902d5d195c550149dbaa44679f93cdbce8cd73de3a3f8177809e04da9
|
|
BLAKE2b-256 checksum How to use checksums |
fe60790bf8e27d586fd9cf333d20a284af40309e49bd6207f65aa94526391f1c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.16
|
Release files / echofish_aws_raw_to_zarr_lambda-1.0.0.dev20230906215656-py3-none-any.whl
| Download URL | echofish_aws_raw_to_zarr_lambda-1.0.0.dev20230906215656-py3-none-any.whl |
|---|---|
| Size | 12.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d65a00eb90353346edd9716f63dae4c2f2dfa4c0eeb482386f66fb7cd48c8129
|
|
BLAKE2b-256 checksum How to use checksums |
d0adfaebaad7159073cfcd865b451782548b9fae07273eb62e237496556bb314
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.16
|
Security for echofish-aws-raw-to-zarr-lambda 1.0.0.dev20230906215656
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.