PrimeIntellect/SWE-rebench-V2 huggingface dataset:
Repository: ResearchObject/ro-crate-py (python)

Issue:
hasPart property on root dataset is assumed to be an array
Loading this dataset causes an error as the hasPart value is not an array but the code assumes it will be :

```json
{
    "@id": "./",
    "@type": "Dataset",
    "hasPart":  {"@id": "spam/foo.txt"} 
},
{
    "@id": "spam/foo.txt",
    "@type": "File"
}
```

This line is the culprit: https://github.com/ResearchObject/ro-crate-py/blob/dc3f75b0d0390dedbf9a830b6325b76dba468f1f/rocrate/rocrate.py#L145C1-L146C1

 parts = root_entity.pop('hasPart', [])

I added this to my copy  make it work but not sure if you have a general purpose way of doing this in this library:

        if not isinstance(parts, list):
            parts = [parts]



Pull request:
Handle non-array hasPart entries
Fixes #158.

Patch:
diff --git a/rocrate/rocrate.py b/rocrate/rocrate.py
index 57bcd39..5d5a98d 100644
--- a/rocrate/rocrate.py
+++ b/rocrate/rocrate.py
@@ -142,7 +142,7 @@ class ROCrate():
 
         root_entity = entities.pop(root_id)
         assert root_id == root_entity.pop('@id')
-        parts = root_entity.pop('hasPart', [])
+        parts = as_list(root_entity.pop('hasPart', []))
         self.add(RootDataset(self, root_id, properties=root_entity))
         preview_entity = entities.pop(Preview.BASENAME, None)
         if preview_entity and not gen_preview:
@@ -167,7 +167,7 @@ class ROCrate():
                 else:
                     instance = cls(self, source / id_, id_, properties=entity)
             self.add(instance)
-            self.__add_parts(entity.get("hasPart", []), entities, source)
+            self.__add_parts(as_list(entity.get("hasPart", [])), entities, source)
 
     def __read_contextual_entities(self, entities):
         type_map = {_.__name__: _ for _ in subclasses(ContextEntity)}


Test patch:
diff --git a/test/test_read.py b/test/test_read.py
index 9aa3e96..43bf328 100644
--- a/test/test_read.py
+++ b/test/test_read.py
@@ -499,17 +499,17 @@ def test_indirect_data_entity(tmpdir):
             {
                 "@id": "./",
                 "@type": "Dataset",
-                "hasPart": [{"@id": "d1"}]
+                "hasPart": {"@id": "d1"}
             },
             {
                 "@id": "d1",
                 "@type": "Dataset",
-                "hasPart": [{"@id": "d1/d2"}]
+                "hasPart": {"@id": "d1/d2"}
             },
             {
                 "@id": "d1/d2",
                 "@type": "Dataset",
-                "hasPart": [{"@id": "d1/d2/f1"}]
+                "hasPart": {"@id": "d1/d2/f1"}
             },
             {
                 "@id": "d1/d2/f1",
Repository: getmoto/moto (python)

Issue:
Secrets from secretsmanager do not appear in the dashboard
I've been using the [secretsmanager](https://docs.getmoto.org/en/latest/docs/services/secretsmanager.html) mock. When I create a secret, there’s no issue—I can retrieve it using Boto without any errors.
However, in the dashboard at `http://localhost:5000/moto-api/`, the secrets do not appear.
Maybe I'm doing something wrong during the secret creation?

I checked in the `http://localhost:5000/moto-api/data.json` 
`secretsmanager`key only contains an empty array. 
```json 
...
 "secretsmanager": {
    "SecretsManager": [
      
    ]
  },
...
```

Screenshot : 
<img width="1152" alt="Image" src="https://github.com/user-attachments/assets/e47550e7-dfbf-42a7-91ce-3b1951e8586e" />

Code to reproduce : 

```python
import boto3 
from botocore.client import Config
import os 

os.environ["AWS_ACCESS_KEY_ID"] = "testing"
os.environ["AWS_SECRET_ACCESS_KEY"] = "testing"
os.environ["AWS_SECURITY_TOKEN"] = "testing"
os.environ["AWS_SESSION_TOKEN"] = "testing"

secret_manager = boto3.client("secretsmanager",
  region_name="eu-west-3" ,
  endpoint_url="http://localhost:5000",
)

secret_manager.create_secret(
    Name='database-secret',
    Description='string',
    KmsKeyId='string',
    SecretBinary=b'bytes',
    SecretString='string',
)

secret_manager.list_secrets(
    MaxResults=10,
    SortOrder='asc'
)
```

Moto version : `motoserver/moto:5.0.27` docker image


Pull request:
SecretsManager: display Secrets on dashboard
Closes #8782 

Patch:
diff --git a/moto/secretsmanager/models.py b/moto/secretsmanager/models.py
index 5ff91af0c..4e6ea5093 100644
--- a/moto/secretsmanager/models.py
+++ b/moto/secretsmanager/models.py
@@ -72,12 +72,7 @@ def _matches(
     return is_match
 
 
-class SecretsManager(BaseModel):
-    def __init__(self, region_name: str):
-        self.region = region_name
-
-
-class FakeSecret:
+class FakeSecret(BaseModel):
     def __init__(
         self,
         account_id: str,


Test patch:
diff --git a/tests/test_secretsmanager/test_server.py b/tests/test_secretsmanager/test_server.py
index f553e9fb4..95ed6c8ac 100644
--- a/tests/test_secretsmanager/test_server.py
+++ b/tests/test_secretsmanager/test_server.py
@@ -3,6 +3,7 @@ import unittest
 
 import boto3
 import pytest
+import requests
 
 import moto.server as server
 from moto import mock_aws, settings
@@ -1024,3 +1025,20 @@ def test_batch_get_secret_value_with_filters():
 
     json_data = json.loads(batch_get_secret_values.data.decode("utf-8"))
     assert len(json_data["SecretValues"]) == len(matched) == 2
+
+
+@mock_aws
+def test_data_api() -> None:
+    base_url = (
+        "http://localhost:5000"
+        if settings.TEST_SERVER_MODE
+        else "http://motoapi.amazonaws.com"
+    )
+    data_url = f"{base_url}/moto-api/data.json"
+    conn = boto3.client("secretsmanager", region_name="us-west-1")
+    conn.create_secret(Name="test-secret")
+    data = requests.post(data_url).json()
+    secrets = data["secretsmanager"]["FakeSecret"]
+    assert len(secrets) == 1
+    secret = secrets[0]
+    assert secret["name"] == "test-secret"