Visit Banyan Computing for full documentation.
Please create branches named according the the author name and the feature name
like {author-name}/{feature-name}
. For example: caleb/add-tests-for-hdf5
.
Then, submit a pull request on GitHub to merge your branch into the branch with
the latest version number.
When pulling/pushing code, you may need to add the appropriate SSH key. Look up GitHub documentation for how to generate an SSH key, then make sure to add it. You may need to do this repeatedly if you have multiple SSH keys for different GitHub accounts. For example, on Windows you may need to:
eval `ssh-agent`
ssh-add -D
ssh-add /c/Users/Claris/.ssh/id_rsa_clarisw
git remote set-url origin git@github.com:banyan-team/banyan-website.git
Make sure you have Python and Poetry installed and then run poetry install
from the Banyan Python project you want to work on (e.g., banyan-python
for banyan-python).
To see an example of how to add tests, see banyan-python/tests/test_config.py
.
To run tests, ensure that you have a Banyan account connected to an AWS account.
Then, cd
into the directory with the Banyan Python project you want to run
tests for (e.g., banyan-python
for banyan-python) and run:
poetry run pytest
to run all tests intests
directorypoetry run pytest tests/xx.py
to run all tests intests/xx.py
poetry run pytest tests/xx.py::foo
to runfoo
function intests/xx.py
poetry run pytest tests/xx.py::bar::foo
to runfoo
function inbar
class intests/xx.py
You must then specify the cluster name with the BANYAN_CLUSTER_NAME
environment variable. You must also specify the relevant BANYAN_*
and AWS_*
environment variables to provide credentials. AWS
credentials are specified in the same way as they would be if using
the AWS CLI (either use environment variables or use the relevant
AWS configuration files) and the Banyan environment variables
are saved in banyanconfig.toml
so you don't need to specify it
every time.
For example, if you have previously specified your Banyan API key, user ID, and AWS credentials, you could:
If your AWS credentials are saved under a profile named banyan-testing
, you could use AWS_DEFAULT_PROFILE=banyan-testing
.