### Install from Local Source Source: https://github.com/ruestefa/stormtrack/blob/master/docs/installation.rst Install StormTrack after cloning the repository or downloading the tarball. This command should be run from the root of the source directory. ```console $ python setup.py install ``` -------------------------------- ### Run Sandbox Example Source: https://github.com/ruestefa/stormtrack/blob/master/README.md Execute a specific sandbox example, such as identifying and tracking cyclones. The example can be run with a specified number of parallel processes. ```bash cd "${sandbox_path}/sandboxes/cyclones" ./identify_and_track_cyclones.sh 4 # use 4 parallel processes ``` -------------------------------- ### Install from GitHub Repository Source: https://github.com/ruestefa/stormtrack/blob/master/docs/installation.rst Install StormTrack directly from its GitHub repository using pip. This is useful for getting the latest development version. ```console $ pip install git+https://github.com/MeteoSwiss-APN/stormtrack#egg=stormtrack ``` -------------------------------- ### Install StormTrack Package Source: https://github.com/ruestefa/stormtrack/blob/master/README.md Install the StormTrack package and its dependencies into a specified virtual environment directory. The CHAIN=1 argument is used for installation. ```bash # Location where you install packages venv_dir="${HOME}/local/venvs/stormtrack" make install VENV_DIR=${venv_dir} CHAIN=1 ``` -------------------------------- ### Install Development Dependencies Source: https://github.com/ruestefa/stormtrack/blob/master/CONTRIBUTING.rst Install development dependencies and create a virtual environment. The virtual environment name and directory can be customized. ```shell $ cd stormtrack/ $ make install-dev ``` -------------------------------- ### Install Stable Release with Pip Source: https://github.com/ruestefa/stormtrack/blob/master/docs/installation.rst Use this command to install the latest stable version of StormTrack. Ensure pip is installed. ```console $ pip install stormtrack ``` -------------------------------- ### Install from GitHub Repository in Developer Mode Source: https://github.com/ruestefa/stormtrack/blob/master/docs/installation.rst Install StormTrack in editable mode from its GitHub repository. Changes to the source code will be reflected immediately without reinstallation. ```console $ pip install -e git+https://github.com/MeteoSwiss-APN/stormtrack#egg=stormtrack ``` -------------------------------- ### Pinning Runtime Dependencies Source: https://github.com/ruestefa/stormtrack/blob/master/CONTRIBUTING.rst This command sequence pins the current runtime dependencies to a requirements file. It first installs the project and then uses `pip freeze` to capture the exact versions of all installed packages. ```bash $ make install $ ./venv/bin/python -m pip freeze >requirements/requirements.txt ``` -------------------------------- ### Run StormTrack Tests Source: https://github.com/ruestefa/stormtrack/blob/master/README.md Run all tests for the StormTrack package. This involves installing the package into a temporary environment, running tests, and then cleaning up the temporary environment. ```bash make test-all CHAIN=1 make clean-all ``` -------------------------------- ### Clone StormTrack Repository Source: https://github.com/ruestefa/stormtrack/blob/master/docs/installation.rst Clone the StormTrack source code from GitHub to your local machine. This is the first step before installing from source. ```console $ git clone git://github.com/ruestefa/stormtrack ``` -------------------------------- ### Create StormTrack Sandboxes Source: https://github.com/ruestefa/stormtrack/blob/master/README.md Set up sandboxes for testing StormTrack tools. This involves creating a directory for sandboxes, activating the virtual environment, and running the create_sandboxes.py script with desired options. ```bash # Working directory with lots of disk space sandbox_path="${SCRATCH}/stormtrack" source "${venv_dir}/bin/activate" ./sandboxes/create_sandboxes.py -h # show options ./sandboxes/create_sandboxes.py "${sandbox_path}" --dry # check what will be done ./sandboxes/create_sandboxes.py "${sandbox_path}" # add -f when re-running ``` -------------------------------- ### Configure Executable Scripts in setup.py Source: https://github.com/ruestefa/stormtrack/blob/master/CONTRIBUTING.rst Define executable scripts for your package in the `setup.py` file. The left side is the executable name, and the right side is the module and function to call. ```python ... scripts = [ "stormtrack=stormtrack.cli:main", ] setup( ... entry_points={"console_scripts": scripts}, ... ) ``` -------------------------------- ### Format Code and Run Static Analysis Source: https://github.com/ruestefa/stormtrack/blob/master/CONTRIBUTING.rst Format your code using black and check for static code analysis issues with flake8. ```shell $ make format $ make line ``` -------------------------------- ### Link StormTrack Tools to PATH Source: https://github.com/ruestefa/stormtrack/blob/master/README.md Link the main StormTrack tools and additional utility scripts from the virtual environment's bin directory to a directory in your system's PATH for system-wide access. ```bash # A directory that is in $PATH bin_dir="${HOME}/local/bin" cd ${bin_dir} # Main tools ln -s ${venv_dir}/bin/identify-features . ln -s ${venv_dir}/bin/identify-front-fields . ln -s ${venv_dir}/bin/track-features . # Additional tools ln -s ${venv_dir}/bin/group-tracks . ln -s ${venv_dir}/bin/inspect-tracks . ln -s ${venv_dir}/bin/project-tracks . ``` -------------------------------- ### Clone the StormTrack Repository Source: https://github.com/ruestefa/stormtrack/blob/master/CONTRIBUTING.rst Clone your forked repository locally to begin development. ```shell $ git clone git@github.com:your_name_here/stormtrack.git ``` -------------------------------- ### Activate Virtual Environment Source: https://github.com/ruestefa/stormtrack/blob/master/CONTRIBUTING.rst Optionally activate the created virtual environment. Note that `make` commands automatically use the virtual environment. ```shell $ source ./venv/bin/activate ``` -------------------------------- ### Deploy a New Patch Version Source: https://github.com/ruestefa/stormtrack/blob/master/CONTRIBUTING.rst Deploy a new patch version by bumping the version, pushing changes, and pushing tags. ```shell $ make bump-patch $ git push $ git push --tags ``` -------------------------------- ### Run Tests with Tox for Compatibility Source: https://github.com/ruestefa/stormtrack/blob/master/CONTRIBUTING.rst Verify compatibility across multiple Python versions and packageability by running tests within tox. ```shell $ make test-all ``` -------------------------------- ### Clone StormTrack Repository Source: https://github.com/ruestefa/stormtrack/blob/master/README.md Clone the StormTrack repository using git. Navigate into the cloned directory to access the Makefile for further commands. ```bash git clone git@github.com:ruestefa/stormtrack.git cd stormtrack ``` -------------------------------- ### Create a New Branch Source: https://github.com/ruestefa/stormtrack/blob/master/CONTRIBUTING.rst Create a new branch for your bugfix or feature development. ```shell $ git checkout -b name-of-your-bugfix-or-feature ``` -------------------------------- ### Download StormTrack Tarball Source: https://github.com/ruestefa/stormtrack/blob/master/docs/installation.rst Download the StormTrack source code as a tarball archive from GitHub. This is an alternative to cloning the repository. ```console $ curl -OL https://github.com/ruestefa/stormtrack/tarball/master ``` -------------------------------- ### Run Tests with Pytest Source: https://github.com/ruestefa/stormtrack/blob/master/CONTRIBUTING.rst Ensure your changes function correctly by running tests using pytest. ```shell $ make test ``` -------------------------------- ### Commit and Push Changes Source: https://github.com/ruestefa/stormtrack/blob/master/CONTRIBUTING.rst Commit your changes with a descriptive message and push the branch to GitHub. ```shell $ git add . $ git commit -m "Your detailed description of your changes." $ git push origin name-of-your-bugfix-or-feature ``` -------------------------------- ### Run a Subset of Tests Source: https://github.com/ruestefa/stormtrack/blob/master/CONTRIBUTING.rst Execute a specific subset of tests using pytest by specifying the test file. ```shell $ pytest tests.test_stormtrack ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.