Skip to content

Commit b42486a

Browse files
Backing up
1 parent cde955f commit b42486a

20 files changed

+1257
-0
lines changed

.DS_Store

6 KB
Binary file not shown.

.github/workflows/ci.yml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main, dev ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: [3.8, 3.9, "3.10", "3.11", "3.12"]
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Set up Python ${{ matrix.python-version }}
20+
uses: actions/setup-python@v4
21+
with:
22+
python-version: ${{ matrix.python-version }}
23+
24+
- name: Install dependencies
25+
run: |
26+
python -m pip install --upgrade pip
27+
pip install -e ".[dev]"
28+
29+
- name: Lint with flake8
30+
run: |
31+
flake8 src tests --count --select=E9,F63,F7,F82 --show-source --statistics
32+
flake8 src tests --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
33+
34+
- name: Type check with mypy
35+
run: |
36+
mypy src
37+
38+
- name: Test with pytest
39+
run: |
40+
pytest --cov=fuseflow --cov-report=xml --cov-report=term-missing
41+
42+
- name: Upload coverage to Codecov
43+
uses: codecov/codecov-action@v3
44+
with:
45+
file: ./coverage.xml
46+
flags: unittests
47+
name: codecov-umbrella
48+
49+
build:
50+
runs-on: ubuntu-latest
51+
needs: test
52+
53+
steps:
54+
- uses: actions/checkout@v4
55+
56+
- name: Set up Python
57+
uses: actions/setup-python@v4
58+
with:
59+
python-version: "3.11"
60+
61+
- name: Install build dependencies
62+
run: |
63+
python -m pip install --upgrade pip
64+
pip install build
65+
66+
- name: Build package
67+
run: python -m build
68+
69+
- name: Check package
70+
run: |
71+
pip install twine
72+
twine check dist/*

.github/workflows/release.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Release
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
deploy:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v4
13+
14+
- name: Set up Python
15+
uses: actions/setup-python@v4
16+
with:
17+
python-version: "3.11"
18+
19+
- name: Install dependencies
20+
run: |
21+
python -m pip install --upgrade pip
22+
pip install build twine
23+
24+
- name: Build package
25+
run: python -m build
26+
27+
- name: Publish to PyPI
28+
env:
29+
TWINE_USERNAME: __token__
30+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
31+
run: |
32+
twine upload dist/*

.pre-commit-config.yaml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v4.4.0
4+
hooks:
5+
- id: trailing-whitespace
6+
- id: end-of-file-fixer
7+
- id: check-yaml
8+
- id: check-added-large-files
9+
- id: check-merge-conflict
10+
- id: check-toml
11+
- id: check-json
12+
- id: pretty-format-json
13+
args: ['--autofix']
14+
15+
- repo: https://github.com/psf/black
16+
rev: 23.3.0
17+
hooks:
18+
- id: black
19+
language_version: python3
20+
21+
- repo: https://github.com/pycqa/flake8
22+
rev: 6.0.0
23+
hooks:
24+
- id: flake8
25+
additional_dependencies: [flake8-docstrings]
26+
27+
- repo: https://github.com/pre-commit/mirrors-mypy
28+
rev: v1.3.0
29+
hooks:
30+
- id: mypy
31+
additional_dependencies: [types-all]
32+
33+
- repo: https://github.com/pycqa/isort
34+
rev: 5.12.0
35+
hooks:
36+
- id: isort
37+
name: isort (python)
38+
39+
- repo: https://github.com/pycqa/bandit
40+
rev: 1.7.5
41+
hooks:
42+
- id: bandit
43+
args: ['-c', 'pyproject.toml']

CHANGELOG.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [Unreleased]
9+
10+
### Added
11+
- Initial project structure
12+
- Basic package configuration
13+
- Development tools setup
14+
15+
### Changed
16+
17+
### Deprecated
18+
19+
### Removed
20+
21+
### Fixed
22+
23+
### Security
24+
25+
## [0.1.0] - 2025-07-16
26+
27+
### Added
28+
- Initial release
29+
- Package structure and configuration

README.md

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
# FuseFlow
2+
3+
A Python package for building FUSE hydrological models.
4+
5+
## Installation
6+
7+
### From PyPI (when published)
8+
```bash
9+
pip install fuseflow
10+
```
11+
12+
### From Source
13+
```bash
14+
git clone https://github.com/kasra-keshavarz/fuseflow.git
15+
cd fuseflow
16+
pip install -e .
17+
```
18+
19+
### Development Installation
20+
```bash
21+
git clone https://github.com/kasra-keshavarz/fuseflow.git
22+
cd fuseflow
23+
pip install -e ".[dev]"
24+
```
25+
26+
## Quick Start
27+
28+
```python
29+
from fuseflow import FuseFlow
30+
31+
# Create an instance
32+
ff = FuseFlow()
33+
34+
# Use the package
35+
result = ff.process()
36+
print(result)
37+
```
38+
39+
## Features
40+
41+
- Feature 1: Description
42+
- Feature 2: Description
43+
- Feature 3: Description
44+
45+
## Documentation
46+
47+
Full documentation is available at [link-to-docs].
48+
49+
## Development
50+
51+
### Setting up the development environment
52+
53+
1. Clone the repository:
54+
```bash
55+
git clone https://github.com/kasra-keshavarz/fuseflow.git
56+
cd fuseflow
57+
```
58+
59+
2. Install in development mode with dev dependencies:
60+
```bash
61+
pip install -e ".[dev]"
62+
```
63+
64+
3. Install pre-commit hooks:
65+
```bash
66+
pre-commit install
67+
```
68+
69+
### Running Tests
70+
71+
```bash
72+
# Run all tests
73+
pytest
74+
75+
# Run tests with coverage
76+
pytest --cov=fuseflow --cov-report=html
77+
78+
# Run specific test file
79+
pytest tests/test_core.py
80+
```
81+
82+
### Code Quality
83+
84+
```bash
85+
# Format code
86+
black src tests
87+
88+
# Lint code
89+
flake8 src tests
90+
91+
# Type checking
92+
mypy src
93+
```
94+
95+
### Building the Package
96+
97+
```bash
98+
# Build source and wheel distributions
99+
python -m build
100+
```
101+
102+
## Contributing
103+
104+
1. Fork the repository
105+
2. Create a feature branch (`git checkout -b feature/amazing-feature`)
106+
3. Make your changes
107+
4. Add tests for your changes
108+
5. Ensure all tests pass and code is properly formatted
109+
6. Commit your changes (`git commit -m 'Add amazing feature'`)
110+
7. Push to the branch (`git push origin feature/amazing-feature`)
111+
8. Open a Pull Request
112+
113+
## License
114+
115+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
116+
117+
## Changelog
118+
119+
See [CHANGELOG.md](CHANGELOG.md) for a list of changes.

docs/README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Documentation
2+
3+
This directory contains the documentation for the FuseFlow package.
4+
5+
## Building Documentation
6+
7+
To build the documentation locally:
8+
9+
```bash
10+
# Install documentation dependencies
11+
pip install -e ".[docs]"
12+
13+
# Build the documentation
14+
cd docs
15+
make html
16+
17+
# View the documentation
18+
open _build/html/index.html
19+
```
20+
21+
## Documentation Structure
22+
23+
- `source/`: Source files for Sphinx documentation
24+
- `_build/`: Generated documentation (not included in version control)
25+
- `Makefile`: Make commands for building documentation
26+
27+
## Writing Documentation
28+
29+
We use Sphinx with reStructuredText format. Key files:
30+
31+
- `source/conf.py`: Sphinx configuration
32+
- `source/index.rst`: Main documentation page
33+
- `source/api.rst`: API reference
34+
- `source/examples.rst`: Usage examples

0 commit comments

Comments
 (0)