Thank you for your interest in contributing to Railtracks! This guide will help you get set up for development.
This is a mono-repo containing multiple packages:
railtracks/
├── pyproject.toml # Root development environment
├── docs/ # Shared documentation
├── packages/
│ ├── railtracks/ # Core SDK package
│ │ ├── src/railtracks/ # Python module (underscore)
│ │ ├── tests/ # SDK tests
│ │ └── pyproject.toml
│ └── railtracks-cli/ # CLI package
│ ├── src/railtracks_cli/ # Python module (underscore)
│ ├── tests/ # CLI tests
│ └── pyproject.toml
└── LICENSE
Important: Package names use dashes (railtracks-cli) but Python modules use underscores (railtracks_cli).
- Python 3.10 or higher
-
Clone the repository
git clone https://github.com/RailtownAI/railtracks cd railtracks -
Install development dependencies
Dev dependencies are not all required, but will be useful for devs working with the project.
python -m venv .venv source .venv/bin/activate # for mac and linux pip install uv uv sync --group dev
## Development Workflow
### Code Style
```bash
# Run linter
ruff check
# Fix auto-fixable issues
ruff check --fix
# Format code
ruff format
# Serve documentation locally
cd docs
mkdocs serve
# Build documentation
mkdocs buildIndividual packages can be installed separately:
# Core SDK
pip install railtracks
pip install "railtracks[integrations]" # With integrations
pip install "railtracks[all]" # With all extras
# CLI tool (includes core SDK)
pip install railtracks-cliThe main SDK with optional dependencies:
chat- FastAPI chat interfaceintegrations- The integration tooling to connect to various data sources.all- All optional dependencies
Command-line interface that gives you a visualizer to use with the system.
- Write tests in the appropriate
tests/directory of the package of intrest - Use
pytestfor running tests
-
Create a fork
git checkout -b feature/your-feature-name
-
Make your changes
- Write tests for new functionality
- Update documentation if needed
- Follow existing code style
-
Run quality checks
# Run tests pytest # Check code quality ruff check --fix ruff format
-
Commit and push
git add . git commit -m "feat: add your feature description" git push origin feature/your-feature-name
-
Create a Pull Request
- Describe your changes using the template provided
- Link any related issues
- Ensure CI checks passes
**Note on Tests: Our repo uses end-to-end testing for ensuring appropriate external API invocations. Once you create a PR, the workflow checks that run on your PR include all the tests that do not require keys or secrets. After the passing of these tests, a maintainer will run the end-to-end tests before giving your PR an approval or providing you with the relevant output of end-to-end failures.
- Run tests from the repository root for full test suite, excluding the
end_to_endtests with the following:
pytest -s -v packages/railtracks/tests/unit_tests/ packages/railtracks/tests/integration_tests/- Individual package tests can be run from within each package directory
If you run into issues:
- Check this contributing guide
- Look at existing issues on GitHub
- Reach out the maintainers on discord
- Create a new issue with detailed information about your problem
Thank you for contributing to Railtracks! 🚂