-
-
Notifications
You must be signed in to change notification settings - Fork 1
⚡ general improvements #40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
7bd68d9
refactor: enhance encoding function with depth limit and filter handling
techouse acbbe22
refactor: update hashing strategy in WeakWrapper to use proxy identity
techouse 75646a8
refactor: optimize merge logic by avoiding deepcopy for performance
techouse 512f109
test: add depth guard test to prevent recursion errors in encoding
techouse dd2d9af
test: add unit test for merging with non-dict mapping target
techouse ecb8b48
refactor: improve hash handling in WeakWrapper tests and enhance valu…
techouse 7a57f89
refactor: correct type hint for deque and improve comment clarity in …
techouse 78a63f9
refactor: update input handling in encode function and improve max de…
techouse 1488114
refactor: enhance comment clarity for merge target preparation in Uti…
techouse 5c715ff
refactor: implement max depth option for encoding and enhance related…
techouse 12ad2b5
test: add assertion for max_depth property in EncodeOptions
techouse c46ab50
refactor: improve clarity in project instructions regarding input han…
techouse f6cfa76
chore: remove outdated AGENTS.md file and add comprehensive repositor…
techouse 1f6936f
refactor: rename test for clarity and add assertions for hash stabili…
techouse File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -116,7 +116,6 @@ venv.bak/ | |
|
|
||
| # AI related | ||
| .junie | ||
| AGENTS.md | ||
|
|
||
| # VS Code specific | ||
| .history | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| # Repository Guidelines | ||
|
|
||
| ## Project Structure & Module Organization | ||
| - `src/qs_codec/` contains the codec implementation, option models, and helpers; place new modules here and keep exports deliberate. | ||
| - `tests/` mirrors the package layout with `test_*.py` files so every feature has a nearby regression check. | ||
| - `docs/` builds the Sphinx site; refresh guides when behavior or options change. | ||
| - `requirements_dev.txt` pins tooling and `tox.ini` mirrors the CI matrix—update both when adding dependencies. | ||
|
|
||
| ## Build, Test, and Development Commands | ||
| - `python -m pip install -e .[dev]` installs the package alongside linting and typing extras. | ||
| - `pytest -v --cov=src/qs_codec` drives the unit suite and produces the coverage XML consumed by codecov. | ||
| - `tox -e python3.13` runs tests in an isolated interpreter; swap the env name to target other supported versions. | ||
| - `tox -e linters` chains Black, isort, flake8, pylint, bandit, pyright, and mypy to catch style or security drift before review. | ||
|
|
||
| ## Coding Style & Naming Conventions | ||
| - Format code with Black (120-char lines) and order imports with isort's Black profile, both configured in `pyproject.toml`. | ||
| - Keep functions and modules in snake_case, reserve PascalCase for classes reflecting `qs` data structures, and type hint public APIs. | ||
| - Respect docstring tone and option names from the JavaScript `qs` package to signal parity. | ||
|
|
||
| ## Testing Guidelines | ||
| - Add or extend pytest cases under `tests/`, leaning on parametrization for the different encoder/decoder modes. | ||
| - Preserve or raise the coverage level tracked in `coverage.xml`; CI flags regressions. | ||
| - Name tests `test_{feature}_{scenario}` and refresh fixtures whenever query-string semantics shift. | ||
| - When touching cross-language behavior, run `tests/comparison/compare_outputs.sh` to confirm parity with the Node reference. | ||
| - For encoding depth changes, cover `EncodeOptions.max_depth` (positive int/None) and cap-to-recursion behavior. | ||
|
|
||
| ## Commit & Pull Request Guidelines | ||
| - Follow the emoji-prefixed summaries visible in `git log` (e.g., `:arrow_up: Bump actions/setup-python from 5 to 6 (#26)`), using the imperative mood. | ||
| - Keep each commit focused; include a short body for impactful changes explaining compatibility or migration notes. | ||
| - For PRs, push only after `tox` succeeds, link the driving issue, outline user-facing changes, and note the tests you ran (attach before/after snippets for docs tweaks). | ||
|
|
||
| ## Security & Compatibility Notes | ||
| - Follow `SECURITY.md` for private vulnerability disclosure and avoid posting sensitive details in public threads. | ||
| - This port tracks the npm `qs` package; document intentional divergences in both code and docs as soon as they occur. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.