Skip to content

Commit 074c142

Browse files
committed
Release: v2.1.0
1 parent 7293901 commit 074c142

17 files changed

Lines changed: 137 additions & 537 deletions

CHANGELOG.md

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,89 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [2.1.0] - 2024-08-28
9+
10+
### 🚀 Modernization Release - uv and Python 3.12+ Optimization
11+
12+
This release modernizes the project to use `uv` for package management and removes all legacy `typing` imports in favor of modern Python 3.12+ type annotations.
13+
14+
### Added
15+
16+
#### 📦 Package Management Modernization
17+
- **uv Support**: Full migration from pip to uv for faster package management
18+
- **Hatchling Backend**: Updated build system to use hatchling instead of setuptools
19+
- **Optimized Dependencies**: Removed unused dependencies (pathlib-mate, typing-extensions)
20+
21+
#### 🐍 Modern Python 3.12+ Features
22+
- **Native Type Annotations**: Removed all `typing` module imports
23+
- **Union Syntax**: Using `|` instead of `Union` throughout codebase
24+
- **Collections.abc**: Using built-in collections.abc instead of typing equivalents
25+
- **Modern Object Type**: Using `object` instead of `Any` where appropriate
26+
27+
### Changed
28+
29+
#### 🧹 Code Modernization
30+
- **Type System**: Complete removal of typing module dependencies
31+
- **Import Cleanup**: Removed unused imports (asyncio, typing-extensions)
32+
- **Dependency Reduction**: Streamlined dependency list to essential packages only
33+
34+
#### 📚 Documentation Updates
35+
- **Installation Instructions**: Updated to recommend uv over pip
36+
- **Development Setup**: Modernized development workflow with uv
37+
- **Contributing Guide**: Updated with uv-based development process
38+
39+
### Removed
40+
41+
#### 🗑️ Legacy Code Cleanup
42+
- **Legacy Scripts**: Removed old compatibility scripts (wog_dump.py, convert_normal_map.py)
43+
- **Typing Imports**: Eliminated all `from typing import` statements
44+
- **Unused Dependencies**: Removed pathlib-mate and typing-extensions
45+
- **Dead Code**: Cleaned up unused imports and deprecated patterns
46+
47+
### Migration Guide
48+
49+
#### For Developers
50+
51+
**Old Development Setup:**
52+
```bash
53+
pip install -e ".[dev]"
54+
```
55+
56+
**New Development Setup:**
57+
```bash
58+
uv pip install -e ".[dev]"
59+
```
60+
61+
#### Type Annotation Changes
62+
63+
**Before (v2.0):**
64+
```python
65+
from typing import Any, Dict, List, Optional, Union
66+
67+
def process_data(items: List[Dict[str, Any]]) -> Optional[Dict[str, Union[str, int]]]:
68+
pass
69+
```
70+
71+
**After (v2.1):**
72+
```python
73+
def process_data(items: list[dict[str, object]]) -> dict[str, str | int] | None:
74+
pass
75+
```
76+
77+
### Technical Improvements
78+
79+
#### Performance
80+
- **Faster Installation**: uv provides significantly faster package resolution and installation
81+
- **Reduced Dependencies**: Fewer packages to install and manage
82+
- **Cleaner Imports**: No typing module overhead
83+
84+
#### Developer Experience
85+
- **Modern Syntax**: Cleaner, more readable type annotations
86+
- **Better Tooling**: uv provides superior dependency management
87+
- **Simplified Setup**: Fewer steps required for development environment
88+
89+
---
90+
891
## [2.0.0] - 2024-08-28
992

1093
### 🚀 Major Release - Complete Rewrite for Python 3.12+

CONTRIBUTING.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,17 @@ Thank you for your interest in contributing to WOG Dump! This document provides
1414

1515
2. **Set up Development Environment**
1616
```bash
17-
# Create virtual environment
18-
python -m venv venv
19-
source venv/bin/activate # Linux/macOS
17+
# Install uv if you haven't already
18+
curl -LsSf https://astral.sh/uv/install.sh | sh
19+
20+
# Create virtual environment with uv
21+
uv venv
22+
source .venv/bin/activate # Linux/macOS
2023
# or
21-
venv\Scripts\activate # Windows
24+
.venv\Scripts\activate # Windows
2225

2326
# Install in development mode
24-
pip install -e ".[dev]"
27+
uv pip install -e ".[dev]"
2528
```
2629

2730
3. **Install Pre-commit Hooks**

README.md

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -30,32 +30,39 @@ WOG Dump is a modern, completely refactored Python tool for extracting 3D gun mo
3030

3131
## 🚀 Installation
3232

33-
### Quick Install (Recommended)
33+
### Quick Install with uv (Recommended)
34+
35+
[uv](https://github.com/astral-sh/uv) is the modern, fast Python package installer and resolver.
36+
3437
```bash
38+
# Install uv if you haven't already
39+
curl -LsSf https://astral.sh/uv/install.sh | sh
40+
# or with pip: pip install uv
41+
3542
# Clone the repository
3643
git clone https://github.com/hampta/WOG-dump
3744
cd WOG-dump
3845

39-
# Install in development mode
40-
pip install -e .
46+
# Install in development mode with uv
47+
uv pip install -e .
4148
```
4249

43-
### Manual Install
50+
### Alternative Installation Methods
51+
52+
**Traditional pip:**
4453
```bash
4554
# Clone repository
4655
git clone https://github.com/hampta/WOG-dump
4756
cd WOG-dump
4857

49-
# Install dependencies
50-
pip install -r requirements.txt
51-
# OR install from pyproject.toml
52-
pip install .
58+
# Install with pip
59+
pip install -e .
5360
```
5461

55-
### Development Setup
62+
**Development Setup with uv:**
5663
```bash
5764
# Install with development dependencies
58-
pip install -e ".[dev]"
65+
uv pip install -e ".[dev]"
5966

6067
# Install pre-commit hooks
6168
pre-commit install
@@ -207,8 +214,8 @@ pytest -m slow # Slow tests
207214
## 🔨 Development
208215

209216
```bash
210-
# Install development dependencies
211-
pip install -e ".[dev]"
217+
# Install development dependencies with uv
218+
uv pip install -e ".[dev]"
212219

213220
# Code formatting
214221
black src/ tests/
@@ -219,6 +226,9 @@ mypy src/
219226

220227
# Linting
221228
flake8 src/ tests/
229+
230+
# Run all checks
231+
uv run pre-commit run --all-files
222232
```
223233

224234
## ➕ Additional Tools

convert_normal_map.py

Lines changed: 0 additions & 68 deletions
This file was deleted.

pyproject.toml

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
[build-system]
2-
requires = ["setuptools>=68.0", "wheel"]
3-
build-backend = "setuptools.build_meta"
2+
requires = ["hatchling"]
3+
build-backend = "hatchling.build"
44

55
[project]
66
name = "wog-dump"
7-
version = "2.0.0"
7+
version = "2.1.0"
88
description = "A modern tool to download, decrypt and unpack 3D gun models from World of Guns: Gun Disassembly"
99
readme = "README.md"
1010
license = {text = "MIT"}
@@ -37,8 +37,6 @@ dependencies = [
3737
"pydantic>=2.4.0",
3838
"pillow>=10.0.0",
3939
"rich>=13.0.0",
40-
"pathlib-mate>=1.0.0",
41-
"typing-extensions>=4.8.0",
4240
]
4341

4442
[project.optional-dependencies]
@@ -68,12 +66,6 @@ Documentation = "https://github.com/hampta/WOG-dump/blob/main/README.md"
6866
wog-dump = "wog_dump.cli.main:main"
6967
wog-convert-normals = "wog_dump.utils.normal_map:cli_main"
7068

71-
[tool.setuptools.packages.find]
72-
where = ["src"]
73-
74-
[tool.setuptools.package-dir]
75-
"" = "src"
76-
7769
[tool.black]
7870
line-length = 88
7971
target-version = ['py312']

requirements.txt

Lines changed: 0 additions & 26 deletions
This file was deleted.

src/wog_dump/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
from __future__ import annotations
1111

12-
__version__ = "2.0.0"
12+
__version__ = "2.1.0"
1313
__author__ = "hampta"
1414
__email__ = "hampta@example.com"
1515
__description__ = "A modern tool to download, decrypt and unpack 3D gun models from World of Guns: Gun Disassembly"

src/wog_dump/cli/main.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
import sys
66
from pathlib import Path
7-
from typing import Any
87

98
import click
109

src/wog_dump/core/config.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import os
66
import platform
77
from pathlib import Path
8-
from typing import Any, ClassVar
98

109
from pydantic import BaseModel, Field, computed_field, field_validator
1110

@@ -137,7 +136,7 @@ def get_config() -> WOGConfig:
137136
return _config
138137

139138

140-
def set_config(**kwargs: Any) -> WOGConfig:
139+
def set_config(**kwargs: object) -> WOGConfig:
141140
"""Set configuration parameters and return the updated config."""
142141
global _config
143142
if _config is None:

src/wog_dump/core/decrypt.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
from concurrent.futures import ThreadPoolExecutor, as_completed
1010
from io import BytesIO
1111
from pathlib import Path
12-
from typing import Any
1312

1413
import requests
1514
import UnityPy
@@ -71,7 +70,7 @@ def get_key_for_asset(self, asset_name: str) -> str | None:
7170

7271
return None
7372

74-
except (requests.RequestException, bz2.BZ2Error, UnicodeDecodeError) as e:
73+
except (requests.RequestException, OSError, UnicodeDecodeError) as e:
7574
self.logger.error(f"Failed to get key for {asset_name}: {e}")
7675
return None
7776

0 commit comments

Comments
 (0)