|
| 1 | +# Linux Quickstart Guide |
| 2 | + |
| 3 | +This guide helps you get started with **hammocking** on Linux. |
| 4 | + |
| 5 | +## Prerequisites |
| 6 | + |
| 7 | +### Required |
| 8 | +- Python 3.10 or higher (3.13 recommended) |
| 9 | +- Git |
| 10 | + |
| 11 | +### Optional (for integration tests) |
| 12 | +- clang/llvm |
| 13 | +- ninja-build |
| 14 | + |
| 15 | +### Installing Prerequisites on Ubuntu/Debian |
| 16 | + |
| 17 | +```bash |
| 18 | +# Install Python 3.13 |
| 19 | +sudo apt update |
| 20 | +sudo apt install python3.13 python3.13-venv python3-pip |
| 21 | + |
| 22 | +# Optional: Install build tools for integration tests |
| 23 | +sudo apt install clang ninja-build llvm |
| 24 | +``` |
| 25 | + |
| 26 | +## Installation |
| 27 | + |
| 28 | +### Using the build script |
| 29 | + |
| 30 | +```bash |
| 31 | +# Clone the repository |
| 32 | +git clone https://github.com/avengineers/hammocking |
| 33 | +cd hammocking |
| 34 | + |
| 35 | +# Install dependencies |
| 36 | +./build.sh --install |
| 37 | + |
| 38 | +# Run full build (includes lint, test, docs) |
| 39 | +./build.sh |
| 40 | +``` |
| 41 | + |
| 42 | +## Common Tasks |
| 43 | + |
| 44 | +The common tasks are separated as functions within `./build.sh`. |
| 45 | + |
| 46 | +## Setup Development Environment |
| 47 | + |
| 48 | +```bash |
| 49 | +# Complete setup with pre-commit hooks |
| 50 | +./build.sh --setup |
| 51 | + |
| 52 | +# Or manually |
| 53 | +poetry install |
| 54 | +poetry run pre-commit install |
| 55 | +``` |
| 56 | + |
| 57 | +## build.sh Targets Reference |
| 58 | + |
| 59 | +Run `./build.sh --help` to see all available targets. |
| 60 | + |
| 61 | +## Troubleshooting |
| 62 | + |
| 63 | +### Poetry Not Found |
| 64 | +If `poetry` command is not found after installation: |
| 65 | +```bash |
| 66 | +export PATH="$HOME/.local/bin:$PATH" |
| 67 | +``` |
| 68 | + |
| 69 | +Add this to your `~/.bashrc` or `~/.zshrc` to make it permanent. |
| 70 | + |
| 71 | +### Python Version Issues |
| 72 | +Check your Python version: |
| 73 | +```bash |
| 74 | +python3 --version |
| 75 | +``` |
| 76 | + |
| 77 | +If you need to use a specific Python version with poetry: |
| 78 | +```bash |
| 79 | +poetry env use python3.13 |
| 80 | +``` |
| 81 | + |
| 82 | +### Integration Test Failures |
| 83 | +If integration tests fail due to missing clang: |
| 84 | +```bash |
| 85 | +# Skip integration tests |
| 86 | +poetry run pytest -v -m "not integration" |
| 87 | + |
| 88 | +# Or install clang |
| 89 | +sudo apt install clang |
| 90 | +``` |
| 91 | + |
| 92 | +### Lock File Issues |
| 93 | +If you see "poetry.lock changed" errors: |
| 94 | +```bash |
| 95 | +poetry lock |
| 96 | +poetry install |
| 97 | +``` |
| 98 | + |
| 99 | +## Getting Help |
| 100 | + |
| 101 | +- Documentation: Built docs at `out/docs/html/index.html` after running `./build.sh` |
| 102 | +- Issues: https://github.com/avengineers/hammocking/issues |
| 103 | +- Main command help: `poetry run python -m hammocking --help` |
| 104 | + |
| 105 | +## Next Steps |
| 106 | + |
| 107 | +1. Read the full documentation: `./build.sh && firefox out/docs/html/index.html` |
| 108 | +2. Explore the examples in `docs/usage/examples/` |
| 109 | +3. Check out the test files in `tests/` to see how to use the API |
0 commit comments