Skip to content

Commit 3ad85d8

Browse files
authored
Merge pull request #65 from HyperionGray/copilot/complete-cicd-review
Add missing documentation files and README sections for CI/CD compliance
2 parents bc3abac + 05898dc commit 3ad85d8

File tree

5 files changed

+264
-432
lines changed

5 files changed

+264
-432
lines changed

CHANGELOG.md

Lines changed: 49 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -5,75 +5,68 @@ 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-
## [0.5.0] - 2024-12-XX
8+
## [Unreleased]
99

1010
### Added
11-
- **I/O Mode**: New `cdp.connection` module providing WebSocket I/O, JSON-RPC framing, and command multiplexing
12-
- **8 New Domains**: Extensions, FedCm, DeviceAccess, FileSystem, Autofill, BluetoothEmulation, PWA, Preload
13-
- **Privacy Sandbox APIs**: Comprehensive support for Attribution Reporting, Shared Storage, Interest Groups/FLEDGE
14-
- Security-focused APIs for testing federated authentication, device permissions, and extension boundaries
15-
- Bounce tracking mitigation testing capabilities
16-
- IP protection proxy status and control
17-
- Related Website Sets (First-Party Sets) support
18-
- Form security issue detection via Audits domain
19-
- Privacy Sandbox enrollment override for testing
20-
- Enhanced cookie controls for third-party cookie testing
11+
- CONTRIBUTING.md with contribution guidelines
12+
- CHANGELOG.md for tracking version history
13+
- CODE_OF_CONDUCT.md for community standards
14+
- SECURITY.md with security policy and vulnerability reporting
15+
16+
## [0.5.0]
17+
18+
### Added
19+
- I/O Mode with built-in WebSocket connection support via `cdp.connection` module
20+
- WebSocket management with async context managers
21+
- JSON-RPC message framing and multiplexing
22+
- Event handling via async iterators
23+
- Comprehensive error handling with typed exceptions
24+
- Optional websockets dependency via `[io]` extra
2125

2226
### Changed
23-
- Updated to Chrome DevTools Protocol version 1.3 (latest)
24-
- Fixed same-domain type reference bug in code generator (e.g., `Network.TimeSinceEpoch` now correctly resolves)
25-
- Improved code generator to protect manually-written files (connection.py, util.py)
26-
- `page.navigate()` now returns 4 values instead of 3 (added `is_download` parameter)
27+
- Enhanced README with I/O mode documentation
28+
- Improved examples demonstrating both Sans-I/O and I/O modes
2729

28-
### Removed
29-
- **Breaking Change**: Removed deprecated Database domain (use IndexedDB, Storage, or Cache Storage APIs instead)
30+
## [0.4.0]
3031

31-
### Security
32-
- Added comprehensive security testing capabilities for Privacy Sandbox
33-
- Enhanced storage domain with privacy-preserving measurement APIs
34-
- Added attribution reporting and shared storage tracking
35-
- Improved form security auditing
32+
### Changed
33+
- Updated to latest Chrome DevTools Protocol specification
34+
- Improved type hints and mypy compliance
35+
- Enhanced documentation
3636

37-
## [0.4.0] - Previous Release
37+
## [0.3.0]
3838

3939
### Added
40-
- Initial sans-I/O implementation
41-
- Type wrappers for Chrome DevTools Protocol
40+
- Initial Sans-I/O implementation
4241
- Automatic code generation from CDP specification
43-
- Support for Python 3.7+
44-
45-
## Migration Guide
46-
47-
### From 0.4.x to 0.5.0
42+
- Type wrappers for all CDP types, commands, and events
43+
- Comprehensive test suite
4844

49-
#### Database Domain Removed
50-
```python
51-
# Old (no longer works)
52-
from cdp import database
53-
await conn.execute(database.some_command())
54-
55-
# New - Use IndexedDB instead
56-
from cdp import indexed_db
57-
await conn.execute(indexed_db.request_database_names(security_origin="https://example.com"))
58-
```
59-
60-
#### page.navigate() Return Signature Changed
61-
```python
62-
# Old (3 values)
63-
frame_id, loader_id, error_text = await conn.execute(page.navigate(url="..."))
45+
### Changed
46+
- Improved project structure
47+
- Enhanced type safety
6448

65-
# New (4 values - added is_download)
66-
frame_id, loader_id, error_text, is_download = await conn.execute(page.navigate(url="..."))
67-
```
49+
## [0.2.0]
6850

69-
## Links
51+
### Added
52+
- Enhanced type definitions
53+
- Additional protocol domains
7054

71-
- [Repository](https://github.com/HyperionGray/python-chrome-devtools-protocol)
72-
- [Documentation](https://py-cdp.readthedocs.io)
73-
- [PyPI](https://pypi.org/project/chrome-devtools-protocol/)
74-
- [Chrome DevTools Protocol](https://chromedevtools.github.io/devtools-protocol/)
55+
### Fixed
56+
- Various type annotation improvements
57+
- Bug fixes in code generation
7558

76-
---
59+
## [0.1.0]
7760

78-
For detailed security-relevant updates, see [SECURITY.md](SECURITY.md).
79-
For implementation details, see [IMPLEMENTATION.md](IMPLEMENTATION.md).
61+
### Added
62+
- Initial release
63+
- Basic type wrappers for Chrome DevTools Protocol
64+
- Code generator from CDP specification
65+
- MIT License
66+
67+
[Unreleased]: https://github.com/HyperionGray/python-chrome-devtools-protocol/compare/v0.5.0...HEAD
68+
[0.5.0]: https://github.com/HyperionGray/python-chrome-devtools-protocol/compare/v0.4.0...v0.5.0
69+
[0.4.0]: https://github.com/HyperionGray/python-chrome-devtools-protocol/compare/v0.3.0...v0.4.0
70+
[0.3.0]: https://github.com/HyperionGray/python-chrome-devtools-protocol/compare/v0.2.0...v0.3.0
71+
[0.2.0]: https://github.com/HyperionGray/python-chrome-devtools-protocol/compare/v0.1.0...v0.2.0
72+
[0.1.0]: https://github.com/HyperionGray/python-chrome-devtools-protocol/releases/tag/v0.1.0

CODE_OF_CONDUCT.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ representative at an online or offline event.
5959
## Enforcement
6060

6161
Instances of abusive, harassing, or otherwise unacceptable behavior may be
62-
reported to the community leaders responsible for enforcement at the project
63-
repository. All complaints will be reviewed and investigated promptly and fairly.
62+
reported to the community leaders responsible for enforcement via GitHub issues.
63+
All complaints will be reviewed and investigated promptly and fairly.
6464

6565
All community leaders are obligated to respect the privacy and security of the
6666
reporter of any incident.

CONTRIBUTING.md

Lines changed: 67 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -1,143 +1,138 @@
11
# Contributing to PyCDP
22

3-
Thank you for your interest in contributing to Python Chrome DevTools Protocol (PyCDP)! This document provides guidelines for contributing to the project.
3+
Thank you for your interest in contributing to Python Chrome DevTools Protocol (PyCDP)! We welcome contributions from the community.
44

55
## Getting Started
66

77
### Prerequisites
88

99
- Python 3.7 or higher
10-
- [Poetry](https://python-poetry.org/) for dependency management
10+
- Poetry for dependency management
11+
- Git for version control
1112

12-
### Setting Up Your Development Environment
13+
### Setting Up Development Environment
1314

14-
1. Fork the repository on GitHub
15-
2. Clone your fork locally:
15+
1. Fork and clone the repository:
1616
```bash
1717
git clone https://github.com/YOUR_USERNAME/python-chrome-devtools-protocol.git
1818
cd python-chrome-devtools-protocol
1919
```
20-
3. Install dependencies:
20+
21+
2. Install dependencies:
2122
```bash
23+
pip install poetry
2224
poetry install
2325
```
2426

2527
## Development Workflow
2628

2729
### Code Generation
2830

29-
This project automatically generates Python wrappers from the Chrome DevTools Protocol specification. Most code in the `cdp/` directory (except `connection.py` and `util.py`) is auto-generated.
31+
This project automatically generates Python wrappers from the Chrome DevTools Protocol specification:
3032

31-
To regenerate the protocol wrappers:
3233
```bash
33-
poetry run make generate
34+
poetry run python generator/generate.py
3435
```
3536

3637
### Running Tests
3738

3839
Run the test suite:
3940
```bash
40-
poetry run make test-cdp
41-
poetry run make test-generate
42-
```
43-
44-
Or run all checks:
45-
```bash
46-
poetry run make
41+
poetry run pytest test/
42+
poetry run pytest generator/
4743
```
4844

4945
### Type Checking
5046

5147
We use mypy for static type checking:
5248
```bash
53-
poetry run make mypy-cdp
54-
poetry run make mypy-generate
49+
poetry run mypy cdp/
50+
poetry run mypy generator/
5551
```
5652

57-
### Building Documentation
53+
### Complete Build
5854

59-
To build the documentation:
55+
Run all checks (type checking, tests, and generation):
6056
```bash
61-
poetry run make docs
57+
poetry run make default
6258
```
6359

64-
## Making Changes
65-
66-
### Code Style
60+
## Submitting Changes
6761

68-
- Follow PEP 8 style guidelines
69-
- Use type hints for all function signatures
70-
- Keep code clear and well-documented
71-
72-
### Commit Messages
73-
74-
- Use clear and descriptive commit messages
75-
- Reference issue numbers when applicable
76-
- Keep commits focused on a single change
62+
### Pull Request Process
7763

78-
### Pull Requests
79-
80-
1. Create a new branch for your changes:
64+
1. Create a new branch for your feature or bugfix:
8165
```bash
8266
git checkout -b feature/your-feature-name
8367
```
84-
2. Make your changes and commit them
85-
3. Push to your fork and submit a pull request
86-
4. Ensure all tests pass and type checking succeeds
87-
5. Provide a clear description of your changes
88-
89-
## What to Contribute
9068

91-
### Areas for Contribution
69+
2. Make your changes and ensure:
70+
- All tests pass
71+
- Code passes type checking
72+
- Code follows the existing style
73+
- Documentation is updated if needed
9274

93-
- **Bug fixes**: Fix issues in the connection module or utility functions
94-
- **Documentation**: Improve examples, tutorials, or API documentation
95-
- **Tests**: Add test coverage for existing functionality
96-
- **Examples**: Add new usage examples in the `examples/` directory
75+
3. Commit your changes with clear, descriptive messages:
76+
```bash
77+
git commit -m "Add feature: brief description"
78+
```
9779

98-
### Code Generation Changes
80+
4. Push to your fork and submit a pull request:
81+
```bash
82+
git push origin feature/your-feature-name
83+
```
9984

100-
If you need to modify code generation:
101-
- Edit files in the `generator/` directory
102-
- Run the generator and verify the output
103-
- Ensure all tests still pass
104-
- Add tests for your generator changes
85+
5. In your pull request description:
86+
- Describe what changes you made and why
87+
- Reference any related issues
88+
- Include any relevant context
10589

106-
### Protocol Updates
90+
### Code Review
10791

108-
The protocol definitions are automatically fetched from the Chrome DevTools Protocol repository. If you need to update to a newer protocol version, please open an issue first to discuss the change.
92+
- Maintainers will review your pull request
93+
- Address any feedback or requested changes
94+
- Once approved, a maintainer will merge your PR
10995

11096
## Reporting Issues
11197

11298
### Bug Reports
11399

114100
When reporting bugs, please include:
115-
- Python version
116-
- PyCDP version
117-
- Steps to reproduce
118-
- Expected vs. actual behavior
119-
- Error messages or stack traces
101+
- A clear, descriptive title
102+
- Steps to reproduce the issue
103+
- Expected behavior vs. actual behavior
104+
- Python version and environment details
105+
- Any relevant error messages or logs
120106

121107
### Feature Requests
122108

123-
For feature requests:
124-
- Clearly describe the feature
125-
- Explain the use case
126-
- Consider if it fits the project's scope
109+
For feature requests, please:
110+
- Clearly describe the feature and its use case
111+
- Explain why it would be valuable
112+
- Provide examples if possible
127113

128-
## Code of Conduct
114+
## Code Style
129115

130-
Please be respectful and constructive in all interactions. We are committed to providing a welcoming and inclusive environment for all contributors.
116+
- Follow PEP 8 style guidelines
117+
- Use type hints for function parameters and return values
118+
- Write clear, descriptive variable and function names
119+
- Add docstrings for public APIs
120+
- Keep functions focused and modular
131121

132-
## Questions?
122+
## Documentation
133123

134-
If you have questions about contributing, please:
135-
- Check existing issues and pull requests
136-
- Open a new issue with your question
137-
- Tag it appropriately for visibility
124+
- Update README.md if you add new features
125+
- Update docstrings for any modified functions or classes
126+
- Add examples for new functionality when appropriate
138127

139128
## License
140129

141-
By contributing to PyCDP, you agree that your contributions will be licensed under the MIT License.
130+
By contributing, you agree that your contributions will be licensed under the MIT License.
131+
132+
## Questions?
133+
134+
If you have questions, feel free to:
135+
- Open an issue for discussion
136+
- Reach out to the maintainers
142137

143138
Thank you for contributing to PyCDP!

0 commit comments

Comments
 (0)