Skip to content

Commit 28c6181

Browse files
dreamiurgclaude
andauthored
docs: streamline documentation for clarity and automation (#28)
Simplified README.md to focus on end-users: - Removed project structure and development sections - Removed technical implementation details (dependencies, how it works) - Simplified introduction and features list - Removed redundant Contributing section (added reference early instead) - Added early reference to CONTRIBUTING.md Updated CONTRIBUTING.md to reflect automated release process: - Removed pre-commit installation from basic setup - Removed detailed pre-commit hooks section - Emphasized automated releases via GitHub Actions - Clarified manual releases are fallback only - Removed manual version override and troubleshooting sections Net result: Removed 124 lines of developer-focused content, making documentation more concise and user-focused. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude <noreply@anthropic.com>
1 parent 6d7e55b commit 28c6181

File tree

2 files changed

+25
-148
lines changed

2 files changed

+25
-148
lines changed

CONTRIBUTING.md

Lines changed: 18 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@ curl -LsSf https://astral.sh/uv/install.sh | sh
1616
# Set up the development environment
1717
uv sync
1818

19-
# Install pre-commit hooks
20-
uv run pre-commit install
21-
2219
# Run the CLI
2320
uv run peakbagger --help
2421
```
@@ -32,9 +29,6 @@ source .venv/bin/activate # On Windows: .venv\Scripts\activate
3229

3330
# Install in editable mode with dev dependencies
3431
pip install -e ".[dev]"
35-
36-
# Install pre-commit hooks
37-
pre-commit install
3832
```
3933

4034
## Project Structure
@@ -63,26 +57,7 @@ peakbagger-cli/
6357

6458
## Code Quality
6559

66-
### Pre-commit Hooks
67-
68-
Pre-commit hooks automatically check code before commits:
69-
70-
```bash
71-
# Install hooks (one time setup)
72-
uv run pre-commit install
73-
74-
# Run manually on all files
75-
uv run pre-commit run --all-files
76-
```
77-
78-
**Hooks verify:**
79-
80-
- **Ruff**: Formatting and linting (replaces Black, isort, flake8)
81-
- **Bandit**: Security vulnerability checks
82-
- **mypy**: Type checking
83-
- File hygiene (trailing whitespace, end of file newlines, etc.)
84-
85-
### Manual Formatting and Linting
60+
### Formatting and Linting
8661

8762
```bash
8863
# Format code
@@ -146,7 +121,18 @@ When updating scraper logic:
146121
1. Test parsing locally without network requests
147122
1. Update tests with new HTML structure
148123

149-
## Release Process (Maintainers Only)
124+
## Release Process
125+
126+
### Automated Releases (Default)
127+
128+
**Releases are fully automated via GitHub Actions.** When commits are merged to the `main` branch:
129+
130+
1. GitHub Actions analyzes commit messages
131+
2. If a release-triggering commit is found, the version is bumped automatically
132+
3. CHANGELOG.md is updated
133+
4. A Git tag and GitHub release are created
134+
135+
**No manual intervention needed** - just merge your PR with a conventional commit message.
150136

151137
### Commit Message Format
152138

@@ -186,23 +172,16 @@ git commit -m "feat: redesign CLI interface
186172
BREAKING CHANGE: The --full flag has been replaced with --detailed"
187173
```
188174

189-
### Creating a Release
175+
### Manual Release (Fallback Only)
176+
177+
Manual releases are rarely needed but available for testing or troubleshooting:
190178

191179
```bash
192180
# Preview what would be released
193181
uv run semantic-release version --print
194182

195-
# Create the release (updates version, changelog, creates tag)
196-
uv run semantic-release version
197-
198-
# Build the package
199-
uv build
200-
201-
# Publish to PyPI
202-
uv tool run twine upload dist/*
203-
204-
# Create GitHub release
205-
gh release create v0.2.0 --notes-from-tag
183+
# Create release locally (testing/development only)
184+
uv run semantic-release version --no-push --no-vcs-release
206185
```
207186

208187
### Version Bumping Examples
@@ -215,36 +194,6 @@ gh release create v0.2.0 --notes-from-tag
215194
| Multiple `fix:` commits | 3x `fix:` commits | `0.1.1` (single bump) |
216195
| `fix:` + `feat:` | Both types present | `0.2.0` (highest bump wins) |
217196

218-
### Manual Version Override
219-
220-
```bash
221-
# Force a specific bump type
222-
uv run semantic-release version --patch
223-
uv run semantic-release version --minor
224-
uv run semantic-release version --major
225-
226-
# Set exact version
227-
uv run semantic-release version --bump-version 0.3.0
228-
```
229-
230-
### Troubleshooting Releases
231-
232-
#### "No release will be made"
233-
234-
- No commits since last release follow conventional format
235-
- Add a conventional commit or use `--patch/--minor/--major` flag
236-
237-
#### "Token value is missing"
238-
239-
- This warning is safe to ignore for manual releases
240-
- Only needed for GitHub Actions automation
241-
242-
#### Wrong version calculated
243-
244-
- Review commits: `git log v0.1.0..HEAD --oneline`
245-
- Check commit types match conventional format
246-
- Use `--noop` flag to preview before committing
247-
248197
## License
249198

250199
Contributing to peakbagger-cli means your contributions receive MIT License terms.

README.md

Lines changed: 7 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,20 @@
66
[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/dreamiurg/peakbagger-cli/blob/main/LICENSE)
77
[![Types: Typed](https://img.shields.io/badge/types-typed-brightgreen.svg)](https://github.com/dreamiurg/peakbagger-cli/blob/main/peakbagger)
88

9-
A modern command-line interface for searching and retrieving mountain peak data from [PeakBagger.com](https://www.peakbagger.com).
10-
11-
Python 3.12+, Click, and Rich deliver a beautiful terminal experience.
9+
A command-line interface for searching and retrieving mountain peak data from [PeakBagger.com](https://www.peakbagger.com).
1210

1311
## Features
1412

1513
- 🔍 **Search peaks** by name with instant results
1614
- 📊 **Detailed peak info** including elevation, prominence, isolation, and location
1715
- 📈 **Ascent statistics** - analyze climbing activity, seasonal patterns, and trip reports
18-
- 🎨 **Beautiful output** with Rich-formatted tables and colors
16+
- 🎨 **Beautiful output** with formatted tables and colors
1917
- 🤖 **JSON output** for automation and scripting
20-
-**Fast and modern** using `uv` for dependency management and Pydantic models
2118
- 🛡️ **Respectful scraping** with configurable rate limiting
2219
- 🌐 **Cloudflare bypass** for reliable access
2320

21+
> **For contributors**: See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup, code guidelines, and release process.
22+
2423
## Installation
2524

2625
### Using uvx (Recommended - No Installation Required)
@@ -584,76 +583,10 @@ peakbagger peak search "Rainier" --rate-limit 3.0
584583
peakbagger peak show 2296 --rate-limit 1.0
585584
```
586585

587-
## Project Structure
588-
589-
```text
590-
peakbagger-cli/
591-
├── peakbagger/
592-
│ ├── __init__.py # Package metadata
593-
│ ├── cli.py # Click CLI commands
594-
│ ├── client.py # HTTP client with rate limiting
595-
│ ├── scraper.py # HTML parsing logic
596-
│ ├── models.py # Data models
597-
│ ├── formatters.py # Output formatting (Rich/JSON)
598-
│ └── logging_config.py # Logging configuration
599-
├── tests/ # Test suite (coming soon)
600-
├── pyproject.toml # Project configuration
601-
├── README.md # This file
602-
├── CONTRIBUTING.md # Contribution guide
603-
└── LICENSE # MIT License
604-
```
605-
606-
## Development
607-
608-
See [CONTRIBUTING.md](CONTRIBUTING.md) for detailed development guidelines.
609-
610-
### Quick Setup
586+
## Data Source
611587

612-
```bash
613-
# Clone the repository
614-
git clone https://github.com/yourusername/peakbagger-cli.git
615-
cd peakbagger-cli
616-
617-
# Set up development environment with uv
618-
uv sync
619-
620-
# Run the CLI
621-
uv run peakbagger --help
622-
```
623-
624-
### Running Commands
625-
626-
```bash
627-
# Run CLI commands during development
628-
uv run peakbagger peak search "Rainier"
629-
uv run peakbagger peak show 2296
630-
631-
# Check version
632-
uv run peakbagger --version
633-
```
634-
635-
## Technical Details
636-
637-
### Dependencies
638-
639-
- **Click**: CLI framework
640-
- **cloudscraper**: Cloudflare bypass for HTTP requests
641-
- **BeautifulSoup4**: HTML parsing
642-
- **lxml**: Fast XML/HTML parser
643-
- **Rich**: Beautiful terminal output
644-
- **loguru**: Simple and powerful logging
645-
646-
### How It Works
647-
648-
1. **Search**: Queries PeakBagger.com's search endpoint with your query
649-
2. **Parse**: Extracts peak information from HTML using BeautifulSoup
650-
3. **Format**: Displays results as Rich tables (text) or JSON
651-
4. **Rate Limit**: Waits between requests to respect the server
652-
653-
### Data Sources
654-
655-
This tool scrapes all data from [PeakBagger.com](https://www.peakbagger.com), which
656-
aggregates peak information from USGS, LIDAR data, and user contributions.
588+
All data is scraped from [PeakBagger.com](https://www.peakbagger.com).
589+
The site aggregates peak information from USGS, LIDAR data, and user contributions.
657590

658591
## Limitations
659592

@@ -699,11 +632,6 @@ Verify Python 3.12+ installation:
699632
python3 --version # Should be 3.12 or higher
700633
```
701634

702-
## Contributing
703-
704-
Contributions are welcome! See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup,
705-
code style guidelines, and submission instructions.
706-
707635
## Support
708636

709637
- **Bug Reports & Feature Requests**: [GitHub Issues](https://github.com/yourusername/peakbagger-cli/issues)

0 commit comments

Comments
 (0)