Processing tool for converting Level_0 water column sonar data to Level_1 and Level_2 derived data sets as well as generating geospatial information.
Python 3.10.12
- Install pyenv (https://github.com/pyenv/pyenv#set-up-your-shell-environment-for-pyenv)
brew update
arch -arm64 brew install pyenv
- In ~/.bashrc add
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"
arch -arm64 brew install openssl readline sqlite3 xz zlib tcl-tk
- Install pyenv-virtualenv (https://github.com/pyenv/pyenv-virtualenv)
arch -arm64 brew install pyenv-virtualenv
- In ~/.bashrc add
eval "$(pyenv virtualenv-init -)"
- Open a new terminal
- Install Python version
env CONFIGURE_OPTS='--enable-optimizations' arch -arm64 pyenv install 3.10.12
- Create virtual env (to delete 'pyenv uninstall 3.10.12/water-column-sonar-processing')
pyenv virtualenv 3.10.12 water-column-sonar-processing
- Set local version of python (if not done already)
- change directory to root of project
pyenv local 3.10.12 water-column-sonar-processing
pyenv activate water-column-sonar-processing
- 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/mocking_aws/bin/python
- Set up Python Facet (not sure if this is required)
- File -> Project Structure or CMD + ;
- Facets -> + -> Python
- Set interpreter
uv pip install --upgrade pip
#uv pip install -r requirements_dev.txt
uv pip install -r pyproject.toml --extra dev
uv run pytest tests
#pytest --disable-warnings
or
pytest --cache-clear --cov=src tests/ --cov-report=xml
Following this tutorial: https://packaging.python.org/en/latest/tutorials/packaging-projects/
see here for installation: https://pre-commit.com/ https://dev.to/rafaelherik/using-trufflehog-and-pre-commit-hook-to-prevent-secret-exposure-edo
pre-commit install --allow-missing-config
Ruff https://plugins.jetbrains.com/plugin/20574-ruff
https://colab.research.google.com/drive/1KiLMueXiz9WVB9o4RuzYeGjNZ6PsZU7a#scrollTo=AayVyvpBdfIZ
20241124 8 failed, 32 passed, 3 skipped, 1 warning in 6.92s 20241125 5 failed, 35 passed, 3 skipped, 1 warning in 9.71s 3 failed, 38 passed, 3 skipped, 1 warning in 7.24s
Step 1 --> increment the semantic version in the zarr_manager.py "metadata" & the "pyproject.toml"
git tag -a v25.1.8 -m "Releasing version v25.1.8"
git push origin --tags
uv build
python -m twine upload --repository pypi dist/*
add https://pypi.org/project/setuptools-scm/ for extracting the version
bandit -r water_column_sonar_processing/
Experimental Plotting in Xarray (hvPlot): https://colab.research.google.com/drive/18vrI9LAip4xRGEX6EvnuVFp35RAiVYwU#scrollTo=q9_j9p2yXsLV
HB0707 Cruise zoomable: https://hb0707.s3.us-east-1.amazonaws.com/index.html