PrimeIntellect/SWE-rebench-V2-Filtered-Easy-Verified huggingface dataset:
Repository: pvlib/pvlib-python (python)
Issue: Bug in dirint: pressure is not passed to disc
The dirint function fails to pass the input pressure to its internal disc function call. This effects disc's airmass calculation, which effects the disc dni calculation, which effects the dirint dni. I'll fix this soon.
Pull request description: fix dirint pressure bug
closes #212. 


Patch:
diff --git a/docs/sphinx/source/whatsnew/v0.4.0.txt b/docs/sphinx/source/whatsnew/v0.4.0.txt
index 4c1e292..d5adb58 100644
--- a/docs/sphinx/source/whatsnew/v0.4.0.txt
+++ b/docs/sphinx/source/whatsnew/v0.4.0.txt
@@ -27,6 +27,8 @@ Enhancements
 Bug fixes
 ~~~~~~~~~
 
+* dirint function yielded the wrong results for non-sea-level pressures.
+  Fixed. (:issue:`212`)
 
 
 Documentation
diff --git a/pvlib/irradiance.py b/pvlib/irradiance.py
index aa6ac3f..fd4cf3e 100644
--- a/pvlib/irradiance.py
+++ b/pvlib/irradiance.py
@@ -1470,7 +1470,7 @@ def dirint(ghi, zenith, times, pressure=101325, use_delta_kt_prime=True,
 
     pvl_logger.debug('clearsky.dirint')
 
-    disc_out = disc(ghi, zenith, times)
+    disc_out = disc(ghi, zenith, times, pressure=pressure)
     kt = disc_out['kt']
 
     # Absolute Airmass, per the DISC model


Test patch:
diff --git a/pvlib/test/test_irradiance.py b/pvlib/test/test_irradiance.py
index 23d5d7f..67d3c24 100644
--- a/pvlib/test/test_irradiance.py
+++ b/pvlib/test/test_irradiance.py
@@ -208,7 +208,7 @@ def test_dirint_value():
     pressure = 93193.
     dirint_data = irradiance.dirint(ghi, zenith, times, pressure=pressure)
     assert_almost_equal(dirint_data.values,
-                        np.array([928.85, 688.26]), 1)
+                        np.array([ 888. ,  683.7]), 1)
 
 
 def test_dirint_nans():
@@ -220,7 +220,7 @@ def test_dirint_nans():
     dirint_data = irradiance.dirint(ghi, zenith, times, pressure=pressure,
                                     temp_dew=temp_dew)
     assert_almost_equal(dirint_data.values,
-                        np.array([np.nan, np.nan, np.nan, np.nan, 934.2]), 1)
+                        np.array([np.nan, np.nan, np.nan, np.nan, 893.1]), 1)
 
 
 def test_dirint_tdew():
@@ -231,7 +231,7 @@ def test_dirint_tdew():
     dirint_data = irradiance.dirint(ghi, zenith, times, pressure=pressure,
                                     temp_dew=10)
     assert_almost_equal(dirint_data.values,
-                        np.array([934.06, 640.67]), 1)
+                        np.array([892.9,  636.5]), 1)
 
 def test_dirint_no_delta_kt():
     times = pd.DatetimeIndex(['2014-06-24T12-0700','2014-06-24T18-0700'])
@@ -241,7 +241,7 @@ def test_dirint_no_delta_kt():
     dirint_data = irradiance.dirint(ghi, zenith, times, pressure=pressure,
                                     use_delta_kt_prime=False)
     assert_almost_equal(dirint_data.values,
-                        np.array([901.56, 674.87]), 1)
+                        np.array([861.9,  670.4]), 1)
 
 def test_dirint_coeffs():
     coeffs = irradiance._get_dirint_coeffs()
Repository: proullon/ramsql (go)
Issue: Support true and false for values in argument values for Exec, Query

db.Exec("INSERT INTO table (id, hasBool) VALUES(?,?)", 0, true) 

returns with no strconv error.
Pull request description: fix: insert mixed case value attribute
## Context

Mixed case variable are not recognized by agnostic engine value map. 

## Fix

`executor` engine store variable as `strings.ToLower` in values map.

Closes #82 


Patch:
diff --git a/engine/executor/engine.go b/engine/executor/engine.go
index e3c48ef..cdbc886 100644
--- a/engine/executor/engine.go
+++ b/engine/executor/engine.go
@@ -7,6 +7,7 @@ import (
 	"fmt"
 	"reflect"
 	"strconv"
+	"strings"
 
 	"github.com/proullon/ramsql/engine/agnostic"
 	"github.com/proullon/ramsql/engine/log"
@@ -360,7 +361,7 @@ func getValues(specifiedAttrs []string, valuesDecl *parser.Decl, args []NamedVal
 				return nil, err
 			}
 		}
-		values[specifiedAttrs[i]] = v
+		values[strings.ToLower(specifiedAttrs[i])] = v
 	}
 
 	return values, nil


Test patch:
diff --git a/driver/driver_test.go b/driver/driver_test.go
index 0278659..14e425b 100644
--- a/driver/driver_test.go
+++ b/driver/driver_test.go
@@ -31,6 +31,30 @@ func TestCreateTable(t *testing.T) {
 	}
 }
 
+func TestInsertBool(t *testing.T) {
+
+	db, err := sql.Open("ramsql", "TestInsertBool")
+	if err != nil {
+		t.Fatalf("sql.Open: %s", err)
+	}
+
+	_, err = db.Exec(`CREATE TABLE ttable (id BIGINT, hasBool BOOL)`)
+	if err != nil {
+		t.Fatalf("cannot create table: %s", err)
+	}
+
+	_, err = db.Exec(`INSERT INTO ttable (id, hasBool) VALUES (?,?)`, 1, true)
+	if err != nil {
+		t.Fatalf("cannot insert into table: %s", err)
+	}
+
+	err = db.Close()
+	if err != nil {
+		t.Fatalf("sql.Close : Error : %s\n", err)
+	}
+
+}
+
 func TestInsertEmptyString(t *testing.T) {
 
 	db, err := sql.Open("ramsql", "TestInsertEmptyString")