A Python package for building FUSE hydrological models.
pip install fuseflow
After installation, the fuseflow
command-line tool will be available in your environment.
git clone https://github.com/kasra-keshavarz/fuseflow.git
cd fuseflow
pip install -e .
git clone https://github.com/kasra-keshavarz/fuseflow.git
cd fuseflow
pip install -e ".[dev]"
from fuseflow import FUSEWorkflow
# Create a workflow instance
workflow = FUSEWorkflow(
name="my_workflow",
cat="/path/to/catchment.geojson",
forcing_vars={"precip": "precipitation", "temp": "temperature"},
forcing_files="/path/to/forcing/files/",
forcing_units={"precip": "mm/day", "temp": "degC"},
settings={"start_date": "2000-01-01", "end_date": "2010-12-31"}
)
# Run the workflow
result = workflow.run()
print(result)
# Save the results
workflow.save("/path/to/output/")
The package also provides a CLI for running workflows from JSON configuration files:
# Run a workflow from a configuration file
fuseflow --json config.json --output-path ./results
# Run with verbose output
fuseflow --json config.json --output-path ./results --verbose
# Show help
fuseflow --help
# Show version
fuseflow --version
See CLI_USAGE.md for detailed CLI documentation and examples.
- Feature 1: Description
- Feature 2: Description
- Feature 3: Description
Full documentation is available at [link-to-docs].
-
Clone the repository:
git clone https://github.com/kasra-keshavarz/fuseflow.git cd fuseflow
-
Install in development mode with dev dependencies:
pip install -e ".[dev]"
-
Install pre-commit hooks:
pre-commit install
# Run all tests
pytest
# Run tests with coverage
pytest --cov=fuseflow --cov-report=html
# Run specific test file
pytest tests/test_core.py
# Format code
black src tests
# Lint code
flake8 src tests
# Type checking
mypy src
# Build source and wheel distributions
python -m build
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Make your changes
- Add tests for your changes
- Ensure all tests pass and code is properly formatted
- Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
See CHANGELOG.md for a list of changes.