Northy1717/SWE-bench-Live huggingface dataset:
Repository: aws-cloudformation/cfn-lint

Issue:
v1: E2001 'AllowedPattern' is not one of [ ... ] for parameter type AWS::EC2::Image::Id
### CloudFormation Lint Version

1.3.3

### What operating system are you using?

Ubuntu

### Describe the bug

Validation fails when specifying the `AllowedPattern` propety for a parameter with type `AWS::EC2::Image::Id`.

### Expected behavior

Validation should pass.

### Reproduction template

```yaml
AWSTemplateFormatVersion: "2010-09-09"
Parameters:
  MyImageId:
    Type: AWS::EC2::Image::Id
    AllowedPattern: '^ami-[0-9a-f]+$'
Resources:
  myInstance:
    Type: AWS::EC2::Instance
    Properties:
      ImageId: !Ref MyImageId
```


Discussion:

Patch:
diff --git a/src/cfnlint/data/schemas/other/parameters/configuration.json b/src/cfnlint/data/schemas/other/parameters/configuration.json
index 72031b96ef..a8c9748b26 100644
--- a/src/cfnlint/data/schemas/other/parameters/configuration.json
+++ b/src/cfnlint/data/schemas/other/parameters/configuration.json
@@ -7,6 +7,7 @@
     "else": {
      "propertyNames": {
       "enum": [
+       "AllowedPattern",
        "AllowedValues",
        "ConstraintDescription",
        "Default",


Test patch:
diff --git a/test/unit/rules/parameters/test_configuration.py b/test/unit/rules/parameters/test_configuration.py
index 418e7e617e..046504b570 100644
--- a/test/unit/rules/parameters/test_configuration.py
+++ b/test/unit/rules/parameters/test_configuration.py
@@ -73,6 +73,16 @@ def context(cfn):
             },
             [],
         ),
+        (
+            "AWS type allowed allowed pattern",
+            {
+                "AWS": {
+                    "Type": "AWS::EC2::Image::Id",
+                    "AllowedPattern": "^ami-[0-9a-f]+$",
+                }
+            },
+            [],
+        ),
         (
             "Number type with AllowedPattern",
             {
Repository: beeware/briefcase

Issue:
Add console app builds/testing to CI
### What is the problem or limitation you are having?

We aren't building and testing Console apps in CI like we do Toga, PySide, and Pygame. Should we be?

### Describe the solution you'd like

Console apps are exercised in CI like other formats/toolkits.

### Describe alternatives you've considered

status quo

### Additional context

_No response_


Discussion:
Should we? Absolutely. The test doesn't need to be fancy - we don't need to test any text-mode GUI frameworks, for example - but given we have a different stub binary, and other non-trivial execution paths, we should definitely be testing console startup.



Patch:
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index f97540b1d..8af65229d 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -187,7 +187,7 @@ jobs:
     strategy:
       fail-fast: false
       matrix:
-        framework: [ "toga", "pyside6", "pygame" ]
+        framework: [ "toga", "pyside6", "pygame", "console" ]
         runner-os: [ "macos-12", "macos-14", "ubuntu-22.04", "windows-latest" ]
 
   verify-apps:
@@ -206,5 +206,5 @@ jobs:
     strategy:
       fail-fast: false
       matrix:
-        framework: [ "toga", "pyside6", "pygame" ]
+        framework: [ "toga", "pyside6", "pygame", "console" ]
         runner-os: [ "macos-12", "macos-14", "ubuntu-22.04", "windows-latest" ]
diff --git a/automation/src/automation/bootstraps/console.py b/automation/src/automation/bootstraps/console.py
index 3436c4cdf..4faa15abb 100644
--- a/automation/src/automation/bootstraps/console.py
+++ b/automation/src/automation/bootstraps/console.py
@@ -12,5 +12,4 @@ def main():
     time.sleep(2)
     print("{EXIT_SUCCESS_NOTIFY}")
     print("{BRIEFCASE_EXIT_SUCCESS_SIGNAL}")
-
 """
diff --git a/changes/1867.misc.rst b/changes/1867.misc.rst
new file mode 100644
index 000000000..6d7e52a14
--- /dev/null
+++ b/changes/1867.misc.rst
@@ -0,0 +1,1 @@
+Console app testing was added to CI.
diff --git a/src/briefcase/bootstraps/console.py b/src/briefcase/bootstraps/console.py
index b9f7568db..58de0ad4a 100644
--- a/src/briefcase/bootstraps/console.py
+++ b/src/briefcase/bootstraps/console.py
@@ -10,7 +10,6 @@ def app_source(self):
 def main():
     # Your app logic goes here
     print("Hello, World.")
-
 """
 
     def app_start_source(self):


Test patch:
diff --git a/tests/commands/new/test_build_context.py b/tests/commands/new/test_build_context.py
index ec86799a3..05cae9bd0 100644
--- a/tests/commands/new/test_build_context.py
+++ b/tests/commands/new/test_build_context.py
@@ -291,7 +291,6 @@ def test_question_sequence_console(new_command):
 def main():
     # Your app logic goes here
     print("Hello, World.")
-
 """,
         app_start_source="""\
 from {{ cookiecutter.module_name }}.app import main
Repository: keras-team/keras

Issue:
Keras 3 error with keras.ops.tile
I was working in Keras 3 on the Jax backend, and switched to the Torch backend. I received this error
`TypeError: tile(): argument 'dims' must be tuple of ints, not int`

The call site of tile() looks like:
`keras.ops.tile(tensor, n)`
where is a scalar integer, which according to the documentation is a valid input. This works on the jax backend, but fails on the torch backend specifically.

I believe this is an error with the torch backend of Keras 3, and converting the scalar to a tuple solves the issue. 


Discussion:

Patch:
diff --git a/keras/src/backend/torch/numpy.py b/keras/src/backend/torch/numpy.py
index 8ea1806decca..a0340b30c6d3 100644
--- a/keras/src/backend/torch/numpy.py
+++ b/keras/src/backend/torch/numpy.py
@@ -1359,6 +1359,8 @@ def round(x, decimals=0):
 def tile(x, repeats):
     if is_tensor(repeats):
         repeats = tuple(repeats.int().numpy())
+    if isinstance(repeats, int):
+        repeats = (repeats,)
     x = convert_to_tensor(x)
     return torch.tile(x, dims=repeats)
 
diff --git a/keras/src/ops/numpy.py b/keras/src/ops/numpy.py
index 69dbe23076d3..bbff45e5c97a 100644
--- a/keras/src/ops/numpy.py
+++ b/keras/src/ops/numpy.py
@@ -5047,6 +5047,8 @@ def call(self, x):
     def compute_output_spec(self, x):
         x_shape = list(x.shape)
         repeats = self.repeats
+        if isinstance(repeats, int):
+            repeats = [repeats]
         if len(x_shape) > len(repeats):
             repeats = [1] * (len(x_shape) - len(repeats)) + repeats
         else:


Test patch:
diff --git a/keras/src/ops/numpy_test.py b/keras/src/ops/numpy_test.py
index ab730608fc4f..267efa657311 100644
--- a/keras/src/ops/numpy_test.py
+++ b/keras/src/ops/numpy_test.py
@@ -1445,6 +1445,7 @@ def test_tanh(self):
 
     def test_tile(self):
         x = KerasTensor((None, 3))
+        self.assertEqual(knp.tile(x, 2).shape, (None, 6))
         self.assertEqual(knp.tile(x, [2]).shape, (None, 6))
         self.assertEqual(knp.tile(x, [1, 2]).shape, (None, 6))
         self.assertEqual(knp.tile(x, [2, 1, 2]).shape, (2, None, 6))
@@ -1969,6 +1970,7 @@ def test_tanh(self):
 
     def test_tile(self):
         x = KerasTensor((2, 3))
+        self.assertEqual(knp.tile(x, 2).shape, (2, 6))
         self.assertEqual(knp.tile(x, [2]).shape, (2, 6))
         self.assertEqual(knp.tile(x, [1, 2]).shape, (2, 6))
         self.assertEqual(knp.tile(x, [2, 1, 2]).shape, (2, 2, 6))
@@ -4119,6 +4121,7 @@ def test_tanh(self):
 
     def test_tile(self):
         x = np.array([[1, 2, 3], [3, 2, 1]])
+        self.assertAllClose(knp.tile(x, 2), np.tile(x, 2))
         self.assertAllClose(knp.tile(x, [2, 3]), np.tile(x, [2, 3]))
         self.assertAllClose(knp.Tile([2, 3])(x), np.tile(x, [2, 3]))