Processing tool for converting L0 data to L1 and L2 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
- Add dependencies with versions to requirements.txt
pip install --upgrade pip && pip install -r requirements_dev.txt
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/
python -m build
python -m twine upload --repository pypi dist/*
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
git tag "v0.0.12" -a
# enter description
git push origin --tags
add https://pypi.org/project/setuptools-scm/ for extracting the version