hash
stringlengths 40
40
| diff
stringlengths 131
26.7k
| message
stringlengths 7
694
| project
stringlengths 5
67
| split
stringclasses 1
value | diff_languages
stringlengths 2
24
|
|---|---|---|---|---|---|
ad15aed2377cb39a117373e53e31bfffd32a72f0
|
diff --git a/pyoko/db/adapter/db_riak.py b/pyoko/db/adapter/db_riak.py
index <HASH>..<HASH> 100644
--- a/pyoko/db/adapter/db_riak.py
+++ b/pyoko/db/adapter/db_riak.py
@@ -62,7 +62,6 @@ class BlockSave(object):
key_list = list(set(Adapter.block_saved_keys))
indexed_obj_count = self.mdl.objects.filter(key__in=key_list)
while Adapter.block_saved_keys and indexed_obj_count.count() < len(key_list):
- print("save %s" % Adapter.block_saved_keys)
time.sleep(.4)
Adapter.COLLECT_SAVES = False
@@ -154,7 +153,8 @@ class Adapter(BaseAdapter):
# t1 = time.time()
obj = self.bucket.get(doc['_yz_rk'])
if not obj.exists:
- raise ObjectDoesNotExist("Possibly a Riak <-> Solr sync delay issue!")
+ raise ObjectDoesNotExist("We got %s from Solr for %s bucket but cannot find it in the Riak" % (
+ doc['_yz_rk'], self._model_class))
yield obj.data, obj.key
if settings.DEBUG:
sys.PYOKO_STAT_COUNTER['read'] += 1
|
removed leftover print statement
added more explicit error message for key found in solr but not in riak exception.
rref #<I> ref GH-<I>
|
zetaops_pyoko
|
train
|
py
|
3d08a20276872da5c649058fd2bf163d5f88d8a7
|
diff --git a/each.js b/each.js
index <HASH>..<HASH> 100644
--- a/each.js
+++ b/each.js
@@ -12,6 +12,7 @@ module.exports = function(items, ctx, fn) {
}
} else {
for (var key in items) {
+ if (!items.hasOwnProperty(key)) { continue }
fn.call(ctx, items[key], key)
}
}
|
Don't loop over inherited properties in each
|
marcuswestin_std.js
|
train
|
js
|
bc6950c24587c453682bda0464efbb2c3597c925
|
diff --git a/rAppid.js b/rAppid.js
index <HASH>..<HASH> 100644
--- a/rAppid.js
+++ b/rAppid.js
@@ -196,7 +196,7 @@
if (err) {
callback(err);
} else {
- applicationContext.createApplicationInstance(document, function (err, stage, application) {
+ applicationContext.createApplicationInstance(window, function (err, stage, application) {
if (err) {
callback(err);
} else {
@@ -357,10 +357,20 @@
this.$config = config;
};
- ApplicationContext.prototype.createApplicationInstance = function (document, callback) {
+ ApplicationContext.prototype.createApplicationInstance = function (window, callback) {
+
+ var document;
+
// create instance
var applicationFactory = this.$applicationFactory;
+ if (window.document) {
+ document = window.document;
+ } else {
+ document = window;
+ window = null;
+ }
+
// TODO: add node support for window
var stage = new Stage(this.$requirejsContext, this, document, window);
|
create application context with window instead of document
|
rappid_rAppid.js
|
train
|
js
|
9a7ee3533c01e0312f6b3669aba405b5a42462a2
|
diff --git a/EventListener/ConfigSubscriber.php b/EventListener/ConfigSubscriber.php
index <HASH>..<HASH> 100644
--- a/EventListener/ConfigSubscriber.php
+++ b/EventListener/ConfigSubscriber.php
@@ -149,7 +149,7 @@ class ConfigSubscriber extends CommonSubscriber
// $this->extendedFields = $this->leadModel->getExtendedEntities(['keys' => 'alias']);
// @todo - check permissions before including Secure.
- $fields = $this->leadModel->getEntities(
+ $fields = $this->fieldModel->getEntities(
[
[
'column' => 'f.isPublished',
|
[ENG-<I>] fix model instance from lead to field
|
TheDMSGroup_mautic-extended-field
|
train
|
php
|
a97231063b7fd6c0c88bf681431bc79982485bfd
|
diff --git a/src/main/java/graphql/introspection/Introspection.java b/src/main/java/graphql/introspection/Introspection.java
index <HASH>..<HASH> 100644
--- a/src/main/java/graphql/introspection/Introspection.java
+++ b/src/main/java/graphql/introspection/Introspection.java
@@ -408,6 +408,7 @@ public class Introspection {
.description("An enum describing valid locations where a directive can be placed")
.value("QUERY", DirectiveLocation.QUERY, "Indicates the directive is valid on queries.")
.value("MUTATION", DirectiveLocation.MUTATION, "Indicates the directive is valid on mutations.")
+ .value("SUBSCRIPTION", DirectiveLocation.SUBSCRIPTION, "Indicates the directive is valid on subscriptions.")
.value("FIELD", DirectiveLocation.FIELD, "Indicates the directive is valid on fields.")
.value("FRAGMENT_DEFINITION", DirectiveLocation.FRAGMENT_DEFINITION, "Indicates the directive is valid on fragment definitions.")
.value("FRAGMENT_SPREAD", DirectiveLocation.FRAGMENT_SPREAD, "Indicates the directive is valid on fragment spreads.")
|
Add SUBSCRIPTION to __DirectiveLocation enum
|
graphql-java_graphql-java
|
train
|
java
|
6b1eda5bb2d831e2de3590692e3ec0eb2092e8ee
|
diff --git a/master/buildbot/test/unit/test_db_migrate_versions_018_add_sourcestampset.py b/master/buildbot/test/unit/test_db_migrate_versions_018_add_sourcestampset.py
index <HASH>..<HASH> 100644
--- a/master/buildbot/test/unit/test_db_migrate_versions_018_add_sourcestampset.py
+++ b/master/buildbot/test/unit/test_db_migrate_versions_018_add_sourcestampset.py
@@ -44,8 +44,8 @@ class Migration(migration.MigrateTestMixin, unittest.TestCase):
sa.Column('results', sa.SmallInteger),
)
self.buildsets.create(bind=conn)
- sa.Index('buildsets_complete', self.buildsets.c.complete)
- sa.Index('buildsets_submitted_at', self.buildsets.c.submitted_at)
+ sa.Index('buildsets_complete', self.buildsets.c.complete).create()
+ sa.Index('buildsets_submitted_at', self.buildsets.c.submitted_at).create()
self.patches = sa.Table('patches', metadata,
sa.Column('id', sa.Integer, primary_key=True),
|
actually create the indexes on buildsets in test setup
|
buildbot_buildbot
|
train
|
py
|
7bc999c1f37498f82f57533d54e76d478918d9b8
|
diff --git a/core/src/main/java/com/orientechnologies/orient/core/type/tree/OMVRBTreeRID.java b/core/src/main/java/com/orientechnologies/orient/core/type/tree/OMVRBTreeRID.java
index <HASH>..<HASH> 100644
--- a/core/src/main/java/com/orientechnologies/orient/core/type/tree/OMVRBTreeRID.java
+++ b/core/src/main/java/com/orientechnologies/orient/core/type/tree/OMVRBTreeRID.java
@@ -301,8 +301,10 @@ public class OMVRBTreeRID extends OMVRBTreePersistent<OIdentifiable, OIdentifiab
@Override
public int commitChanges() {
- if (!((OMVRBTreeRIDProvider) getProvider()).isEmbeddedStreaming())
+ if (!((OMVRBTreeRIDProvider) getProvider()).isEmbeddedStreaming()){
+ saveAllNewEntries();
return super.commitChanges();
+ }
return 0;
}
|
Fixed bug on OMVRBTreeRID: sometimes add was lazy and in case of db close could be not saved on disk
|
orientechnologies_orientdb
|
train
|
java
|
b24fdef76b631947b5d3f77140a526ef6a69229d
|
diff --git a/discover/client.go b/discover/client.go
index <HASH>..<HASH> 100644
--- a/discover/client.go
+++ b/discover/client.go
@@ -205,7 +205,7 @@ func (s *ServiceSet) Unwatch(ch chan *ServiceUpdate) {
}
func (s *ServiceSet) Wait() (*ServiceUpdate, error) {
- updateCh := make(chan *ServiceUpdate, 1)
+ updateCh := make(chan *ServiceUpdate, 1024) // buffer because of Watch bringCurrent race bug
s.Watch(updateCh, true)
defer s.Unwatch(updateCh)
select {
diff --git a/discover/client_test.go b/discover/client_test.go
index <HASH>..<HASH> 100644
--- a/discover/client_test.go
+++ b/discover/client_test.go
@@ -145,7 +145,12 @@ func TestClient(t *testing.T) {
t.Fatal("Registering service failed", err)
}
for i := 0; i < 5; i++ {
- update := <-updates
+ var update *ServiceUpdate
+ select {
+ case update = <-updates:
+ case <-time.After(3 * time.Second):
+ t.Fatal("Timeout exceeded")
+ }
if update.Online != true {
t.Fatal("Service update of unexected status: ", update, i)
}
|
discoverd: ran into race regarding bringCurrent. temp workaround until handled as separate issue
|
flynn_flynn
|
train
|
go,go
|
c8c035e041a5eb9b527f7af465a5131bfed6eec1
|
diff --git a/tests/test_mixture_smoothing.py b/tests/test_mixture_smoothing.py
index <HASH>..<HASH> 100644
--- a/tests/test_mixture_smoothing.py
+++ b/tests/test_mixture_smoothing.py
@@ -23,3 +23,5 @@ class MS_Tester(unittest.TestCase):
0.0911574, 0.0911574]), array([1, 1, 1, 1])))
+if __name__=="__main__":
+ unittest.main()
|
adding if __name__=='__main__' to tests missing it
|
pysal_mapclassify
|
train
|
py
|
bc15841c1da63846b9517a6abc01a1522cf99414
|
diff --git a/lib/markdown/highlightLines.js b/lib/markdown/highlightLines.js
index <HASH>..<HASH> 100644
--- a/lib/markdown/highlightLines.js
+++ b/lib/markdown/highlightLines.js
@@ -39,7 +39,7 @@ module.exports = md => {
})
if (inRange) {
return {
- code: `<span class="highlighted-line">${split}</span>`,
+ code: `<span class="highlighted-line">${split || '\n'}</span>`,
highlighted: true
}
}
|
fix: highlight line issue for empty lines
|
vuejs_vuepress
|
train
|
js
|
68d490917f61c3dcfc150107b7ffb65ef050e4d0
|
diff --git a/trezorlib/client.py b/trezorlib/client.py
index <HASH>..<HASH> 100644
--- a/trezorlib/client.py
+++ b/trezorlib/client.py
@@ -384,6 +384,11 @@ class ProtocolMixin(object):
return []
n = n.split('/')
+
+ # m/a/b/c => a/b/c
+ if n[0] == 'm':
+ n = n[1:]
+
path = []
for x in n:
prime = False
|
trezorctl: accept also m/a/b/c as get_address path
|
trezor_python-trezor
|
train
|
py
|
f9247dc60867d96ff7946929395eba626710a176
|
diff --git a/src/Form/EventListener/GenerateAddressFieldsSubscriber.php b/src/Form/EventListener/GenerateAddressFieldsSubscriber.php
index <HASH>..<HASH> 100644
--- a/src/Form/EventListener/GenerateAddressFieldsSubscriber.php
+++ b/src/Form/EventListener/GenerateAddressFieldsSubscriber.php
@@ -175,6 +175,7 @@ class GenerateAddressFieldsSubscriber implements EventSubscriberInterface
AddressFormatInterface::ADMINISTRATIVE_AREA_TYPE_STATE => 'State',
AddressFormatInterface::POSTAL_CODE_TYPE_POSTAL => 'Postal Code',
AddressFormatInterface::POSTAL_CODE_TYPE_ZIP => 'ZIP code',
+ AddressFormatInterface::POSTAL_CODE_TYPE_PIN => 'PIN code',
);
// Determine the correct administrative area label.
diff --git a/src/Model/AddressFormatInterface.php b/src/Model/AddressFormatInterface.php
index <HASH>..<HASH> 100644
--- a/src/Model/AddressFormatInterface.php
+++ b/src/Model/AddressFormatInterface.php
@@ -37,6 +37,7 @@ interface AddressFormatInterface
// Postal code types.
const POSTAL_CODE_TYPE_POSTAL = 'postal';
const POSTAL_CODE_TYPE_ZIP = 'zip';
+ const POSTAL_CODE_TYPE_PIN = 'pin';
/**
* Gets the two-letter country code.
|
Add the PIN postal code type (used by India).
|
commerceguys_addressing
|
train
|
php,php
|
6993dc01a549073dd47ce9be81d9ce339e65ffae
|
diff --git a/BeforeQueryTrait.php b/BeforeQueryTrait.php
index <HASH>..<HASH> 100644
--- a/BeforeQueryTrait.php
+++ b/BeforeQueryTrait.php
@@ -7,6 +7,9 @@ trait BeforeQueryTrait
public static function find()
{
+ /**
+ * @var $obj ActiveRecord
+ */
$obj = new static;
$class = new \ReflectionClass($obj);
$condition = [];
@@ -15,6 +18,9 @@ trait BeforeQueryTrait
$condition = array_merge($condition, $property->getValue($obj));
}
}
- return (new \sibds\behaviors\TrashQuery($obj))->findRemoved()->andFilterWhere($condition);
+ if($obj->hasAttribute($obj->removedAttribute))
+ return (new \sibds\behaviors\TrashQuery($obj))->findRemoved()->andFilterWhere($condition);
+ else
+ return parent::find()->andFilterWhere($condition);
}
}
|
Update BeforeQueryTrait.php
Fix error with models not support "soft delete"
|
sibds_yii2-activerecord
|
train
|
php
|
014e3d1ce134257cbed049b8aa4402bcb5a284c2
|
diff --git a/client/createReducer.js b/client/createReducer.js
index <HASH>..<HASH> 100644
--- a/client/createReducer.js
+++ b/client/createReducer.js
@@ -10,6 +10,9 @@ from '~routes/admin/authenticated/sidebar/community-settings/recipient/page'
// Reapop
import { reducer as notificationsReducer } from 'reapop'
+// Apollo
+import { client } from './store'
+
// Application
import auth from '~client/account/redux/reducers'
import wait from '~client/components/await/redux/reducers'
@@ -36,6 +39,7 @@ export default function createReducer (asyncReducers) {
recurringForm,
communityRecipientForm
}),
+ apollo: client.reducer(),
notifications: notificationsReducer(),
auth,
wait,
diff --git a/client/store.js b/client/store.js
index <HASH>..<HASH> 100644
--- a/client/store.js
+++ b/client/store.js
@@ -53,6 +53,8 @@ export function configureStore (initialState, thunkExtraArgument) {
})
)
+ middlewares.push(client.middleware())
+
let store = createStore(
createReducer(),
initialState,
|
chore(graphql): add reducer mode on apollo client
|
nossas_bonde-client
|
train
|
js,js
|
1361264710da33c67a6e65c5e1f74a56ba5f182b
|
diff --git a/lib/jss/api_object/self_servable.rb b/lib/jss/api_object/self_servable.rb
index <HASH>..<HASH> 100644
--- a/lib/jss/api_object/self_servable.rb
+++ b/lib/jss/api_object/self_servable.rb
@@ -177,10 +177,12 @@ module JSS
notifications_supported: :ssvc_and_nctr,
notification_reminders: true
},
- JSS::MacApplication => { # TODO: add the correct values when Jamf fixes this bug
- in_self_service_data_path: nil, # [:general, :distribution_method],
- in_self_service: nil, # MAKE_AVAILABLE,
- not_in_self_service: nil, # AUTO_INSTALL_OR_PROMPT,
+ JSS::MacApplication => {
+ # in_self_service_data_path was finally implemnted in JamfPro 10.9
+ # Jamf Product Issue [PI-003773]
+ in_self_service_data_path: [:general, :deployment_type],
+ in_self_service: MAKE_AVAILABLE,
+ not_in_self_service: AUTO_INSTALL_OR_PROMPT,
targets: [:macos],
payload: :app,
can_display_in_categories: true,
|
jamf fixed the selfservice data for mac apps as of Jamf Pro <I>
|
PixarAnimationStudios_ruby-jss
|
train
|
rb
|
14aad3d5ea4c323bcd7a2137e735da24a76e814c
|
diff --git a/jsonpb/jsonpb.go b/jsonpb/jsonpb.go
index <HASH>..<HASH> 100644
--- a/jsonpb/jsonpb.go
+++ b/jsonpb/jsonpb.go
@@ -1116,6 +1116,8 @@ func (s mapKeys) Swap(i, j int) { s[i], s[j] = s[j], s[i] }
func (s mapKeys) Less(i, j int) bool {
if k := s[i].Kind(); k == s[j].Kind() {
switch k {
+ case reflect.String:
+ return s[i].String() < s[j].String()
case reflect.Int32, reflect.Int64:
return s[i].Int() < s[j].Int()
case reflect.Uint32, reflect.Uint64:
|
jsonpb: avoid copying string-valued map-keys (#<I>)
|
golang_protobuf
|
train
|
go
|
6cac8820306e713c4f901c023cfd9c4ea9ab7c6d
|
diff --git a/connection.go b/connection.go
index <HASH>..<HASH> 100644
--- a/connection.go
+++ b/connection.go
@@ -534,7 +534,7 @@ func (cn *connection) updatePiecePriority(piece int) {
default:
panic(tpp)
}
- prio += piece
+ prio += piece / 2
cn.pieceRequestOrder.Set(piece, prio)
cn.updateRequests()
}
|
Reduce the impact of preferring earlier pieces
I think urgent pieces at the end of a torrent were getting fairly starved.
|
anacrolix_torrent
|
train
|
go
|
046d52da0e924c4da6e2663c8153dd70ea8f46a6
|
diff --git a/src/main/java/nl/jqno/equalsverifier/AbstractDelegationChecker.java b/src/main/java/nl/jqno/equalsverifier/AbstractDelegationChecker.java
index <HASH>..<HASH> 100644
--- a/src/main/java/nl/jqno/equalsverifier/AbstractDelegationChecker.java
+++ b/src/main/java/nl/jqno/equalsverifier/AbstractDelegationChecker.java
@@ -15,6 +15,7 @@
*/
package nl.jqno.equalsverifier;
+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import nl.jqno.equalsverifier.internal.*;
import java.lang.reflect.Field;
@@ -146,6 +147,7 @@ class AbstractDelegationChecker<T> implements Checker {
}
}
+ @SuppressFBWarnings(value = "DE_MIGHT_IGNORE", justification = "These exceptions will re-occur and be handled later.")
private <S> void checkAbstractMethods(Class<?> instanceClass, S instance, S copy, boolean prefabPossible) {
try {
instance.equals(copy);
|
FindBugs: might ignore exception
|
jqno_equalsverifier
|
train
|
java
|
cf4da728a60bcc9a6f1f02cb9d571990f5624315
|
diff --git a/logfmt.go b/logfmt.go
index <HASH>..<HASH> 100644
--- a/logfmt.go
+++ b/logfmt.go
@@ -83,17 +83,8 @@ func writeBytesKey(buf *bytes.Buffer, b []byte) {
buf.Write(bytesNull)
return
}
- index := bytes.IndexFunc(b, invalidKey)
- if index < 0 {
- buf.Write(b)
- return
- }
- if index > 0 {
- buf.Write(b[0:index])
- b = b[index:]
- }
for {
- index = bytes.IndexFunc(b, invalidKey)
+ index := bytes.IndexFunc(b, invalidKey)
if index < 0 {
break
}
|
Remove unnecessary code in writeBytesKey
|
jjeffery_kv
|
train
|
go
|
42e60e296e8a17ebc6c35c1c0d58c14ebd9b24db
|
diff --git a/lib/cisco_node_utils/snmpuser.rb b/lib/cisco_node_utils/snmpuser.rb
index <HASH>..<HASH> 100644
--- a/lib/cisco_node_utils/snmpuser.rb
+++ b/lib/cisco_node_utils/snmpuser.rb
@@ -241,7 +241,7 @@ module Cisco
# Retrieve password hashes
hashed_pw = SnmpUser.auth_password('dummy_user', @engine_id)
if hashed_pw.nil?
- fail "SNMP dummy user #{dummy_user} #{@engine_id} was configured " \
+ fail "SNMP dummy user 'dummy_user' #{@engine_id} was configured " \
"but password is missing?\n" \
+ @@node.get(command: 'show run snmp all')
end
@@ -289,7 +289,7 @@ module Cisco
dummyau = SnmpUser.auth_password('dummy_user', @engine_id)
hashed_pw = SnmpUser.priv_password('dummy_user', @engine_id)
if hashed_pw.nil?
- fail "SNMP dummy user #{dummy_user} #{@engine_id} was configured " \
+ fail "SNMP dummy user 'dummy_user' #{@engine_id} was configured " \
"but password is missing?\n" \
+ @@node.get(command: 'show run snmp all')
end
|
snmpuser: dummy_user var does not exist
|
cisco_cisco-network-node-utils
|
train
|
rb
|
49522ac1f590937df11131da5f76721290fa8332
|
diff --git a/src/ConfigTrait.php b/src/ConfigTrait.php
index <HASH>..<HASH> 100644
--- a/src/ConfigTrait.php
+++ b/src/ConfigTrait.php
@@ -41,6 +41,7 @@ trait ConfigTrait
try {
$keys = func_get_args();
array_shift($keys);
+ \Assert\thatAll($keys)->string()->notEmpty();
$config = new Config($config->getKey($keys));
} catch (Exception $exception) {
throw new RuntimeException(
|
Assert that all keys are non-empty strings.
|
brightnucleus_config
|
train
|
php
|
299ca8af998549fb5d3464944ff6df681186aaf8
|
diff --git a/TYPO3.Flow/Classes/Monitor/ChangeDetectionStrategy/F3_FLOW3_Monitor_ChangeDetectionStrategy_ModificationTime.php b/TYPO3.Flow/Classes/Monitor/ChangeDetectionStrategy/F3_FLOW3_Monitor_ChangeDetectionStrategy_ModificationTime.php
index <HASH>..<HASH> 100644
--- a/TYPO3.Flow/Classes/Monitor/ChangeDetectionStrategy/F3_FLOW3_Monitor_ChangeDetectionStrategy_ModificationTime.php
+++ b/TYPO3.Flow/Classes/Monitor/ChangeDetectionStrategy/F3_FLOW3_Monitor_ChangeDetectionStrategy_ModificationTime.php
@@ -90,6 +90,8 @@ class ModificationTime implements \F3\FLOW3\Monitor\ChangeDetectionStrategyInter
return self::STATUS_CHANGED;
}
} else {
+ unset($this->filesAndModificationTimes[$pathAndFilename]);
+ $this->modificationTimesChanged = TRUE;
return self::STATUS_DELETED;
}
} else {
|
FLOW3:
* small fix to "modification time" change detection strategy
* fixes php lint bus error along the way - see r<I> for a previous case of that
Original-Commit-Hash: 0fe<I>e3fdf<I>f4db4c<I>d2b8a<I>fecdb1
|
neos_flow-development-collection
|
train
|
php
|
eab0fac1c1de2cd780ed1c218234c5e3a588d00e
|
diff --git a/src/nls/ru/strings.js b/src/nls/ru/strings.js
index <HASH>..<HASH> 100644
--- a/src/nls/ru/strings.js
+++ b/src/nls/ru/strings.js
@@ -257,7 +257,7 @@ define({
"BASEURL_ERROR_SEARCH_DISALLOWED" : "Основной URL не может содержать такие параметры поиска как \"{0}\".",
"BASEURL_ERROR_HASH_DISALLOWED" : "Основной URL не может содержать такие хеши как \"{0}\".",
"BASEURL_ERROR_INVALID_CHAR" : "Специальные символы как '{0}' должны быть %-экранированы.",
- "BASEURL_ERROR_UNKOWN_ERROR" : "Неизвестная ошибка при парсинге основного URL",
+ "BASEURL_ERROR_UNKNOWN_ERROR" : "Неизвестная ошибка при парсинге основного URL",
// extensions/default/DebugCommands
|
UNKOWN -> UNKNOWN
|
adobe_brackets
|
train
|
js
|
1dc8f5f28938b5e790adec36719a4ab65e6f27bb
|
diff --git a/tests/unit/states/grains_test.py b/tests/unit/states/grains_test.py
index <HASH>..<HASH> 100644
--- a/tests/unit/states/grains_test.py
+++ b/tests/unit/states/grains_test.py
@@ -157,7 +157,7 @@ class GrainsTestCase(TestCase):
with patch.dict(grains.__opts__, {'test': True}):
with patch.dict(grains.__grains__, {self.name: [self.value]}):
- self.assertDictEqual(grains.list_absent(self.name, self.value),
+ self.assertDictEqual(grains.list_absent(self.name, [self.value]),
ret1)
self.assertDictEqual(grains.list_absent(self.name, self.value), ret2)
|
unit test update
grain value looks for list in assertion
|
saltstack_salt
|
train
|
py
|
3233f32dfb8ccc869d8772436a58dd48496d8c0a
|
diff --git a/lib/behat/behat_base.php b/lib/behat/behat_base.php
index <HASH>..<HASH> 100644
--- a/lib/behat/behat_base.php
+++ b/lib/behat/behat_base.php
@@ -597,6 +597,11 @@ class behat_base extends Behat\MinkExtension\Context\RawMinkContext {
* @throws ExpectationException
*/
protected function resize_window($windowsize) {
+ // Non JS don't support resize window.
+ if (!$this->running_javascript()) {
+ return;
+ }
+
switch ($windowsize) {
case "small":
$width = 640;
@@ -611,7 +616,7 @@ class behat_base extends Behat\MinkExtension\Context\RawMinkContext {
$height = 1600;
break;
default:
- preg_match('/^(small|medium|large|\d+x\d+)$/', $windowsize, $matches);
+ preg_match('/^(\d+x\d+)$/', $windowsize, $matches);
if (empty($matches) || (count($matches) != 2)) {
throw new ExpectationException("Invalid screen size, can't resize", $this->getSession());
}
|
MDL-<I> behat: Resize window only possible with javascript
|
moodle_moodle
|
train
|
php
|
7f48ff671787e5d789394a2effb5de7c35c796c0
|
diff --git a/watchtower/wtclient/session_queue.go b/watchtower/wtclient/session_queue.go
index <HASH>..<HASH> 100644
--- a/watchtower/wtclient/session_queue.go
+++ b/watchtower/wtclient/session_queue.go
@@ -316,8 +316,8 @@ func (q *sessionQueue) drainBackups() {
// before attempting to dequeue any pending updates.
stateUpdate, isPending, backupID, err := q.nextStateUpdate()
if err != nil {
- log.Errorf("SessionQueue(%s) unable to get next state "+
- "update: %v", err)
+ log.Errorf("SessionQueue(%v) unable to get next state "+
+ "update: %v", q.ID(), err)
return
}
@@ -557,7 +557,7 @@ func (q *sessionQueue) sendStateUpdate(conn wtserver.Peer,
// TODO(conner): borked watchtower
err = fmt.Errorf("unable to ack seqnum=%d: %v",
stateUpdate.SeqNum, err)
- log.Errorf("SessionQueue(%s) failed to ack update: %v", err)
+ log.Errorf("SessionQueue(%v) failed to ack update: %v", q.ID(), err)
return err
case err == wtdb.ErrLastAppliedReversion:
|
watchtower: fix linter errors
|
lightningnetwork_lnd
|
train
|
go
|
d23a761e6b460e177145be2833f5f130f3b4e934
|
diff --git a/lib/MwbExporter/Formatter/Doctrine2/Yaml/Model/Table.php b/lib/MwbExporter/Formatter/Doctrine2/Yaml/Model/Table.php
index <HASH>..<HASH> 100644
--- a/lib/MwbExporter/Formatter/Doctrine2/Yaml/Model/Table.php
+++ b/lib/MwbExporter/Formatter/Doctrine2/Yaml/Model/Table.php
@@ -281,11 +281,12 @@ class Table extends BaseTable
return $this;
}
+ /**
+ * (non-PHPdoc)
+ * @see \MwbExporter\Model\Base::getVars()
+ */
protected function getVars()
{
- $vars = parent::getVars();
- $vars['%entity%'] = str_replace('\\', '.', $this->getModelNameAsFQCN());
-
- return $vars;
+ return array_merge(parent::getVars(), array('%entity%' => str_replace('\\', '.', $this->getModelNameAsFQCN())));
}
}
|
Merge model variables with its parent.
|
mysql-workbench-schema-exporter_doctrine2-exporter
|
train
|
php
|
7d992fbf9ca5d719d9b21095acf56f2986d810f8
|
diff --git a/test.php b/test.php
index <HASH>..<HASH> 100644
--- a/test.php
+++ b/test.php
@@ -5,10 +5,9 @@ echo '<pre>';
set_time_limit(300);
-require realpath(dirname(__FILE__)) . '/GameQ/Autoloader.php';
+require realpath(dirname(__FILE__)) . '/src/GameQ/Autoloader.php';
-
-$gq = new GameQ();
+$gq = new \GameQ\GameQ();
/*$gq->addServer(array(
'id' => 1,
'type' => 'source',
@@ -19,7 +18,7 @@ $gq = new GameQ();
$gq->addServer(array(
//'id' => 2,
'type' => 'source',
- 'host' => '64.74.97.72:27017'
+ 'host' => '192.223.26.191:27015'
));
|
Updated test file while building as example for others.
|
Austinb_GameQ
|
train
|
php
|
aafa3ced07105a4f8670a7adfee789c5691f8c2c
|
diff --git a/tools/loggraphdiff/loggraphdiff.go b/tools/loggraphdiff/loggraphdiff.go
index <HASH>..<HASH> 100644
--- a/tools/loggraphdiff/loggraphdiff.go
+++ b/tools/loggraphdiff/loggraphdiff.go
@@ -49,11 +49,11 @@ func main() {
old, err := readGraph(os.Args[1])
if err != nil {
- log.Fatal("failed to read %s: %s", os.Args[1], err)
+ log.Fatalf("failed to read %s: %s", os.Args[1], err)
}
new, err := readGraph(os.Args[2])
if err != nil {
- log.Fatal("failed to read %s: %s", os.Args[1], err)
+ log.Fatalf("failed to read %s: %s", os.Args[1], err)
}
var nodes []string
@@ -84,7 +84,7 @@ func main() {
})
fmt.Println("digraph G {")
- fmt.Println(" rankdir = \"BT\";\n")
+ fmt.Print(" rankdir = \"BT\";\n\n")
for _, n := range nodes {
var attrs string
_, inOld := old.nodes[n]
|
tools/loggraphdiff: Fix vet warnings
|
hashicorp_terraform
|
train
|
go
|
c77cd092c41e7f95700904c0283cdd89fea8b47e
|
diff --git a/scripts/github/merge_dev_to_feature.py b/scripts/github/merge_dev_to_feature.py
index <HASH>..<HASH> 100644
--- a/scripts/github/merge_dev_to_feature.py
+++ b/scripts/github/merge_dev_to_feature.py
@@ -7,6 +7,7 @@ REPO_NAME=os.environ.get('REPOSITORY')
MASTER_NAME=os.environ.get('MASTER','dev')
USERNAME=os.environ.get('USERNAME')
PASSWORD=os.environ.get('PASSWORD')
+BUILD_COMMIT=os.environ.get('BUILD_COMMIT', None)
g = Github(USERNAME,PASSWORD)
@@ -37,7 +38,10 @@ for branch in repo.get_branches():
# Get a comparison of master vs branch. compare.ahead_by means master is head of the branch.
# This orientation is necessary so the compare.files list lists files changed in master but not
# in the branch.
- compare = repo.compare(branch.commit.sha, master.commit.sha)
+ if BUILD_COMMIT:
+ compare = repo.compare(branch.commit.sha, BUILD_COMMIT)
+ else:
+ compare = repo.compare(branch.commit.sha, master.commit.sha)
if not compare.files:
print 'Skipping branch %s: branch has no files different than %s' % (branch.name, master.name)
continue
|
Added support for passing a commit id from master branch for merge
|
SFDO-Tooling_CumulusCI
|
train
|
py
|
99d1dea07ae3ae914efaa2ad6e2af7e2d721b81f
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -18,7 +18,7 @@ function attachVirtuals(schema) {
var virtuals = [];
var keys = Object.keys(schema.virtuals);
for (var i = 0; i < keys.length; ++i) {
- if (!schema.virtuals[keys[i]].ref) {
+ if (!schema.virtuals[keys[i]].ref && (!schema.virtuals[keys[i]].options || !schema.virtuals[keys[i]].options.ref)) {
virtuals.push(keys[i]);
}
}
|
Fix for where 'ref' is in options
|
vkarpov15_mongoose-lean-virtuals
|
train
|
js
|
3412596f57844090f2e3fb3af0cf7711dd1e35c6
|
diff --git a/automl/synth.py b/automl/synth.py
index <HASH>..<HASH> 100644
--- a/automl/synth.py
+++ b/automl/synth.py
@@ -26,7 +26,7 @@ versions = ["v1beta1"]
# Generate automl GAPIC layer
# ----------------------------------------------------------------------------
for version in versions:
- library = gapic.py_library("automl", version)
+ library = gapic.py_library("automl", version, include_protos=True)
s.move(library / f"google/cloud/automl_{version}")
s.move(library / f"tests/unit/gapic/{version}")
s.move(library / f"docs/gapic/{version}")
diff --git a/datacatalog/synth.py b/datacatalog/synth.py
index <HASH>..<HASH> 100644
--- a/datacatalog/synth.py
+++ b/datacatalog/synth.py
@@ -29,6 +29,7 @@ library = gapic.py_library(
version,
config_path='/google/cloud/datacatalog/artman_datacatalog_v1beta1.yaml',
artman_output_name='datacatalog-v1beta1',
+ include_protos=True,
)
s.move(
|
Include protos in synth. (#<I>)
|
googleapis_google-cloud-python
|
train
|
py,py
|
a532f6405b16ac9b49acb4689662add18c4cbdd5
|
diff --git a/functions.php b/functions.php
index <HASH>..<HASH> 100644
--- a/functions.php
+++ b/functions.php
@@ -1024,7 +1024,7 @@ function pods_shortcode ( $tags, $content = null ) {
if ( !empty( $pod ) ) {
$tags[ 'name' ] = get_post_type();
- $tags[ 'id' ] = get_the_ID();
+ $id = $tags[ 'id' ] = get_the_ID();
}
}
@@ -1048,14 +1048,16 @@ function pods_shortcode ( $tags, $content = null ) {
return '<p>Please provide either a template or field name</p>';
}
- // id > slug (if both exist)
- $id = empty( $tags[ 'slug' ] ) ? null : $tags[ 'slug' ];
+ if ( !isset( $id ) ) {
+ // id > slug (if both exist)
+ $id = empty( $tags[ 'slug' ] ) ? null : $tags[ 'slug' ];
- if ( !empty ( $tags[ 'id' ] ) ) {
- $id = $tags[ 'id' ];
+ if ( !empty ( $tags[ 'id' ] ) ) {
+ $id = $tags[ 'id' ];
- if ( is_numeric( $id ) )
- $id = absint( $id );
+ if ( is_numeric( $id ) )
+ $id = absint( $id );
+ }
}
if ( !isset( $pod ) )
|
Minor tweaks to shortcode slug/id handling
|
pods-framework_pods
|
train
|
php
|
fe5df1b39649a49d1ea59a2628b40534114817c3
|
diff --git a/lib/dynflow/rails/configuration.rb b/lib/dynflow/rails/configuration.rb
index <HASH>..<HASH> 100644
--- a/lib/dynflow/rails/configuration.rb
+++ b/lib/dynflow/rails/configuration.rb
@@ -168,7 +168,7 @@ module Dynflow
if remote?
false
else
- if defined?(::Sidekiq) && !Sidekiq.options[:dynflow_world].nil?
+ if defined?(::Sidekiq) && Sidekiq.options[:dynflow_executor]
::Dynflow::Executors::Sidekiq::Core
else
::Dynflow::Executors::Parallel::Core
|
Properly detect which executor core to use
We used to check if `Sidekiq.options[:dynflow_executor]` is not nil, but in
rails this was being set after the world was initialized. That led to Parallel
core being used instead of Sidekiq one.
|
Dynflow_dynflow
|
train
|
rb
|
0a74a9eec07f148ba3554ed70e4bbda901bbcb6b
|
diff --git a/kafka/codec.py b/kafka/codec.py
index <HASH>..<HASH> 100644
--- a/kafka/codec.py
+++ b/kafka/codec.py
@@ -2,6 +2,7 @@ import gzip
from io import BytesIO
import struct
+import six
from six.moves import xrange
_XERIAL_V1_HEADER = (-126, b'S', b'N', b'A', b'P', b'P', b'Y', 0, 1, 1)
@@ -100,10 +101,15 @@ def snappy_encode(payload, xerial_compatible=True, xerial_blocksize=32*1024):
out.write(struct.pack('!' + fmt, dat))
# Chunk through buffers to avoid creating intermediate slice copies
- for chunk in (buffer(payload, i, xerial_blocksize)
+ if six.PY2:
+ chunker = lambda payload, i, size: buffer(payload, i, size)
+ else:
+ chunker = lambda payload, i, size: memoryview(payload)[i:size+i].tobytes()
+
+ for chunk in (chunker(payload, i, xerial_blocksize)
for i in xrange(0, len(payload), xerial_blocksize)):
- block = snappy.compress(chunk)
+ block = snappy.compress(chunk) # this wont accept a raw memoryview...?
block_size = len(block)
out.write(struct.pack('!i', block_size))
out.write(block)
|
Python3 does not support buffer -- use memoryview in snappy_decode
|
dpkp_kafka-python
|
train
|
py
|
3bfde37a53edc8502052696e53fde3758686b718
|
diff --git a/lib/extras/liquid_view.rb b/lib/extras/liquid_view.rb
index <HASH>..<HASH> 100644
--- a/lib/extras/liquid_view.rb
+++ b/lib/extras/liquid_view.rb
@@ -11,16 +11,25 @@ class LiquidView
end
- def render(template, local_assigns)
+ def render(template, local_assigns_for_rails_less_than_2_1_0 = nil)
@action_view.controller.headers["Content-Type"] ||= 'text/html; charset=utf-8'
assigns = @action_view.assigns.dup
+ # template is a Template object in Rails >=2.1.0, a source string previously.
+ if template.respond_to? :source
+ source = template.source
+ local_assigns = template.locals
+ else
+ source = template
+ local_assigns = local_assigns_for_rails_less_than_2_1_0
+ end
+
if content_for_layout = @action_view.instance_variable_get("@content_for_layout")
assigns['content_for_layout'] = content_for_layout
end
assigns.merge!(local_assigns)
- liquid = Liquid::Template.parse(template)
+ liquid = Liquid::Template.parse(source)
liquid.render(assigns, :filters => [@action_view.controller.master_helper_module], :registers => {:action_view => @action_view, :controller => @action_view.controller})
end
|
Enable rails <I>.x compaitibility by allowing the render method to accept an ActionView::Template object.
This seems to complete the earlier 'ugly hack' for rails <I>.x compatibility
|
Shopify_liquid
|
train
|
rb
|
8c35f56add46144dde137e2fb703eb779fd10074
|
diff --git a/test/packages.test.js b/test/packages.test.js
index <HASH>..<HASH> 100644
--- a/test/packages.test.js
+++ b/test/packages.test.js
@@ -10,6 +10,7 @@ import {
DropzonesPackage,
EmphasisPackage,
FilePackage,
+ FindAndReplacePackage,
GridPackage,
GutterPackage,
HeadingPackage,
@@ -53,6 +54,7 @@ test('import all packages', (t) => {
DropzonesPackage,
EmphasisPackage,
FilePackage,
+ FindAndReplacePackage,
GridPackage,
GutterPackage,
HeadingPackage,
|
Test find and replace package importing.
|
substance_substance
|
train
|
js
|
132235924e6523b3aa34a85e03fc55215fc21eaf
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -244,12 +244,12 @@ function runMongoMigrate(direction, migrationEnd) {
function performMigration(direction, migrateTo) {
var db = require('./lib/db');
db.getConnection(dbConfig || require(cwd + path.sep + configFileName)[dbProperty], function (err, db) {
- var migrationCollection = db.migrationCollection,
- dbConnection = db.connection;
if (err) {
console.error('Error connecting to database');
process.exit(1);
}
+ var migrationCollection = db.migrationCollection,
+ dbConnection = db.connection;
migrationCollection.find({}).sort({num: -1}).limit(1).toArray(function (err, migrationsRun) {
if (err) {
|
don't try to use db connection if error is thrown
Currently, if there are issues connecting to mongo
db.migrationCollection is still called. If db is undefined, this will
raise an exception. Moving error conditional up, so that an error is
logged instead.
|
afloyd_mongo-migrate
|
train
|
js
|
8295e4be8ec402830e2f9b142decc20d439713d8
|
diff --git a/src/inner-slider.js b/src/inner-slider.js
index <HASH>..<HASH> 100644
--- a/src/inner-slider.js
+++ b/src/inner-slider.js
@@ -401,6 +401,7 @@ export class InnerSlider extends React.Component {
changeSlide = (options, dontAnimate = false) => {
const spec = { ...this.props, ...this.state };
let targetSlide = changeSlide(spec, options);
+ if (targetSlide === this.state.targetSlide) return;
if (targetSlide !== 0 && !targetSlide) return;
if (dontAnimate === true) {
this.slideHandler(targetSlide, dontAnimate);
|
avoid slide change if it is already on the same slide
|
akiran_react-slick
|
train
|
js
|
41016566a6f72dd036907bb0d26d9f781ad3c346
|
diff --git a/src/modules/Parallax.js b/src/modules/Parallax.js
index <HASH>..<HASH> 100644
--- a/src/modules/Parallax.js
+++ b/src/modules/Parallax.js
@@ -84,10 +84,10 @@ class Parallax extends Component {
return true;
}
- componentDidUpdate(nextProps) {
- const { parent, bgImage, bgImageSrcSet, bgImageSizes } = nextProps;
+ componentDidUpdate() {
+ const { parent, bgImage, bgImageSrcSet, bgImageSizes } = this.props;
const { bgImage: stateBgImage } = this.state;
- this.splitChildren = getSplitChildren(nextProps);
+ this.splitChildren = getSplitChildren(this.props);
if (parent && this.parent !== parent) {
this.parent = parent;
this.removeListeners();
|
fix: reference current this.props in cDU
|
RRutsche_react-parallax
|
train
|
js
|
9f7f3370aabe6f99d8b51f3edaffa642412b8a68
|
diff --git a/middleman-core/lib/middleman-core/renderers/coffee_script.rb b/middleman-core/lib/middleman-core/renderers/coffee_script.rb
index <HASH>..<HASH> 100644
--- a/middleman-core/lib/middleman-core/renderers/coffee_script.rb
+++ b/middleman-core/lib/middleman-core/renderers/coffee_script.rb
@@ -31,7 +31,9 @@ module Middleman
def evaluate(context, locals, &block)
begin
super
- rescue ::ExecJS::RuntimeError=> e
+ rescue ::ExecJS::RuntimeError => e
+ e.to_s
+ rescue => e
e.to_s
end
end
|
Catch JRuby/Coffee exception correctly
|
middleman_middleman
|
train
|
rb
|
7bd967cff5748624d7da700ac7900ff5a4b7d8b2
|
diff --git a/modules/cms/controllers/Index.php b/modules/cms/controllers/Index.php
index <HASH>..<HASH> 100644
--- a/modules/cms/controllers/Index.php
+++ b/modules/cms/controllers/Index.php
@@ -162,15 +162,15 @@ class Index extends Controller
/*
* Extensibility
*/
- Event::fire('cms.template.save', [$this, $type]);
- $this->fireEvent('cms.template.save', [$type]);
+ Event::fire('cms.template.save', [$this, $template, $type]);
+ $this->fireEvent('cms.template.save', [$template, $type]);
Flash::success(Lang::get('cms::lang.template.saved'));
$result = [
- 'templatePath' => $template->fileName,
+ 'templatePath' => $template->fileName,
'templateMtime' => $template->mtime,
- 'tabTitle' => $this->getTabTitle($type, $template)
+ 'tabTitle' => $this->getTabTitle($type, $template)
];
if ($type == 'page') {
|
Fix cms.template.save event, should always pass the primary object as the first/second parameter.
This may be a breaking change for some, sorry about that.
|
octobercms_october
|
train
|
php
|
7d73727d6c40e617d5713577399e5430e3ab95e4
|
diff --git a/packages/net/csp/transports.js b/packages/net/csp/transports.js
index <HASH>..<HASH> 100644
--- a/packages/net/csp/transports.js
+++ b/packages/net/csp/transports.js
@@ -206,11 +206,8 @@ transports.xhr = Class(baseTransport, function(supr) {
} else if('onreadystatechange' in xhr) {
xhr.onreadystatechange = bind(this, '_onReadyStateChange', rType, cb, eb);
}
- if(data) {
- xhr.send(data);
- } else {
- xhr.send();
- }
+
+ setTimeout(bind(xhr, 'send', data), 0);
};
});
|
this line was accidently deleted in 3b<I>b7beb1d9ce<I> (mcarter) - fixes spinning loading indicators in webkit
|
gameclosure_js.io
|
train
|
js
|
fa378a7f8c164af7cc873969cb31163ebdbff89b
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -147,7 +147,7 @@ function serveManifest(paths, opts, callback) {
watchers.push(watcher);
checkReady();
},
- catchupDelay: 500
+ catchupDelay: ('catchupDelay' in opts) ? opts['catchupDelay'] : 500
});
});
}
|
Allow opts to override the catchupDelay value
|
isaacsimmons_cache-manifest-generator
|
train
|
js
|
b02ccff55ff8735edd4d96eb0eedecb347ed79bc
|
diff --git a/lib/auger/request.rb b/lib/auger/request.rb
index <HASH>..<HASH> 100644
--- a/lib/auger/request.rb
+++ b/lib/auger/request.rb
@@ -1,7 +1,7 @@
module Auger
class Request
- attr_accessor :tests, :before_tests_proc, :response, :arg
+ attr_accessor :tests, :before_tests_proc, :arg
def self.load(arg, &block)
request = new(arg)
|
no need for @response in request
|
rlister_auger
|
train
|
rb
|
b7bdc3a88c153b3d433cda3f0ac9f2ecded3d63d
|
diff --git a/ccmlib/common.py b/ccmlib/common.py
index <HASH>..<HASH> 100644
--- a/ccmlib/common.py
+++ b/ccmlib/common.py
@@ -527,7 +527,7 @@ def get_version_from_build(install_dir=None, node_path=None):
def get_dse_version(install_dir):
for root, dirs, files in os.walk(install_dir):
for file in files:
- match = re.search('^dse-([0-9.]+)(?:-SNAPSHOT)?\.jar', file)
+ match = re.search('^dse(?:-core)-([0-9.]+)(?:-SNAPSHOT)?\.jar', file)
if match:
return match.group(1)
return None
|
added support to find version using new dse jar name format
|
riptano_ccm
|
train
|
py
|
538395b333d25a59cce4e30b2a41da7354d10865
|
diff --git a/text_formatter.go b/text_formatter.go
index <HASH>..<HASH> 100644
--- a/text_formatter.go
+++ b/text_formatter.go
@@ -46,15 +46,22 @@ type TextFormatter struct {
// Enable logging the full timestamp when a TTY is attached instead of just
// the time passed since beginning of execution.
FullTimestamp bool
+
+ // The fields are sorted by default for a consistent output. For applications
+ // that log extremely frequently and don't use the JSON formatter this may not
+ // be desired.
+ DisableSorting bool
}
func (f *TextFormatter) Format(entry *Entry) ([]byte, error) {
-
var keys []string = make([]string, 0, len(entry.Data))
for k := range entry.Data {
keys = append(keys, k)
}
- sort.Strings(keys)
+
+ if !f.DisableSorting {
+ sort.Strings(keys)
+ }
b := &bytes.Buffer{}
diff --git a/text_formatter_test.go b/text_formatter_test.go
index <HASH>..<HASH> 100644
--- a/text_formatter_test.go
+++ b/text_formatter_test.go
@@ -32,3 +32,6 @@ func TestQuoting(t *testing.T) {
checkQuoting(false, errors.New("invalid"))
checkQuoting(true, errors.New("invalid argument"))
}
+
+// TODO add tests for sorting etc., this requires a parser for the text
+// formatter output.
|
text_formatter: add field to disable sorting
|
sirupsen_logrus
|
train
|
go,go
|
5a8a10d6504d55f3b99e64fd301f63e0bc954840
|
diff --git a/pkg/cmd/cli/cli.go b/pkg/cmd/cli/cli.go
index <HASH>..<HASH> 100644
--- a/pkg/cmd/cli/cli.go
+++ b/pkg/cmd/cli/cli.go
@@ -36,9 +36,8 @@ run new-app:
$ %[1]s new-app openshift/ruby-20-centos7~https://github.com/openshift/ruby-hello-world.git
This will create an application based on the Docker image 'openshift/ruby-20-centos7' that builds
-the source code at 'github.com/openshift/ruby-hello-world.git'. To start the build, run
-
- $ %[1]s start-build ruby-hello-world --follow
+the source code at 'github.com/openshift/ruby-hello-world.git'. A build will start automatically and
+a deployment will start as soon as the build finishes.
Once your application is deployed, use the status, get, and describe commands to see more about
the created components:
|
Fix docs of oc
|
openshift_origin
|
train
|
go
|
f13297cec77984470fb52b7f09c7eb946db0d4f8
|
diff --git a/zechframework.php b/zechframework.php
index <HASH>..<HASH> 100755
--- a/zechframework.php
+++ b/zechframework.php
@@ -1,9 +1,6 @@
<?php
require __DIR__ . DIRECTORY_SEPARATOR . "vendor" . DIRECTORY_SEPARATOR . "autoload.php";
-error_reporting(E_ALL);
-ini_set('display_errors', 1);
-
// Define constants for file paths, url, etc.
define('DS', DIRECTORY_SEPARATOR);
define('ROOT_PATH', __DIR__);
|
for now I removed the php init settings. best to leave the server configuration on the server.
|
zewadesign_framework
|
train
|
php
|
aae4dd2280f8f3e1f1babee51c2ba227bd1def9f
|
diff --git a/src/Request.php b/src/Request.php
index <HASH>..<HASH> 100644
--- a/src/Request.php
+++ b/src/Request.php
@@ -209,12 +209,11 @@ final class Request
/**
* Get all GET params.
- * @param bool $setNoneNull
* @return array
*/
- final public function getParams(bool $setNoneNull = false): array
+ final public function getParams(): array
{
- return $this->params->get->toArray($setNoneNull);
+ return $this->params->get->toArray();
}
/**
@@ -230,12 +229,11 @@ final class Request
/**
* Get all POST params.
- * @param bool $setNoneNull
* @return array
*/
- final public function postParams(bool $setNoneNull = false): array
+ final public function postParams(): array
{
- return $this->params->post->toArray($setNoneNull);
+ return $this->params->post->toArray();
}
/**
@@ -251,12 +249,11 @@ final class Request
/**
* Get all COOKIE params.
- * @param bool $setNoneNull
* @return array
*/
- final public function cookieParams(bool $setNoneNull = false): array
+ final public function cookieParams(): array
{
- return $this->params->cookie->toArray($setNoneNull);
+ return $this->params->cookie->toArray();
}
/**
|
Remove $setNoneNull options.
|
froq_froq-http
|
train
|
php
|
6c1a18f034165c8313deafe2e56b4e2c553ce5b5
|
diff --git a/go/engine/gpg_import_key.go b/go/engine/gpg_import_key.go
index <HASH>..<HASH> 100644
--- a/go/engine/gpg_import_key.go
+++ b/go/engine/gpg_import_key.go
@@ -149,7 +149,7 @@ func (e *GPGImportKeyEngine) Run(ctx *Context) (err error) {
break
}
}
- if duplicate {
+ if duplicate && !e.arg.OnlyImport {
// This key's already been posted to the server.
res, err := ctx.GPGUI.ConfirmDuplicateKeyChosen(context.TODO(), 0)
if err != nil {
|
Fix `--only-import` of existing key in PGP select
Address one aspect of CORE-<I>
|
keybase_client
|
train
|
go
|
333d8f60d31be07d73fbbc00bb53d7ca29135ef2
|
diff --git a/plugins/org.eclipse.xtext/src/org/eclipse/xtext/documentation/impl/MultiLineJavaDocTypeReferenceProvider.java b/plugins/org.eclipse.xtext/src/org/eclipse/xtext/documentation/impl/MultiLineJavaDocTypeReferenceProvider.java
index <HASH>..<HASH> 100644
--- a/plugins/org.eclipse.xtext/src/org/eclipse/xtext/documentation/impl/MultiLineJavaDocTypeReferenceProvider.java
+++ b/plugins/org.eclipse.xtext/src/org/eclipse/xtext/documentation/impl/MultiLineJavaDocTypeReferenceProvider.java
@@ -26,7 +26,7 @@ public class MultiLineJavaDocTypeReferenceProvider implements IJavaDocTypeRefere
public List<ReplaceRegion> computeTypeRefRegions(INode node) {
List<ReplaceRegion> regions = Lists.newArrayList();
Iterable<ILeafNode> leafNodes = node.getLeafNodes();
- computeRegions(regions, leafNodes, "@link ", "}", "#");
+ computeRegions(regions, leafNodes, "@link ", " ", "#");
computeRegions(regions, leafNodes, "@see ", " " , "#");
return regions;
}
|
[Xbase] Fix problem in compiling JavaDoc
|
eclipse_xtext-core
|
train
|
java
|
f7a07d9b8b4d635e6f024293f344b41ce7690aa7
|
diff --git a/api.php b/api.php
index <HASH>..<HASH> 100644
--- a/api.php
+++ b/api.php
@@ -1616,7 +1616,7 @@ class PHP_CRUD_API {
echo '{"swagger":"2.0",';
echo '"info":{';
echo '"title":"'.$database.'",';
- echo '"description":"API generated with [PHP_CRUD_API](https://github.com/mevdschee/php-crud-api)",';
+ echo '"description":"API generated with [PHP-CRUD-API](https://github.com/mevdschee/php-crud-api)",';
echo '"version":"1.0.0"';
echo '},';
echo '"host":"'.$_SERVER['HTTP_HOST'].'",';
|
Update project name in swagger output
|
mevdschee_php-crud-api
|
train
|
php
|
f4c515d6362fdee01cd378fb945b55466549a5e0
|
diff --git a/sllurp/llrp_proto.py b/sllurp/llrp_proto.py
index <HASH>..<HASH> 100644
--- a/sllurp/llrp_proto.py
+++ b/sllurp/llrp_proto.py
@@ -27,6 +27,8 @@ import logging
import struct
from collections import defaultdict
from binascii import hexlify
+from six import iteritems
+
from .util import BIT, BITMASK, func, reverse_dict
from . import llrp_decoder
from .llrp_errors import LLRPError
@@ -3367,7 +3369,7 @@ class LLRPMessageDict(dict):
# Reverse dictionary for Message_struct types
Message_Type2Name = {}
-for msgname, msgstruct in Message_struct.iteritems():
+for msgname, msgstruct in iteritems(Message_struct):
try:
ty = msgstruct['type']
except KeyError:
|
use iteritems from six
|
ransford_sllurp
|
train
|
py
|
f490a68d7dd630d2368af4198229600c6d3ad745
|
diff --git a/lottie/src/main/java/com/airbnb/lottie/LottieAnimationView.java b/lottie/src/main/java/com/airbnb/lottie/LottieAnimationView.java
index <HASH>..<HASH> 100644
--- a/lottie/src/main/java/com/airbnb/lottie/LottieAnimationView.java
+++ b/lottie/src/main/java/com/airbnb/lottie/LottieAnimationView.java
@@ -136,7 +136,7 @@ import java.util.Map;
}
}
if (ta.getBoolean(R.styleable.LottieAnimationView_lottie_autoPlay, false)) {
- lottieDrawable.playAnimation();
+ wasAnimatingWhenDetached = true;
autoPlay = true;
}
|
Prevent autoPlay from playing an animation before it is attached to a window
Fixes #<I>
|
airbnb_lottie-android
|
train
|
java
|
11dc58a58ca60daf6221f858ad42dab1530fd423
|
diff --git a/devices.js b/devices.js
index <HASH>..<HASH> 100755
--- a/devices.js
+++ b/devices.js
@@ -1193,10 +1193,10 @@ const devices = [
extend: hue.light_onoff_brightness_colortemp_colorxy,
},
{
- zigbeeModel: ['LCA002'],
+ zigbeeModel: ['LCA001', 'LCA002'],
model: '9290022166',
vendor: 'Philips',
- description: 'Hue white and color ambiance E26',
+ description: 'Hue white and color ambiance E26/E27',
extend: hue.light_onoff_brightness_colortemp_colorxy,
},
{
|
Added LCA<I> Philips Hue White and Ambiance E<I> (#<I>)
* Added LCA<I> Philips Hue White and Ambiance E<I>
* Added a space between LCA<I> and LCA<I>
|
Koenkk_zigbee-shepherd-converters
|
train
|
js
|
da39fe3da5aaad9f0dccfc082b66ac347591b354
|
diff --git a/rest_framework_extensions/compat.py b/rest_framework_extensions/compat.py
index <HASH>..<HASH> 100644
--- a/rest_framework_extensions/compat.py
+++ b/rest_framework_extensions/compat.py
@@ -211,7 +211,10 @@ else:
# handle different QuerySet representations
def queryset_to_value_list(queryset):
- assert isinstance(queryset, str)
+ if six.PY3:
+ assert isinstance(queryset, str)
+ else:
+ assert isinstance(queryset, basestring)
# django 1.10 introduces syntax "<QuerySet [(#1), (#2), ...]>"
# we extract only the list of tuples from the string
|
added python <I> compatibility for string/unicode comparison
|
chibisov_drf-extensions
|
train
|
py
|
664c8c691ccdbe6d2dceedee6315a5fc3f55fad6
|
diff --git a/bcbio/pipeline/run_info.py b/bcbio/pipeline/run_info.py
index <HASH>..<HASH> 100644
--- a/bcbio/pipeline/run_info.py
+++ b/bcbio/pipeline/run_info.py
@@ -799,6 +799,8 @@ def _add_algorithm_defaults(algorithm):
Converts allowed multiple inputs into lists if specified as a single item.
Converts required single items into string if specified as a list
"""
+ if not algorithm:
+ algorithm = {}
defaults = {"archive": [],
"tools_off": [],
"tools_on": [],
|
Fix error caused by an empty algorithm in the config YAML.
Closes #<I>.
|
bcbio_bcbio-nextgen
|
train
|
py
|
6733137d98f8d927d8b03174bcbf77601c227f5e
|
diff --git a/js/jquery.mapael.js b/js/jquery.mapael.js
index <HASH>..<HASH> 100644
--- a/js/jquery.mapael.js
+++ b/js/jquery.mapael.js
@@ -317,12 +317,12 @@
options.text.attrs["text-anchor"] = textPosition.textAnchor;
elem.textElem = paper.text(textPosition.x, textPosition.y, options.text.content).attr(options.text.attrs);
$.fn.mapael.setHoverOptions(elem.textElem, options.text.attrs, options.text.attrsHover);
- $.fn.mapael.setHover(paper, elem.mapElem, elem.textElem);
options.eventHandlers && $.fn.mapael.setEventHandlers(id, options, elem.mapElem, elem.textElem);
+ $.fn.mapael.setHover(paper, elem.mapElem, elem.textElem);
$(elem.textElem.node).attr("data-id", id);
} else {
- $.fn.mapael.setHover(paper, elem.mapElem);
options.eventHandlers && $.fn.mapael.setEventHandlers(id, options, elem.mapElem);
+ $.fn.mapael.setHover(paper, elem.mapElem);
}
// Init the tooltip
|
Bind event handlers before the binding of mouseover and mouseout events
|
neveldo_jQuery-Mapael
|
train
|
js
|
43ae9ab2c97f165c4cddf51b5215ad4917a78365
|
diff --git a/languagetool-dev/src/test/java/org/languagetool/dev/eval/LanguageDetectionEval.java b/languagetool-dev/src/test/java/org/languagetool/dev/eval/LanguageDetectionEval.java
index <HASH>..<HASH> 100644
--- a/languagetool-dev/src/test/java/org/languagetool/dev/eval/LanguageDetectionEval.java
+++ b/languagetool-dev/src/test/java/org/languagetool/dev/eval/LanguageDetectionEval.java
@@ -46,6 +46,7 @@ class LanguageDetectionEval {
//languageIdentifier.enableFasttext(new File("/path/to/fasttext/binary"), new File("/path/to/fasttext/model"));
// Daniel's paths:
//languageIdentifier.enableFasttext(new File("/home/languagetool/fasttext/fasttext"), new File("/home/languagetool/fasttext/lid.176.bin"));
+ //languageIdentifier.enableNgrams(new File("/home/languagetool/model_ml50_new.zip"));
}
private float evaluate(Language language) throws IOException {
|
add ngram path (commented out)
|
languagetool-org_languagetool
|
train
|
java
|
00ef9a5e442c9bf9ccec4b58e2ce6b86d270708d
|
diff --git a/src/main/java/com/github/jinahya/bit/io/BitIoConstraints.java b/src/main/java/com/github/jinahya/bit/io/BitIoConstraints.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/github/jinahya/bit/io/BitIoConstraints.java
+++ b/src/main/java/com/github/jinahya/bit/io/BitIoConstraints.java
@@ -98,7 +98,7 @@ final class BitIoConstraints {
static {
MAX_SIZES[0] = (int) pow(2, MIN_EXPONENT);
for (int i = 1; i < MAX_SIZES.length; i++) {
- MAX_SIZES[i] = MAX_SIZES[i - 1] << 2;
+ MAX_SIZES[i] = MAX_SIZES[i - 1] << 1;
}
}
@@ -142,7 +142,7 @@ final class BitIoConstraints {
}
static int requireValidSizeChar(final int size) {
- return requireValidSize(true, SIZE_EXPONENT_CHAR, size);
+ return requireValidSize(false, SIZE_EXPONENT_CHAR, size);
}
// -----------------------------------------------------------------------------------------------------------------
|
Fix wrong size constraint for char
|
jinahya_bit-io
|
train
|
java
|
72712f5247deba610906f1a8d7add3298c3c5732
|
diff --git a/lib/luban/cli/version.rb b/lib/luban/cli/version.rb
index <HASH>..<HASH> 100644
--- a/lib/luban/cli/version.rb
+++ b/lib/luban/cli/version.rb
@@ -1,5 +1,5 @@
module Luban
module CLI
- VERSION = "0.4.4"
+ VERSION = "0.4.5"
end
end
|
bump up version to <I>
|
lubanrb_cli
|
train
|
rb
|
576c9ee0dcf84c278a4130bc257a3caeb8cd9fb4
|
diff --git a/segmentstore/server/src/main/java/io/pravega/segmentstore/server/reading/StreamSegmentReadIndex.java b/segmentstore/server/src/main/java/io/pravega/segmentstore/server/reading/StreamSegmentReadIndex.java
index <HASH>..<HASH> 100644
--- a/segmentstore/server/src/main/java/io/pravega/segmentstore/server/reading/StreamSegmentReadIndex.java
+++ b/segmentstore/server/src/main/java/io/pravega/segmentstore/server/reading/StreamSegmentReadIndex.java
@@ -1172,7 +1172,7 @@ class StreamSegmentReadIndex implements CacheManager.Client, AutoCloseable {
insert(offset, data);
}
} catch (Exception ex) {
- log.error("{}: Unable to process Storage Read callback. Offset={}, Result=[{}].", this.traceObjectId, offset, result);
+ log.error("{}: Unable to process Storage Read callback. Offset={}, Result=[{}].", this.traceObjectId, offset, result, ex);
}
};
|
Issue <I>: (SegmentStore) Logging the exception in StreamSegmentReadIndex.queueStorageRead (#<I>)
Fixed the error logging in StreamSegmentReadIndex.queueStorageRead to log the exception, not just the message.
|
pravega_pravega
|
train
|
java
|
e900c7574b86aad2211575b3880cec4852132301
|
diff --git a/findspark.py b/findspark.py
index <HASH>..<HASH> 100644
--- a/findspark.py
+++ b/findspark.py
@@ -137,7 +137,10 @@ def init(spark_home=None, python_path=None, edit_rc=False, edit_profile=False):
# add pyspark to sys.path
spark_python = os.path.join(spark_home, 'python')
- py4j = glob(os.path.join(spark_python, 'lib', 'py4j-*.zip'))[0]
+ try:
+ py4j = glob(os.path.join(spark_python, 'lib', 'py4j-*.zip'))[0]
+ except IndexError:
+ raise Exception("Unable to find py4j, your SPARK_HOME may not be configured correctly")
sys.path[:0] = [spark_python, py4j]
if edit_rc:
|
Added descriptive error when py4j can't be found
Ran into this issue while attempting to use the library and got a "IndexError", this change makes it much more clear that something is probably wrong with the user's config of Spark, since py4j cannot be found (at least, this is what happened in my case, open to a more general rephrasing).
|
minrk_findspark
|
train
|
py
|
c2fbe8c3cc9ae3a78f8f72fa0034d6aea4bbf100
|
diff --git a/osbs/conf.py b/osbs/conf.py
index <HASH>..<HASH> 100644
--- a/osbs/conf.py
+++ b/osbs/conf.py
@@ -615,7 +615,7 @@ class Configuration(object):
continue
platform = section.split("platform:")[1]
platform_descriptor = {}
- logger.warning("user configuration platforms in section %s is ignored in ",
+ logger.warning("user configuration platforms in section %s is ignored in "
"arrangement %s and later",
section, REACTOR_CONFIG_ARRANGEMENT_VERSION)
logger.warning("it has been deprecated in favor of the value in the reactor_config_map")
|
conf: fix errant comma in deprecation warnings
|
projectatomic_osbs-client
|
train
|
py
|
51706c436fb24b4a89548b6afac7d8c909c6a63e
|
diff --git a/tests/integ/test_training_compiler.py b/tests/integ/test_training_compiler.py
index <HASH>..<HASH> 100644
--- a/tests/integ/test_training_compiler.py
+++ b/tests/integ/test_training_compiler.py
@@ -32,6 +32,10 @@ def gpu_instance_type(request):
integ.test_region() not in integ.TRAINING_COMPILER_SUPPORTED_REGIONS,
reason="SageMaker Training Compiler is not supported in this region",
)
+@pytest.mark.skipif(
+ integ.test_region() in integ.TRAINING_NO_P3_REGIONS,
+ reason="no ml.p3 instances in this region",
+)
def test_huggingface_pytorch(
sagemaker_session,
gpu_instance_type,
@@ -78,6 +82,10 @@ def test_huggingface_pytorch(
integ.test_region() not in integ.TRAINING_COMPILER_SUPPORTED_REGIONS,
reason="SageMaker Training Compiler is not supported in this region",
)
+@pytest.mark.skipif(
+ integ.test_region() in integ.TRAINING_NO_P3_REGIONS,
+ reason="no ml.p3 instances in this region",
+)
def test_huggingface_tensorflow(
sagemaker_session,
gpu_instance_type,
|
fix: integs for training compiler in non-PDX regions (#<I>)
|
aws_sagemaker-python-sdk
|
train
|
py
|
6c6fc5f46e6ffc8fca99ecbb5dcd900e464d6032
|
diff --git a/includes/functions.php b/includes/functions.php
index <HASH>..<HASH> 100644
--- a/includes/functions.php
+++ b/includes/functions.php
@@ -1483,6 +1483,13 @@ function yourls_salt( $string ) {
* 'var', 'value', $url
* If $url omitted, uses $_SERVER['REQUEST_URI']
*
+ * The result of this function call is a URL : it should be escaped before being printed as HTML
+ *
+ * @since 1.5
+ * @param string|array $param1 Either newkey or an associative_array.
+ * @param string $param2 Either newvalue or oldquery or URI.
+ * @param string $param3 Optional. Old query or URI.
+ * @return string New URL query string.
*/
function yourls_add_query_arg() {
$ret = '';
@@ -1564,6 +1571,12 @@ function yourls_urlencode_deep( $value ) {
/**
* Remove arg from query. Opposite of yourls_add_query_arg. Stolen from WP.
*
+ * The result of this function call is a URL : it should be escaped before being printed as HTML
+ *
+ * @since 1.5
+ * @param string|array $key Query key or keys to remove.
+ * @param bool|string $query Optional. When false uses the $_SERVER value. Default false.
+ * @return string New URL query string.
*/
function yourls_remove_query_arg( $key, $query = false ) {
if ( is_array( $key ) ) { // removing multiple keys
|
For hackers: add comment about preventing XSS
|
YOURLS_YOURLS
|
train
|
php
|
21164655a0abb1c2055e13fa4bd3bb61beb239d8
|
diff --git a/changelogs/changelogs.py b/changelogs/changelogs.py
index <HASH>..<HASH> 100644
--- a/changelogs/changelogs.py
+++ b/changelogs/changelogs.py
@@ -21,7 +21,7 @@ def _load_custom_functions(vendor, name):
:return: dict, functions
"""
functions = {}
- filename = "{}.py".format(name)
+ filename = "{}.py".format(name.lower())
path = os.path.join(
os.path.dirname(os.path.realpath(__file__)), # current working dir
"custom", # /dir/parser
|
Make custom functions case insensitive.
Some packages prefer different kind of casing in their name. For example
`SQLAlchemy` instead of `sqlalchemy`.
|
pyupio_changelogs
|
train
|
py
|
fed36ec327867c065603081d81dc73e41cbc6db2
|
diff --git a/src/test/java/org/jooq/lambda/SeqTest.java b/src/test/java/org/jooq/lambda/SeqTest.java
index <HASH>..<HASH> 100644
--- a/src/test/java/org/jooq/lambda/SeqTest.java
+++ b/src/test/java/org/jooq/lambda/SeqTest.java
@@ -272,10 +272,15 @@ public class SeqTest {
Supplier<Tuple2<Seq<Integer>, Seq<Integer>>> reset = () -> Seq.of(1, 2, 3, 4, 5).duplicate();
Tuple2<Seq<Integer>, Seq<Integer>> duplicate;
+ // Consume v1 first
duplicate = reset.get().map((s1, s2) -> tuple(s1.limit(2), s2.skip(2)));
-
assertEquals(asList(1, 2), duplicate.v1.toList());
assertEquals(asList(3, 4, 5), duplicate.v2.toList());
+
+ // Consume v2 first
+ duplicate = reset.get().map((s1, s2) -> tuple(s1.limit(2), s2.skip(2)));
+ assertEquals(asList(3, 4, 5), duplicate.v2.toList());
+ assertEquals(asList(1, 2), duplicate.v1.toList());
}
@Test
|
[#<I>] Added failing integration test
|
jOOQ_jOOL
|
train
|
java
|
b0ca8033ac69e2c4e6dcdc08f036dc317079b705
|
diff --git a/lib/ember/version.rb b/lib/ember/version.rb
index <HASH>..<HASH> 100644
--- a/lib/ember/version.rb
+++ b/lib/ember/version.rb
@@ -6,8 +6,12 @@ module Ember
# we might want to unify this with the ember version string,
# but consistency?
def rubygems_version_string
- major, rc = VERSION.sub('-','.').scan(/(\d+\.\d+\.\d+\.rc)\.(\d+)/).first
+ if VERSION =~ /rc/
+ major, rc = VERSION.sub('-','.').scan(/(\d+\.\d+\.\d+\.rc)\.(\d+)/).first
- "#{major}#{rc}"
+ "#{major}#{rc}"
+ else
+ VERSION
+ end
end
end
|
Fix ember-source to handle non-RCs
|
emberjs_ember.js
|
train
|
rb
|
67151840e46d498f0aec789b26bec816bb5bc0df
|
diff --git a/km3pipe/io/aanet.py b/km3pipe/io/aanet.py
index <HASH>..<HASH> 100644
--- a/km3pipe/io/aanet.py
+++ b/km3pipe/io/aanet.py
@@ -103,6 +103,7 @@ class AanetPump(Pump):
'MCHits': HitSeries.from_aanet(event.mc_hits, event.id),
'MCTracks': TrackSeries.from_aanet(event.mc_trks,
event.id),
+ 'Tracks': TrackSeries.from_aanet(event.trks, event.id),
'filename': filename,
'Header': self.header,
'EventInfo': EventInfo(
@@ -121,10 +122,13 @@ class AanetPump(Pump):
w2,
w3,
),
- }
- recos = read_mini_dst(event, event.id)
- for recname, reco in recos.items():
- blob[recname] = reco
+ }
+ try:
+ recos = read_mini_dst(event, event.id)
+ for recname, reco in recos.items():
+ blob[recname] = reco
+ except IndexError:
+ pass
yield blob
del event_file
|
try reading aanet non-mc tracks
|
tamasgal_km3pipe
|
train
|
py
|
4cd085bf9ffcee32907b8139b38474a30a917e84
|
diff --git a/src/Groups/ANDGroup.php b/src/Groups/ANDGroup.php
index <HASH>..<HASH> 100644
--- a/src/Groups/ANDGroup.php
+++ b/src/Groups/ANDGroup.php
@@ -99,7 +99,7 @@ class ANDGroup implements Group
if ( ! $this->isSet())
{
$responses[] = new Response(
- $this->getPrintableName().' must all be set'
+ $this->getPrintableName().' must be set'
);
$memberResponses = array();
|
update response to make sense in more cases
|
aidantwoods_BetterOptions
|
train
|
php
|
dc910997039f11492437c61cb7bd818cc5b38bd6
|
diff --git a/openquake/engine/engine.py b/openquake/engine/engine.py
index <HASH>..<HASH> 100644
--- a/openquake/engine/engine.py
+++ b/openquake/engine/engine.py
@@ -111,8 +111,7 @@ def parse_config(source):
File-like object containing the config parameters.
:returns:
A `dict` of the parameter keys and values parsed from the config file
- and a `dict` of :class:`~openquake.engine.db.models.Input` objects,
- keyed by the config file parameter.
+ and a `dict` of input model file paths keyed by input type.
These dicts are return as a tuple/pair.
"""
@@ -150,9 +149,7 @@ def parse_config(source):
# It's a relative path.
path = os.path.join(base_path, path)
- files[key] = create_input(
- path, input_type, prepare_user(getpass.getuser())
- )
+ files[input_type] = path
else:
params[key] = value
|
engine:
Updated parse_config to have less side-effects, and simplified its
return interface.
Instead of creating Input records, we just return a dict of the input
model file paths and leave the Input creation to a later function in
the workflow.
Former-commit-id: <I>e<I>b4e<I>a<I>a<I>cedcd<I>e3ac<I>b
|
gem_oq-engine
|
train
|
py
|
da2aa57879ecd82b3089d931d49c845e8f3ae100
|
diff --git a/lib/features/complex-cell/ComplexCell.js b/lib/features/complex-cell/ComplexCell.js
index <HASH>..<HASH> 100644
--- a/lib/features/complex-cell/ComplexCell.js
+++ b/lib/features/complex-cell/ComplexCell.js
@@ -15,8 +15,8 @@ var assign = require('lodash/object/assign'),
* Complex Property:
* - template: {DOMNode}
* HTML template of the complex content
- * - className: {String} (optional, defaults to 'complex-cell')
- * Defines the className which is set on the container of the complex cell
+ * - className: {String | String[]} (optional, defaults to 'complex-cell')
+ * Defines the classNames which are set on the container of the complex cell
* - offset: {Object} (option, defaults to {x: 0, y: 0})
* Defines the offset of the template from the top left corner of the cell
*
@@ -124,7 +124,13 @@ ComplexCell.prototype._createContainer = function(className, position) {
event.stopPropagation();
});
- domClasses(container).add(className);
+ if(typeof className === 'string') {
+ domClasses(container).add(className);
+ } else {
+ for(var i = 0; i < className.length; i++) {
+ domClasses(container).add(className[i]);
+ }
+ }
return container;
};
|
feat(complex-cell): allow setting multiple class names
related to CAM-<I>
|
bpmn-io_table-js
|
train
|
js
|
b5e211ed15e10b44e1ca5dd363a81a683ecfedc5
|
diff --git a/src/main/java/org/mariadb/jdbc/internal/queryresults/resultset/MariaSelectResultSet.java b/src/main/java/org/mariadb/jdbc/internal/queryresults/resultset/MariaSelectResultSet.java
index <HASH>..<HASH> 100644
--- a/src/main/java/org/mariadb/jdbc/internal/queryresults/resultset/MariaSelectResultSet.java
+++ b/src/main/java/org/mariadb/jdbc/internal/queryresults/resultset/MariaSelectResultSet.java
@@ -1654,6 +1654,7 @@ public class MariaSelectResultSet implements ResultSet {
Calendar calendar = options.useLegacyDatetimeCode ? Calendar.getInstance() : cal;
synchronized (calendar) {
+ calendar.clear();
calendar.set(Calendar.YEAR, year);
calendar.set(Calendar.MONTH, month - 1);
calendar.set(Calendar.DAY_OF_MONTH, day);
|
[CONJ-<I>] Clear Calendar instance before using it
|
MariaDB_mariadb-connector-j
|
train
|
java
|
ef50c3f5e326706425de993aeb1dbd8c49c0ab51
|
diff --git a/src/Network/FTP/Client/FtpClient.php b/src/Network/FTP/Client/FtpClient.php
index <HASH>..<HASH> 100644
--- a/src/Network/FTP/Client/FtpClient.php
+++ b/src/Network/FTP/Client/FtpClient.php
@@ -244,23 +244,6 @@ class FtpClient extends AbstractFtpClient {
}
/**
- * Returns a list of files in the given directory.
- *
- * @param string $directory The directory.
- * @return array Returns a list of files in the given directory.
- * @throws FtpException Throws a FTP exception if an error occurs.
- */
- public function mlsd(string $directory): array {
-
- $result = @ftp_mlsd($this->getConnection(), $directory);
- if (false === $result) {
- throw $this->newFtpException("ftp_mlsd failed: [{$directory}]");
- }
-
- return $result;
- }
-
- /**
* Retrieves a file from the FTP server and writes it to an open file (non-blocking).
*
* @param resource $localStream The local stream.
|
Remove a PHP <I> function used into FTP client
|
webeweb_core-library
|
train
|
php
|
a180bd9dce2c89eb7da3ad4b78a94a71f517fc76
|
diff --git a/build.php b/build.php
index <HASH>..<HASH> 100755
--- a/build.php
+++ b/build.php
@@ -22,7 +22,7 @@ if ($phpcsViolations > 0) {
}
$phpunitConfiguration = PHPUnit_Util_Configuration::getInstance(__DIR__ . '/phpunit.xml');
-$phpunitArguments = array('coverageHtml' => 'coverage', 'configuration' => $phpunitConfiguration);
+$phpunitArguments = array('coverageHtml' => __DIR__ . '/coverage', 'configuration' => $phpunitConfiguration);
$testRunner = new PHPUnit_TextUI_TestRunner();
$result = $testRunner->doRun($phpunitConfiguration->getTestSuiteConfiguration(), $phpunitArguments);
if (!$result->wasSuccessful()) {
|
Use the full path to the code coverage.
|
traderinteractive_image-util-php
|
train
|
php
|
18b7ab638a52b1dc2899f2e32b33f41d931ce2f4
|
diff --git a/setuptools/command/rotate.py b/setuptools/command/rotate.py
index <HASH>..<HASH> 100755
--- a/setuptools/command/rotate.py
+++ b/setuptools/command/rotate.py
@@ -2,6 +2,7 @@ from distutils.util import convert_path
from distutils import log
from distutils.errors import DistutilsOptionError
import os
+import shutil
from setuptools.extern import six
@@ -59,4 +60,7 @@ class rotate(Command):
for (t, f) in files:
log.info("Deleting %s", f)
if not self.dry_run:
- os.unlink(f)
+ if os.path.isdir(f):
+ shutil.rmtree(f)
+ else:
+ os.unlink(f)
|
Handle not-zip-safe egg (folder) deletion in rotate command
|
pypa_setuptools
|
train
|
py
|
48e7087e77fe583a11cda676d1db3a2f634c5dce
|
diff --git a/test/backends_bucket-at-most-once.js b/test/backends_bucket-at-most-once.js
index <HASH>..<HASH> 100644
--- a/test/backends_bucket-at-most-once.js
+++ b/test/backends_bucket-at-most-once.js
@@ -5,7 +5,7 @@ var should = require ('should');
var factory = null;
[
- {label: 'MongoDB Bucket', mq: require ('../backends/bucket-mongo')}
+ {label: 'MongoDB Bucket', mq: require ('../backends/bucket-mongo')}
].forEach (function (MQ_item) {
describe ('bucket-at-most-once with ' + MQ_item.label + ' queue backend', function () {
@@ -87,6 +87,7 @@ describe ('bucket-at-most-once with ' + MQ_item.label + ' queue backend', functi
cb();
})},
], function(err, results) {
+ q.drain();
done();
});
});
@@ -127,6 +128,7 @@ describe ('bucket-at-most-once with ' + MQ_item.label + ' queue backend', functi
cb();
})},
], function(err, results) {
+ q.drain();
done();
});
});
|
bucket-at-most-once test: added drain calls
|
pepmartinez_keuss
|
train
|
js
|
4232770d5cc58cf300c62f80e1376db8a3d9662c
|
diff --git a/src/Model.php b/src/Model.php
index <HASH>..<HASH> 100644
--- a/src/Model.php
+++ b/src/Model.php
@@ -36,6 +36,10 @@ trait Model
*/
public function __construct(iterable $input = null)
{
+ $cache = $this->__getModelPropertyDecorations();
+ foreach ($cache['properties'] as $field => $annotations) {
+ $this->$field = $this->ornamentalize($field, null);
+ }
if (isset($input)) {
foreach ($input as $key => $value) {
$this->$key = $this->ornamentalize($key, $value);
|
on initialization, always correctly set decorated properties (even with a null value)
|
ornament-orm_core
|
train
|
php
|
bf87ac15b529447a0906f47fdeeb842faa5739ff
|
diff --git a/src/components/Cards/ImageCard.js b/src/components/Cards/ImageCard.js
index <HASH>..<HASH> 100644
--- a/src/components/Cards/ImageCard.js
+++ b/src/components/Cards/ImageCard.js
@@ -9,7 +9,7 @@ export default class ImageCard extends React.Component {
return (
<Card onClick={onClick} className={styles.root}>
<img src={image} onLoad={onImageLoaded} />
- <h1>{text}</h1>
+ <h2>{text}</h2>
{description ? <p>{description}</p> : null}
</Card>
|
Make cards have h2s not h1s
|
netlify_netlify-cms
|
train
|
js
|
e4b2698ec871b8a2f3e9c970f9e272f83be13d60
|
diff --git a/connect.go b/connect.go
index <HASH>..<HASH> 100644
--- a/connect.go
+++ b/connect.go
@@ -140,6 +140,13 @@ const (
VIR_CONNECT_GET_ALL_DOMAINS_STATS_ENFORCE_STATS = VirConnectGetAllDomainStatsFlags(C.VIR_CONNECT_GET_ALL_DOMAINS_STATS_ENFORCE_STATS)
)
+type VirConnectFlags int
+
+const (
+ VIR_CONNECT_RO = VirConnectFlags(C.VIR_CONNECT_RO)
+ VIR_CONNECT_NO_ALIASES = VirConnectFlags(C.VIR_CONNECT_NO_ALIASES)
+)
+
type VirConnection struct {
ptr C.virConnectPtr
}
|
Add enum constants for connection open
|
libvirt_libvirt-go
|
train
|
go
|
12f907209252af108ab81b4ebead472933b59508
|
diff --git a/src/Maatwebsite/Excel/Excel.php b/src/Maatwebsite/Excel/Excel.php
index <HASH>..<HASH> 100644
--- a/src/Maatwebsite/Excel/Excel.php
+++ b/src/Maatwebsite/Excel/Excel.php
@@ -117,8 +117,8 @@ class Excel extends \PHPExcel
// Load the file
$this->excel = $this->reader->load($this->file);
- // Return itself
- return $this;
+ // Return reader object for chaining methods from PHPExcel
+ return $this->excel;
}
/**
|
Changed return value of load() method
|
Maatwebsite_Laravel-Excel
|
train
|
php
|
c3d9d72318f14181a1ecab68c7cd9cd13d14529c
|
diff --git a/src/basic/Textarea.js b/src/basic/Textarea.js
index <HASH>..<HASH> 100644
--- a/src/basic/Textarea.js
+++ b/src/basic/Textarea.js
@@ -34,6 +34,7 @@ class Textarea extends Component {
this.props.placeholderTextColor ? this.props.placeholderTextColor : variables.inputColorPlaceholder
}
underlineColorAndroid="rgba(0,0,0,0)"
+ editable={this.props.disabled ? false : true}
/>
);
}
|
Added disabled prop to TextArea
|
GeekyAnts_NativeBase
|
train
|
js
|
3d219a42423ed34f384d3bce3b9df61d55fb6f9e
|
diff --git a/DeviceDetector.php b/DeviceDetector.php
index <HASH>..<HASH> 100644
--- a/DeviceDetector.php
+++ b/DeviceDetector.php
@@ -501,7 +501,7 @@ class DeviceDetector
* As most touch enabled devices are tablets and only a smaller part are desktops/notebooks we assume that
* all Windows 8 touch devices are tablets.
*/
- if (is_null($this->device) && in_array($this->getOs('short_name'), array('WI8', 'W81', 'WRT')) && $this->isTouchEnabled()) {
+ if (is_null($this->device) && in_array($this->getOs('short_name'), array('WI8', 'W81', 'WRT', 'WR2')) && $this->isTouchEnabled()) {
$this->device = DeviceParserAbstract::DEVICE_TYPE_TABLET;
}
|
detection for windows rt <I> tablets
|
matomo-org_device-detector
|
train
|
php
|
5c27c530f449511481e3f437a5763f13d70c538a
|
diff --git a/src/Drupal/Driver/DrushDriver.php b/src/Drupal/Driver/DrushDriver.php
index <HASH>..<HASH> 100644
--- a/src/Drupal/Driver/DrushDriver.php
+++ b/src/Drupal/Driver/DrushDriver.php
@@ -134,6 +134,7 @@ class DrushDriver implements DriverInterface {
public function drush($command, array $arguments = array(), array $options = array()) {
$arguments = implode(' ', $arguments);
$string_options = '';
+ $options['nocolor'] => '';
foreach ($options as $name => $value) {
if (is_null($value)) {
$string_options .= ' --' . $name;
|
Issue #<I> by grendzy: Fixed DrushDriver: ANSI color output confuses XML parsers.
|
jhedstrom_DrupalDriver
|
train
|
php
|
e5aa1c6f825b5cf2d5f2b0d33d077d174fcc3ccf
|
diff --git a/client/connection.go b/client/connection.go
index <HASH>..<HASH> 100644
--- a/client/connection.go
+++ b/client/connection.go
@@ -10,10 +10,10 @@ import (
"strings"
"time"
+ log "gopkg.in/inconshreveable/log15.v2"
"gopkg.in/macaroon-bakery.v2/httpbakery"
"github.com/lxc/lxd/shared"
- log "github.com/lxc/lxd/shared/log15"
"github.com/lxc/lxd/shared/logger"
"github.com/lxc/lxd/shared/simplestreams"
)
|
client: Update imports for log<I>
|
lxc_lxd
|
train
|
go
|
c2a966b5183da197ff214d8c02e5d05dd3bf5642
|
diff --git a/src/engine/GoalTree.js b/src/engine/GoalTree.js
index <HASH>..<HASH> 100644
--- a/src/engine/GoalTree.js
+++ b/src/engine/GoalTree.js
@@ -217,9 +217,6 @@ let resolveSimpleActions = function resolveSimpleActions(clause, possibleActions
});
thetaSet.forEach((tuple) => {
- if (tuple.unresolved.length > 0) {
- return;
- }
tuple.candidates.forEach((literal) => {
candidateActions.add(literal);
});
|
remove empty unresolved check for candidate actions selection
|
lps-js_lps.js
|
train
|
js
|
74a97a9a8ad27aa38c02bfa56647659e34f62f0a
|
diff --git a/lib/roger_style_guide/templates/mustache/mustache_template.rb b/lib/roger_style_guide/templates/mustache/mustache_template.rb
index <HASH>..<HASH> 100644
--- a/lib/roger_style_guide/templates/mustache/mustache_template.rb
+++ b/lib/roger_style_guide/templates/mustache/mustache_template.rb
@@ -4,8 +4,14 @@ module RogerStyleGuide::Templates::Mustache
# Mustach template wrapper which handles partial
# resolving.
class MustacheTemplate < ::Mustache
+ attr_reader :template_context
+
def render(template, data, template_context = nil)
- @template_context = template_context
+ if template_context
+ @template_context = template_context
+ elsif data.respond_to?(:template_context)
+ @template_context = data.template_context
+ end
super(template, data)
end
|
Pass template context to lower level mustache renderers
|
DigitPaint_roger_style_guide
|
train
|
rb
|
76a7febff2bf7dadb2ef0380599eb98fe52d8ce0
|
diff --git a/test/helpers/kubectl.go b/test/helpers/kubectl.go
index <HASH>..<HASH> 100644
--- a/test/helpers/kubectl.go
+++ b/test/helpers/kubectl.go
@@ -1531,7 +1531,7 @@ func (kub *Kubectl) WaitForCiliumInitContainerToFinish() error {
}
for _, pod := range podList.Items {
for _, v := range pod.Status.InitContainerStatuses {
- if v.State.Terminated.Reason != "Completed" || v.State.Terminated.ExitCode != 0 {
+ if v.State.Terminated != nil && (v.State.Terminated.Reason != "Completed" || v.State.Terminated.ExitCode != 0) {
kub.Logger().WithFields(logrus.Fields{
"podName": pod.Name,
"currentState": v.State.String(),
|
Add nil check for init container terminated state
|
cilium_cilium
|
train
|
go
|
386bb71738d0a3245e55e2d7abe0272e0b804f30
|
diff --git a/test/index.js b/test/index.js
index <HASH>..<HASH> 100644
--- a/test/index.js
+++ b/test/index.js
@@ -27,6 +27,10 @@ describe('stripe-as-promised', () => {
sandbox.restore();
});
+ it('throws if no Promise is provided', () => {
+ expect(stripeAsPromised.bind()).to.throw('Promise');
+ });
+
it('passes through utility methods', () => {
promisify();
expect(stripe.card.validateCardNumber).to.equal(Stripe.card.validateCardNumber);
|
Test w/out promise ctor
|
bendrucker_stripe-as-promised
|
train
|
js
|
52069c50056a033c4840274d93398c07348391a8
|
diff --git a/lib/data_mapper/mapper/attribute_set.rb b/lib/data_mapper/mapper/attribute_set.rb
index <HASH>..<HASH> 100644
--- a/lib/data_mapper/mapper/attribute_set.rb
+++ b/lib/data_mapper/mapper/attribute_set.rb
@@ -90,7 +90,9 @@ module DataMapper
end
end
- each { |attribute| instance << attribute.clone unless instance[attribute.name] }
+ each do |attribute|
+ instance << attribute.clone unless instance[attribute.name]
+ end
instance
end
|
Use do/end blocks for #each in AttributeSet#merge
|
rom-rb_rom
|
train
|
rb
|
29afb6ad38bd5bfe49b46c711282ebe25ff56ff5
|
diff --git a/pelix/framework.py b/pelix/framework.py
index <HASH>..<HASH> 100644
--- a/pelix/framework.py
+++ b/pelix/framework.py
@@ -283,7 +283,8 @@ class Bundle(object):
self._state = previous_state
# Re-raise directly Pelix exceptions
- _logger.exception("Pelix error raised by %s", self.__name)
+ _logger.exception("Pelix error raised by %s while starting",
+ self.__name)
raise
except Exception as ex:
@@ -291,7 +292,8 @@ class Bundle(object):
self._state = previous_state
# Raise the error
- _logger.exception("Error raised by %s", self.__name)
+ _logger.exception("Error raised by %s while stopping",
+ self.__name)
raise BundleException(ex)
# Bundle is now active
@@ -324,8 +326,18 @@ class Bundle(object):
# Call the start method
stopper(self.__context)
+ except (FrameworkException, BundleException) as ex:
+ # Restore previous state
+ self._state = previous_state
+
+ # Re-raise directly Pelix exceptions
+ _logger.exception("Pelix error raised by %s while stopping",
+ self.__name)
+ exception = ex
+
except Exception as ex:
- _logger.exception("Error calling the activator")
+ _logger.exception("Error raised by %s while stopping",
+ self.__name)
# Store the exception (raised after service clean up)
exception = BundleException(ex)
|
Same exception behavior for bundle.start/stop
Re-raise the exception raised by the bundle activator on start or stop
without converting it, if it is a Pelix exception (Bundle/FrameworkException)
|
tcalmant_ipopo
|
train
|
py
|
a1d7b092f65532f4f2ae9da6a45752d30927d301
|
diff --git a/spec/clamp/command_spec.rb b/spec/clamp/command_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/clamp/command_spec.rb
+++ b/spec/clamp/command_spec.rb
@@ -435,6 +435,19 @@ describe Clamp::Command do
end
+ context "with option arguments that look like options" do
+
+ before do
+ command.parse(%w[--flavour=-dashing- --scoops -1])
+ end
+
+ it "sets the options" do
+ expect(command.flavour).to eq("-dashing-")
+ expect(command.scoops).to eq(-1)
+ end
+
+ end
+
context "with option-like things beyond the arguments" do
it "treats them as positional arguments" do
|
Test behaviour of option arguments that look like options.
This is a (failed) attempt to reproduce #<I>. Having failed to
reproduce, I realise I've actually mis-interpreted #<I>. But this
is still a useful test.
|
mdub_clamp
|
train
|
rb
|
39337d2145fb955de2f3b9f43eebc27935486165
|
diff --git a/upload/catalog/controller/payment/twocheckout.php b/upload/catalog/controller/payment/twocheckout.php
index <HASH>..<HASH> 100644
--- a/upload/catalog/controller/payment/twocheckout.php
+++ b/upload/catalog/controller/payment/twocheckout.php
@@ -7,7 +7,7 @@ class ControllerPaymentTwoCheckout extends Controller {
$order_info = $this->model_checkout_order->getOrder($this->session->data['order_id']);
- $this->data['action'] = 'https://www.2checkout.com/checkout/spurchase';
+ $this->data['action'] = 'https://www.2checkout.com/checkout/purchase';
$this->data['sid'] = $this->config->get('twocheckout_account');
$this->data['currency_code'] = $order_info['currency_code'];
|
2Checkout no longer has a seperate URL for the single page checkout routine.
|
opencart_opencart
|
train
|
php
|
a03e5e328a67bd2efd479f7aebed4830a7d8f922
|
diff --git a/lxd/cluster/gateway.go b/lxd/cluster/gateway.go
index <HASH>..<HASH> 100644
--- a/lxd/cluster/gateway.go
+++ b/lxd/cluster/gateway.go
@@ -407,7 +407,7 @@ func (g *Gateway) raftDial() client.DialFunc {
listener.Close()
- go dqliteProxy("raftDial", g.stopCh, conn, goUnix)
+ go dqliteProxy("raft", g.stopCh, conn, goUnix)
return cUnix, nil
}
@@ -1075,7 +1075,7 @@ func runDqliteProxy(stopCh chan struct{}, bindAddress string, acceptCh chan net.
continue
}
- go dqliteProxy("runDqliteProxy", stopCh, remote, local)
+ go dqliteProxy("dqlite", stopCh, remote, local)
}
}
|
lxd/cluster/gateway: Standardise logging naming of dqliteProxy and dqliteNetworkDial
|
lxc_lxd
|
train
|
go
|
9a1574a7e507a02c6d3814f8a76df89e98c74f7d
|
diff --git a/src/Symfony/Component/DomCrawler/Tests/CrawlerTest.php b/src/Symfony/Component/DomCrawler/Tests/CrawlerTest.php
index <HASH>..<HASH> 100755
--- a/src/Symfony/Component/DomCrawler/Tests/CrawlerTest.php
+++ b/src/Symfony/Component/DomCrawler/Tests/CrawlerTest.php
@@ -81,9 +81,6 @@ class CrawlerTest extends \PHPUnit_Framework_TestCase
$this->assertEquals('foo', $crawler->filterXPath('//div')->attr('class'), '->addHtmlContent() adds nodes from an HTML string');
}
- /**
- * @covers Symfony\Component\DomCrawler\Crawler::addHtmlContent
- */
public function testAddHtmlContentWithBaseTag()
{
$crawler = new Crawler();
|
removed @covers annotations in tests
|
symfony_symfony
|
train
|
php
|
1af331c05c9feed01f0c652e472c76965a7d55f2
|
diff --git a/cmd/server-startup-msg.go b/cmd/server-startup-msg.go
index <HASH>..<HASH> 100644
--- a/cmd/server-startup-msg.go
+++ b/cmd/server-startup-msg.go
@@ -109,7 +109,7 @@ func printServerCommonMsg(apiEndpoints []string) {
apiEndpointStr := strings.Join(apiEndpoints, " ")
// Colorize the message and print.
- log.Println(colorBlue("\nEndpoint: ") + colorBold(fmt.Sprintf(getFormatStr(len(apiEndpointStr), 1), apiEndpointStr)))
+ log.Println(colorBlue("Endpoint: ") + colorBold(fmt.Sprintf(getFormatStr(len(apiEndpointStr), 1), apiEndpointStr)))
log.Println(colorBlue("AccessKey: ") + colorBold(fmt.Sprintf("%s ", cred.AccessKey)))
log.Println(colorBlue("SecretKey: ") + colorBold(fmt.Sprintf("%s ", cred.SecretKey)))
if region != "" {
|
Remove unnecessary newline at beginning of server output (#<I>)
|
minio_minio
|
train
|
go
|
93a3657f87aaeb4a4201acf21eb012b4af9104ca
|
diff --git a/indra/databases/identifiers.py b/indra/databases/identifiers.py
index <HASH>..<HASH> 100644
--- a/indra/databases/identifiers.py
+++ b/indra/databases/identifiers.py
@@ -35,7 +35,7 @@ identifiers_mappings = {
non_registry = {
'SDIS', 'SCHEM', 'SFAM', 'SCOMP', 'HMS-LINCS', 'NXPFA',
'OMIM', 'LSPCI', 'UPLOC', 'BFO', 'CCLE', 'CLO', 'GENBANK',
- 'DRUGBANK.SALT', 'SMILES', 'NIHREPORTER.PROJECT', 'GOOGLE.PATENT'
+ 'DRUGBANK.SALT', 'SMILES', 'NIHREPORTER.PROJECT', 'GOOGLE.PATENT', 'SPINE'
}
# These are reverse mappings from identifiers.org namespaces to INDRA
|
Add more identifiers missing from registry
|
sorgerlab_indra
|
train
|
py
|
85a1df9a18d61708a829e0a2cbfda6f2bea0ba8b
|
diff --git a/src/Ufo/Widgets/WidgetsStorageInterface.php b/src/Ufo/Widgets/WidgetsStorageInterface.php
index <HASH>..<HASH> 100644
--- a/src/Ufo/Widgets/WidgetsStorageInterface.php
+++ b/src/Ufo/Widgets/WidgetsStorageInterface.php
@@ -13,5 +13,22 @@ use Ufo\Core\Section;
interface WidgetsStorageInterface
{
+ /**
+ * @param \Ufo\Core\Section $section
+ * @return array
+ *
+ * return array structure:
+ * [
+ * 'place 1 name' => [
+ * Widget $widget1,
+ * Widget $widget2,
+ * ...
+ * ],
+ * 'place 2 name' => [
+ * ...
+ * ],
+ * ...
+ * ]
+ */
public function getWidgets(Section $section): array;
}
|
chore: describe returning value structure in phpdoc
|
enikeishik_ufoframework
|
train
|
php
|
Subsets and Splits
Java Commits in Train Set
Queries for all entries where the diff_languages column is 'java', providing a filtered dataset but without deeper analysis.
Java Commits Test Data
Returns a subset of 5000 entries from the dataset where the programming language difference is Java, providing basic filtering for exploration.
Java Commits Sample
Retrieves the first 1,000 records where the 'diff_languages' column is 'java', providing limited insight into the specific data entries.
Java Commits Validation Sample
Retrieves a sample of entries from the validation dataset where the diff languages are Java, providing limited insight into specific Java-related data points.
Java Commits in Validation
This query retrieves a limited sample of entries from the validation dataset where the programming language difference is Java, providing basic filtering with minimal insight.
Java Commits Sample
This query retrieves a sample of 100 records where the 'diff_languages' is 'java', providing basic filtering but limited analytical value.
Java Commits Sample
Retrieves 100 samples where the language difference is Java, providing basic filtering but minimal analytical value.
Java Commits Sample
Retrieves 10 samples where the diff_languages column is 'java', providing basic examples of data entries with this specific language.
Java Commits Validation Sample
Retrieves 1,000 records where the differences in languages are marked as Java, providing a snapshot of that specific subset but limited to raw data.
Java Commits Sample
This query retrieves 1000 random samples from the dataset where the programming language is Java, offering limited insight beyond raw data.