instance_id stringlengths 10 65 | repo stringlengths 5 59 | pr_number int64 1 313k | task_type stringclasses 1
value | base_commit stringlengths 40 40 | review_commit stringlengths 40 40 | title stringlengths 2 282 | body stringlengths 7 3k | patch stringlengths 202 204k | n_defects int64 1 72 | n_supported int64 1 65 | n_major int64 0 32 | defects stringlengths 140 18.8k | certifier_count int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
strapi__strapi__24608 | strapi/strapi | 24,608 | defect | b86673f75ed13156625a6ff4c512dc3e6921f849 | 58a4350ab300ed518e23cb27ccfd9eb438599456 | fix: misleading error message when publish empty required components | ### What does it do?
There's a misleading error when trying to publish a component that is either required or has required fields with empty fields.
<img width="513" height="126" alt="Screenshot 2025-10-16 at 16 44 47" src="https://github.com/user-attachments/assets/31378046-2518-4d0e-936e-2edf03c1f227" />
The... | diff --git a/packages/core/content-manager/admin/src/pages/EditView/components/DocumentActions.tsx b/packages/core/content-manager/admin/src/pages/EditView/components/DocumentActions.tsx
index 87203ae3f542..098b7c9d4b74 100644
--- a/packages/core/content-manager/admin/src/pages/EditView/components/DocumentActions.tsx
+... | 1 | 1 | 1 | [{"id": "G0", "claim": "The new e2e test should use `test` instead of `test.only` so it does not run as a focused test that skips the rest of the suite.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
strapi__strapi__24659 | strapi/strapi | 24,659 | defect | f9e7b7b70b0498e2839c165642b6a810c8574ba1 | 842f71f22dcb7b9384eb4c9b09e1296e8185f5be | fix: prefill non translatable fields when creating new document locale | ### What does it do?
When creating a new locale of a document, the non translatable fields (where "Enable localization for this field" is disabled) are empty but they should be pre-filled because their values are shared between all locales.
BEFORE:
https://github.com/user-attachments/assets/c7b0518d-2c1f-422d-... | diff --git a/packages/plugins/i18n/admin/src/components/CMHeaderActions.tsx b/packages/plugins/i18n/admin/src/components/CMHeaderActions.tsx
index ceade4cbe41a..9d4ee8b63afc 100644
--- a/packages/plugins/i18n/admin/src/components/CMHeaderActions.tsx
+++ b/packages/plugins/i18n/admin/src/components/CMHeaderActions.tsx
@... | 3 | 2 | 1 | [{"id": "G0", "claim": "A failed fetch of source-locale data for the prefill only logs a console.warn instead of surfacing a NotificationError, and the reviewer asks whether staying silent is acceptable.", "category": "design", "verdict": "opposed", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The n... | null |
strapi__strapi__24739 | strapi/strapi | 24,739 | defect | 749ebd26c0d087f67c3039fd96e3f8e22e975afa | c602e006703f3ff9c431553804fae5818081f528 | fix: prevent admins from deleting themselves | ### What does it do?
- Add checks to see if the user is trying to delete themselves and throw an Error
- remove the delete icon/button from the admin user in the list, to prevent them from attempting to delete themselves
### Why is it needed?
- the resulting behavior from users deleting themselves is undesira... | diff --git a/packages/core/admin/admin/src/pages/Settings/pages/Users/ListPage.tsx b/packages/core/admin/admin/src/pages/Settings/pages/Users/ListPage.tsx
index 7eb551ae1167..8d112e8a9569 100644
--- a/packages/core/admin/admin/src/pages/Settings/pages/Users/ListPage.tsx
+++ b/packages/core/admin/admin/src/pages/Setting... | 3 | 1 | 1 | [{"id": "G0", "claim": "Consider letting the rest of a batch delete succeed and failing only the deletion of the requesting user's own account, for consistency with how other methods behave.", "category": "design", "verdict": "opposed", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "An existing API te... | null |
strapi__strapi__24899 | strapi/strapi | 24,899 | defect | cb374d6b06692607bcfbd4d5131bafd4c990aa29 | c8dfa314f85bca2548030a005aea641794f5e513 | chore: ctb session identifier implementation | <!--
Hello 👋 Thank you for submitting a pull request.
To help us merge your PR, make sure to follow the instructions below:
- Create or update the tests
- Create or update the documentation at https://github.com/strapi/documentation
- Refer to the issue you are closing in the PR description: Fix #issue
- Spe... | diff --git a/packages/core/admin/admin/src/features/Tracking.tsx b/packages/core/admin/admin/src/features/Tracking.tsx
index 5a32b627926b..63cd52cdaeeb 100644
--- a/packages/core/admin/admin/src/features/Tracking.tsx
+++ b/packages/core/admin/admin/src/features/Tracking.tsx
@@ -18,6 +18,16 @@ export interface Telemetry... | 1 | 1 | 1 | [{"id": "G0", "claim": "generateSessionId uses the cryptographically insecure Math.random() to build the CTB session identifier, which the security scanner flags as insecure randomness in a security context.", "category": "security", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
strapi__strapi__24909 | strapi/strapi | 24,909 | defect | d882b94b648d9b6ed979fafc0f9128412daddc24 | deec81922d16045458c14f1ff5e5476ddf6f4382 | chore: integrate subscription info in backend trackers | <!--
Hello 👋 Thank you for submitting a pull request.
To help us merge your PR, make sure to follow the instructions below:
- Create or update the tests
- Create or update the documentation at https://github.com/strapi/documentation
- Refer to the issue you are closing in the PR description: Fix #issue
- Spe... | diff --git a/packages/core/core/src/ee/index.ts b/packages/core/core/src/ee/index.ts
index 35d6175d1bb0..514f6c282be2 100644
--- a/packages/core/core/src/ee/index.ts
+++ b/packages/core/core/src/ee/index.ts
@@ -22,6 +22,8 @@ interface EE {
seats?: number;
type?: string;
isTrial: boolean;
+ subscriptio... | 1 | 1 | 1 | [{"id": "G0", "claim": "Copying the entire strapi.ee object into the metrics groupProperties is undesirable; it would be better to extract only the specific properties that should be sent.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
strapi__strapi__25012 | strapi/strapi | 25,012 | defect | 869f75b82c6faf1fddc8e4b7f968f36442c8fc62 | 505931665342dd9c9f96408596dd8206df56c040 | fix: replace favicon if provided in config | ### What does it do?
The current documentation to replace the favicon is wrong. If we put `head: { favicon }` in the admin config, it's just doing nothing.
Removing useless part in the code and updating the documentation (https://github.com/strapi/documentation/pull/2899) to explain how correctly replace the favico... | diff --git a/packages/core/admin/admin/src/StrapiApp.tsx b/packages/core/admin/admin/src/StrapiApp.tsx
index 6b8d48895caa..9e5c22946e5c 100644
--- a/packages/core/admin/admin/src/StrapiApp.tsx
+++ b/packages/core/admin/admin/src/StrapiApp.tsx
@@ -28,6 +28,7 @@ import {
} from './reducer';
import { getInitialRoutes } ... | 8 | 6 | 1 | [{"id": "G0", "claim": "Adzouz should verify that the reported favicon problem is not simply a browser/app cache issue, as suggested by the docs.", "category": "correctness", "verdict": "opposed", "priority": "P3", "scope": "pre_existing"}, {"id": "G1", "claim": "The new favicon helper hardcodes the MIME type to 'image... | null |
strapi__strapi__25097 | strapi/strapi | 25,097 | defect | eac316c672390ecdf839b7277a843cb71d2c72ff | a3da5e8c9ea9ee217ebf210d716343eedd639d7a | feat: allow selectionParams in documents.delete | ### What does it do?
Allow using `fields` and `populate` in delete calls. For example, if you add them in a documents.use middleware.
### Why is it needed?
I want to populate the delete so I can do something with the relations _after_ the delete happened.
Right now the `query` is used to find the versions o... | diff --git a/packages/core/core/src/services/document-service/entries.ts b/packages/core/core/src/services/document-service/entries.ts
index a062fe32fb4a..6cdc9bb1bd5c 100644
--- a/packages/core/core/src/services/document-service/entries.ts
+++ b/packages/core/core/src/services/document-service/entries.ts
@@ -87,10 +87... | 1 | 1 | 1 | [{"id": "G0", "claim": "With the current approach entriesToDelete is selected only by documentId, so localized deletes may be widened to all locales for that document; the existing locale/documentId delete query logic should be kept as-is and selection params applied separately to the returned deleted entries, plus a t... | null |
strapi__strapi__25123 | strapi/strapi | 25,123 | defect | f86041c89a8c1545c6437a881dc613e98bc52bd7 | b1aec91b81e63c8f0f46b9cbc2a1044a1cc14671 | Fix drag-and-drop preview in dynamic zones | <!--
Hello 👋 Thank you for submitting a pull request.
To help us merge your PR, make sure to follow the instructions below:
- Create or update the tests
- Create or update the documentation at https://github.com/strapi/documentation
- Refer to the issue you are closing in the PR description: Fix #issue
- Spe... | diff --git a/packages/core/admin/admin/src/components/Form.tsx b/packages/core/admin/admin/src/components/Form.tsx
index 03c9ee7c0c4c..b693d358fc1e 100644
--- a/packages/core/admin/admin/src/components/Form.tsx
+++ b/packages/core/admin/admin/src/components/Form.tsx
@@ -594,11 +594,28 @@ const reducer = <TFormValues ex... | 2 | 2 | 2 | [{"id": "G0", "claim": "On a key collision the retry loop adds the collided key back to the existingKeys set, which changes nothing, so generateNKeysBetween is called again with the same inputs and often returns the same key until the attempt limit is hit; the reviewer asks to fix that.", "category": "correctness", "ve... | null |
strapi__strapi__25303 | strapi/strapi | 25,303 | defect | e62f45eea4f47c86a376077d294a2743b2d35ea8 | b0a131ce97b58a63c4781a227fbe79f16d059f4b | test(api): use jwt default options instead of expiresIn | ### What does it do?
- switches our API tests to use the new JWT config option defaults instead of `expiresIn`
- adds test for legacy expiresIn to make sure it keeps working
### Why is it needed?
almost every API test spits out multiple warnings about deprecated values, polluting the test logs
### How to t... | diff --git a/packages/utils/api-tests/strapi.js b/packages/utils/api-tests/strapi.js
index 5db462223718..36e89bb1934f 100644
--- a/packages/utils/api-tests/strapi.js
+++ b/packages/utils/api-tests/strapi.js
@@ -22,6 +22,8 @@ const createStrapiInstance = async ({
bypassAuth = true,
bootstrap,
strapiOptions = {}... | 9 | 1 | 0 | [{"id": "G0", "claim": "Setting admin.auth.sessions.options to { expiresIn: null } may cause issues because null may not be distinguished from undefined downstream, so the helper should instead set an empty options object guarded by a check for existing config.", "category": "design", "verdict": "supported", "priority"... | null |
strapi__strapi__25344 | strapi/strapi | 25,344 | defect | a067d091b176b9dbeeec36c2cb1eaed448943860 | 6b41cfa844fddb5d3d0dd44fd582399fa9740b03 | fix: responsive drawer for content history | ### What does it do?
Enhancement of the content history page for mobile and tablet devices.
This part wasn't correctly adapted to smaller devices (not to say a nightmare 😅).
The right sidebar containing the list of versions is now in a collapsible sticky drawer at the bottom the page (making the rest of the fo... | diff --git a/packages/core/admin/admin/src/components/MainNav/MainNav.tsx b/packages/core/admin/admin/src/components/MainNav/MainNav.tsx
index db6273aeca6a..0bf3e7138be2 100644
--- a/packages/core/admin/admin/src/components/MainNav/MainNav.tsx
+++ b/packages/core/admin/admin/src/components/MainNav/MainNav.tsx
@@ -24,8 ... | 2 | 2 | 0 | [{"id": "G0", "claim": "The VersionAuthor component should be moved lower in the file, above the actual VersionCard, since the PR added VersionAuthor.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The list markup in VersionsList should be extra... | null |
strapi__strapi__25365 | strapi/strapi | 25,365 | defect | 355b65778029082ecc751d18f230c428a0945906 | 7e30918297a3bdaeb7f1e2c1240de0c585e73fc8 | future: implement grid view media library | ## What does it do?
Implements the grid view for the future media library
## Why is it needed?
Adds a functional grid view to the future media library
**Scope:**
- Folders, drag and drop, selection/multiselect, and CRUD operations are handled by other tasks
## How to test
1. Enable the future med... | diff --git a/packages/core/upload/admin/src/future/pages/Assets/components/AssetsGrid.tsx b/packages/core/upload/admin/src/future/pages/Assets/components/AssetsGrid.tsx
index c336570e8698..e64660df1d8a 100644
--- a/packages/core/upload/admin/src/future/pages/Assets/components/AssetsGrid.tsx
+++ b/packages/core/upload/a... | 7 | 6 | 2 | [{"id": "G0", "claim": "The e2e test 'should display uploaded file in the assets list' fails because it gets stuck in grid view after this change.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The three date/size cells in the asset row each repeat thei... | null |
strapi__strapi__25397 | strapi/strapi | 25,397 | defect | a4a53fd30626959d9711b5967e3c51e0b3b5b1c0 | 5fd715895fb849177067a93d433b1a3daaf53fc6 | future(upload): infinite asset loading | ## What does it do?
Adds infinite scroll pagination to the Media Library assets page.
- Introduces a `useInfiniteAssets` hook that fetches pages of assets
- Replaces the single-page `useGetAssetsQuery` with new `useInfiniteAssets` hook.
- Uses `useElementOnScreen` to automatically fetch the next page when the u... | diff --git a/packages/core/upload/admin/src/future/hooks/tests/useInfiniteAssets.test.ts b/packages/core/upload/admin/src/future/hooks/tests/useInfiniteAssets.test.ts
new file mode 100644
index 000000000000..a6eef7e71754
--- /dev/null
+++ b/packages/core/upload/admin/src/future/hooks/tests/useInfiniteAssets.test.ts
@@ ... | 3 | 2 | 1 | [{"id": "G0", "claim": "Scrolling down to load more assets shows the items twice (duplicated content).", "category": "correctness", "verdict": "supported", "priority": "P0", "scope": "introduced"}, {"id": "G1", "claim": "The 'Loading more assets...' indicator is never seen in testing; it may just be happening too fast ... | null |
strapi__strapi__25433 | strapi/strapi | 25,433 | defect | edcdb4221b562721f89b3190c00fd6a9434fe349 | e8b97f941d7d103e4d333ac3c5a5fe65e1240c2c | feat(content-manager): add relationOpenMode setting (modal/page/newTab) | ### What does it do?
Adds a new per-content-type setting called **"Relation open behavior"** (`relationOpenMode`) to the Content Manager. This setting allows users to choose how relation entries open when clicked:
- **Modal** (default) — opens the relation in the existing inline modal (current behavior, unchanged... | diff --git a/packages/core/content-manager/admin/src/components/ConfigurationForm/Form.tsx b/packages/core/content-manager/admin/src/components/ConfigurationForm/Form.tsx
index ab8ef9f52ab6..111920d3bd30 100644
--- a/packages/core/content-manager/admin/src/components/ConfigurationForm/Form.tsx
+++ b/packages/core/conte... | 8 | 7 | 2 | [{"id": "G0", "claim": "The author should lint and format the code with `yarn lint:fix` and `yarn prettier:write`.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The `RelationOpenMode` type should be imported from shared/contracts/content-types.... | null |
strapi__strapi__25447 | strapi/strapi | 25,447 | defect | ecb32992dd5f7756fdf21fc930cde3f8e4b84860 | e8a4d91f828c77787e190516e15d02840145121a | enhancement: extended ctb api for plugins | <!--
Hello 👋 Thank you for submitting a pull request.
To help us merge your PR, make sure to follow the instructions below:
- Create or update the tests
- Create or update the documentation at https://github.com/strapi/documentation
- Refer to the issue you are closing in the PR description: Fix #issue
- Spe... | diff --git a/packages/core/content-type-builder/server/src/controllers/validation/content-type.ts b/packages/core/content-type-builder/server/src/controllers/validation/content-type.ts
index fe50fca84c89..57e5f15a1b96 100644
--- a/packages/core/content-type-builder/server/src/controllers/validation/content-type.ts
+++ ... | 2 | 2 | 2 | [{"id": "G0", "claim": "The pull request's new plugin content-type support may impact the AI CTB chat, and that impact should be checked.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The optional `plugin` field in the create content-type schema sh... | null |
strapi__strapi__25468 | strapi/strapi | 25,468 | defect | 10956101955b3a848383af12a25e08bb18272082 | 059684b0dba28dbf478357408c56af7dc5701d66 | future(upload): folder list/grid view + navigation | ## What does it do?
This PR adds folder display and navigation capabilities to the future Media Library grid and table views.
### **Frontend Changes**
- **Folder Display:** Folders are rendered in grid view and table view
- **Folder Navigation:**
- **Folder Title Hook:** The `useFolderTitle` hook displays t... | diff --git a/packages/core/upload/admin/src/future/pages/Assets/AssetsPage.tsx b/packages/core/upload/admin/src/future/pages/Assets/AssetsPage.tsx
index ef4033547507..b3526bcfe333 100644
--- a/packages/core/upload/admin/src/future/pages/Assets/AssetsPage.tsx
+++ b/packages/core/upload/admin/src/future/pages/Assets/Asse... | 8 | 6 | 2 | [{"id": "G0", "claim": "The folder containers/items should be built with the design-system styled components (styled Flex) instead of styled divs.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The navigation handler defined in AssetsPage and drilled dow... | null |
strapi__strapi__25557 | strapi/strapi | 25,557 | defect | d7981bd752a22e0afc625d921ad144ffba413daa | 1046e404572b2b7842e4c085f4ad42cabaf1f3f1 | fix(content-manager): reduce over-populated localizations and metadata | ### What does it do?
Reduces the amount of data populated for the localizations relation and meta.availableLocales in Content Manager responses.
- Adds withPopulateOverrids to the populate builder. Only populates minimal localization fields for content manager.
- Updates the bulk locale publish dialog to only vali... | diff --git a/packages/core/content-manager/server/src/controllers/collection-types.ts b/packages/core/content-manager/server/src/controllers/collection-types.ts
index be43d8467b6d..62623b990e29 100644
--- a/packages/core/content-manager/server/src/controllers/collection-types.ts
+++ b/packages/core/content-manager/serv... | 2 | 2 | 1 | [{"id": "G0", "claim": "The PR adds an extra layer of indirection where it could use the existing populate param: keep the isLocalized guard and, for list/find, pre-build the populate with the right localizations shape via a builder step that merges overrides into the initial populate (e.g. withPopulate({ localizations... | null |
strapi__strapi__25623 | strapi/strapi | 25,623 | defect | d262dfad94848d660bdbc6be8be118b2e93a69a9 | f1329010c510ecd56103ddb6e36991b1fc009e0e | fix(content-manager): reduce excessive rerendering in relation fields | ### What does it do?
This PR reduces unnecessary re-renders in the content-manager relation fields.
### Why is it needed?
Before this change, relation fields could re-render on unrelated field updates.
That was particularly expensive because the relation field contains a combobox/modal flow
On larger edi... | diff --git a/packages/core/content-manager/admin/src/pages/EditView/components/FormInputs/Relations/Relations.tsx b/packages/core/content-manager/admin/src/pages/EditView/components/FormInputs/Relations/Relations.tsx
index decf38ce3c0f..8e7b95753eb3 100644
--- a/packages/core/content-manager/admin/src/pages/EditView/co... | 3 | 1 | 1 | [{"id": "G0", "claim": "Since it is only used in one place, the EMPTY_RELATION_RESULTS constant the PR adds is unnecessary and could be inlined.", "category": "maintainability", "verdict": "uncertain", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The new itemData useMemo in RelationsList carries so ... | null |
strapi__strapi__25723 | strapi/strapi | 25,723 | defect | e3b43de8613d22a6f8959e96bbfe750dabaa3820 | 852450683f3290747571f97d448e2cabdcfbb6c3 | RBAC "Move to stage" for review workflows | ### What does it do?
- **Adds "to" stage permissions for Review Workflows.** Previously, permissions only controlled who can move content *out* of a stage ("from"). This change adds explicit "to" permissions so you can control which roles can move content *into* each stage.
- **Transition rules:** Moving from stage... | diff --git a/packages/core/review-workflows/admin/src/routes/settings/components/Stages.tsx b/packages/core/review-workflows/admin/src/routes/settings/components/Stages.tsx
index 601a1c51c2dd..55fc0afe7e97 100644
--- a/packages/core/review-workflows/admin/src/routes/settings/components/Stages.tsx
+++ b/packages/core/re... | 7 | 6 | 1 | [{"id": "G0", "claim": "Since the existing `permissions` entries are actually the from-permissions, the field should be renamed to `fromPermissions` in the admin Stages component.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The reviewer asked... | null |
strapi__strapi__25764 | strapi/strapi | 25,764 | defect | a6fd594526e2f77009ede7900438e49ccafaeeb6 | 6382dd55b9b5202fe53838694c693e8e5b950176 | fix(core): relation handling preserves order during unpublish/republish cycles | ## What does it do?
When a content entry is unpublished and then republished, the `load()` function in `bidirectional-relations.ts` now also retrieves the relation order from the draft link table
It maps the draft-side join-table rows to their corresponding future published rows, so that `sync()` can restore the ... | diff --git a/packages/core/core/src/services/document-service/utils/bidirectional-relations.ts b/packages/core/core/src/services/document-service/utils/bidirectional-relations.ts
index be1cfcfe7d8a..25db500d469a 100644
--- a/packages/core/core/src/services/document-service/utils/bidirectional-relations.ts
+++ b/package... | 2 | 2 | 2 | [{"id": "G0", "claim": "The fix still misses owner-side sync: publishing the owning side of a bidirectional relation does not capture and preserve the relation order on that side.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "Rows are dropped when ... | null |
strapi__strapi__25810 | strapi/strapi | 25,810 | defect | ed80b16a8e6ec3e228cc05ea2fa22555fb286b35 | 6916ab5ec329eff1bf70343330ebd557648c7368 | fix: contains filter no longer returns empty data | ### What does it do?
traverse scalar fields when the value is an operator object so filter handling matches nested structures used by the REST API
### Why is it needed?
Fixes REST filtering with **`$contains` / `$containsi`** on scalar fields sometimes returning empty datasets when matches should exist ([#2579... | diff --git a/packages/core/utils/src/__tests__/sanitize.visitors.test.ts b/packages/core/utils/src/__tests__/sanitize.visitors.test.ts
index ef06c86772a0..181d7b83511d 100644
--- a/packages/core/utils/src/__tests__/sanitize.visitors.test.ts
+++ b/packages/core/utils/src/__tests__/sanitize.visitors.test.ts
@@ -2,6 +2,7 ... | 1 | 1 | 1 | [{"id": "G0", "claim": "The guard in query-filters.ts should be generalized from just $null/$notNull to any operator operand that is an object but not actually filter-like, because scalar filters now recurse into operator maps and values like GraphQL DateTime operands ($gt: Date) flow through there, leaving failing Gra... | null |
strapi__strapi__25890 | strapi/strapi | 25,890 | defect | a6fd594526e2f77009ede7900438e49ccafaeeb6 | d29917d34b4542f4594aad470717674823108cc7 | fix(document-service): preserve self-referential relations during publish and discard | ### What does it do?
Adds a new `self-referential-relations` utility that captures and restores
self-referential join table rows across publish and discard-draft operations.
- `load()` queries join tables for rows where both sides belong to the set of
entries being published/discarded, before those entries are dele... | diff --git a/packages/core/core/src/services/document-service/repository.ts b/packages/core/core/src/services/document-service/repository.ts
index 247c3080b321..9828ef2d5ad9 100644
--- a/packages/core/core/src/services/document-service/repository.ts
+++ b/packages/core/core/src/services/document-service/repository.ts
@... | 5 | 4 | 3 | [{"id": "G0", "claim": "The fix misses bidirectional join-table duplication: when both sides of a self-referential relation are present, sync can write duplicate rows because the mappedBy inverse attribute shares the owning attribute's join table.", "category": "correctness", "verdict": "supported", "priority": "P1", "... | null |
strapi__strapi__25900 | strapi/strapi | 25,900 | defect | a8039bd84c73a690b1f2e561e362d3a833718fc8 | dba0c1239449afbfbd63f6890c31a06579566ac3 | fix: prevent trailing ? in URL when params is empty object (#25724) | ## What does it do?
When `params` is an empty object `{}`, `qs.stringify({})` returns an empty string `""`, resulting in URLs like `/actions/publish?` with a trailing `?`.
## Why is it needed?
The trailing `?` breaks the deduplication guard in the content-manager history lifecycles service:
```typescript
// lifecyc... | diff --git a/packages/core/admin/admin/src/utils/getFetchClient.ts b/packages/core/admin/admin/src/utils/getFetchClient.ts
index 6ee9024f70c9..21da8f4882e4 100644
--- a/packages/core/admin/admin/src/utils/getFetchClient.ts
+++ b/packages/core/admin/admin/src/utils/getFetchClient.ts
@@ -340,7 +340,10 @@ const getFetchCl... | 2 | 2 | 0 | [{"id": "G0", "claim": "The fix does not resolve the original issue because line 46 of packages/core/content-manager/server/src/history/services/lifecycles.ts also needs to strip the query string ('?locale={locale}' is appended there), so the check should be changed to strapi.requestContext.get()?.request.url.split('?'... | null |
strapi__strapi__25909 | strapi/strapi | 25,909 | defect | b78c5e7c6a8eff8c64ff187d9f43043a00dc4821 | db5099a41c9630fd196981d14ac19eda7ee252d7 | fix(document-service): preserve relations during publish | ## What does it do?
The `getDeepPopulate` function in the document service now **populates all non-morph relations**, regardless of their `visible` attribute.
Previously, it only included relations marked as visible or special admin fields (`createdBy` / `updatedBy`).
This ensures that internal actions lik... | diff --git a/packages/core/core/src/services/document-service/utils/populate.ts b/packages/core/core/src/services/document-service/utils/populate.ts
index 9e8dcf0a981c..1bc22fd81176 100644
--- a/packages/core/core/src/services/document-service/utils/populate.ts
+++ b/packages/core/core/src/services/document-service/uti... | 2 | 2 | 0 | [{"id": "G0", "claim": "The test description should not include the ticket number, e.g. drop '(CMS-150)' from the describe title.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The test should not modify files in the test app to set visible: fal... | null |
strapi__strapi__25911 | strapi/strapi | 25,911 | defect | e26d2748a294db13a7f10bcd7721ac3d9c0fe0ce | e42fce46218af3c8aac13e1c5dbb355d87d35825 | fix(admin): batch content manager permission checks and reuse session… | ### What does it do?
This change addresses the admin permission performance regression from two sides:
- It batches Content Manager link authorization during initialization, instead of calling `checkUserHasPermissions()` once per visible content type.
- It reuses the computed admin ability for repeated authentic... | diff --git a/packages/core/admin/server/src/bootstrap.ts b/packages/core/admin/server/src/bootstrap.ts
index 3b4cc95b1cc9..b819761d7ce3 100644
--- a/packages/core/admin/server/src/bootstrap.ts
+++ b/packages/core/admin/server/src/bootstrap.ts
@@ -2,6 +2,7 @@ import { merge, map, difference, uniq } from 'lodash/fp';
im... | 10 | 7 | 3 | [{"id": "G0", "claim": "The 60-second TTL and 500-session cap are unexplained; document the security/performance tradeoff in comments and consider making the values configurable via strapi.config.get.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": ... | null |
strapi__strapi__25996 | strapi/strapi | 25,996 | defect | 1799b4298064d8360a9fc16c9b920ffdd04d57dc | ac49fa93cfe9dd1077f6cf3c25df57dbd175182d | fix(content-manager): render ID column without number grouping | ## What
Fixes #25985
## Why
`CellValue.tsx` uses `formatNumber` (react-intl's `Intl.NumberFormat` wrapper) to render numeric values in the list view. This adds locale-specific grouping separators. That behavior is fine for regular integer fields, but confusing for the ID column, where a value like `17236` renders as... | diff --git a/packages/core/admin/server/src/bootstrap.ts b/packages/core/admin/server/src/bootstrap.ts
index 3b4cc95b1cc9..a4f2e0ce1d17 100644
--- a/packages/core/admin/server/src/bootstrap.ts
+++ b/packages/core/admin/server/src/bootstrap.ts
@@ -111,7 +111,12 @@ export default async ({ strapi }: { strapi: Core.Strapi ... | 4 | 4 | 2 | [{"id": "G0", "claim": "Existing unit tests asserting the previous grouped output (e.g. '314,159,265,359') will fail after the integer/biginteger formatting change, so they must be updated to assert the ungrouped value and ideally add a regression assertion for a larger integer.", "category": "testing", "verdict": "sup... | null |
strapi__strapi__26005 | strapi/strapi | 26,005 | defect | 43420134cce21eae10471ba1ffb0f0e506d076b4 | 2f1e7c9baa19d91312ec22c6407a8e44d35e3840 | fix(content-manager): optimize document layout hooks | ### What does it do?
Prevents duplicate network requests when loading Edit or List view in the content manager.
Key changes:
1. Reads persisted query params from localStorage during render to avoid extra fetches.
2. Defers document list queries until layout config is loaded to prevent unnecessary initial requ... | diff --git a/packages/core/content-manager/admin/src/hooks/useDocumentLayout.ts b/packages/core/content-manager/admin/src/hooks/useDocumentLayout.ts
index 0568889d3503..2f505dfdd019 100644
--- a/packages/core/content-manager/admin/src/hooks/useDocumentLayout.ts
+++ b/packages/core/content-manager/admin/src/hooks/useDoc... | 2 | 2 | 1 | [{"id": "G0", "claim": "The new readPersistedQueryParams helper is a localStorage utility rather than a hook, and the reviewer questions whether it belongs in usePersistentQueryParams.ts.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "It would b... | null |
strapi__strapi__26020 | strapi/strapi | 26,020 | defect | 8c649cc43b9208da7e5d730be7c58518888d6093 | 0142c0a298bb6eb71b6e5cdff459ba49600b4c92 | fix(admin): eliminate several browser race conditions | ### What does it do?
- **`Form.tsx`**: Keeps `valuesRef` in sync with `state.values` during render (not only in an effect) so `getValues()` / `validate()` always see the latest committed values. Validation reads from that ref snapshot and the validate callback no longer depends on `state.values` in a way that can go... | diff --git a/packages/core/admin/admin/src/components/Form.tsx b/packages/core/admin/admin/src/components/Form.tsx
index 189b239628cb..2fe654fd8af4 100644
--- a/packages/core/admin/admin/src/components/Form.tsx
+++ b/packages/core/admin/admin/src/components/Form.tsx
@@ -172,10 +172,13 @@ const Form = React.forwardRef<H... | 3 | 3 | 2 | [{"id": "G0", "claim": "Save reads the wrong `document` — `document.activeElement` is `undefined` on the plain form-values object, so the optional chain never calls `.blur()`.", "category": "correctness", "verdict": "supported", "priority": "P0", "scope": "introduced"}, {"id": "G1", "claim": "Using `setTimeout(…, 0)` t... | null |
strapi__strapi__26031 | strapi/strapi | 26,031 | defect | f57a81a5a3c8931385191a21e2aead29b3465978 | 8371e8f40b4883de0d2f07348aa36dc3b036ca3c | fix(i18n): preserve non-localized media when creating a locale | ### What does it do?
This change fixes locale creation for localized content types when they contain non-localized media fields.
It updates the Document Service i18n path to:
- populate non-localized fields before copying them into a newly created locale
- normalize copied media values into upload file IDs befo... | diff --git a/packages/core/core/src/services/document-service/internationalization.ts b/packages/core/core/src/services/document-service/internationalization.ts
index d54f1a613d48..c562cba3906c 100644
--- a/packages/core/core/src/services/document-service/internationalization.ts
+++ b/packages/core/core/src/services/do... | 8 | 5 | 2 | [{"id": "G0", "claim": "The local SchemaWithAttributes parameter type on normalizeMediaIds weakens type safety compared to the Schema.ContentType | Schema.Component type the duplicate in localizations.ts uses.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1"... | null |
strapi__strapi__26152 | strapi/strapi | 26,152 | defect | 4d3719a327155a5ea3919c02fbafb41e0fd1ac8d | d7b8868fb7b66391473d5a8bfe32888aa026c5d5 | fix(document-service): discard-draft 500 on self-referential manyToMany relations | ### What does it do?
Fixes two bugs in the document service that caused `discardDraft` to throw a 500 on content types with a **unidirectional self-referential relation** (e.g. a `manyToMany` targeting the same content type, with no `inversedBy`).
1. **`self-referential-relations.ts`** — `sync()` was converting t... | diff --git a/packages/core/core/src/services/document-service/utils/__tests__/self-referential-relations.test.ts b/packages/core/core/src/services/document-service/utils/__tests__/self-referential-relations.test.ts
index a6e98c4b62ae..0d39c25dfb44 100644
--- a/packages/core/core/src/services/document-service/utils/__te... | 1 | 1 | 0 | [{"id": "G0", "claim": "The idMapping accumulator's value type should be a number rather than `unknown`, since the target entry ID is an integer coming from the DB.", "category": "correctness", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
strasdat__Sophus__305 | strasdat/Sophus | 305 | defect | 7c50901c32b4a2ebc3d90b6a6cbad42baa7c2695 | d09ae80512e228cccd0c58a56080fe3022853785 | Templated local parametrization for ceres | * Added templated local parameterization class
* Slightly adjusted `RxSO2::cast` / `(Rx)SO3::operator*` in order to be compatible with `ceres::Jet`
In order to work around a corner-case of `SO2::Tangent` being `Scalar` (and not `Vector<Scalar, 1>`), helper trait `is_mappable_type_v` is introduced (using completenes... | diff --git a/sophus/ceres_local_parameterization.hpp b/sophus/ceres_local_parameterization.hpp
new file mode 100644
index 000000000..4bdad9f68
--- /dev/null
+++ b/sophus/ceres_local_parameterization.hpp
@@ -0,0 +1,96 @@
+#ifndef SOPHUS_CERES_LOCAL_PARAMETERIZATION_HPP
+#define SOPHUS_CERES_LOCAL_PARAMETERIZATION_HPP
+
... | 6 | 5 | 0 | [{"id": "G0", "claim": "The is_mappable trait's purpose is unclear (it may be just the negation of std::is_scalar) and its implementation is convoluted, so it should be rewritten in a more compact, readable form.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "... | null |
strasdat__Sophus__409 | strasdat/Sophus | 409 | defect | 142851aaa1247732fc2ba3725b90c3c6992cb04c | ed08799508b30b421aaa243c7d561a8e6cdf9b05 | Copy constructors for Ray and UnitNormal. | Convenience typedef for writing generic image code. | diff --git a/cpp/sophus/geometry/ray.h b/cpp/sophus/geometry/ray.h
index 40c0a2832..1676405aa 100644
--- a/cpp/sophus/geometry/ray.h
+++ b/cpp/sophus/geometry/ray.h
@@ -74,6 +74,9 @@ class UnitVector {
return vector_;
}
+ // Class invariant established from sibling we're copying from
+ UnitVector(UnitVector... | 1 | 1 | 1 | [{"id": "G0", "claim": "Copy assignment operators should also be added for UnitVector and Ray, per the rule of three, since copy constructors were added.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
stratis-storage__stratisd__3069 | stratis-storage/stratisd | 3,069 | defect | 161b6696f16faeb57eb4b10400c03bc2734d7c5e | 910cc46f0b827a65b83b41bd882db3fdeb910227 | Build stratisd with the udev sync devicemapper-rs branch | Update the build dependencies for devicemapper-rs to reference the bmr-udev-sync branch and include `ilbdevmapper.h` in the dependencies for CI environments. | diff --git a/.github/workflows/cargo.yml b/.github/workflows/cargo.yml
index ed772c0d2f5..7669907b601 100644
--- a/.github/workflows/cargo.yml
+++ b/.github/workflows/cargo.yml
@@ -42,6 +42,7 @@ jobs:
curl
cryptsetup-devel
dbus-devel
+ device-mapper-devel
git
... | 2 | 1 | 0 | [{"id": "G0", "claim": "For the stratis-cli tests the log level should stay at DEBUG rather than being raised to trace, since they run against the sim engine and don't tend to cause udev events of interest.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "... | null |
stratis-storage__stratisd__3273 | stratis-storage/stratisd | 3,273 | defect | 6dc54f43598c3c3b024624b76dac8cf723a14f23 | ae10467e968552304e6c6612ece7f203060a02ab | Update stratis to clap v4 | Closes https://github.com/stratis-storage/project/issues/580 | diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml
index a0e6afd5334..c74a510160a 100644
--- a/.github/workflows/python.yml
+++ b/.github/workflows/python.yml
@@ -39,7 +39,9 @@ jobs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- - name: Install dependencies for F... | 1 | 1 | 0 | [{"id": "G0", "claim": "There are no tests to capture the changes of behavior in stratis-min made by this pull request; consider doing the test work (issue #429) first.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "pre_existing"}] | null |
stratis-storage__stratisd__3594 | stratis-storage/stratisd | 3,594 | defect | 922b85c824b7cac80f6ff024165d0ee8bcf2ddab | 7a9e29fc81b6a65929d4978cdcbf564953f662f1 | Add stratis-min tests | Related https://github.com/stratis-storage/stratisd/issues/3299 | diff --git a/tests/stratis_min.rs b/tests/stratis_min.rs
index 9bfbf49894f..b1215dc1d45 100644
--- a/tests/stratis_min.rs
+++ b/tests/stratis_min.rs
@@ -214,6 +214,22 @@ fn test_stratis_min_pool_rename() {
test_with_stratisd_min_sim(stratis_min_pool_rename);
}
+#[test]
+// Test stopping a pool using an invalid ... | 2 | 2 | 0 | [{"id": "G0", "claim": "The pool stop invalid-name test never interacts with stratisd-min (the failure comes from stratis-min parsing the name as a UUID), so it should use just the one part structure, like test_stratis_min_report_bad_subreport does, instead of being wrapped in the sim-engine runner.", "category": "desi... | null |
stratis-storage__stratisd__3977 | stratis-storage/stratisd | 3,977 | defect | 7bbe3630cedeba0f90552a7bcdb769f85f3aa06e | c671b3c4defc551cf516f7508f9a5927ae7223b9 | Rewrite stratis-decode-dm in Rust | Closes https://github.com/stratis-storage/stratisd/issues/3976 | diff --git a/.githooks/pre-commit b/.githooks/pre-commit
index fd066b4582..910791057c 100755
--- a/.githooks/pre-commit
+++ b/.githooks/pre-commit
@@ -11,7 +11,6 @@ make fmt-ci &&
make clippy &&
make yamllint &&
make tmtlint &&
- make lint &&
make check-typos || exit 1
export PYTHONPATH=$PWD/tests/client-dbu... | 7 | 2 | 0 | [{"id": "G0", "claim": "The .packit.yaml post-upstream-clone step should be reverted to the official stratis-storage/ci repository before merging to master, as the pull request currently points it at the personal fork mulkieran/ci, branch issue_stratisd_3976.", "category": "correctness", "verdict": "uncertain", "priori... | null |
stratosphere__stratosphere__797 | stratosphere/stratosphere | 797 | defect | 966b189ca779eac7751fe4d8ae616e43840ead0f | 7afec35711898895ec4b7e25ac87673d53eddfc2 | Expose WriteMode in JAPI. | Fix issue #781.
Pass Configuration parameters to runtime operators in JAPI (+test)
| diff --git a/stratosphere-core/src/main/java/eu/stratosphere/api/common/io/FileOutputFormat.java b/stratosphere-core/src/main/java/eu/stratosphere/api/common/io/FileOutputFormat.java
index 6e14660df..c8d21d5eb 100644
--- a/stratosphere-core/src/main/java/eu/stratosphere/api/common/io/FileOutputFormat.java
+++ b/stratos... | 3 | 3 | 3 | [{"id": "G0", "claim": "DEFAULT_WRITE_MODE should not be made a public static field, since a public default would allow the default write mode to be overwritten.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The three-argument writeAsCsv should not pass... | null |
stravalib__stravalib__283 | stravalib/stravalib | 283 | defect | d5e5f415220b73d43f34cfc77d7c6694306beb0b | df869270bd00304880100ed0f0fe2b9d8d702ebd | Add integration tests for all POST/PUT client methods | These new tests make sure that all (implemented, see #282) endpoints used for creating and updating objects are covered.
It adds several deprecation warnings (both at runtime and in the documentation) for method parameters that are not supported anymore by Strava. | diff --git a/changelog.md b/changelog.md
index 33981ae9..cd94edaa 100644
--- a/changelog.md
+++ b/changelog.md
@@ -1,6 +1,7 @@
# Change Log
## Unreleased
+* Add: Add integration tests for all POST/PUT client methods (@jsamoocha, #250 (partial))
* Add: add code of conduct to the repo, update contributing guide + re... | 1 | 1 | 0 | [{"id": "G0", "claim": "The generic warning helper functions should live in the exc.py module rather than in the client module.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
stravalib__stravalib__287 | stravalib/stravalib | 287 | defect | e68b7f18ab1cb4315801266dea1708a6643e8b41 | c20d5b8e0af1a514bccb0cf14087ce1f3bcf1935 | Add: integration tests for codecov testing | This adds 2 trivial integration tests to see if codecov diff is working. | diff --git a/stravalib/tests/integration/strava_api_stub.py b/stravalib/tests/integration/strava_api_stub.py
index 9ece378d..6bfcbe4d 100644
--- a/stravalib/tests/integration/strava_api_stub.py
+++ b/stravalib/tests/integration/strava_api_stub.py
@@ -118,6 +118,10 @@ def method_wrapper(
if isinstance(r... | 2 | 2 | 0 | [{"id": "G0", "claim": "The inline comment '# force single response in example into result list (not all examples provide lists)' should start with a capital letter, per the request to follow PEP 8 comment style for consistency.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introd... | null |
stravalib__stravalib__309 | stravalib/stravalib | 309 | defect | 19e051ed0d7f52b7f3fc17522eeb0c1b0f3a991f | 4b050d2bf0cc16bef36daaaf5b30bfdc340db4b6 | fix(upload_activity): - fix unable to read activity_file with type bytes | closes #308
<!--- * If this pr does not address an open issue in the repository, please be sure
to explain what this pull request fixes or does. We prefer to discuss changes in issues first, to just ensure we are all on the same page about the change being proposed.
* If this is a technical code change, pleas... | diff --git a/stravalib/client.py b/stravalib/client.py
index e2ac772b..d9c73833 100644
--- a/stravalib/client.py
+++ b/stravalib/client.py
@@ -734,7 +734,7 @@ def upload_activity(self, activity_file, data_type, name=None, description=None,
if not hasattr(activity_file, 'read'):
if isinstance(activ... | 3 | 3 | 0 | [{"id": "G0", "claim": "The docstring of upload_activity should be updated so the activity_file parameter lists the correct types TextIOWrapper, str, and bytes.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The NOTE in the new test's docstring (t... | null |
stravalib__stravalib__318 | stravalib/stravalib | 318 | defect | 00ec7b6654a99cff45a99a29921bb3b95dd01e79 | b5914e70aa71d4659600e053a9682ce39dd722a5 | feat(ActivityUploader): upload photo to activity | <!--- * If this pr does not address an open issue in the repository, please be sure
to explain what this pull request fixes or does. We prefer to discuss changes in issues first, to just ensure we are all on the same page about the change being proposed.
* If this is a technical code change, please be sure that yo... | diff --git a/stravalib/client.py b/stravalib/client.py
index 5a47b998..7c71b537 100644
--- a/stravalib/client.py
+++ b/stravalib/client.py
@@ -11,13 +11,19 @@
import time
from datetime import datetime, timedelta
from io import BytesIO
+from typing import List, Optional
import arrow
import pytz
from stravalib ... | 4 | 1 | 1 | [{"id": "G0", "claim": "Define the PhotoData class in the model.py module, rename it to something like UploadPhotoData, and make it extend the Pydantic BaseModel to streamline with the ongoing pydantic-model development.", "category": "design", "verdict": "opposed", "priority": "P2", "scope": "introduced"}, {"id": "G1"... | null |
stravalib__stravalib__362 | stravalib/stravalib | 362 | defect | 55782771db62d388ffff7171317de92fd3d473b5 | 437eab800d383512f38da576db2242d578bfa5e8 | implemented sport_type for client.update_activity | updates:
- [github.com/psf/black: 23.1.0 → 23.3.0](https://github.com/psf/black/compare/23.1.0...23.3.0)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
closes #360
## Description
support sport_type in client.update_activitiy().
From the strava api UpdatableActivity it see... | diff --git a/changelog.md b/changelog.md
index 524562d0..78de3cfa 100644
--- a/changelog.md
+++ b/changelog.md
@@ -4,6 +4,7 @@
- Add: Adds RPE to activity model (@jsamoocha, #355)
- Fix: Move to numpy style docstrings & add black (@lwasser, #365)
+- Add: support sport_type in client.update_activitiy() (@think-nice-... | 2 | 2 | 2 | [{"id": "G0", "claim": "The existing test for the update_activity client method needs to be modified to cover the new sport_type behaviour.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "A deprecation warning should be shown when the old activity_type p... | null |
stravalib__stravalib__385 | stravalib/stravalib | 385 | defect | dffb9284e56fd344446b9d54ec3ccad157d060be | d17f0da3965f99e09a43e67b2d83d4ba28815303 | Fix stream methods | closes #383 and closes #367
<!--- * If this pr does not address an open issue in the repository, please be sure
to explain what this pull request fixes or does. We prefer to discuss changes in issues first, to just ensure we are all on the same page about the change being proposed.
* If this is a technical code chan... | diff --git a/stravalib/client.py b/stravalib/client.py
index b55fdac4..c244228c 100644
--- a/stravalib/client.py
+++ b/stravalib/client.py
@@ -31,6 +31,20 @@
from stravalib.unithelper import is_quantity_type
from stravalib.util import limiter
+VALID_STREAM_TYPE = [
+ "time",
+ "latlng",
+ "distance",
+ ... | 5 | 4 | 2 | [{"id": "G0", "claim": "Reworking get_activity_streams to return a set of Stream objects instead of the previous dict of streams is a breaking change for users.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "get_activity_streams should probably also retu... | null |
stravalib__stravalib__434 | stravalib/stravalib | 434 | defect | d18f4948837f9d7d6ad06ec1e76573109a8ad400 | 9f37e6197f24905a5fda53b4c198c70f6afa30ec | Relax Segment ActivityTypes | closes https://github.com/stravalib/stravalib/issues/432
_The text above will ensure the issue will be closed when this PR is merged_
<!--- * If this pr does not address an open issue in the repository, please be sure
to explain what this pull request fixes or does. We prefer to discuss changes in issues first,... | diff --git a/changelog.md b/changelog.md
index baa20fb8..5aa30304 100644
--- a/changelog.md
+++ b/changelog.md
@@ -7,6 +7,7 @@
- Remove python 3.8 support following NEP-29 (@enadeau, #416)
- Stravalib now includes types annotation, the package is PEP 561 compatible (@enadeau, #423)
- Add blacken-docs and codespell t... | 1 | 1 | 1 | [{"id": "G0", "claim": "Relaxing Segment.activity_type to ActivityType, the same fix as applied in #369, produces typing errors that are now visible in CI, and it is unknown whether a typing workaround exists or one of two evils must be chosen.", "category": "correctness", "verdict": "supported", "priority": "P0", "sco... | null |
stravalib__stravalib__471 | stravalib/stravalib | 471 | defect | 84580fccc2c6da5a689255b3744277dd37df33f5 | bd88b3bb284c212571fcd1f0b400e0a365e45592 | Fix: validate sport / activity type & add sport type to create_activity method | addresses in part - #279
## Description
I'm trying to fix 279 opened by @jsamoocha however i'm a bit confused and need some direction with the test suite.
What this does:
✅ it adds a small validate method helper so that the checks for sport type and activity type can be reused easily (assuming a python DICT... | diff --git a/changelog.md b/changelog.md
index a3946f89..d1aeaee3 100644
--- a/changelog.md
+++ b/changelog.md
@@ -6,6 +6,7 @@
- Fix: Docs - add contributing section to top bar for easier discovery and a few small syntax fixes in the docs (@lwasser)
- Fix: Manifest.in file - remove example dir (@lwasser, #307)
- Fix... | 10 | 9 | 3 | [{"id": "G1", "claim": "The type-removal (params.pop of type) logic that update_activity had before this PR should also be in _validate_activity_type(), so create_activity and update_activity behave consistently when both types are given.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "... | null |
stravalib__stravalib__492 | stravalib/stravalib | 492 | defect | be5d7403b01d3d8608ddbcfbe12dad8340178fac | 60263609a15cd516b6f9b3716c56288505361c44 | pydantic 2.x migration p1 |
## Description
This PR is an attempt to begin to migrate from pydantic 1.x to 2.x. I'd love some feedback. i did NOT remove all of the legacy behavior in this PR.
I also am still struggling with the activityzones test because the example data has floating point values in it whereas the API / strava_model... | diff --git a/pyproject.toml b/pyproject.toml
index aeb70590..0e23ad2f 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -49,7 +49,7 @@ classifiers = [
"Programming Language :: Python :: 3.12",
]
-dependencies = ["pint", "pytz", "arrow", "requests", "pydantic<2.0"]
+dependencies = ["pint", "pytz", "arrow", "requ... | 24 | 23 | 5 | [{"id": "G0", "claim": "Now that the code requires pydantic 2.x, the pydantic dependency in pyproject.toml should specify a lower bound of pydantic>=2.0.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The get_activity_zones test fails because the ex... | null |
stravalib__stravalib__507 | stravalib/stravalib | 507 | defect | 104dcba61d179618d894085d8562c90c3ec1b8a8 | cf3eead26caf6d939d97fe49cc4b9dbad46a3537 | Athlete stats | This fixes the type hierarchy for athlete-related objects. | diff --git a/src/stravalib/client.py b/src/stravalib/client.py
index d44e0da7..c16a468f 100644
--- a/src/stravalib/client.py
+++ b/src/stravalib/client.py
@@ -528,7 +528,7 @@ def get_club(self, club_id: int) -> model.Club:
def get_club_members(
self, club_id: int, limit: int | None = None
- ) -> Batc... | 5 | 2 | 2 | [{"id": "G0", "claim": "Please test get_club_admins() out, since a call from a non-admin account returns nothing odd, and if it is a permissions thing adjust the docstring accordingly.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The get_club_admins d... | null |
stravalib__stravalib__518 | stravalib/stravalib | 518 | defect | a265486379919302db1c355b8dc34f72fa3ff274 | ad926c830f748fb1d3a8bddbda1da79db5252802 | Adds SummarySegmentEffort superclass | Tiny PR for adding the `SummarySegmentEffort` superclass. | diff --git a/src/stravalib/model.py b/src/stravalib/model.py
index e9c8cfff..c2a982d7 100644
--- a/src/stravalib/model.py
+++ b/src/stravalib/model.py
@@ -39,7 +39,6 @@
Comment,
DetailedClub,
DetailedGear,
- DetailedSegmentEffort,
ExplorerSegment,
Lap,
LatLng,
@@ -50,7 +49,6 @@
Sum... | 1 | 1 | 0 | [{"id": "G0", "claim": "The segment models return missing or None values where the Strava spec says data should be present (athlete_pr_effort mostly empty, athlete_segment_stats None, some segment fields such as distance None), which may mean a few wires are crossed between the models and what Strava actually returns; ... | null |
stravalib__stravalib__522 | stravalib/stravalib | 522 | defect | 85aea791297404af5c73a2f5e1238c1d50ee0805 | 8083dd88334a77a23f0005daa361fcb6b8e55841 | Add `naive_datetime()` test to the `pydantic-v2` branch. | closes #521
_The text above will ensure the issue will be closed when this PR is merged_
<!--- * If this pr does not address an open issue in the repository, please be sure
to explain what this pull request fixes or does. We prefer to discuss changes in issues first, to just ensure we are all on the same page a... | diff --git a/src/stravalib/model.py b/src/stravalib/model.py
index 62ec182f..698089c4 100644
--- a/src/stravalib/model.py
+++ b/src/stravalib/model.py
@@ -69,7 +69,7 @@
def naive_datetime(value: Optional[AllDateTypes]) -> Optional[datetime]:
"""Utility helper that parses a datetime value provided in
JSON, st... | 1 | 1 | 0 | [{"id": "G0", "claim": "The pull request's contribution should be added to the changelog under the \"Unreleased\" header.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
stravalib__stravalib__526 | stravalib/stravalib | 526 | defect | 3174656eb81f4aada15b1e8ef4dca40523e1411d | e118b62d9619cfa7732a6d7dbefeafd72a041011 | Gear and Athlete type hierarchies (+ naive_datetime typing fixes) | This corrects the type hierarchies for `Gear` and `Athlete` types, + several other typing issues I encountered in the `pydantic-v2` branch. The remaining (3) typing issues will be resolved by #510 . | diff --git a/src/stravalib/client.py b/src/stravalib/client.py
index 0a9993d4..a5505955 100644
--- a/src/stravalib/client.py
+++ b/src/stravalib/client.py
@@ -308,7 +308,7 @@ def get_activities(
limit=limit,
)
- def get_athlete(self) -> model.Athlete:
+ def get_athlete(self) -> model.Detai... | 3 | 2 | 1 | [{"id": "G0", "claim": "The rewritten naive_datetime() logic left a gap in test coverage, and tests should be added to fill the gaps before the branch is merged.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "Many undocumented attributes on DetailedAthl... | null |
stravalib__stravalib__534 | stravalib/stravalib | 534 | defect | d9e977f3b5063704b8c49366991d2a8af9eac9a3 | ed1f1bdecf153a36763c97c88b948b79de65900f | Custom types | closes #500
## Description
Adds custom types to our model that allow to preserve the legacy behavior of, e.g., unit conversion, while being a proper subtype of the generated strava model and not tripping up mypy.
## Type of change
Select the statement best describes this pull request.
- [x] Breaking cha... | diff --git a/changelog.md b/changelog.md
index 3e15d31a..8b973dbf 100644
--- a/changelog.md
+++ b/changelog.md
@@ -2,6 +2,7 @@
## Unreleased
- Fix: Add `naive_datetime()` test to the `pydantic-v2 branch`. (@bmeares, #522)
+- Fix: Add custom types that pass static type checks (@jsamoocha, #534)
## v1.7
diff --g... | 6 | 5 | 0 | [{"id": "G0", "claim": "Rename `unithelper.py` to `unit_helper.py` so the module naming is consistent throughout.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "pre_existing"}, {"id": "G1", "claim": "Rename `docs/reference/unithelper.rst` for consistency with the other .rst files."... | null |
stravalib__stravalib__536 | stravalib/stravalib | 536 | defect | 6b295411d7219bfce5ddeaa4c8d80257db07f79c | 23e1003b38b736b8ce791e6514a03dd775604042 | Rename unithelper to unit_helper for consistency | closes #535
## Description
Just a small change to ensure naming consistency in our API. :)
## Type of change
Select the statement best describes this pull request.
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking c... | diff --git a/changelog.md b/changelog.md
index 8b973dbf..4fb5613e 100644
--- a/changelog.md
+++ b/changelog.md
@@ -3,6 +3,8 @@
## Unreleased
- Fix: Add `naive_datetime()` test to the `pydantic-v2 branch`. (@bmeares, #522)
- Fix: Add custom types that pass static type checks (@jsamoocha, #534)
+- Fix: Replace invaria... | 1 | 1 | 1 | [{"id": "G0", "claim": "Docstring examples in src/stravalib/model.py still refer to the old `unithelper` module name after the rename and should be updated to `unit_helper`, ideally via a full directory search and replace so no references are missed.", "category": "documentation", "verdict": "supported", "priority": "P... | null |
stravalib__stravalib__567 | stravalib/stravalib | 567 | defect | 18c92443e8ddfe3aa536e0e9b2881dfb84ce7aaf | 7c5d728117c31a60cd2174fa4bf1442fb6cc0ed0 | Add get_athlete_zone method on client | closes #508
<!--- * If this pr does not address an open issue in the repository, please be sure
to explain what this pull request fixes or does. We prefer to discuss changes in issues first, to just ensure we are all on the same page about the change being proposed.
* If this is a technical code change, please... | diff --git a/changelog.md b/changelog.md
index 8f2c3c20..bf251c67 100644
--- a/changelog.md
+++ b/changelog.md
@@ -2,6 +2,10 @@
## Unreleased
+### Added
+
+- Add: `get_athelete_zones` method on client
+
## v2.0.0
### Major Changes in This Release
diff --git a/src/stravalib/client.py b/src/stravalib/client.py
i... | 2 | 2 | 1 | [{"id": "G0", "claim": "The swagger.json test resource should not be rewritten to match the real API response; instead supply the real response to the mock via the `json` kwarg (as in `test_get_activity_zones()`).", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "c... | null |
stravalib__stravalib__603 | stravalib/stravalib | 603 | defect | 5cd5a09561f049118174b78086cb823f55568f24 | de861472af231db61e6789473c6f6bc7b23e848b | feat(docs): add specifics about using our mock fixture | closes #292
I've been fighting a bit with the test suite and so I took some time to better understand our mock setup.
This PR should close the existing issue around documenting the mock.
I could also add some examples of using it if that would be useful?
## Description
I added some text around how the m... | diff --git a/changelog.md b/changelog.md
index 09d05cbe..ea7bbe75 100644
--- a/changelog.md
+++ b/changelog.md
@@ -2,6 +2,10 @@
## Unreleased
+### Added
+
+- Add: Add more information about how our mock fixture works (@lwasser, #292)
+
## v2.1.0
### Added
@@ -31,7 +35,7 @@
- Change: Strava API update (@github... | 2 | 2 | 0 | [{"id": "G0", "claim": "The new docs should say the mock object is 'accessed through' the pytest fixture instead of the grammatically wrong 'access through a'.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The docs should describe the fixture as ... | null |
stravalib__stravalib__604 | stravalib/stravalib | 604 | defect | 5cd5a09561f049118174b78086cb823f55568f24 | 3aeba2d72fb12e9cb73995446f7f94065cc8bcbb | fix(endpoint): Update segment_efforts endpoint to match the currently documented endpoint | closes #321
## Description
This pr fixes the segment_efforts api endpoint. I'm struggling a lot with understanding what is broken in the tests and would appreciate any input! This is why I created #603 as I think i generally understand the mock behavior but i clearly don't understand how to use it as these tests ... | diff --git a/changelog.md b/changelog.md
index 09d05cbe..5590d16f 100644
--- a/changelog.md
+++ b/changelog.md
@@ -2,6 +2,8 @@
## Unreleased
+- Fix: Update segment_efforts api and return warnings (@lwasser, #321)
+
## v2.1.0
### Added
@@ -31,7 +33,7 @@
- Change: Strava API update (@github-actions, #592)
##... | 2 | 1 | 1 | [{"id": "G0", "claim": "The get_segment_effort endpoint could use more testing (hedged: \"I think?\").", "category": "testing", "verdict": "opposed", "priority": "P3", "scope": "pre_existing"}, {"id": "G1", "claim": "The new test_get_segment_efforts_warnings test passes only sometimes in the debugger and fails when the... | null |
stravalib__stravalib__605 | stravalib/stravalib | 605 | defect | d2244d4e22fea3caf88350b013d689b1cd12332e | 45bfd7b631f0d508a9ef66c9129a4bf9653eee01 | feat: Return optional SummaryAthlete via exchange code for token with user request | closes #552
## Description
This ensures `exchange_code_for_token` returns the optional `SummaryAthlete` object if requested.
## Type of change
Select the statement best describes this pull request.
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds f... | diff --git a/.github/.dependabot.yml b/.github/.dependabot.yml
new file mode 100644
index 00000000..d549a23a
--- /dev/null
+++ b/.github/.dependabot.yml
@@ -0,0 +1,11 @@
+# To get started with Dependabot version updates, you'll need to specify which
+# package ecosystems to update and where the package manifests are lo... | 5 | 5 | 2 | [{"id": "G0", "claim": "Building the SummaryAthlete from the raw response should happen in the client method instead of the protocol module, for consistency with how other responses are handled.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "Because the ... | null |
stravalib__stravalib__612 | stravalib/stravalib | 612 | defect | 68bd1f125cc9c91187a1b6c4f6a0334ed3e57ea7 | 46a9adec74457a976bb33781842b9cd1610a17c8 | feat(token refresh): add automatic token refresh to stravalib :sparkles: | closes #585
## Description
This is a stab at an automatic token refresh built into stravalib using environment variables if the user wishes to do so. it should NOT impact current functionality.
My notes regarding how this works are below. Once we are happy with it I will add docs as well.
This workflow as... | diff --git a/.gitignore b/.gitignore
index ec39dfd0..2f555a67 100644
--- a/.gitignore
+++ b/.gitignore
@@ -21,9 +21,10 @@ examples/strava-oauth/settings.cfg
.nox
.vscode/*
docs/_build/*
+.env
-# so people don't mistakenly delete and submit a pr with these
+# So people don't mistakenly delete and submit a pr with... | 9 | 7 | 3 | [{"id": "G0", "claim": "The README should have a tiny quick start that links to the docs instead of maintaining the examples in two places.", "category": "documentation", "verdict": "uncertain", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The newly added python-dotenv dependency could be made optio... | null |
stravalib__stravalib__643 | stravalib/stravalib | 643 | defect | 8cb1fc7daed8177fe81321f42a080a9330978706 | 29e6b656b9758b4cebe36a695cea09eb53901ce2 | ENH: bypass client ID & client secret error and warning when `silence_token_warning` is true | closes #625
_The text above will ensure the issue will be closed when this PR is merged_
<!--- * If this pr does not address an open issue in the repository, please be sure
to explain what this pull request fixes or does. We prefer to discuss changes in issues first, to just ensure we are all on the same page a... | diff --git a/src/stravalib/protocol.py b/src/stravalib/protocol.py
index 80ce18ca..e4523adc 100644
--- a/src/stravalib/protocol.py
+++ b/src/stravalib/protocol.py
@@ -131,8 +131,10 @@ def _check_credentials(self) -> None:
client_id_str = os.environ.get("STRAVA_CLIENT_ID")
client_secret = os.environ.... | 4 | 4 | 2 | [{"id": "G0", "claim": "Move the silence_token_warning check out of the `if client_id_str or silence_token_warning:` condition so the type checker no longer sees client_id as possibly unset.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "Add text to... | null |
stravalib__stravalib__674 | stravalib/stravalib | 674 | defect | 53008445c9883a0cbe2377ba84497c218a8b7034 | f491c04eaf6f27a63a872d7d110320b831bd87cf | Improve athlete stats error handling | ## Description
This PR addresses several TODO and FIXME comments found in the codebase, improving error handling and documentation quality. The changes focus on providing more actionable error messages and better documenting existing features that were previously under-documented.
### Changes Made:
**1. Enhanc... | diff --git a/changelog.md b/changelog.md
index 2de10b3b..3b6b4e4f 100644
--- a/changelog.md
+++ b/changelog.md
@@ -7,6 +7,10 @@
- Fix: Adds necessary permissions for update-model job (@jsamoocha, #654)
- Chore(ci): Update and fix dependabot (@lwasser, #657)
- Fix: Numerous documentation fixes (@lwasser, #651)
+- Fix... | 2 | 2 | 1 | [{"id": "G0", "claim": "The docstring should mention that the 600-requests-per-15-minutes figure is only an example, since actual rate limits are determined by Strava on an app-by-app basis.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The new e... | null |
stravalib__stravalib__708 | stravalib/stravalib | 708 | defect | cc6000d16b81f8845bedfdd2ba4d72ca366a5be3 | 1f2f665cefc5f64c2e261037204613d16afea443 | feat: replace pytz which is eol with zoneinfo | closes #706
## Description
Replaces EOL `pytz` by stdlib `ZoneInfo`
## Type of change
Select the statement best describes this pull request.
- [X] New feature (non-breaking change which adds functionality)
## Does your PR include tests
If you are fixing a bug or adding a feature, we appreciate (but... | diff --git a/CLAUDE.md b/CLAUDE.md
new file mode 100644
index 00000000..75c18dba
--- /dev/null
+++ b/CLAUDE.md
@@ -0,0 +1,182 @@
+# CLAUDE.md
+
+This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
+
+## Overview
+
+Stravalib is a Python library providing easy-to-use to... | 1 | 1 | 0 | [{"id": "G0", "claim": "CLAUDE.md's Python version references should be updated to reflect #711: the testing line should read 3.10-3.14 once #711 merges, and the Python Version Support section should say minimum 3.11, actively tested 3.11-3.14, and type checking targeting 3.11+.", "category": "documentation", "verdict"... | null |
strawberry-graphql__strawberry-django__135 | strawberry-graphql/strawberry-django | 135 | defect | 6cb433aabcb1f4c4f016908dc8eeacaa207854c6 | 70da13ccb28ed10955fafa7aad90137e0eac337e | feature: allow overriding field class | <!--- Provide a general summary of your changes in the title above. -->
<!--- This template is entirely optional and can be removed, but is here to help both you and us. -->
<!--- Anything on lines wrapped in comments like these will not show up in the final text. -->
## Description
For a project I am working o... | diff --git a/strawberry_django/fields/field.py b/strawberry_django/fields/field.py
index 4b0d5badc..78a3a6a79 100644
--- a/strawberry_django/fields/field.py
+++ b/strawberry_django/fields/field.py
@@ -22,6 +22,10 @@ def django_model(self):
type_ = utils.unwrap_type(self.type)
return utils.get_django_m... | 2 | 1 | 0 | [{"id": "G0", "claim": "The custom get_field helper added in tests/utils.py duplicates functionality and could instead use the get_field method strawberry already provides on TypeDefinition.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Routing... | null |
strawberry-graphql__strawberry-django__15 | strawberry-graphql/strawberry-django | 15 | defect | 54bf93fd55d79f7b55b050317894584babeb601d | 9040b0532874709029347b771f5db30c812c2765 | Implement django-filters for filter generation | Some things to consider:
- Should we make "django-filters" an optional dependency?
- How do we implement this into the library? I suppose it should be optional, and easy to modify.
We could add global settings eg:
```
STRAWBERRY_DJANGO_GENERATE_FILTERS = "default to false, when set true we raise error when its n... | diff --git a/README.md b/README.md
index e69600e29..c9a503b02 100644
--- a/README.md
+++ b/README.md
@@ -136,6 +136,80 @@ mutation {
}
```
+## Typed filtering with Django Filter
+
+Install django-filters `pip install django-filter`
+
+Then add `django_filters` to your INSTALLED_APPS.
+
+```python
+INSTALLED_APPS = ... | 8 | 7 | 4 | [{"id": "G0", "claim": "Raising ModuleNotFoundError at import time breaks the whole strawberry_django package when django-filter is not installed; the check should instead happen when filtering functions are used.", "category": "correctness", "verdict": "supported", "priority": "P0", "scope": "introduced"}, {"id": "G1"... | null |
strawberry-graphql__strawberry-django__191 | strawberry-graphql/strawberry-django | 191 | defect | 9fe56949feb60f86a2d091357693baac1f3e12dc | 9eb38276e5c7bd1d4e4464867d6aad67dbeca0b2 | Allow passing info in filters | ## Description
This patch allows passing the info object to filters, catering for use cases like filtering with respect to the logged in user (which, its relative cookie will be passed via the input object).
At the same time, it addresses existing codebase and not breaking them by performing analysis on the filte... | diff --git a/strawberry_django/filters.py b/strawberry_django/filters.py
index c80518e7a..37f7240cb 100644
--- a/strawberry_django/filters.py
+++ b/strawberry_django/filters.py
@@ -1,3 +1,4 @@
+import inspect
from enum import Enum
from typing import Generic, List, Optional, TypeVar
@@ -118,7 +119,7 @@ def build_fil... | 2 | 2 | 0 | [{"id": "G0", "claim": "Calling inspect.getfullargspec on every filter method inside the apply loop is a performance concern, and the review asks to add a utility decorated with @functools.cache to retrieve the filter method check.", "category": "performance", "verdict": "supported", "priority": "P2", "scope": "introdu... | null |
strawberry-graphql__strawberry-django__213 | strawberry-graphql/strawberry-django | 213 | defect | 6ff91e0134eaa933b2fcd0d9260e0c26a7d331ff | b2e04f5a9e63c6cc2400adbd75ba6ae0282f38bf | Geos fields query & mutation support | This PR is created as I can't write to https://github.com/strawberry-graphql/strawberry-graphql-django/pull/91
## Types of Changes
<!--- What types of changes does your pull request introduce? Put an `x` in all the boxes that apply. -->
- [x] Core
- [ ] Bugfix
- [x] New feature
- [x] Enhancement/optimization
... | diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 2efee1de8..054f05909 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -16,19 +16,53 @@ on:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a ... | 14 | 11 | 2 | [{"id": "G0", "claim": "Point should be defined as a Strawberry scalar (with serialize/parse_value and a description) instead of a plain Union type, so it can be registered in the schema.", "category": "correctness", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The sqlite/spa... | null |
strawberry-graphql__strawberry-django__219 | strawberry-graphql/strawberry-django | 219 | defect | f09a3180306fc717ca29d0a87a03d6c68fc8ae74 | d06a336f97a9cb9a5724ed0b53c9ec3ed15c839e | removed `django-filter` from pyproject.toml, added tests matrix | <!--- Provide a general summary of your changes in the title above. -->
<!--- This template is entirely optional and can be removed, but is here to help both you and us. -->
<!--- Anything on lines wrapped in comments like these will not show up in the final text. -->
## Description
Removed `django-filter` fro... | diff --git a/poetry.lock b/poetry.lock
index 4fb09e4a0..c552999b6 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -1,3 +1,5 @@
+# This file is automatically @generated by Poetry and should not be changed by hand.
+
[[package]]
name = "asgiref"
version = "3.5.2"
@@ -5,12 +7,16 @@ description = "ASGI specs, helper code,... | 1 | 1 | 1 | [{"id": "G0", "claim": "The PR's CI tests are failing because it ships a poetry v2 lockfile / new dependency format that requires poetry >= 1.3, while the workflow fetches poetry pinned to 1.2.2 via abatilo/actions-poetry.", "category": "correctness", "verdict": "supported", "priority": "P0", "scope": "introduced"}] | null |
strawberry-graphql__strawberry-django__239 | strawberry-graphql/strawberry-django | 239 | defect | 97cdea29867d33b2bfd75b67a4310dd6cc147ddc | 0777cb72697a46da12c7df2197b546026dd4e9c9 | feature: backporting django-debug-toolbar from strawberry-django-plus | <!--- Provide a general summary of your changes in the title above. -->
<!--- This template is entirely optional and can be removed, but is here to help both you and us. -->
<!--- Anything on lines wrapped in comments like these will not show up in the final text. -->
## Description
<!--- Describe your change... | diff --git a/examples/django/app/settings.py b/examples/django/app/settings.py
index b6106a87d..b5dec72dd 100644
--- a/examples/django/app/settings.py
+++ b/examples/django/app/settings.py
@@ -5,12 +5,20 @@
SECRET_KEY = "very-secret-key"
DEBUG = True
+
+INTERNAL_IPS = [
+ "127.0.0.1",
+]
+
ALLOWED_HOSTS = []
... | 4 | 4 | 3 | [{"id": "G0", "claim": "A `tool.poetry.extras` section probably also needs to be added to pyproject.toml so the optional django-debug-toolbar dependency is installable as an extra.", "category": "packaging", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The `strawberry_django`... | null |
strawberry-graphql__strawberry-django__246 | strawberry-graphql/strawberry-django | 246 | defect | e6c4ac3b2eb0eef522c4f490c7c1fca7b345c560 | 0a0f5bcb7101fe8dfdaee3599c9130cbc2d74e53 | refactor: do not insert `pk` arguments inside non root fields | Instead of checking if the field is a relation or not, just check if
it is defined in a root type (e.g. a `Query`). If it is not, do not
insert the pk argument for it.
This fixes a lot of issues like:
1) Defining a field with a name different from the relation
2) Defining a field for a function or property inside the... | diff --git a/strawberry_django/filters.py b/strawberry_django/filters.py
index d06520ed1..ec6d3f969 100644
--- a/strawberry_django/filters.py
+++ b/strawberry_django/filters.py
@@ -182,9 +182,12 @@ def arguments(self) -> List[StrawberryArgument]:
arguments = []
if not self.base_resolver:
... | 3 | 3 | 2 | [{"id": "G0", "claim": "Remove the leftover debug line `__import__(\"pprint\").pprint(str(schema))` from the new test.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The new test should also test the output when actually running a query, not onl... | null |
strawberry-graphql__strawberry-django__293 | strawberry-graphql/strawberry-django | 293 | defect | 01b8abe7a1892519f476b4a56408333ad65c3f40 | 16cd23652f9100247a4fb21f2463993a466e3c85 | Add new keywords "fields" and "exclude" to type decorator for auto-population of Django model fields | <!--- Provide a general summary of your changes in the title above. -->
<!--- This template is entirely optional and can be removed, but is here to help both you and us. -->
<!--- Anything on lines wrapped in comments like these will not show up in the final text. -->
## Description
Per [the discussion around... | diff --git a/docs/guide/fields.md b/docs/guide/fields.md
index b2040eebf..17aa4e618 100644
--- a/docs/guide/fields.md
+++ b/docs/guide/fields.md
@@ -116,6 +116,51 @@ strawberry_django.field_type_map.update({
})
```
+## Including / excluding Django model fields by name
+
+`strawberry.django.type` includes two option... | 8 | 8 | 2 | [{"id": "G0", "claim": "The doc's python code-block titles are file names (e.g. `title=fields_all.py`); make them semantic like `title=\"All Fields\"`.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Add a warning to the docs that `fields`/`exclude... | null |
strawberry-graphql__strawberry-django__302 | strawberry-graphql/strawberry-django | 302 | defect | 32e7bec03edd0a9b4c6b52a147a6272ed6cfe3a6 | b7111feda008d2be5dcfc93050b8b1698cba7b18 | refactor!: use a setting to decide if we should map fields to relay types or not | `strawberry-django-plus` used to do that, but when migrating this
I thought it would be enough to check if the type itself inherits from
`relay.Node`.
It turns out that it is not, specially for filters as those doesn't
inherit from `relay.Node`.
This adds an option to allow the user to use `ID` or `GlobalID`
for thei... | diff --git a/docs/guide/filters.md b/docs/guide/filters.md
index 5d2a489db..39c5a25a9 100644
--- a/docs/guide/filters.md
+++ b/docs/guide/filters.md
@@ -26,6 +26,13 @@ input FruitFilter {
}
```
+!!! tip
+
+ If you are using the [relay integration](relay.md) and working with types inheriting
+ from `relay.Node... | 2 | 2 | 0 | [{"id": "G0", "claim": "In docs/guide/filters.md the example should set `MAP_AUTO_ID_AS_GLOBAL_ID=True`, not `Trye`.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "In docs/guide/relay.md the example should set `MAP_AUTO_ID_AS_GLOBAL_ID=True`, not ... | null |
strawberry-graphql__strawberry-django__376 | strawberry-graphql/strawberry-django | 376 | defect | f66c4a9065970db6a3146329d95f243f852faa2c | 01314b283947a91b1520c6754fdffc260084d648 | Docs improvement Subscriptions | As referred to in issue #375 some improved guidance on getting subscriptions running including the missing pieces related to the test-server. | diff --git a/docs/guide/subscriptions.md b/docs/guide/subscriptions.md
index a4b528583..4f48dc3ad 100644
--- a/docs/guide/subscriptions.md
+++ b/docs/guide/subscriptions.md
@@ -1,6 +1,136 @@
-### Subscriptions
+# Subscriptions
Subscriptions are supported using the
[Strawberry Django Channels](https://strawberry.roc... | 7 | 7 | 0 | [{"id": "G0", "claim": "The guide should read \"Django doesn't support websockets out of the box\" instead of \"doesnt\".", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The guide should point out that Django Channels adds websocket capabilities to... | null |
strawberry-graphql__strawberry-django__377 | strawberry-graphql/strawberry-django | 377 | defect | 498fe635a742c500b541201866caec1c8352140d | 961d14e0063fcb9e98d412946008900be39771c8 | Support annotate parameter in field to allow ORM annotations | <!--- Provide a general summary of your changes in the title above. -->
<!--- This template is entirely optional and can be removed, but is here to help both you and us. -->
<!--- Anything on lines wrapped in comments like these will not show up in the final text. -->
## Description
Adds support for ORM annot... | diff --git a/strawberry_django/fields/field.py b/strawberry_django/fields/field.py
index 983ddec2d..0bcf90bd5 100644
--- a/strawberry_django/fields/field.py
+++ b/strawberry_django/fields/field.py
@@ -59,7 +59,12 @@
from strawberry.unset import UnsetType
from typing_extensions import Literal
- from straw... | 7 | 2 | 0 | [{"id": "G0", "claim": "The author is unsure whether `BaseExpression` is the best annotation for `AnnotateCallable`/`AnnotateType` or whether `Expression` would be better, noting `BaseExpression` also allows `Subquery`, and will double-check.", "category": "design", "verdict": "opposed", "priority": "P3", "scope": "int... | null |
strawberry-graphql__strawberry-django__380 | strawberry-graphql/strawberry-django | 380 | defect | a17b51bcb92e210f71ab7cce6b76a2472c689e60 | c03dc67d4aa50abf44585fca9e9b9604a18cb071 | Fix: DjangoOptimizerExtension corrupts nested objects' fields' prefetch objects | <!--- Provide a general summary of your changes in the title above. -->
<!--- This template is entirely optional and can be removed, but is here to help both you and us. -->
<!--- Anything on lines wrapped in comments like these will not show up in the final text. -->
## Description
This PR aims to resolve is... | diff --git a/strawberry_django/optimizer.py b/strawberry_django/optimizer.py
index 582b9eee4..5e9ba36c7 100644
--- a/strawberry_django/optimizer.py
+++ b/strawberry_django/optimizer.py
@@ -5,6 +5,7 @@
import dataclasses
import itertools
from collections import defaultdict
+from copy import deepcopy
from typing impo... | 1 | 1 | 0 | [{"id": "G0", "claim": "Unless there is a specific reason, `deepcopy` of the Prefetch object should be a plain shallow `copy`, since that should be enough to fix the issue.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
strawberry-graphql__strawberry-django__405 | strawberry-graphql/strawberry-django | 405 | defect | fd2422d84f51049ada531bd57ea7e86e4383e42e | 8ef0aa4936827a7320fac1945a5eb2e14c1eca91 | feat: Enforce validation for updating nested relations | <!--- Provide a general summary of your changes in the title above. -->
<!--- This template is entirely optional and can be removed, but is here to help both you and us. -->
<!--- Anything on lines wrapped in comments like these will not show up in the final text. -->
## Description
If nested one to many / ma... | diff --git a/strawberry_django/mutations/resolvers.py b/strawberry_django/mutations/resolvers.py
index ed4dcfed1..e63f30249 100644
--- a/strawberry_django/mutations/resolvers.py
+++ b/strawberry_django/mutations/resolvers.py
@@ -474,6 +474,7 @@ def update_m2m(
if data:
for k, inner... | 1 | 1 | 1 | [{"id": "G0", "claim": "The unconditional obj.full_clean() calls this PR adds inside update_m2m need to respect the full_clean options that are passed to the update/create methods.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
strawberry-graphql__strawberry-django__409 | strawberry-graphql/strawberry-django | 409 | defect | e336ebe047726ed5761b173df2994e7009b9aab4 | 4f29375c592a70146c0dbdcb058ce8cc2b2dd0f1 | fix: keep ordering sequence | Make sure that the sequence the ordering was given by the client is respected.
Fix #150
| diff --git a/strawberry_django/ordering.py b/strawberry_django/ordering.py
index 216220ef9..1100541e6 100644
--- a/strawberry_django/ordering.py
+++ b/strawberry_django/ordering.py
@@ -2,9 +2,11 @@
from typing import (
TYPE_CHECKING,
Callable,
+ Dict,
List,
Optional,
Sequence,
+ Tuple,
... | 4 | 2 | 0 | [{"id": "G0", "claim": "The inline sort-key lambda in generate_order_args should be extracted into a function because it is hard to tell what it does.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The GraphQL field-node parsing of the order arg... | null |
strawberry-graphql__strawberry-django__421 | strawberry-graphql/strawberry-django | 421 | defect | c7f46436f86265f946deb59ed798bf38c1824305 | dfb11c17f9bc9d15a067eb792a1d6eaa10cf91d7 | Login and CurrentUser queries yield broken responses | <!--- Provide a general summary of your changes in the title above. -->
When doing a login with an incorrect username/password or querying me/current_user both cases result in a cryptical reponse:
```json{
"data": null,
"errors": [
{
"message": "Cannot return null for non-nullable field Query.me.",
... | diff --git a/strawberry_django/auth/exceptions.py b/strawberry_django/auth/exceptions.py
new file mode 100644
index 000000000..d0e8db313
--- /dev/null
+++ b/strawberry_django/auth/exceptions.py
@@ -0,0 +1,9 @@
+from strawberry_django.exceptions import DefaultMessageError
+
+
+class IncorrectUsernamePasswordError(Defaul... | 3 | 3 | 0 | [{"id": "G0", "claim": "resolve_login should raise django's ValidationError instead of creating a custom IncorrectUsernamePasswordError (any custom exception should inherit from ValidationError).", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "resolve_cur... | null |
strawberry-graphql__strawberry-django__424 | strawberry-graphql/strawberry-django | 424 | defect | c7f46436f86265f946deb59ed798bf38c1824305 | a2a854cef8bd2db67ff02f7f90bfc9712a2954e2 | Guarantee 'AND', 'OR', and 'NOT' filter fields get evaluated last by … | …sorting 'filters.__strawberry_definition__.fields'; fixed issue #422;
<!--- Provide a general summary of your changes in the title above. -->
<!--- This template is entirely optional and can be removed, but is here to help both you and us. -->
<!--- Anything on lines wrapped in comments like these will not show... | diff --git a/strawberry_django/filters.py b/strawberry_django/filters.py
index 6a31176ca..3546a60e7 100644
--- a/strawberry_django/filters.py
+++ b/strawberry_django/filters.py
@@ -180,7 +180,9 @@ def build_filter_kwargs(
else None
)
- for f in filters.__strawberry_definition__.fields:
+ for f in ... | 4 | 3 | 2 | [{"id": "G0", "claim": "The pull request should include a test that would break without this change, not only to evaluate that the change is in fact fixing the issue but also to avoid regressions in the future.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "clai... | null |
strawberry-graphql__strawberry-django__446 | strawberry-graphql/strawberry-django | 446 | defect | f4f77a3a681687344ed6fec2ee5d129f52e63b02 | e4dc86d24fcd26157b81f168da84f93e823e8946 | Feature: Add setting DEFAULT_PK_FIELD_NAME | This PR was inspired by #159.
I took a different approach which is less granular but easier to implement.
If a fine-grain control is needed it can be implemented in the future.
<!--- This template is entirely optional and can be removed, but is here to help both you and us. -->
<!--- Anything on lines wrapped in ... | diff --git a/docs/guide/settings.md b/docs/guide/settings.md
index 46db2c8b7..7cd6728d0 100644
--- a/docs/guide/settings.md
+++ b/docs/guide/settings.md
@@ -49,6 +49,11 @@ A dictionary with the following optional keys:
instead of `strawberry.ID`. This is mostly useful if all your model types inherit
from ... | 3 | 3 | 2 | [{"id": "G0", "claim": "The module-level `settings = ...()` instantiations in filters.py, mutations/fields.py and mutations/mutations.py should instead be instantiated where they are used, so that any changes made to settings are picked up.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope":... | null |
strawberry-graphql__strawberry-django__449 | strawberry-graphql/strawberry-django | 449 | defect | 6b8664c37ea01e717c4763f4235fe2e074be41bc | fff3daa2f174f0275b294569e47213f46b5cc78b | Allow updates of nested fields | # Summary
This PR allows updates of nested fields, i.e.
- update the field by setting the ID
- add copies of Child by leaving the ID unset
- remove a Child by omitting it
## Description
The `update_m2m`, `parse_data` and the `_parse_pk` methods were changed. `_parse_pk` does now return the id as well. If... | diff --git a/strawberry_django/auth/mutations.py b/strawberry_django/auth/mutations.py
index f29764f26..fc109b967 100644
--- a/strawberry_django/auth/mutations.py
+++ b/strawberry_django/auth/mutations.py
@@ -89,6 +89,7 @@ def create(self, data: dict[str, Any], *, info: Info):
info,
mo... | 3 | 2 | 2 | [{"id": "G0", "claim": "key_attr should have a default value and be keyword-only so it is not required at every call site (the reviewer proposed defaulting it to \"id\"; after the author questioned that, the reviewer conceded \"pk\" is the right default).", "category": "design", "verdict": "supported", "priority": "P1"... | null |
strawberry-graphql__strawberry-django__490 | strawberry-graphql/strawberry-django | 490 | defect | bd75a3b1e3850ec3cde56498eb632140762f7ab2 | 45ab478f927f87377a313978441b30689bca2541 | fix: OneToManyInput saves and runs validation on foreign key #487 | ## Description
Fix for [issue described in #487](**[url](https://github.com/strawberry-graphql/strawberry-django/issues/487)**)
Notes:
- Used django_assert_max_num_queries to write test
- Reduced the number of queries for a "patch" update from 25 to 12
- `test_relation.py` was blank so deleted it.
- As a new ... | diff --git a/strawberry_django/mutations/resolvers.py b/strawberry_django/mutations/resolvers.py
index f4c87f4b1..4c39d1153 100644
--- a/strawberry_django/mutations/resolvers.py
+++ b/strawberry_django/mutations/resolvers.py
@@ -251,10 +251,17 @@ def prepare_create_update(
)
if value is None a... | 2 | 1 | 0 | [{"id": "G0", "claim": "Sourcery suggests ensuring that the use of `_default_manager.create()` does not unintentionally bypass custom managers that might be defined on related models, and asks that custom managers either be supported explicitly or the implementation choice be documented.", "category": "maintainability"... | null |
strawberry-graphql__strawberry-django__493 | strawberry-graphql/strawberry-django | 493 | defect | 42a31836bb699e19c378b86f8e3e663f9a5a3325 | a28650442922c703bfa3c194562c660895a8a446 | fix: use str() to trigger eventual django's gettext_lazy string | The generate enum from choices feature fail when choice description is a django's lazy string (gettext_lazy used with translation framework)
## Description
Use `str()` on description to trigger string translation when generating Enum.
## Types of Changes
<!--- What types of changes does your pull request... | diff --git a/strawberry_django/fields/types.py b/strawberry_django/fields/types.py
index 874cd263a..54f2165f3 100644
--- a/strawberry_django/fields/types.py
+++ b/strawberry_django/fields/types.py
@@ -15,7 +15,6 @@
Type,
TypeVar,
Union,
- cast,
)
import django
@@ -445,7 +444,6 @@ def resolve_model... | 4 | 1 | 0 | [{"id": "G0", "claim": "Removing the explicit cast of model_field.choices to List[Tuple[Any, str]] should be checked to ensure it does not impact type safety or introduce type mismatches elsewhere.", "category": "correctness", "verdict": "uncertain", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "Expl... | null |
strawberry-graphql__strawberry-django__494 | strawberry-graphql/strawberry-django | 494 | defect | 42a31836bb699e19c378b86f8e3e663f9a5a3325 | 073c2475b6493e425789b6ff0188e1da15f86bd5 | Fix/489 auto enum value allowed chars | Use regex to replace invalid characters in auto generated enums.
This occur because django's choice values are strings and can contain any chars.
Exemple This
```
class Choice(models.TextChoices):
EN_US = "en-US", "English"
```
`Choice.choices` return `(("en-US", "English"),)`, and hyphen is not a valid... | diff --git a/strawberry_django/fields/types.py b/strawberry_django/fields/types.py
index 874cd263a..1c82beeb2 100644
--- a/strawberry_django/fields/types.py
+++ b/strawberry_django/fields/types.py
@@ -2,6 +2,7 @@
import decimal
import enum
import inspect
+import re
import uuid
from typing import (
TYPE_CHECKI... | 5 | 2 | 2 | [{"id": "G0", "claim": "Sanitizing choice names can map distinct choice values to the same GraphQL enum name (e.g. '1example'/'example' or '1-a'/'1_a' both become '_1_a'), so add a mechanism to ensure the uniqueness of sanitized enum names.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope":... | null |
strawberry-graphql__strawberry-django__498 | strawberry-graphql/strawberry-django | 498 | defect | 67433e6f414871a1f41535b9b253a0b228fcd405 | 6e5d160c916414c20460693affaf91464f0cbeea | Fix `_perm_cache` processing | <!--- This template is entirely optional and can be removed, but is here to help both you and us. -->
<!--- Anything on lines wrapped in comments like these will not show up in the final text. -->
## Description
<!--- Provide a general summary of your changes in the title above. -->
It appears [this line](https:/... | diff --git a/strawberry_django/utils/query.py b/strawberry_django/utils/query.py
index d3ba500df..e8c19cf78 100644
--- a/strawberry_django/utils/query.py
+++ b/strawberry_django/utils/query.py
@@ -1,5 +1,5 @@
import functools
-from typing import TYPE_CHECKING, List, Optional, Set, Type, TypeVar, cast
+from typing impo... | 2 | 1 | 0 | [{"id": "G0", "claim": "Ensure perm_cache supports set-like membership testing before relying on `p in perm_cache`, since if it is a list or another O(n)-lookup structure the removal of the explicit set creation could negatively impact performance with a large number of permissions.", "category": "performance", "verdic... | null |
strawberry-graphql__strawberry-django__540 | strawberry-graphql/strawberry-django | 540 | defect | 41a00eca34dea1dccac334b8d8184b0c1fa15beb | 74e9f84aeafd99df9d3d9c55e1f0f95f071aea6c | feat: Nested optimization for lists and connections | This is going to enable optimization of nested relations even when using filters/ordering/pagination, which previously would mean throwing the results away and fetching new ones, causing more than n+1 issues.
Note: Although nested connections are being optimized as well, we are only doing that for those annotated wi... | diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index 17a1fb322..f50d586b7 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -43,9 +43,6 @@ jobs:
fail-fast: false
matrix:
django-version:
- - 3.2.*
- - 4.0.*
- - 4.1.*
... | 19 | 9 | 0 | [{"id": "G0", "claim": "The new OptimizerConfig field nested_relations_prefetch should be renamed to enable_nested_relations_prefetch to stay consistent with the other boolean fields.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "For consistenc... | null |
strawberry-graphql__strawberry-django__547 | strawberry-graphql/strawberry-django | 547 | defect | 9454e9951f7ce19b95f592e622fe1df16d4dde9b | 9233a5c2fa34d10fd2b22f281eac212e53e1179b | fix: Fix specialized connection aliases missing filters/ordering | When retrieving the strawberry django type, we need to make sure to resolve any `LazyType` and also to consider specialized type vars for aliases to get the `NodeType` from them.
This also bumps the minimum strawberry version to [0.234.2](https://github.com/strawberry-graphql/strawberry/releases/tag/0.234.2) as the ... | diff --git a/poetry.lock b/poetry.lock
index 62c2d70ef..1c3317162 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -1195,6 +1195,7 @@ files = [
{file = "PyYAML-6.0.1-cp311-cp311-win_amd64.whl", hash = "sha256:bf07ee2fef7014951eeb99f56f39c9bb4af143d8aa3c21b1677805985307da34"},
{file = "PyYAML-6.0.1-cp312-cp312-ma... | 9 | 1 | 0 | [{"id": "G0", "claim": "A brief comment should be added explaining why LazyType needs to be resolved at that point in django_type.", "category": "maintainability", "verdict": "uncertain", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The variable name origin_specialized_type_var_map is long and confu... | null |
strawberry-graphql__strawberry-django__553 | strawberry-graphql/strawberry-django | 553 | defect | 015621c9cb1216e670483d8c827ea451f8781788 | d4db2a27b4084d2c22118d7c6a5757011c6bbded | fix: fix optimized nested connections failing to access totalCount | When resolving the connection from cache, we were missing setting `nodes` in it 🤦♂️
We do have a test that was passing with this, but MPTT triggered the issue. The issue was probably happening to corner cases as well
Used https://github.com/strawberry-graphql/strawberry-django/pull/551 as a base for the reprodu... | diff --git a/poetry.lock b/poetry.lock
index 1c3317162..e8b8dca13 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -373,6 +373,40 @@ files = [
[package.dependencies]
Django = ">=2.2"
+[[package]]
+name = "django-js-asset"
+version = "2.2.0"
+description = "script tag with additional attributes for django.forms.Media"
... | 5 | 2 | 2 | [{"id": "G0", "claim": "Assigning `conn` within the try block could lead to issues if an exception is raised before `conn` is defined; consider defining `conn` before the try block so it is always initialized.", "category": "correctness", "verdict": "uncertain", "priority": "P3", "scope": "introduced"}, {"id": "G1", "c... | null |
strawberry-graphql__strawberry-django__556 | strawberry-graphql/strawberry-django | 556 | defect | 015621c9cb1216e670483d8c827ea451f8781788 | 93074cd05d9a3731ee3385480a8bb7a6cf662a1b | fix: Extract interface definition in optimizer to fix django-polymorphic | ## Description
Extracting GraphQL definition from a strawberry definition based on the type (interface or object type)
## Types of Changes
<!--- What types of changes does your pull request introduce? Put an `x` in all the boxes that apply. -->
- [ ] Core
- [x] Bugfix
- [ ] New feature
- [ ] Enhancement/op... | diff --git a/strawberry_django/optimizer.py b/strawberry_django/optimizer.py
index 1463cc814..ab1a35b0e 100644
--- a/strawberry_django/optimizer.py
+++ b/strawberry_django/optimizer.py
@@ -794,6 +794,13 @@ def _get_model_hints(
return store
+def _get_gql_definition(schema: Schema, definition: StrawberryObjectD... | 5 | 2 | 2 | [{"id": "G0", "claim": "Add a docstring to the new _get_gql_definition helper explaining its purpose and parameters.", "category": "maintainability", "verdict": "uncertain", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "Add a comment explaining why the # type: ignore directive is necessary on the _re... | null |
strawberry-graphql__strawberry-django__565 | strawberry-graphql/strawberry-django | 565 | defect | 7b8a6a2da3381844e23a3bc7d151354fd9abc45b | 177add4bc624ab32c5bd6495ddbdc88a84e4f9c8 | Generated fields type resolution | I added support for field type resolution for Django 5 `GeneratedFields`. For a generated field, the `output_field` is mandatory, and this is what I'm using to determine the strawberry field type.
Extended existing test about field type resolution that is backwards compatible with Django <5. Did not modify the proje... | diff --git a/strawberry_django/fields/base.py b/strawberry_django/fields/base.py
index b60c70d55..d19543ca1 100644
--- a/strawberry_django/fields/base.py
+++ b/strawberry_django/fields/base.py
@@ -37,6 +37,11 @@
_QS = TypeVar("_QS", bound="models.QuerySet")
+try:
+ from django.db.models.fields.generated import ... | 10 | 4 | 0 | [{"id": "G0", "claim": "It might be useful to log the ImportError raised when GeneratedField is unavailable (in both base.py and types.py import guards), to help with debugging in environments where GeneratedField is not present.", "category": "maintainability", "verdict": "uncertain", "priority": "P2", "scope": "intro... | null |
strawberry-graphql__strawberry-django__582 | strawberry-graphql/strawberry-django | 582 | defect | cb9f63a6990cc63165b92e0f3224f975d47b476a | 3ac223a354a993ec2083f3f81547b6a6af6905d5 | fix(optimizer): Avoid extra queries for prefetches with existing prefetch hints | Fix #559
<!-- Generated by sourcery-ai[bot]: start summary -->
## Summary by Sourcery
This pull request addresses a bug where prefetching with existing prefetch hints resulted in extra database queries. It includes a new test to verify the fix and updates the optimizer to skip unnecessary optimizations in such cases... | diff --git a/strawberry_django/optimizer.py b/strawberry_django/optimizer.py
index 683e9d48d..1988c3c9f 100644
--- a/strawberry_django/optimizer.py
+++ b/strawberry_django/optimizer.py
@@ -763,6 +763,13 @@ def _get_hints_from_django_relation(
store.prefetch_related.append(model_fieldname)
return store... | 7 | 2 | 0 | [{"id": "G0", "claim": "Consider checking whether 'field' is None before accessing its attributes, since if field can be None the access could raise an AttributeError.", "category": "correctness", "verdict": "uncertain", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "Reword the comment explaining why ... | null |
strawberry-graphql__strawberry-django__622 | strawberry-graphql/strawberry-django | 622 | defect | 98393a354738ede29745a5f8635cb4b6d772ef00 | 810c0455c72e07bbcb3db649fa889970e263abff | Fix calculation of `has_next_page` in `resolve_connection_from_cache` | ## Description
The `strawberry_django.relay.ListConnectionWithTotalCount.resolve_connection_from_cache` method currently incorrectly attempts to determine `has_next_page` from the `QuerySet._result_cache`, as opposed to the cached records within it, resulting in an `AttributeError` being raised.
This PR ensures t... | diff --git a/strawberry_django/relay.py b/strawberry_django/relay.py
index 19649ca45..9309299c1 100644
--- a/strawberry_django/relay.py
+++ b/strawberry_django/relay.py
@@ -188,11 +188,15 @@ def resolve_connection_from_cache(
for node in result
]
has_previous_page = (
- nodes[0... | 2 | 1 | 1 | [{"id": "G0", "claim": "Refactor the has_previous_page/has_next_page calculation to handle an empty result first and bind result[0]/result[-1] to locals once, since the current implementation could raise an IndexError if result is empty and accessing result[0]/result[-1] multiple times may impact performance for larger... | null |
strawberry-graphql__strawberry-django__653 | strawberry-graphql/strawberry-django | 653 | defect | 5f5aca95b4ef98d770ddc6c5c7aaa21b16607085 | 22616f4bec3e350124215c27d5d68c8ef507c162 | Batch Mutations for creating, updating, and deleting #438 | Batch mutations for creating, updating, and deleting.
## Description
Batched mutations are mutations that mutate multiple objects at once.
Mutations with a filter function or accept a list of objects that return a list.
## Types of Changes
- [ ] Core
- [ ] Bugfix
- [x] New feature
- [ ] Enhancement/opti... | diff --git a/docs/guide/mutations.md b/docs/guide/mutations.md
index 3506de12d..1c93bbada 100644
--- a/docs/guide/mutations.md
+++ b/docs/guide/mutations.md
@@ -184,3 +184,20 @@ class Mutation:
schema = strawberry.Schema(mutation=Mutation)
```
+
+## Batching
+
+If you need to make multiple creates, updates, or dele... | 6 | 2 | 1 | [{"id": "G0", "claim": "The kwargs parameter of instance_level_update appears unnecessary because it is not used.", "category": "maintainability", "verdict": "uncertain", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Batch-creation tests only cover the happy path; consider adding tests for empty list... | null |
strawberry-graphql__strawberry-django__670 | strawberry-graphql/strawberry-django | 670 | defect | 745b7f27c0fa8306cdaccadb264f1a9d627a7e17 | c3565b0a45274d85bffd77494f991ce419fd3618 | Added missing unpacking of strawberry.LazyType to optimzer.py | The query optimizer doesn't properly unpack LazyType on PaginatedRespone handling.
This fixes it the same way _get_model_hints_from_connection does it.
## Types of Changes
- [ ] Core
- [x ] Bugfix
- [ ] New feature
- [ ] Enhancement/optimization
- [ ] Documentation
## Checklist
<!--- Go over all the fo... | diff --git a/strawberry_django/optimizer.py b/strawberry_django/optimizer.py
index 956627fa9..f34531b06 100644
--- a/strawberry_django/optimizer.py
+++ b/strawberry_django/optimizer.py
@@ -1193,6 +1193,10 @@ def _get_model_hints_from_paginated(
store = None
n_type = object_definition.type_var_map.get("NodeT... | 1 | 1 | 1 | [{"id": "G0", "claim": "Please add tests to verify the LazyType unpacking behavior for PaginatedResponse handling to prevent future regressions.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}] | null |
strawberry-graphql__strawberry-django__673 | strawberry-graphql/strawberry-django | 673 | defect | e76b3fa1713bc28ef0a845c194e581bead198660 | ad7dad206a255d74214ba3c301bfbb7c343cf9de | fix(pagination)!: Use `PAGINATION_DEFAULT_LIMIT` when limit is not provided | An oversight from my side when working on https://github.com/strawberry-graphql/strawberry-django/pull/642
Fix https://github.com/strawberry-graphql/strawberry-django/issues/656
## Summary by Sourcery
Fix the pagination logic to use the `PAGINATION_DEFAULT_LIMIT` setting when the limit is not explicitly provided in ... | diff --git a/strawberry_django/pagination.py b/strawberry_django/pagination.py
index 1b6b4608b..6ca9a699b 100644
--- a/strawberry_django/pagination.py
+++ b/strawberry_django/pagination.py
@@ -13,6 +13,7 @@
from strawberry_django.fields.base import StrawberryDjangoFieldBase
from strawberry_django.resolvers import d... | 1 | 1 | 0 | [{"id": "G0", "claim": "The default-limit test should also cover the case where the limit is explicitly set to null in the pagination input, since that valid GraphQL case may behave differently.", "category": "testing", "verdict": "supported", "priority": "P2", "scope": "introduced"}] | null |
strawberry-graphql__strawberry-django__674 | strawberry-graphql/strawberry-django | 674 | defect | 0d59b845c07d4f870c7dd4e836914c738aaa32a6 | 75d41c72ee9b7d918e5d2ac6f879370808ed9b55 | fix(mutations): Refetch instances to optimize the return value | Refetch instances after the mutation to make sure we optimize the result.
Without this, `annotated` fields would not exist in the return value and would fail to be returned.
I'm also modifying a test to include an annotated field. Without this change applied it would fail.
Fix https://github.com/strawberry-gra... | diff --git a/strawberry_django/mutations/fields.py b/strawberry_django/mutations/fields.py
index 95421001b..b58c3c8eb 100644
--- a/strawberry_django/mutations/fields.py
+++ b/strawberry_django/mutations/fields.py
@@ -1,7 +1,7 @@
from __future__ import annotations
import inspect
-from typing import TYPE_CHECKING, An... | 2 | 1 | 1 | [{"id": "G0", "claim": "Add a test case covering the refetch behavior when DjangoOptimizerExtension is disabled (where refetch returns the original resolved value).", "category": "testing", "verdict": "uncertain", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "DjangoOptimizerExtension.enabled is a Con... | null |
strawberry-graphql__strawberry-django__675 | strawberry-graphql/strawberry-django | 675 | defect | 1b49393abca64b8ff79fb488fed6e49cb05d2471 | e6cae73e32375da2e8e97a49083ad31471a70603 | fix(optimizer): Prevent issuing duplicated queries for certain uses of first() and get() | For "many-type" fields (i.e. ManyToManyField or a reverse FK) when the corresponding GraphQL field has a singular result, StrawberryDjangoField will use `QuerySet#get` and `QuerySet#first` to produce the result. This prevents the QuerySet from using any prefetched data, because those methods do an implicit slice.
This... | diff --git a/strawberry_django/fields/field.py b/strawberry_django/fields/field.py
index 56b4cd86b..ba3c9a873 100644
--- a/strawberry_django/fields/field.py
+++ b/strawberry_django/fields/field.py
@@ -282,12 +282,35 @@ def qs_hook(qs: models.QuerySet): # type: ignore
def qs_hook(qs: models.QuerySet): #... | 2 | 1 | 0 | [{"id": "G0", "claim": "Extract the prefetch-aware get() logic into a helper function (e.g. _get_from_prefetched_qs) to reduce nesting and improve readability, keeping behavior identical.", "category": "maintainability", "verdict": "uncertain", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Use qs._re... | null |
strawberry-graphql__strawberry-django__683 | strawberry-graphql/strawberry-django | 683 | defect | 48b54fd0ffae1fcc48597f0cd2d2df8a3296c0bc | de8a3b6e302bfd04d40266900793b4e01cbba815 | Update test scope to include django 5.1, update pre-commit hooks | ## Description
Update test scope & pre-commit hooks.
Replaced `django-mptt` with `django-tree-queries`
## Types of Changes
<!--- What types of changes does your pull request introduce? Put an `x` in all the boxes that apply. -->
- [ ] Core
- [ ] Bugfix
- [ ] New feature
- [x] Enhancement/optimization
- [... | diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index 0a7cf983d..5aa568844 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -45,6 +45,7 @@ jobs:
django-version:
- 4.2.*
- 5.0.*
+ - 5.1.*
python-version:
- '3.... | 5 | 4 | 0 | [{"id": "G0", "claim": "The PR should not exclude tests/relay/mptt/models.py entirely from pyright type checking (keep type checking enabled, or at least document why), preferring targeted `# type: ignore`/`cast` on the specific lines.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": ... | null |
strawberry-graphql__strawberry-django__709 | strawberry-graphql/strawberry-django | 709 | defect | 95dc43b9345f39893bd42a2b2138569bc468c442 | 740761ec08fdb3fcba4745b9e96aea91a4f7ca75 | Add support for the the general `Geometry` type | ## Description
Add Geometry type
## Types of Changes
- [V ] New feature
## Issues Fixed or Closed by This PR
Fix https://github.com/strawberry-graphql/strawberry-django/issues/707
## Checklist
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
<!--- If you're u... | diff --git a/RELEASE.md b/RELEASE.md
new file mode 100644
index 000000000..f745ee961
--- /dev/null
+++ b/RELEASE.md
@@ -0,0 +1,3 @@
+Release type: patch
+
+Implement Geometry type for django.contrib.gis.db.models.GeometryField
\ No newline at end of file
diff --git a/poetry.lock b/poetry.lock
index 827d15ecc..313b824c5... | 5 | 3 | 0 | [{"id": "G0", "claim": "The Geometry scalar's parse_value lambda ignores its input and returns the geos.GeometryCollection type itself; it should parse the value into a geometry (e.g. geos.GeometryCollection(v) or the correct geometry type) instead of always returning geos.GeometryCollection.", "category": "correctness... | null |
strawberry-graphql__strawberry-django__742 | strawberry-graphql/strawberry-django | 742 | defect | 97e370e1c5a5caf13347a4dc11cd89ad799d100f | e04e20e93f160a6ab968023afb2cff4ff32c3476 | Optimizer: Pass accurate "info" parameter to PrefetchCallable and AnnotateCallable | <!--- Provide a general summary of your changes in the title above. -->
The optimizer allows dynamic annotations or prefetches by passing a callable. Currently this callable does not always receive an accurate `GraphQLResolveInfo`.
<!--- This template is entirely optional and can be removed, but is here to help b... | diff --git a/strawberry_django/fields/base.py b/strawberry_django/fields/base.py
index 314a73204..c7b1e34d9 100644
--- a/strawberry_django/fields/base.py
+++ b/strawberry_django/fields/base.py
@@ -20,6 +20,7 @@
from strawberry.types.union import StrawberryUnion
from strawberry.utils.inspect import get_specialized_typ... | 5 | 2 | 0 | [{"id": "G0", "claim": "Add a test where a hints callable returns invalid values (e.g. None, an empty list or an unexpected type) and verify the optimizer handles them gracefully or raises an appropriate error.", "category": "testing", "verdict": "uncertain", "priority": "P2", "scope": "introduced"}, {"id": "G1", "clai... | null |
strawberry-graphql__strawberry-django__755 | strawberry-graphql/strawberry-django | 755 | defect | a3da53844f1a7a5ecdd3e14e14caf23d511969f4 | 9a3cdf77a8b6ff2dba8aada0befe6579efb6a899 | filters in mutation default required, and add setting ALLOW_MUTATIONS_WITHOUT_FILTERS to control | <!--- Provide a general summary of your changes in the title above. -->
<!--- This template is entirely optional and can be removed, but is here to help both you and us. -->
<!--- Anything on lines wrapped in comments like these will not show up in the final text. -->
## Description
This is to prevent front-e... | diff --git a/strawberry_django/filters.py b/strawberry_django/filters.py
index 1cac06e8f..33b2177cc 100644
--- a/strawberry_django/filters.py
+++ b/strawberry_django/filters.py
@@ -315,7 +315,13 @@ def arguments(self) -> list[StrawberryArgument]:
argument(settings["DEFAULT_PK_FIELD_NAME"], strawber... | 1 | 1 | 0 | [{"id": "G0", "claim": "The comment line '# If True, filters used in mutations can be omitted' should use the '#:' doc-comment prefix instead of '#' so the setting keeps its documentation.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}] | null |
strawberry-graphql__strawberry-django__759 | strawberry-graphql/strawberry-django | 759 | defect | 39e174ad447bf19b1ccce2add1fca02c097ae855 | 112df9cafabfb9bbe0439413440c56979ed79cf9 | fix(ordering): fix lazy types in ordering | Fix #758 | diff --git a/strawberry_django/ordering.py b/strawberry_django/ordering.py
index 3dc95e7f7..2486a4d0e 100644
--- a/strawberry_django/ordering.py
+++ b/strawberry_django/ordering.py
@@ -17,6 +17,7 @@
from strawberry.types import has_object_definition
from strawberry.types.base import StrawberryOptional, WithStrawberry... | 2 | 1 | 0 | [{"id": "G0", "claim": "The duplicated LazyType/StrawberryOptional unwrapping in process_ordering_default should be extracted into a loop or helper that unwraps all nested wrappers until the base type is reached.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "... | null |
strawberry-graphql__strawberry-django__762 | strawberry-graphql/strawberry-django | 762 | defect | b6f4bffa3e6ff3c25d670cbdd9c6f5a665ecef67 | d9d78a6b18605d07a41f35296c5e99a8b41bd2c6 | Add support for AND/OR filters to be lists | <!--- Provide a general summary of your changes in the title above. -->
<!--- This template is entirely optional and can be removed, but is here to help both you and us. -->
<!--- Anything on lines wrapped in comments like these will not show up in the final text. -->
## Description
Currently, AND and OR filt... | diff --git a/strawberry_django/filters.py b/strawberry_django/filters.py
index 0834befc8..734dd5649 100644
--- a/strawberry_django/filters.py
+++ b/strawberry_django/filters.py
@@ -1,6 +1,7 @@
from __future__ import annotations
import functools
+import operator
import inspect
import warnings
from enum import Enu... | 9 | 5 | 2 | [{"id": "G0", "claim": "functools.reduce over all_q without an initializer will raise a TypeError when the logical-filter list is empty (e.g. `OR: []`); give reduce an initial value like Q() (or handle empty lists explicitly) and add tests clarifying the expected empty-list behavior.", "category": "correctness", "verdi... | null |
strawberry-graphql__strawberry-django__777 | strawberry-graphql/strawberry-django | 777 | defect | aaae0039f0ce57f94307b62b07c736ebef427f87 | c31867b616f0938fc23e04ad60445cdadc8ec096 | Relay pagination optimizations | ## Description
Goal is to optimize relay nested and non-nested pagination when paginating backwards (via `last`) without `before`. Current behavior is to fetch entire table for this case.
Additionally added `total_count` optimization for non-nested pagination.
I am not very confident with the solutions for `tota... | diff --git a/strawberry_django/optimizer.py b/strawberry_django/optimizer.py
index 49481584f..df264a831 100644
--- a/strawberry_django/optimizer.py
+++ b/strawberry_django/optimizer.py
@@ -37,7 +37,7 @@
from graphql.execution.collect_fields import collect_sub_fields
from graphql.language.ast import OperationType
fro... | 13 | 5 | 1 | [{"id": "G0", "claim": "Catching both IndexError and AttributeError in DjangoListConnection.total_count may mask unrelated issues; narrow the handling to the expected error or add a comment explaining why both are caught.", "category": "maintainability", "verdict": "uncertain", "priority": "P2", "scope": "introduced"},... | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.