diff stringlengths 65 26.7k | message stringlengths 7 9.92k |
|---|---|
diff --git a/Swat/SwatTimeZoneEntry.php b/Swat/SwatTimeZoneEntry.php
index <HASH>..<HASH> 100644
--- a/Swat/SwatTimeZoneEntry.php
+++ b/Swat/SwatTimeZoneEntry.php
@@ -135,7 +135,7 @@ class SwatTimeZoneEntry extends SwatInputControl implements SwatState
} elseif ($this->value === null) {
$message = Swat::_('The %s field is required.');
$this->addMessage(new SwatMessage($message, SwatMessage::ERROR));
- } elseif (!array_key_exists($this->value, $tz_data)) {
+ } elseif (!in_array($this->value, $tz_data)) {
$message = Swat::_('The %s field is an invalid time-zone.');
$this->addMessage(new SwatMessage($message, SwatMessage::ERROR));
} | The TZ IDs are the values, not the keys.
svn commit r<I> |
diff --git a/Manager/FacebookClientManager.php b/Manager/FacebookClientManager.php
index <HASH>..<HASH> 100644
--- a/Manager/FacebookClientManager.php
+++ b/Manager/FacebookClientManager.php
@@ -13,7 +13,7 @@
namespace WellCommerce\Bundle\OAuthBundle\Manager;
use League\OAuth2\Client\Provider\FacebookUser;
-use WellCommerce\Bundle\ClientBundle\Entity\Client;
+use WellCommerce\Bundle\AppBundle\Entity\Client;
use WellCommerce\Bundle\CoreBundle\Helper\Helper;
use WellCommerce\Bundle\CoreBundle\Manager\AbstractManager; | Moved ClientBundle to AppBundle |
diff --git a/hearthstone/enums.py b/hearthstone/enums.py
index <HASH>..<HASH> 100644
--- a/hearthstone/enums.py
+++ b/hearthstone/enums.py
@@ -580,7 +580,7 @@ class GameTag(IntEnum):
LETTUCE_HAS_MANUALLY_SELECTED_ABILITY = 1967
LETTUCE_KEEP_LAST_STANDING_MINION_ACTOR = 1976
GOLDSPARKLES_HINT = 1984
- LETTUCE_USE_DETERMINISTIC_TEAM_ABILITY_QUEUEING = 1990
+ LETTUCE_USE_DETERMINISTIC_TEAM_ABILITY_QUEUING = 1990
QUESTLINE_FINAL_REWARD_DATABASE_ID = 1992
QUESTLINE_PART = 1993
QUESTLINE_REQUIREMENT_MET_1 = 1994 | Fix LETTUCE_USE_DETERMINISTIC_TEAM_ABILITY_QUEUING to use typo from client |
diff --git a/lib/feed2email/cli.rb b/lib/feed2email/cli.rb
index <HASH>..<HASH> 100644
--- a/lib/feed2email/cli.rb
+++ b/lib/feed2email/cli.rb
@@ -40,7 +40,7 @@ module Feed2Email
desc 'history FEED', 'edit history file of feed at index FEED with $EDITOR'
def history(index)
- if ENV['EDITOR'].nil?
+ if ENV['EDITOR'].blank?
$stderr.puts '$EDITOR not set'
exit 6
end
diff --git a/lib/feed2email/core_ext.rb b/lib/feed2email/core_ext.rb
index <HASH>..<HASH> 100644
--- a/lib/feed2email/core_ext.rb
+++ b/lib/feed2email/core_ext.rb
@@ -9,6 +9,10 @@ class Numeric
end
class String
+ def blank?
+ nil? || empty?
+ end
+
def escape_html
CGI.escapeHTML(self)
end | Check for empty $EDITOR in history command |
diff --git a/concepts/tools.py b/concepts/tools.py
index <HASH>..<HASH> 100644
--- a/concepts/tools.py
+++ b/concepts/tools.py
@@ -7,7 +7,7 @@ from itertools import permutations, groupby, starmap
from . import _compat
-__all__ = ['Unique', 'max_len', 'maximal', 'lazyproperty']
+__all__ = ['Unique', 'max_len', 'maximal', 'lazyproperty', 'crc32_hex']
class Unique(_compat.MutableSet):
@@ -190,10 +190,10 @@ class lazyproperty(object):
return result
-def crc32_hex(value):
- """
+def crc32_hex(data):
+ """Return unsigned CRC32 of binary data as hex-encoded string.
>>> crc32_hex(b'spam')
'43daff3d'
"""
- return '%x' % (zlib.crc32(value) & 0xffffffff)
+ return '%x' % (zlib.crc32(data) & 0xffffffff) | add crc<I>_hex() docstring and register |
diff --git a/src/Controller/Backend/FileManager.php b/src/Controller/Backend/FileManager.php
index <HASH>..<HASH> 100644
--- a/src/Controller/Backend/FileManager.php
+++ b/src/Controller/Backend/FileManager.php
@@ -197,8 +197,8 @@ class FileManager extends BackendBase
$formview = $form->createView();
}
- $files = $filesystem->find()->in($path)->files()->toArray();
- $directories = $filesystem->find()->in($path)->directories()->toArray();
+ $files = $filesystem->find()->in($path)->files()->depth(0)->toArray();
+ $directories = $filesystem->find()->in($path)->directories()->depth(0)->toArray();
}
// Select the correct template to render this. If we've got 'CKEditor' in the title, it's a dialog | Set depth limit on file/directory look up |
diff --git a/animal/models.py b/animal/models.py
index <HASH>..<HASH> 100644
--- a/animal/models.py
+++ b/animal/models.py
@@ -37,6 +37,7 @@ GENOTYPE_CHOICES = (
),
('Floxed with Transgene',(
('fl/fl; ?', 'Floxed Undetermined Transgene'),
+ ('fl/+; ?', 'Heterozygous Floxed, Undetermined Transgene'),
('fl/fl; +/+', 'Floxed no Transgene'),
('fl/+; +/+', 'Heterozygous Floxed no Transgene'),
('fl/fl; Tg/+', 'Floxed Heterozygous Transgene'), | added a fl/+, ? genotype |
diff --git a/src/Illuminate/Foundation/helpers.php b/src/Illuminate/Foundation/helpers.php
index <HASH>..<HASH> 100644
--- a/src/Illuminate/Foundation/helpers.php
+++ b/src/Illuminate/Foundation/helpers.php
@@ -138,7 +138,7 @@ if (! function_exists('auth')) {
* Get the available auth instance.
*
* @param string|null $guard
- * @return \Illuminate\Contracts\Auth\Factory
+ * @return \Illuminate\Contracts\Auth\Factory|\Illuminate\Contracts\Auth\Guard|\Illuminate\Contracts\Auth\StatefulGuard
*/
function auth($guard = null)
{ | add additional return types to auth() helper docblock (#<I>) |
diff --git a/src/main/java/me/prettyprint/cassandra/service/JmxMonitor.java b/src/main/java/me/prettyprint/cassandra/service/JmxMonitor.java
index <HASH>..<HASH> 100644
--- a/src/main/java/me/prettyprint/cassandra/service/JmxMonitor.java
+++ b/src/main/java/me/prettyprint/cassandra/service/JmxMonitor.java
@@ -14,7 +14,6 @@ import javax.management.ObjectName;
import me.prettyprint.cassandra.connection.HConnectionManager;
-import org.apache.log4j.xml.DOMConfigurator;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory; | Fix a small messup I did with importing the optional log4j DOMConfigurator, sorry |
diff --git a/docs/source/conf.py b/docs/source/conf.py
index <HASH>..<HASH> 100644
--- a/docs/source/conf.py
+++ b/docs/source/conf.py
@@ -27,7 +27,7 @@ author = "The Font Bakery Authors"
# The short X.Y version
version = "0.7"
# The full version, including alpha/beta/rc tags
-release = "0.7.28"
+release = "0.7.29"
# -- General configuration ---------------------------------------------------
@@ -192,7 +192,7 @@ def linkcode_resolve(domain, info):
# AND We can link to a tag i.e. a release tag. This is awesome:
# tag is: "v0.7.2"
# https://github.com/googlefonts/fontbakery/tree/v0.7.2/Lib/fontbakery/profiles
- tree = 'v0.7.28'
+ tree = 'v0.7.29'
# It's not planned for us to get the line number :-(
# I had to hammer this data into the info.
if 'lineno' in info: | update version on docs/source/conf.py |
diff --git a/spyder/utils/ipython/spyder_kernel.py b/spyder/utils/ipython/spyder_kernel.py
index <HASH>..<HASH> 100644
--- a/spyder/utils/ipython/spyder_kernel.py
+++ b/spyder/utils/ipython/spyder_kernel.py
@@ -11,6 +11,7 @@ Spyder kernel for Jupyter
# Standard library imports
import os
import os.path as osp
+import pickle
# Third-party imports
from ipykernel.datapub import publish_data
@@ -146,7 +147,16 @@ class SpyderKernel(IPythonKernel):
"""Get the value of a variable"""
ns = self._get_current_namespace()
value = ns[name]
- publish_data({'__spy_data__': value})
+ try:
+ publish_data({'__spy_data__': value})
+ except (pickle.PicklingError, pickle.PickleError):
+ # There is no need to inform users about these
+ # errors because they are the most common ones
+ value = None
+ except Exception as e:
+ value = e
+ finally:
+ publish_data({'__spy_data__': value})
def set_value(self, name, value):
"""Set the value of a variable""" | IPython console: Fix pickling errors on the kernel side |
diff --git a/test/test_helper.rb b/test/test_helper.rb
index <HASH>..<HASH> 100644
--- a/test/test_helper.rb
+++ b/test/test_helper.rb
@@ -43,7 +43,11 @@ class GeokitTestCase < ActiveSupport::TestCase
end
self.fixture_path = (PLUGIN_ROOT + 'test/fixtures').to_s
- self.use_transactional_fixtures = true
+ if Rails::VERSION::MAJOR >= 5
+ self.use_transactional_tests = true
+ else
+ self.use_transactional_fixtures = true
+ end
self.use_instantiated_fixtures = false
fixtures :all | Rails 5 has renamed `use_transactional_fixtures` into `use_transactional_tests`
cf <URL> |
diff --git a/src/components/TextArea/index.js b/src/components/TextArea/index.js
index <HASH>..<HASH> 100644
--- a/src/components/TextArea/index.js
+++ b/src/components/TextArea/index.js
@@ -128,7 +128,7 @@ export default class TextArea extends React.PureComponent<Props, State> {
hasValue={this.props.value.length > 0}
isFocused={this.state.isFocused}
disabled={this.props.disabled}
- hasError={this.props.error.length > 0}
+ hasError={this.props.error !== null}
color={this.props.color}
>
{this.props.label} | Fixed small error with the TextArea component |
diff --git a/bcbio/pipeline/shared.py b/bcbio/pipeline/shared.py
index <HASH>..<HASH> 100644
--- a/bcbio/pipeline/shared.py
+++ b/bcbio/pipeline/shared.py
@@ -132,7 +132,7 @@ def _subset_bed_by_region(in_file, out_file, region):
else:
x.end += 1
return x
- orig_bed.intersect(region_bed).each(_ensure_minsize).saveas(out_file)
+ orig_bed.intersect(region_bed).each(_ensure_minsize).merge().saveas(out_file)
def subset_variant_regions(variant_regions, region, out_file):
"""Return BED file subset by a specified chromosome region. | Ensure subset BED files feeding into variant calling are merged to prevent duplicate features. #<I> #<I> |
diff --git a/menu.js b/menu.js
index <HASH>..<HASH> 100644
--- a/menu.js
+++ b/menu.js
@@ -45,7 +45,7 @@ function moveTo(el, list, i) {
}
module.exports = function (list) {
- var menu = h('ul')
+ var menu = h('div.row.hypertabs__tabs')
function tab_button (el, onclick) {
var link = h('a', {href: '#', onclick: function (ev) {
@@ -64,7 +64,7 @@ module.exports = function (list) {
menu.removeChild(wrap)
}}, 'x')
- var wrap = h('li', link, rm)
+ var wrap = h('div.hypertabs__tab', link, rm)
function isSelected () {
if(displayable(el)) | use classes which are compatible with v1 |
diff --git a/lib/generate.js b/lib/generate.js
index <HASH>..<HASH> 100644
--- a/lib/generate.js
+++ b/lib/generate.js
@@ -11,15 +11,28 @@ function dedentFunc(func) {
return [lines[0].replace(/^\s+|\s+$/g, '')];
}
- var match = /^\s*/.exec(lines[lines.length-1]);
- var indent = match[0];
- return lines
- .map(function dedent(line) {
- if (line.slice(0, indent.length) === indent) {
- return line.slice(indent.length);
+ var indent = null;
+ var tail = lines.slice(1);
+ for (var i = 0; i < tail.length; i++) {
+ var match = /^\s+/.exec(tail[i]);
+ if (match) {
+ if (indent === null ||
+ match[0].length < indent.length) {
+ indent = match[0];
}
- return line;
- });
+ }
+ }
+
+ if (indent === null) {
+ return lines;
+ }
+
+ return lines.map(function dedent(line) {
+ if (line.slice(0, indent.length) === indent) {
+ return line.slice(indent.length);
+ }
+ return line;
+ });
}
function serializeSymbol(s) { | lib/generate: generalize dedentFunc
Take take the min indent after the first line; now only has edge cases
if we see mixed tabs and spaces in the input. |
diff --git a/bosh-director/lib/bosh/director/agent_client.rb b/bosh-director/lib/bosh/director/agent_client.rb
index <HASH>..<HASH> 100644
--- a/bosh-director/lib/bosh/director/agent_client.rb
+++ b/bosh-director/lib/bosh/director/agent_client.rb
@@ -236,7 +236,15 @@ module Bosh::Director
end
def send_long_running_message(method_name, *args, &blk)
- task = AgentMessageConverter.convert_old_message_to_new(send_message(method_name, *args))
+ task = send_start_long_running_task_message(method_name, *args)
+ track_long_running_task(task, &blk)
+ end
+
+ def send_start_long_running_task_message(method_name, *args)
+ AgentMessageConverter.convert_old_message_to_new(send_message(method_name, *args))
+ end
+
+ def track_long_running_task(task, &blk)
while task['state'] == 'running'
blk.call if block_given?
sleep(DEFAULT_POLL_INTERVAL) | Separate task start and task polling in agent client. |
diff --git a/tests/lib/IframeApi.spec.js b/tests/lib/IframeApi.spec.js
index <HASH>..<HASH> 100644
--- a/tests/lib/IframeApi.spec.js
+++ b/tests/lib/IframeApi.spec.js
@@ -92,7 +92,7 @@ describe('IframeApi', () => {
const ids = (await KeyStore.instance.list()).map(record => record.id);
for (let id of ids) {
const keyRecord = await KeyStore.instance._get(id);
- const expectedKeyRecord = /** @type {StoredKeyRecord} */(Dummy.storedKeyRecords().find(x => x.id === id));
+ const expectedKeyRecord = /** @type {StoredKeyRecord} */(Dummy.storedKeyRecords().find(record => record.id === id));
expect(keyRecord).toEqual(expectedKeyRecord);
} | Update tests/lib/IframeApi.spec.js |
diff --git a/lib/did_you_mean/finders.rb b/lib/did_you_mean/finders.rb
index <HASH>..<HASH> 100644
--- a/lib/did_you_mean/finders.rb
+++ b/lib/did_you_mean/finders.rb
@@ -10,6 +10,10 @@ module DidYouMean
def suggestions
@suggestions ||= searches.flat_map {|_, __| WordCollection.new(__).similar_to(_, FILTER) }
end
+
+ def searches
+ raise NotImplementedError
+ end
end
class NullFinder | Add a method that should be implemented |
diff --git a/GPy/inference/latent_function_inference/var_dtc.py b/GPy/inference/latent_function_inference/var_dtc.py
index <HASH>..<HASH> 100644
--- a/GPy/inference/latent_function_inference/var_dtc.py
+++ b/GPy/inference/latent_function_inference/var_dtc.py
@@ -142,8 +142,7 @@ class VarDTC(LatentFunctionInference):
Cpsi1Vf, _ = dtrtrs(Lm, tmp, lower=1, trans=1)
# data fit and derivative of L w.r.t. Kmm
- dL_dm = -np.dot((_LBi_Lmi_psi1.T.dot(_LBi_Lmi_psi1))
- - np.eye(Y.shape[0]), VVT_factor)
+ dL_dm = -_LBi_Lmi_psi1.T.dot(_LBi_Lmi_psi1.dot(VVT_factor)) + VVT_factor
delit = tdot(_LBi_Lmi_psi1Vf)
data_fit = np.trace(delit) | fix: reorder brackets to avoid an n^2 array |
diff --git a/blitzdb/backends/mongo/backend.py b/blitzdb/backends/mongo/backend.py
index <HASH>..<HASH> 100644
--- a/blitzdb/backends/mongo/backend.py
+++ b/blitzdb/backends/mongo/backend.py
@@ -166,6 +166,7 @@ class Backend(BaseBackend):
def _exists(obj, key):
value = obj
for elem in key.split("."):
+ print elem
if isinstance(value, list):
try:
value = value[int(elem)]
@@ -176,7 +177,7 @@ class Backend(BaseBackend):
value = value[elem]
except:
return False
- return value
+ return True
def _set(obj, key,new_value):
value = obj | Fixed bug in _exists function. |
diff --git a/lib/kete_gets_trollied.rb b/lib/kete_gets_trollied.rb
index <HASH>..<HASH> 100644
--- a/lib/kete_gets_trollied.rb
+++ b/lib/kete_gets_trollied.rb
@@ -0,0 +1,4 @@
+require 'kete_gets_trollied/has_trolley_controller_helpers_overrides'
+require 'kete_gets_trollied/orders_helper_overrides'
+require 'kete_gets_trollied/line_items_helper_overrides'
+require 'kete_gets_trollied/user_order_notifications' | adding explicit requirements of some modules for overrides, etc. |
diff --git a/src/network/NetworkMonitor.js b/src/network/NetworkMonitor.js
index <HASH>..<HASH> 100644
--- a/src/network/NetworkMonitor.js
+++ b/src/network/NetworkMonitor.js
@@ -1,11 +1,15 @@
"use strict";
+const EventEmitter = require('eventemitter3');
+
/**
+ * Measures network performance between the client and the server
* Represents both the client and server portions of NetworkMonitor
*/
-class NetworkMonitor {
+class NetworkMonitor extends EventEmitter{
constructor() {
+ super();
}
// client
@@ -36,6 +40,10 @@ class NetworkMonitor {
this.movingRTTAverageFrame.shift();
}
this.movingRTTAverage = this.movingRTTAverageFrame.reduce((a,b) => a + b) / this.movingRTTAverageFrame.length;
+ this.emit('RTTUpdate',{
+ RTT: RTT,
+ RTTAverage: this.movingRTTAverage
+ })
}
// server | NetworkMonitor: extend EventEmitter, emit on RTTUpdate |
diff --git a/vendor/plugins/refinery_settings/app/models/refinery_setting.rb b/vendor/plugins/refinery_settings/app/models/refinery_setting.rb
index <HASH>..<HASH> 100644
--- a/vendor/plugins/refinery_settings/app/models/refinery_setting.rb
+++ b/vendor/plugins/refinery_settings/app/models/refinery_setting.rb
@@ -53,13 +53,13 @@ class RefinerySetting < ActiveRecord::Base
def self.find_or_set(name, the_value, options={})
# Try to get the value from cache first.
scoping = options[:scoping]
- required = options[:required]
+ restricted = options[:restricted]
if (value = cache_read(name, scoping)).nil?
# if the database is not up to date yet then it won't know about scoping..
if self.column_names.include?('scoping')
- setting = find_or_create_by_name_and_scoping(:name => name.to_s, :value => the_value, :scoping => scoping, :required => required)
+ setting = find_or_create_by_name_and_scoping(:name => name.to_s, :value => the_value, :scoping => scoping, :restricted => restricted)
else
- setting = find_or_create_by_name(:name => name.to_s, :value => the_value, :required => required)
+ setting = find_or_create_by_name(:name => name.to_s, :value => the_value, :required => restricted)
end
# cache whatever we found including its scope in the name, even if it's nil. | Required is not the same as Restricted, not the same at all. Restricted is the correct answer however. |
diff --git a/account/forms.py b/account/forms.py
index <HASH>..<HASH> 100644
--- a/account/forms.py
+++ b/account/forms.py
@@ -39,19 +39,15 @@ class SignupForm(forms.Form):
def clean_username(self):
if not alnum_re.search(self.cleaned_data["username"]):
raise forms.ValidationError(_("Usernames can only contain letters, numbers and underscores."))
- try:
- User.objects.get(username__iexact=self.cleaned_data["username"])
- except User.DoesNotExist:
+ qs = User.objects.filter(username__iexact=self.cleaned_data["username"])
+ if not qs.exists():
return self.cleaned_data["username"]
raise forms.ValidationError(_("This username is already taken. Please choose another."))
def clean_email(self):
value = self.cleaned_data["email"]
- try:
- EmailAddress.objects.get(email__iexact=value)
- except EmailAddress.DoesNotExist:
- return value
- if not settings.ACCOUNT_EMAIL_UNIQUE:
+ qs = EmailAddress.objects.filter(email__iexact=value)
+ if not qs.exists() or not settings.ACCOUNT_EMAIL_UNIQUE:
return value
raise forms.ValidationError(_("A user is registered with this email address.")) | changed to use exists in SignupForm |
diff --git a/test/test_execute.py b/test/test_execute.py
index <HASH>..<HASH> 100644
--- a/test/test_execute.py
+++ b/test/test_execute.py
@@ -212,7 +212,19 @@ processed.append((_par, _res))
wf = script.workflow()
Sequential_Executor(wf).inspect()
self.assertEqual(env.sos_dict['processed'], [((1, 2), 'p1.txt'), ((1, 3), 'p2.txt'), ((2, 3), 'p3.txt')])
+ #
+ # test for each for pandas dataframe
+ script = SoS_Script(r"""
+[0: alias='res']
+import pandas as pd
+data = pd.DataFrame([(1, 2, 'Hello'), (2, 4, 'World')], columns=['A', 'B', 'C'])
+input: for_each='data'
+output: '${_data["A"]}_${_data["B"]}_${_data["C"]}.txt'
+""")
+ wf = script.workflow()
+ Sequential_Executor(wf).inspect()
+ self.assertEqual(env.sos_dict['res'].output, ['1_2_Hello.txt', '2_4_World.txt'])
def testPairedWith(self):
'''Test option paired_with ''' | Test for_each looping through pandas dataframe |
diff --git a/prospector/tools/pep8/__init__.py b/prospector/tools/pep8/__init__.py
index <HASH>..<HASH> 100644
--- a/prospector/tools/pep8/__init__.py
+++ b/prospector/tools/pep8/__init__.py
@@ -125,7 +125,7 @@ class Pep8Tool(ToolBase):
# Make sure pep8's code ignores are fully reset to zero before
# adding prospector-flavoured configuration.
# pylint: disable=W0201
- self.checker.select = ()
+ self.checker.options.select = ()
self.checker.options.ignore = tuple(prospector_config.get_disabled_messages('pep8'))
if 'max-line-length' in prospector_config.tool_options('pep8'): | Forgot to fix the select option. |
diff --git a/lib/dm-core/resource.rb b/lib/dm-core/resource.rb
index <HASH>..<HASH> 100644
--- a/lib/dm-core/resource.rb
+++ b/lib/dm-core/resource.rb
@@ -840,7 +840,7 @@ module DataMapper
# true if the resource was successfully saved
#
# @api semipublic
- def save_self(safe)
+ def save_self(safe = true)
if safe
new? ? create_hook : update_hook
else | Make safe the default if people call save_self directly |
diff --git a/django_cron/management/commands/runcrons.py b/django_cron/management/commands/runcrons.py
index <HASH>..<HASH> 100644
--- a/django_cron/management/commands/runcrons.py
+++ b/django_cron/management/commands/runcrons.py
@@ -11,6 +11,7 @@ try:
except ImportError:
# timezone added in Django 1.4
from django_cron import timezone
+from django.db import close_connection
DEFAULT_LOCK_TIME = 24 * 60 * 60 # 24 hours
@@ -55,6 +56,7 @@ class Command(BaseCommand):
for cron_class in crons_to_run:
run_cron_with_cache_check(cron_class, force=options['force'],
silent=options['silent'])
+ close_connection()
def run_cron_with_cache_check(cron_class, force=False, silent=False): | We should force database connection close, because django wont closeing it by itself |
diff --git a/trustar/TruStar.py b/trustar/TruStar.py
index <HASH>..<HASH> 100644
--- a/trustar/TruStar.py
+++ b/trustar/TruStar.py
@@ -58,23 +58,29 @@ class TruStar(object):
Attempt to convert a string timestamp in to a TruSTAR compatible format for submission.
Will return current time with UTC time zone if None
:param date_time: int that is epoch time, or string/datetime object containing date, time, and ideally timezone
+ examples of supported timestamp formats: 1487890914, 1487890914000, "2017-02-23T23:01:54", "2017-02-23T23:01:54+0000"
"""
try:
+ # identify type of timestamp and convert to datetime object
if isinstance(date_time, int):
- # converts epoch int ms to datetime object in s
datetime_dt = datetime.fromtimestamp(date_time)
elif isinstance(date_time, str):
datetime_dt = dateutil.parser.parse(date_time)
elif isinstance(date_time, datetime):
datetime_dt = date_time
+
+ # if timestamp is none of the formats above, error message is printed and timestamp is set to current time by default
except Exception as e:
print(e)
datetime_dt = datetime.now()
+ # if timestamp is timezone naive, add timezone
if not datetime_dt.tzinfo:
timezone = get_localzone()
+
# add system timezone
datetime_dt = timezone.localize(datetime_dt)
+
# convert to UTC
datetime_dt = datetime_dt.astimezone(pytz.utc) | Add javadoc comments to normalize_timestamp in TruStar |
diff --git a/bt/backtest.py b/bt/backtest.py
index <HASH>..<HASH> 100644
--- a/bt/backtest.py
+++ b/bt/backtest.py
@@ -70,14 +70,18 @@ class Backtest(object):
else:
# get values for all securities in tree and divide by root values
# for security weights
- vals = pd.DataFrame({x.name: x.values for x in
- self.strategy.members if
- isinstance(x, bt.core.SecurityBase)})
+ vals = {}
+ for m in self.strategy.members:
+ if isinstance(m, bt.core.SecurityBase):
+ if m.name in vals:
+ vals[m.name] += m.values
+ else:
+ vals[m.name] = m.values
+ vals = pd.DataFrame(vals)
+
+ # divide by root strategy values
vals = vals.div(self.strategy.values, axis=0)
- # combine securities with same ticker
- vals = vals.groupby(vals.columns, axis=1).sum()
-
# save for future use
self._sweights = vals | fixed bug in calc of security weights |
diff --git a/actionpack/lib/action_controller/deprecated/base.rb b/actionpack/lib/action_controller/deprecated/base.rb
index <HASH>..<HASH> 100644
--- a/actionpack/lib/action_controller/deprecated/base.rb
+++ b/actionpack/lib/action_controller/deprecated/base.rb
@@ -154,7 +154,6 @@ module ActionController
deprecated_config_accessor :helpers_path
deprecated_config_accessor :javascripts_dir
deprecated_config_accessor :page_cache_directory
- deprecated_config_accessor :page_cache_extension
deprecated_config_accessor :protected_instance_variables
deprecated_config_accessor :relative_url_root, "relative_url_root is ineffective. Please stop using it"
deprecated_config_accessor :stylesheets_dir | page_cache_extension is delegating to config so no need to deprecate |
diff --git a/pydoop/hadoop_utils.py b/pydoop/hadoop_utils.py
index <HASH>..<HASH> 100644
--- a/pydoop/hadoop_utils.py
+++ b/pydoop/hadoop_utils.py
@@ -319,11 +319,17 @@ class HadoopVersion(object):
def is_exe(fpath):
- return os.path.exists(fpath) and os.access(fpath, os.X_OK)
+ """
+ Path references an executable file.
+ """
+ return os.path.isfile(fpath) and os.access(fpath, os.X_OK)
def is_readable(fpath):
- return os.path.exists(fpath) and os.access(fpath, os.R_OK)
+ """
+ Path references a readable file.
+ """
+ return os.path.isfile(fpath) and os.access(fpath, os.R_OK)
def extract_text(node): | Test specifically for executable/readable *files* |
diff --git a/src/build/intro.js b/src/build/intro.js
index <HASH>..<HASH> 100644
--- a/src/build/intro.js
+++ b/src/build/intro.js
@@ -1,4 +1,4 @@
-/*!
+/**
* CLDR JavaScript Library v@VERSION
* http://jquery.com/
*
@@ -8,6 +8,10 @@
*
* Date: @DATE
*/
+/*!
+ * CLDR JavaScript Library v@VERSION @DATE MIT license © Rafael Xavier
+ * http://git.io/h4lmVg
+ */
(function( root, factory ) {
if ( typeof define === "function" && define.amd ) {
diff --git a/src/build/intro.min.js b/src/build/intro.min.js
index <HASH>..<HASH> 100644
--- a/src/build/intro.min.js
+++ b/src/build/intro.min.js
@@ -1,4 +1,4 @@
/*!
- * CLDR JavaScript Library v@VERSION @DATE Released under the MIT license
+ * CLDR JavaScript Library v@VERSION @DATE MIT license © Rafael Xavier
* http://git.io/h4lmVg
*/ | Minor fix
- Make minified intro comment resistent to minification only. Full intro comment
should be allowed to be removed on third-party code minification;
- Update minified intro license information; |
diff --git a/lib/lita/rspec/handler.rb b/lib/lita/rspec/handler.rb
index <HASH>..<HASH> 100644
--- a/lib/lita/rspec/handler.rb
+++ b/lib/lita/rspec/handler.rb
@@ -62,14 +62,14 @@ module Lita
end
def to(route)
- @context.allow(Authorization).to @context.receive(
- :user_in_group?
- ).and_return(true)
- @context.expect_any_instance_of(
- @context.described_class
- ).public_send(@method, @context.receive(route))
+ m = @method
+ b = @message_body
- @context.send_message(@message_body)
+ @context.instance_eval do
+ allow(Authorization).to receive(:user_in_group?).and_return(true)
+ expect_any_instance_of(described_class).public_send(m, receive(route))
+ send_message(b)
+ end
end
end
end | Use #instance_eval to make RouteMatcher#to more readable. |
diff --git a/hamster/widgets/__init__.py b/hamster/widgets/__init__.py
index <HASH>..<HASH> 100644
--- a/hamster/widgets/__init__.py
+++ b/hamster/widgets/__init__.py
@@ -35,6 +35,8 @@ from tags import TagCellRenderer
from reportchooserdialog import ReportChooserDialog
+from facttree import FactTree
+
# handy wrappers
def add_hint(entry, hint):
entry.hint = hint | moved the fact tree out to a widget |
diff --git a/pyof/v0x01/asynchronous/packet_in.py b/pyof/v0x01/asynchronous/packet_in.py
index <HASH>..<HASH> 100644
--- a/pyof/v0x01/asynchronous/packet_in.py
+++ b/pyof/v0x01/asynchronous/packet_in.py
@@ -19,9 +19,9 @@ class PacketInReason(enum.Enum):
"""Reason why this packet is being sent to the controller."""
#: No matching flow
- OFPR_NO_MATCH = 1
+ OFPR_NO_MATCH = 0
#: Action explicitly output to controller
- OFPR_ACTION = 2
+ OFPR_ACTION = 1
# Classes | Fixing PacketInReason Enumeration to start at '0' |
diff --git a/scout_apm/core_agent_manager.py b/scout_apm/core_agent_manager.py
index <HASH>..<HASH> 100644
--- a/scout_apm/core_agent_manager.py
+++ b/scout_apm/core_agent_manager.py
@@ -138,7 +138,7 @@ class CoreAgentDownloader():
full_url=self.full_url(),
filepath=self.package_location))
req = requests.get(self.full_url(), stream=True)
- with open(self.package_location) as f:
+ with open(self.package_location, 'wb') as f:
for chunk in req.iter_content(1024 * 1000):
f.write(chunk) | Open the download path of core agent as "wb" |
diff --git a/bitmap/bitmap.go b/bitmap/bitmap.go
index <HASH>..<HASH> 100644
--- a/bitmap/bitmap.go
+++ b/bitmap/bitmap.go
@@ -79,7 +79,7 @@ func (me *Bitmap) AddRange(begin, end int) {
if begin >= end {
return
}
- me.lazyRB().AddRange(uint32(begin), uint32(end))
+ me.lazyRB().AddRange(uint64(begin), uint64(end))
}
func (me *Bitmap) Remove(i int) {
@@ -174,6 +174,6 @@ func (me *Bitmap) RemoveRange(begin, end int) *Bitmap {
if me.rb == nil {
return me
}
- me.rb.RemoveRange(uint32(begin), uint32(end))
+ me.rb.RemoveRange(uint64(begin), uint64(end))
return me
} | bitmap: RoaringBitmap has moved to uint<I> |
diff --git a/lib/stax/mixin/ecs.rb b/lib/stax/mixin/ecs.rb
index <HASH>..<HASH> 100644
--- a/lib/stax/mixin/ecs.rb
+++ b/lib/stax/mixin/ecs.rb
@@ -133,16 +133,15 @@ module Stax
def containers
my.ecs_services.each do |s|
Aws::Ecs.tasks(service_name: s.physical_resource_id, desired_status: options[:status].upcase).each do |t|
- task = t.task_arn.split('/').last
- taskdef = t.task_definition_arn.split('/').last
- debug("Containers for task #{task} #{taskdef}")
+ task = t.task_arn.split('/').last
+ debug("Containers for task #{task}")
print_table t.containers.map { |c|
[
c.name,
c.container_arn.split('/').last,
color(c.last_status, COLORS),
c.network_interfaces.map(&:private_ipv_4_address).join(','),
- taskdef,
+ t.task_definition_arn.split('/').last,
c.exit_code,
c.reason,
] | do not need to double-up taskdef in output |
diff --git a/src/Cookie.php b/src/Cookie.php
index <HASH>..<HASH> 100644
--- a/src/Cookie.php
+++ b/src/Cookie.php
@@ -329,8 +329,11 @@ final class Cookie {
$headerStr .= '; expires='.$expiryTimeStr;
}
- if (!is_null($maxAgeStr)) {
- $headerStr .= '; Max-Age='.$maxAgeStr;
+ // The `Max-Age` property is supported on PHP 5.5+ only (https://bugs.php.net/bug.php?id=23955).
+ if (\PHP_VERSION_ID >= 50500) {
+ if (!is_null($maxAgeStr)) {
+ $headerStr .= '; Max-Age='.$maxAgeStr;
+ }
}
if (!empty($path) || $path === 0) { | Output the 'Max-Age' property on PHP <I>+ only |
diff --git a/pmagpy/validate_upload3.py b/pmagpy/validate_upload3.py
index <HASH>..<HASH> 100644
--- a/pmagpy/validate_upload3.py
+++ b/pmagpy/validate_upload3.py
@@ -174,7 +174,7 @@ def cv(row, col_name, arg, current_data_model, df, con):
cell_values = cell_value.split(":")
cell_values = [c.strip() for c in cell_values]
for value in cell_values:
- if str(value).lower() in [str(v).lower() for v in vocabulary[col_name]]:
+ if str(value).lower() in [str(v.encode('utf-8')).lower() for v in vocabulary[col_name]]:
continue
elif value.lower() == "none":
continue | deal appropriately with unicode encoding errors with non utf-8 characters in controlled vocabularies |
diff --git a/python_modules/libraries/dagster-aws/setup.py b/python_modules/libraries/dagster-aws/setup.py
index <HASH>..<HASH> 100644
--- a/python_modules/libraries/dagster-aws/setup.py
+++ b/python_modules/libraries/dagster-aws/setup.py
@@ -42,7 +42,11 @@ if __name__ == "__main__":
extras_require={
"redshift": ["psycopg2-binary"],
"pyspark": ["dagster-pyspark"],
- "test": ["moto>=2.2.8", "requests-mock"],
+ "test": [
+ "moto>=2.2.8",
+ "requests-mock",
+ "xmltodict==0.12.0", # pinned until moto>=3.1.9 (https://github.com/spulec/moto/issues/5112)
+ ],
},
zip_safe=False,
) | pin xmltodict to fix aws test failures, until moto <I> (#<I>)
* pin xmltodict to fix aws test failures, until moto <I>
* add comment |
diff --git a/custodia/httpd/server.py b/custodia/httpd/server.py
index <HASH>..<HASH> 100644
--- a/custodia/httpd/server.py
+++ b/custodia/httpd/server.py
@@ -245,6 +245,7 @@ class HTTPRequestHandler(BaseHTTPRequestHandler):
'version': self.request_version,
'headers': self.headers,
'body': self.body}
+ logger.debug("REQUEST: %r", request)
try:
response = self.pipeline(self.server.config, request)
if response is None: | Add incoming requests to debug log |
diff --git a/lib/moodlelib.php b/lib/moodlelib.php
index <HASH>..<HASH> 100644
--- a/lib/moodlelib.php
+++ b/lib/moodlelib.php
@@ -1610,6 +1610,9 @@ function clean_filename($string) {
$string = eregi_replace("\.\.", "", $string);
$string = eregi_replace("[^(-|[:alnum:]|\.)]", "_", $string);
$string = eregi_replace(",", "_", $string);
+ $string = eregi_replace("/", "_", $string);
+ $string = eregi_replace("\(", "_", $string);
+ $string = eregi_replace("\)", "_", $string);
return eregi_replace("_+", "_", $string);
} | Modified the clean_filename() function to strip parenthesis and slashes.
Not really sure if the method used is <I>% correct ot no so, if you can
check it....
Perhpas I should make the stripping in backup process, istead of using this
central function. What do you think? |
diff --git a/handler/src/main/java/io/netty/handler/ssl/SslHandler.java b/handler/src/main/java/io/netty/handler/ssl/SslHandler.java
index <HASH>..<HASH> 100644
--- a/handler/src/main/java/io/netty/handler/ssl/SslHandler.java
+++ b/handler/src/main/java/io/netty/handler/ssl/SslHandler.java
@@ -432,14 +432,20 @@ public class SslHandler extends ByteToMessageDecoder implements ChannelOutboundH
/**
* Sends an SSL {@code close_notify} message to the specified channel and
* destroys the underlying {@link SSLEngine}.
+ *
+ * @deprecated use {@link Channel#close()} or {@link ChannelHandlerContext#close()}
*/
+ @Deprecated
public ChannelFuture close() {
return close(ctx.newPromise());
}
/**
* See {@link #close()}
+ *
+ * @deprecated use {@link Channel#close()} or {@link ChannelHandlerContext#close()}
*/
+ @Deprecated
public ChannelFuture close(final ChannelPromise promise) {
final ChannelHandlerContext ctx = this.ctx;
ctx.executor().execute(new Runnable() { | Deprecate methods on SslHandler that have other replacements
Motivation:
SslHandler has multiple methods which have better replacements now or are obsolete. We should mark these as `@Deprecated`.
Modifications:
Mark methods as deprecated.
Result:
API cleanup preparation. |
diff --git a/spyderlib/utils/introspection/base.py b/spyderlib/utils/introspection/base.py
index <HASH>..<HASH> 100644
--- a/spyderlib/utils/introspection/base.py
+++ b/spyderlib/utils/introspection/base.py
@@ -7,6 +7,7 @@
"""
Introspection utilities used by Spyder
"""
+
from __future__ import print_function
import imp
import os
@@ -14,7 +15,6 @@ import os.path as osp
import re
import time
import functools
-from collections import OrderedDict
from spyderlib.baseconfig import DEBUG, get_conf_path, debug_print
from spyderlib.py3compat import PY2
@@ -61,7 +61,7 @@ def memoize(obj):
See https://wiki.python.org/moin/PythonDecoratorLibrary#Memoize
"""
- cache = obj.cache = OrderedDict()
+ cache = obj.cache = {}
@functools.wraps(obj)
def memoizer(*args, **kwargs): | Python <I> compatibility: Remove usage of OrderedDict (it was added in <I>) |
diff --git a/kappa/context.py b/kappa/context.py
index <HASH>..<HASH> 100644
--- a/kappa/context.py
+++ b/kappa/context.py
@@ -35,7 +35,7 @@ import placebo
LOG = logging.getLogger(__name__)
DebugFmtString = '%(asctime)s - %(name)s - %(levelname)s - %(message)s'
-InfoFmtString = '...%(message)s'
+InfoFmtString = '-> %(message)s'
class Context(object): | Make output look a little nicer |
diff --git a/spyder/widgets/variableexplorer/collectionseditor.py b/spyder/widgets/variableexplorer/collectionseditor.py
index <HASH>..<HASH> 100644
--- a/spyder/widgets/variableexplorer/collectionseditor.py
+++ b/spyder/widgets/variableexplorer/collectionseditor.py
@@ -1421,8 +1421,13 @@ class CollectionsEditor(QDialog):
self.setWindowTitle(self.widget.get_title())
if icon is None:
self.setWindowIcon(ima.icon('dictedit'))
- # Make the dialog act as a window
- self.setWindowFlags(Qt.Window)
+
+ if sys.platform == 'darwin':
+ # See: https://github.com/spyder-ide/spyder/issues/9051
+ self.setWindowFlags(Qt.Tool)
+ else:
+ # Make the dialog act as a window
+ self.setWindowFlags(Qt.Window)
@Slot()
def save_and_close_enable(self): | Make several varexp editors stay on top |
diff --git a/rtbhouse_sdk/reports_api.py b/rtbhouse_sdk/reports_api.py
index <HASH>..<HASH> 100644
--- a/rtbhouse_sdk/reports_api.py
+++ b/rtbhouse_sdk/reports_api.py
@@ -106,14 +106,11 @@ class ReportsApiSession:
raise ReportsApiException('Invalid response format')
def _get_from_cursor(self, path, params=None):
- params = (params or {}).copy()
- params['limit'] = MAX_CURSOR_ROWS_LIMIT
- res = self._get(path, params=params)
+ res = self._get(path, params={**params, 'limit': MAX_CURSOR_ROWS_LIMIT })
rows = res['rows']
while res['nextCursor']:
- params['nextCursor'] = res['nextCursor']
- res = self._get(path, params=params)
+ res = self._get(path, params={ 'nextCursor': res['nextCursor'], 'limit': MAX_CURSOR_ROWS_LIMIT })
rows.extend(res['rows'])
return rows | Updated SDK to reflect changes in api (#8) |
diff --git a/lib/classes/plugin_manager.php b/lib/classes/plugin_manager.php
index <HASH>..<HASH> 100644
--- a/lib/classes/plugin_manager.php
+++ b/lib/classes/plugin_manager.php
@@ -654,6 +654,10 @@ class core_plugin_manager {
return 'git';
}
+ if (is_file($pluginroot.'/.git')) {
+ return 'git-submodule';
+ }
+
if (is_dir($pluginroot.'/CVS')) {
return 'cvs';
}
diff --git a/lib/classes/update/deployer.php b/lib/classes/update/deployer.php
index <HASH>..<HASH> 100644
--- a/lib/classes/update/deployer.php
+++ b/lib/classes/update/deployer.php
@@ -181,6 +181,10 @@ class deployer {
return 'git';
}
+ if (is_file($pluginroot.'/.git')) {
+ return 'git-submodule';
+ }
+
if (is_dir($pluginroot.'/CVS')) {
return 'cvs';
} | MDL-<I> admin: Check if the plugin is a git submodule on uninstalling
Credit goes to PJ King. I was trying to add unit tests for this new
behaviour but it turned out there are many hard-coded dependencies and
it's not easy to make the whole machinery support alternative location
of testable (fake) plugins. |
diff --git a/lib/database/index.js b/lib/database/index.js
index <HASH>..<HASH> 100644
--- a/lib/database/index.js
+++ b/lib/database/index.js
@@ -79,7 +79,7 @@ exports.checkExternalCouch = function (couch_url, callback) {
return /^welcome/i.test(prop)
})
- if (vendor !== 'couchdb' || vendor !== 'express-pouchdb') {
+ if (vendor !== 'couchdb' && vendor !== 'express-pouchdb') {
log.warn(
'database',
'You are not running an official CouchDB distribution, ' + | fix(database): correctly detect untested vendors
* * *
This commit was sponsored by The Hoodie Firm.
You can hire The Hoodie Firm:
<URL> |
diff --git a/cmd/juju/application/addunit.go b/cmd/juju/application/addunit.go
index <HASH>..<HASH> 100644
--- a/cmd/juju/application/addunit.go
+++ b/cmd/juju/application/addunit.go
@@ -51,7 +51,7 @@ Add two units of mysql to existing machines 3 and 4:
juju add-unit mysql -n 2 --to 3,4
-Add three units of mysql, one to machine 7 and the others to new
+Add three units of mysql, one to machine 3 and the others to new
machines:
juju add-unit mysql -n 3 --to 3 | One patch did not belong in develop. |
diff --git a/tests/TestCase/View/Helper/UrlHelperTest.php b/tests/TestCase/View/Helper/UrlHelperTest.php
index <HASH>..<HASH> 100644
--- a/tests/TestCase/View/Helper/UrlHelperTest.php
+++ b/tests/TestCase/View/Helper/UrlHelperTest.php
@@ -343,6 +343,19 @@ class UrlHelperTest extends TestCase
}
/**
+ * Test image with `Asset.timestamp` = force
+ *
+ * @return void
+ */
+ public function testImageTimestampForce()
+ {
+ Configure::write('Asset.timestamp', 'force');
+
+ $result = $this->Helper->image('cake.icon.png');
+ $this->assertRegExp('/' . preg_quote('img/cake.icon.png?', '/') . '[0-9]+/', $result);
+ }
+
+ /**
* test css
*
* @return void | Check if a generated image url has a timestamp when `Asset.timestamp` = force. |
diff --git a/notification/notification.class.inc.php b/notification/notification.class.inc.php
index <HASH>..<HASH> 100644
--- a/notification/notification.class.inc.php
+++ b/notification/notification.class.inc.php
@@ -48,6 +48,16 @@ class PodioNotificationAPI {
return json_decode($response->getBody(), TRUE);
}
}
+
+ /**
+ * Returns the number of unread notifications for the active user.
+ */
+ public function getNewCount() {
+ $response = $this->podio->request('/notification/inbox/new/count');
+ if ($response) {
+ return json_decode($response->getBody(), TRUE);
+ }
+ }
/**
* Returns the notifications in the inbox that has already been viewed. | Add method for getting new inbox count |
diff --git a/app/Module/IndividualFactsTabModule.php b/app/Module/IndividualFactsTabModule.php
index <HASH>..<HASH> 100644
--- a/app/Module/IndividualFactsTabModule.php
+++ b/app/Module/IndividualFactsTabModule.php
@@ -950,6 +950,6 @@ class IndividualFactsTabModule extends AbstractModule implements ModuleTabInterf
{
// We don't actually displaye these facts, but they are displayed
// outside the tabs/sidebar systems. This just forces them to be excluded here.
- return new Collection(['NAME', 'SEX']);
+ return new Collection(['NAME', 'SEX', 'OBJE']);
}
} | Fix: #<I> - level 1 media objects should not appear in the facts/events tab |
diff --git a/src/com/google/javascript/jscomp/ConformanceRules.java b/src/com/google/javascript/jscomp/ConformanceRules.java
index <HASH>..<HASH> 100644
--- a/src/com/google/javascript/jscomp/ConformanceRules.java
+++ b/src/com/google/javascript/jscomp/ConformanceRules.java
@@ -2147,7 +2147,7 @@ public final class ConformanceRules {
return Optional.absent();
}
JSType elementType = compiler.getTypeRegistry().getGlobalType("Element");
- if (type.isSubtypeOf(elementType)) {
+ if (elementType != null && type.isSubtypeOf(elementType)) {
return Optional.of(propertyName);
}
return Optional.absent(); | Fix crashes due to lack of typing info.
PiperOrigin-RevId: <I> |
diff --git a/src/Layer.js b/src/Layer.js
index <HASH>..<HASH> 100644
--- a/src/Layer.js
+++ b/src/Layer.js
@@ -159,15 +159,22 @@ export default class Layer {
addTo (map, beforeLayerID) {
// Manage errors, whether they are an Evented Error or a common Error
try {
- map.once('error', () => { this._waitForMapToLoad(map, beforeLayerID); });
+ map.once('error', (data) => {
+ console.warn(data.error.message);
+ this._waitForMapToLoad(map, beforeLayerID);
+ });
map.addLayer(this, beforeLayerID);
} catch (error) {
+ const STYLE_ERROR_REGEX = /Style is not done loading/;
+ if (!STYLE_ERROR_REGEX.test(error)) {
+ throw new CartoRuntimeError(`Error adding layer to map: ${error}`);
+ }
this._waitForMapToLoad(map, beforeLayerID);
}
}
_waitForMapToLoad (map, beforeLayerID) {
- map.once('load', () => {
+ map.on('load', () => {
map.addLayer(this, beforeLayerID);
});
} | Manage errors, evented or common type |
diff --git a/source/application/controllers/oxstart.php b/source/application/controllers/oxstart.php
index <HASH>..<HASH> 100644
--- a/source/application/controllers/oxstart.php
+++ b/source/application/controllers/oxstart.php
@@ -37,6 +37,8 @@ class oxStart extends oxUBase
if ( 'oxstart' == oxRegistry::getConfig()->getRequestParameter( 'cl' ) || $this->isAdmin() )
return;
+ $oProcessor = $this->_getServerNodeProcessor();
+ $oProcessor->process();
}
/** | ESDEV-<I> Save information about frontend servers so it could be used for license check.
Adding call of nodes processor to appInit. |
diff --git a/src/test/java/org/eluder/coveralls/maven/plugin/service/AppveyorTest.java b/src/test/java/org/eluder/coveralls/maven/plugin/service/AppveyorTest.java
index <HASH>..<HASH> 100755
--- a/src/test/java/org/eluder/coveralls/maven/plugin/service/AppveyorTest.java
+++ b/src/test/java/org/eluder/coveralls/maven/plugin/service/AppveyorTest.java
@@ -30,7 +30,6 @@ import org.junit.Test;
import java.util.HashMap;
import java.util.Map;
-import java.util.Properties;
import static org.junit.Assert.*;
@@ -83,4 +82,8 @@ public class AppveyorTest {
assertEquals("10", new Appveyor(env()).getPullRequest());
}
+ @Test
+ public void testGetJobId() {
+ assertEquals("54de3316c44f", new Appveyor(env()).getJobId());
+ }
} | Unit test for Appveyor job id. |
diff --git a/backends.py b/backends.py
index <HASH>..<HASH> 100644
--- a/backends.py
+++ b/backends.py
@@ -234,7 +234,7 @@ class TensorflowBackend(AbstractBackend):
def shape(self, x):
if self.tf.executing_eagerly():
- return x.shape
+ return list(int(d) for d in x.shape)
else:
return self.tf.unstack(self.tf.shape(x)) | fix for tf eager backend to make shape hashable |
diff --git a/seleniumbase/plugins/base_plugin.py b/seleniumbase/plugins/base_plugin.py
index <HASH>..<HASH> 100755
--- a/seleniumbase/plugins/base_plugin.py
+++ b/seleniumbase/plugins/base_plugin.py
@@ -100,13 +100,14 @@ class Base(Plugin):
error states, we want to make sure that they don't show up in
the nose output as errors.
"""
- self.__log_all_options_if_none_specified(test)
if (err[0] == errors.BlockedTest or
err[0] == errors.SkipTest or
err[0] == errors.DeprecatedTest):
print err[1].__str__().split('''-------------------- >> '''
'''begin captured logging'''
''' << --------------------''', 1)[0]
+ else:
+ self.__log_all_options_if_none_specified(test)
def handleError(self, test, err, capt=None):
""" | Don't log on fake error states such as SkipTest. |
diff --git a/src/widgets/current-refined-values/current-refined-values.js b/src/widgets/current-refined-values/current-refined-values.js
index <HASH>..<HASH> 100644
--- a/src/widgets/current-refined-values/current-refined-values.js
+++ b/src/widgets/current-refined-values/current-refined-values.js
@@ -168,6 +168,13 @@ currentRefinedValues({
* container: '#current-refined-values',
* clearAll: 'after',
* clearsQuery: true,
+ * attributes: [
+ * {name: 'free_shipping', label: 'Free shipping'},
+ * {name: 'price', label: 'Price'},
+ * {name: 'brand', label: 'Brand'},
+ * {name: 'category', label: 'Category'},
+ * ],
+ * onlyListedAttributes: true,
* })
* );
*/ | chore(showcase): Better config for current refinements |
diff --git a/gravity/process_manager/__init__.py b/gravity/process_manager/__init__.py
index <HASH>..<HASH> 100644
--- a/gravity/process_manager/__init__.py
+++ b/gravity/process_manager/__init__.py
@@ -106,9 +106,9 @@ class BaseProcessManager(object, metaclass=ABCMeta):
registered_instance_names = self.config_manager.get_registered_instances()
unknown_instance_names = []
if instance_names:
- for i, n in enumerate(instance_names):
+ for n in instance_names:
if n not in registered_instance_names:
- unknown_instance_names.append(instance_names.pop(i))
+ unknown_instance_names.append(n)
elif registered_instance_names:
instance_names = registered_instance_names
else: | Don't pop from passed in instance_names
We may be passing in tuples. Not sure which one is the bug, but not
manipulating passed in values wins by default for me. |
diff --git a/course/lib.php b/course/lib.php
index <HASH>..<HASH> 100644
--- a/course/lib.php
+++ b/course/lib.php
@@ -751,10 +751,10 @@ function print_course_admin_links($course, $width=180) {
$course->teachers = get_string("defaultcourseteachers");
}
$admindata[]="<a href=\"teacher.php?id=$course->id\">$course->teachers...</a>";
- $adminicon[]="<img src=\"$pixpath/i/settings.gif\" height=16 width=16 alt=\"\">";
+ $adminicon[]="<img src=\"$pixpath/i/users.gif\" height=16 width=16 alt=\"\">";
$admindata[]="<a href=\"student.php?id=$course->id\">$course->students...</a>";
- $adminicon[]="<img src=\"$pixpath/i/settings.gif\" height=16 width=16 alt=\"\">";
+ $adminicon[]="<img src=\"$pixpath/i/users.gif\" height=16 width=16 alt=\"\">";
$admindata[]="<a href=\"$CFG->wwwroot/backup/backup.php?id=$course->id\">".get_string("backup")."...</a>";
$adminicon[]="<img src=\"$pixpath/i/backup.gif\" height=16 width=16 alt=\"\">"; | Put user images on teacher and student links |
diff --git a/retrofit/src/main/java/retrofit/android/AndroidLog.java b/retrofit/src/main/java/retrofit/android/AndroidLog.java
index <HASH>..<HASH> 100644
--- a/retrofit/src/main/java/retrofit/android/AndroidLog.java
+++ b/retrofit/src/main/java/retrofit/android/AndroidLog.java
@@ -16,7 +16,15 @@ public class AndroidLog implements RestAdapter.Log {
@Override public void log(String message) {
for (int i = 0, len = message.length(); i < len; i += LOG_CHUNK_SIZE) {
int end = Math.min(len, i + LOG_CHUNK_SIZE);
- Log.d(tag, message.substring(i, end));
+ logChunk(message.substring(i, end));
}
}
+
+ public void logChunk(String chunk) {
+ Log.d(getTag(), chunk);
+ }
+
+ public String getTag() {
+ return tag;
+ }
} | AndroidLog: Added getTag() and logChunk() methods
… for easier subclassing. |
diff --git a/lib/sprockets/cached_environment.rb b/lib/sprockets/cached_environment.rb
index <HASH>..<HASH> 100644
--- a/lib/sprockets/cached_environment.rb
+++ b/lib/sprockets/cached_environment.rb
@@ -55,7 +55,7 @@ module Sprockets
def build_asset_hash(filename, bundle = true)
key = [
'asset-hash',
- self.digest.hexdigest,
+ self.digest.hexdigest, # FIXME: Avoid Env#digest
filename,
bundle,
file_hexdigest(filename), | Todo to avoid env digest for later |
diff --git a/test/setup.js b/test/setup.js
index <HASH>..<HASH> 100644
--- a/test/setup.js
+++ b/test/setup.js
@@ -24,6 +24,8 @@ before(function(done) {
e.browser.client = webdriverio.remote({
desiredCapabilities: {
+ browserName: 'chrome',
+ version: '42',
tunnelIdentifier: process.env.TRAVIS_JOB_NUMBER
},
host: 'ondemand.saucelabs.com', | Require latest version of Chrome stable to do tests due to incompatibilities. |
diff --git a/src/transports/file/__specs__/file.spec.js b/src/transports/file/__specs__/file.spec.js
index <HASH>..<HASH> 100644
--- a/src/transports/file/__specs__/file.spec.js
+++ b/src/transports/file/__specs__/file.spec.js
@@ -68,7 +68,7 @@ describe('transports/file/file', function () {
var testFile = new file.File(path.join(tmpDir.path, 'test.txt'));
testFile.writeLine('1'.repeat(4096));
- testFile.crop(8);
+ testFile.crop(7 + os.EOL.length);
expect(fs.readFileSync(testFile.path, 'utf8'))
.toEqual('[log cropped]' + os.EOL + '1111111' + os.EOL + os.EOL); | fix(file): Test on Windows |
diff --git a/activerecord/lib/active_record/reflection.rb b/activerecord/lib/active_record/reflection.rb
index <HASH>..<HASH> 100644
--- a/activerecord/lib/active_record/reflection.rb
+++ b/activerecord/lib/active_record/reflection.rb
@@ -153,6 +153,17 @@ module ActiveRecord
end
end
+ # Returns the AssociationReflection object specified in the <tt>:through</tt> option
+ # of a HasMantThrough or HasOneThrough association. Example:
+ #
+ # class Post < ActiveRecord::Base
+ # has_many :taggings
+ # has_many :tags, :through => :taggings
+ # end
+ #
+ # tags_reflection = Post.reflect_on_association(:tags)
+ # taggings_reflection = tags_reflection.through_reflection
+ #
def through_reflection
@through_reflection ||= options[:through] ? active_record.reflect_on_association(options[:through]) : false
end | doc: ActiveRecord::Reflection::AssociationReflection#through_reflection
Added documentation demonstrating the use of #through_reflection for
finding intervening reflection objects for HasManyThrough
and HasOneThrough. |
diff --git a/libraries/lithium/test/filter/Profiler.php b/libraries/lithium/test/filter/Profiler.php
index <HASH>..<HASH> 100644
--- a/libraries/lithium/test/filter/Profiler.php
+++ b/libraries/lithium/test/filter/Profiler.php
@@ -167,8 +167,8 @@ class Profiler extends \lithium\test\Filter {
}
if (!isset($totals[$title]['format'])) {
- $f = static::$_formatters[static::$_metrics[$title]['format']];
- $totals[$title]['formatter'] = $f;
+ $format = static::$_metrics[$title]['format'];
+ $totals[$title]['formatter'] = static::$_formatters[$format];
}
}
} | Updated Profiler filter assignment to be more descriptive |
diff --git a/test/func/alias.js b/test/func/alias.js
index <HASH>..<HASH> 100644
--- a/test/func/alias.js
+++ b/test/func/alias.js
@@ -58,6 +58,8 @@ describe('updateAliasSet', () => {
afterEach(function () {
return truncateTables(bookshelf, [
+ 'bookbrainz.alias_set__alias',
+ 'bookbrainz.alias_set',
'bookbrainz.alias',
'musicbrainz.language'
]);
diff --git a/test/func/identifier.js b/test/func/identifier.js
index <HASH>..<HASH> 100644
--- a/test/func/identifier.js
+++ b/test/func/identifier.js
@@ -54,6 +54,8 @@ describe('updateIdentifierSet', () => {
afterEach(function () {
return truncateTables(bookshelf, [
+ 'bookbrainz.identifier_set__identifier',
+ 'bookbrainz.identifier_set',
'bookbrainz.identifier',
'bookbrainz.identifier_type'
]); | fix(test): also truncate associated tables in func set tests |
diff --git a/FluentDOM.php b/FluentDOM.php
index <HASH>..<HASH> 100644
--- a/FluentDOM.php
+++ b/FluentDOM.php
@@ -963,7 +963,7 @@ class FluentDOM implements RecursiveIterator, SeekableIterator, Countable, Array
$result = $this->_spawn();
foreach ($this->_array as $node) {
$previous = $node->previousSibling;
- while ($previous instanceof DOMNode && !$this->isNode($previous)) {
+ while ($previous instanceof DOMNode && !$this->_isNode($previous)) {
$previous = $previous->previousSibling;
}
if (!empty($previous)) { | FluentDOM:
- fixed: missing underscore in _isNode() call in method prevSiblings() |
diff --git a/eth/backend.go b/eth/backend.go
index <HASH>..<HASH> 100644
--- a/eth/backend.go
+++ b/eth/backend.go
@@ -467,7 +467,7 @@ func (self *Ethereum) minedBroadcastLoop() {
for obj := range self.minedBlockSub.Chan() {
switch ev := obj.(type) {
case core.NewMinedBlockEvent:
- self.protocolManager.BroadcastBlock(ev.Block)
+ self.protocolManager.BroadcastBlock(ev.Block.Hash(), ev.Block)
}
}
} | eth: fixed proper BroadcastBlock for mined blocks |
diff --git a/trollimage/colormap.py b/trollimage/colormap.py
index <HASH>..<HASH> 100644
--- a/trollimage/colormap.py
+++ b/trollimage/colormap.py
@@ -272,7 +272,7 @@ class Colormap(object):
if num_bands1 == num_bands2:
return cmap1, cmap2
if 4 in (num_bands1, num_bands2):
- return cmap1.to_rgba(), cmap1.to_rgba()
+ return cmap1.to_rgba(), cmap2.to_rgba()
raise ValueError("Can't normalize colors of colormaps. Unexpected "
f"number of bands: {num_bands1} and {num_bands2}.") | Fix typo in Colormap color normalization |
diff --git a/src/Composer/Command/CreateProjectCommand.php b/src/Composer/Command/CreateProjectCommand.php
index <HASH>..<HASH> 100644
--- a/src/Composer/Command/CreateProjectCommand.php
+++ b/src/Composer/Command/CreateProjectCommand.php
@@ -104,6 +104,9 @@ EOT
$this->updatePreferredOptions($config, $input, $preferSource, $preferDist, true);
+ if ($input->getOption('dev')) {
+ $io->writeError('<warning>You are using the deprecated option "dev". Dev packages are installed by default now.</warning>');
+ }
if ($input->getOption('no-custom-installers')) {
$io->writeError('<warning>You are using the deprecated option "no-custom-installers". Use "no-plugins" instead.</warning>');
$input->setOption('no-plugins', true); | Added missing deprecation warning in create-project. |
diff --git a/redg-runtime/src/main/java/com/btc/redg/runtime/jdbc/RedGDatabaseUtil.java b/redg-runtime/src/main/java/com/btc/redg/runtime/jdbc/RedGDatabaseUtil.java
index <HASH>..<HASH> 100644
--- a/redg-runtime/src/main/java/com/btc/redg/runtime/jdbc/RedGDatabaseUtil.java
+++ b/redg-runtime/src/main/java/com/btc/redg/runtime/jdbc/RedGDatabaseUtil.java
@@ -125,11 +125,6 @@ public class RedGDatabaseUtil {
throw new InsertionFailedException("SQL execution failed", e);
}
}
- try {
- connection.commit();
- } catch (SQLException e) {
- throw new InsertionFailedException("Commit failed", e);
- }
}
private static Function<RedGEntity, PreparedStatement> prepareStatement(final Connection connection) { | Do not commit RedG data insertions |
diff --git a/sark/enum.py b/sark/enum.py
index <HASH>..<HASH> 100644
--- a/sark/enum.py
+++ b/sark/enum.py
@@ -267,7 +267,7 @@ class EnumMemberComments(object):
"name={name!r},"
" reqular={regular!r},"
" repeat={repeat!r})").format(
- name="{}.{}".format(enum_member.enum.name, enum_member.name),
+ name="{}.{}".format(enum_member.parent.name, enum_member.name),
regular=self.regular,
repeat=self.repeat, )
@@ -325,12 +325,12 @@ class EnumMember(object):
return idaapi.get_enum_member_serial(self.cid)
@property
- def enum(self):
+ def parent(self):
"""Get the enum holding the member."""
return Enum(eid=idaapi.get_enum_member_enum(self.cid))
def __repr__(self):
- return "<EnumMember(name='{}.{}')>".format(self.enum.name, self.name)
+ return "<EnumMember(name='{}.{}')>".format(self.parent.name, self.name)
def iter_bitmasks(eid): | Minor refactoring to the `Enum` class to allow more consistent naming with the `Struct` class (different branch) |
diff --git a/lib/services/api/ec2-2013-02-01.js b/lib/services/api/ec2-2013-02-01.js
index <HASH>..<HASH> 100644
--- a/lib/services/api/ec2-2013-02-01.js
+++ b/lib/services/api/ec2-2013-02-01.js
@@ -9232,8 +9232,7 @@ module.exports = {
Primary: {
type: 'boolean'
}
- },
- name: 'PrivateIpAddressesSet'
+ }
},
flattened: true
},
@@ -9241,7 +9240,7 @@ module.exports = {
type: 'integer'
}
},
- name: 'NetworkInterfaceSet'
+ name: 'NetworkInterface'
},
flattened: true
}, | Fix issue with EC2.requestSpotInstances |
diff --git a/cmsplugin_zinnia/__init__.py b/cmsplugin_zinnia/__init__.py
index <HASH>..<HASH> 100644
--- a/cmsplugin_zinnia/__init__.py
+++ b/cmsplugin_zinnia/__init__.py
@@ -1,5 +1,5 @@
"""cmsplugin_zinnia"""
-__version__ = '0.6'
+__version__ = '0.7'
__license__ = 'BSD License'
__author__ = 'Fantomas42' | Bumping to version <I> |
diff --git a/decayedlog.go b/decayedlog.go
index <HASH>..<HASH> 100644
--- a/decayedlog.go
+++ b/decayedlog.go
@@ -403,7 +403,7 @@ func (d *DecayedLog) PutBatch(b *Batch) (*ReplaySet, error) {
// idempotent.
replayBytes := batchReplayBkt.Get(b.id)
if replayBytes != nil {
- replays = &ReplaySet{}
+ replays = NewReplaySet()
return replays.Decode(bytes.NewReader(replayBytes))
} | ensure replays is fully initialized before using it |
diff --git a/lib/middleman/core_extensions/builder.rb b/lib/middleman/core_extensions/builder.rb
index <HASH>..<HASH> 100644
--- a/lib/middleman/core_extensions/builder.rb
+++ b/lib/middleman/core_extensions/builder.rb
@@ -20,11 +20,11 @@ module Middleman::CoreExtensions::Builder
self.class.build_reroute(&block)
end
- def reroute_builder(desination, request_path)
- result = [desination, request_path]
+ def reroute_builder(destination, request_path)
+ result = [destination, request_path]
build_reroute.each do |block|
- output = instance_exec(desination, request_path, &block)
+ output = instance_exec(destination, request_path, &block)
if output
result = output
break
@@ -34,4 +34,4 @@ module Middleman::CoreExtensions::Builder
result
end
end
-end
\ No newline at end of file
+end | Fix typo desination -> destination |
diff --git a/thymeleaf-spring4/src/main/java/org/thymeleaf/spring4/SpringTemplateEngine.java b/thymeleaf-spring4/src/main/java/org/thymeleaf/spring4/SpringTemplateEngine.java
index <HASH>..<HASH> 100755
--- a/thymeleaf-spring4/src/main/java/org/thymeleaf/spring4/SpringTemplateEngine.java
+++ b/thymeleaf-spring4/src/main/java/org/thymeleaf/spring4/SpringTemplateEngine.java
@@ -58,8 +58,6 @@ public class SpringTemplateEngine
implements ISpringTemplateEngine, MessageSourceAware {
- private static final SpringStandardDialect SPRINGSTANDARD_DIALECT = new SpringStandardDialect();
-
private MessageSource messageSource = null;
private MessageSource templateEngineMessageSource = null;
@@ -69,7 +67,7 @@ public class SpringTemplateEngine
public SpringTemplateEngine() {
super();
// This will set the SpringStandardDialect, overriding the Standard one set in the super constructor
- super.setDialect(SPRINGSTANDARD_DIALECT);
+ super.setDialect(new SpringStandardDialect());
} | Modified the way SpringStandardDialect is initialized in SpringTemplateEngine (startup time) |
diff --git a/pynspect/__init__.py b/pynspect/__init__.py
index <HASH>..<HASH> 100644
--- a/pynspect/__init__.py
+++ b/pynspect/__init__.py
@@ -16,4 +16,4 @@ data structures.
"""
-__version__ = "0.15"
+__version__ = "0.16" | DEPLOY: Increased package version to '<I>' to build new distribution. |
diff --git a/wol/wol.go b/wol/wol.go
index <HASH>..<HASH> 100644
--- a/wol/wol.go
+++ b/wol/wol.go
@@ -70,7 +70,6 @@ func sendMagicPacket(macAddr string) error {
// Run one of the supported commands
func runCommand(cmd string, args []string, aliases map[string]string) error {
var err error
- fmt.Printf("The aliases map is: %v\n", aliases)
switch cmd {
case "alias":
@@ -103,9 +102,16 @@ func runCommand(cmd string, args []string, aliases map[string]string) error {
case "wake":
if len(args) > 0 {
- err = sendMagicPacket(args[0])
+ macAddr := args[0]
+
+ // If we got an alias - use that as the mac addr
+ if val, ok := aliases[macAddr]; ok {
+ macAddr = val
+ }
+
+ err = sendMagicPacket(macAddr)
if err == nil {
- fmt.Printf("Magic packet sent successfully to %s\n", args[0])
+ fmt.Printf("Magic packet sent successfully to %s\n", macAddr)
}
} else {
err = errors.New("No mac address specified to wake command") | aliasing working :) |
diff --git a/lib/build-test-actions.js b/lib/build-test-actions.js
index <HASH>..<HASH> 100644
--- a/lib/build-test-actions.js
+++ b/lib/build-test-actions.js
@@ -53,7 +53,7 @@ var actionsForTestFunctions = function (test, ancestors, helper, stats) {
name: test.name,
type: 'test',
description: test.description(stats.suiteCount, stats.fileCounts[test.file]),
- suiteNames: test.ancestorNames,
+ ancestorNames: test.ancestorNames,
isAssociatedWithATest: true,
children: _.flatten([
beforeEachActions(helper, test, ancestors),
diff --git a/test/plugin-test.js b/test/plugin-test.js
index <HASH>..<HASH> 100644
--- a/test/plugin-test.js
+++ b/test/plugin-test.js
@@ -43,7 +43,7 @@ module.exports = function (finalCallbackPhew) {
wrappers: {
test: function (runTest, metadata, cb) {
if (_.startsWith(metadata.name, 'ignore') ||
- _.some(metadata.suiteNames, function (suiteName) {
+ _.some(metadata.ancestorNames, function (suiteName) {
return _.startsWith(suiteName, 'ignore')
})) {
cb(null) | rename suiteNames to ancestorNames
Thinking about a scheme for uniquely identifying tests & suites in
order to call back the results of each |
diff --git a/lib/overcommit/subprocess.rb b/lib/overcommit/subprocess.rb
index <HASH>..<HASH> 100644
--- a/lib/overcommit/subprocess.rb
+++ b/lib/overcommit/subprocess.rb
@@ -51,7 +51,7 @@ module Overcommit
err.rewind
out.rewind
- Result.new(process.exit_code, out.read, err.read)
+ Result.new(process.exit_code, to_utf8(out.read), to_utf8(err.read))
end
# Spawns a new process in the background using the given array of
@@ -83,6 +83,23 @@ module Overcommit
%w[cmd.exe /c] + [args.join(' ')]
end
+ # Convert string from current locale to utf-8
+ #
+ # When running commands under windows the command output is using
+ # current system locale (depends on system lanuage) not UTF-8
+ #
+ # @param process [String]
+ # @return [String]
+ def to_utf8(string)
+ if Encoding.locale_charmap == 'UTF-8'
+ return string
+ end
+
+ ec = Encoding::Converter.new(Encoding.locale_charmap, 'UTF-8')
+ # Convert encoding, alternatively simple: string.scrub will suffice
+ ec.convert(string)
+ end
+
# @param process [ChildProcess]
# @return [Array<IO>]
def assign_output_streams(process) | Fix encoding of process output under windows (#<I>)
* Fix encoding of process output under windows
Output of commands under windows is not UTF-8 by default, this
can lead to "invalid byte sequence in UTF-8" error on sylink check
* Fix coding style
* Fix invalid converter setting (UTF-8 to UTF-8) |
diff --git a/resources/lang/ar-SA/dashboard.php b/resources/lang/ar-SA/dashboard.php
index <HASH>..<HASH> 100644
--- a/resources/lang/ar-SA/dashboard.php
+++ b/resources/lang/ar-SA/dashboard.php
@@ -137,7 +137,7 @@ return [
// Metrics
'metrics' => [
- 'metrics' => 'Metrics',
+ 'metrics' => 'المقاييس',
'add' => [
'title' => 'Create a metric',
'message' => 'You should add a metric.', | New translations dashboard.php (Arabic) |
diff --git a/lib/coral_core.rb b/lib/coral_core.rb
index <HASH>..<HASH> 100644
--- a/lib/coral_core.rb
+++ b/lib/coral_core.rb
@@ -91,6 +91,7 @@ require 'multi_json'
require 'digest/sha1'
require 'optparse'
require 'thread'
+require 'tmpdir'
#--- | Adding a require of the tmpdir gem in the coral loader. |
diff --git a/smartfields/__init__.py b/smartfields/__init__.py
index <HASH>..<HASH> 100644
--- a/smartfields/__init__.py
+++ b/smartfields/__init__.py
@@ -1,7 +1,7 @@
# Major, minor, revision
-VERSION = (1, 0, 7)
+VERSION = (1, 0, 8)
def get_version():
return "%s.%s.%s" % VERSION | bumped up a version to update pypi package |
diff --git a/lib/image_processing/mini_magick.rb b/lib/image_processing/mini_magick.rb
index <HASH>..<HASH> 100644
--- a/lib/image_processing/mini_magick.rb
+++ b/lib/image_processing/mini_magick.rb
@@ -181,10 +181,10 @@ module ImageProcessing
def apply_define(magick, options)
options.each do |namespace, settings|
- namespace = namespace.to_s.gsub("_", "-")
+ namespace = namespace.to_s.tr("_", "-")
settings.each do |key, value|
- key = key.to_s.gsub("_", "-")
+ key = key.to_s.tr("_", "-")
magick.define "#{namespace}:#{key}=#{value}"
end | perf (#<I>) |
diff --git a/bfw_modules_info.php b/bfw_modules_info.php
index <HASH>..<HASH> 100644
--- a/bfw_modules_info.php
+++ b/bfw_modules_info.php
@@ -1,3 +1,4 @@
<?php
$modulePath = 'src';
+$configFiles = array('config.php');
?>
\ No newline at end of file | Fix bfw_modules_info.php for view config file |
diff --git a/src/ossos-pipeline/ossos/gui/models/imagemanager.py b/src/ossos-pipeline/ossos/gui/models/imagemanager.py
index <HASH>..<HASH> 100644
--- a/src/ossos-pipeline/ossos/gui/models/imagemanager.py
+++ b/src/ossos-pipeline/ossos/gui/models/imagemanager.py
@@ -1,3 +1,5 @@
+import time
+
__author__ = "David Rusk <drusk@uvic.ca>"
from ossos.gui import events, logger
@@ -63,11 +65,15 @@ class ImageManager(object):
)
def get_cutout(self, reading):
+ if reading is None:
+ raise KeyError("Bad Reading")
try:
return self._cutouts[reading]
except KeyError as err:
- logger.info(str(err)+str(reading))
- raise ImageNotLoadedException(reading)
+ print "Image {} not yet available. retrying in 3 seconds.".format(reading)
+ time.sleep(3)
+ self.download_singlet_for_reading(reading, focus=None, needs_apcor=True)
+ return self.get_cutout(reading)
def download_triplets_for_workunit(self, workunit):
if workunit in self._workunits_downloaded_for_triplets: | added some feedback when application is waiting for file from VOS. |
diff --git a/src/Illuminate/Foundation/Testing/Concerns/InteractsWithDatabase.php b/src/Illuminate/Foundation/Testing/Concerns/InteractsWithDatabase.php
index <HASH>..<HASH> 100644
--- a/src/Illuminate/Foundation/Testing/Concerns/InteractsWithDatabase.php
+++ b/src/Illuminate/Foundation/Testing/Concerns/InteractsWithDatabase.php
@@ -206,18 +206,26 @@ trait InteractsWithDatabase
*/
protected function getTable($table)
{
- $entity = $this->getModelEntity($table);
-
- return $entity ? $entity->getTable() : $table;
+ return $this->getModelEntity($table)?->getTable() ?: $table;
}
+ /**
+ * Get the table connection specified in the given model.
+ *
+ * @param \Illuminate\Database\Eloquent\Model|string $table
+ * @return string|null
+ */
protected function getTableConnection($table)
{
- $entity = $this->getModelEntity($table);
-
- return $entity ? $entity->getConnectionName() : null;
+ return $this->getModelEntity($table)?->getConnectionName();
}
+ /**
+ * Get the model entity from the given model or string
+ *
+ * @param \Illuminate\Database\Eloquent\Model|string $table
+ * @return \Illuminate\Database\Eloquent\Model|null
+ */
protected function getModelEntity($table)
{
return is_subclass_of($table, Model::class) ? (new $table) : null; | Added doc blocks and make use of the null safe operator instead of using a temp var |
diff --git a/fixtureless/factory.py b/fixtureless/factory.py
index <HASH>..<HASH> 100644
--- a/fixtureless/factory.py
+++ b/fixtureless/factory.py
@@ -78,3 +78,11 @@ def save_instances(iterable):
for instance in iterable:
instance.save()
yield instance
+
+
+def create(*args):
+ return Factory().create(*args)
+
+
+def build(*args):
+ return Factory().build(*args) | Adding a simple create and build method for api ease |
diff --git a/src/SAML2/AuthnRequestFactory.php b/src/SAML2/AuthnRequestFactory.php
index <HASH>..<HASH> 100644
--- a/src/SAML2/AuthnRequestFactory.php
+++ b/src/SAML2/AuthnRequestFactory.php
@@ -31,6 +31,9 @@ use Surfnet\SamlBundle\Http\Exception\InvalidRequestException;
use Symfony\Component\HttpFoundation\Request;
use XMLSecurityKey;
+/**
+ * @SuppressWarnings(PHPMD.CouplingBetweenObjects)
+ */
class AuthnRequestFactory
{
/** | Suppress PHPMD warning, coupling is allowed in this case
It provides bridging functionality between the configured
private key, the simplesamlphp\saml2 private key
loading mechanism and the private key structure needed
by the SAML2_AuthnRequest. This adds some classes that
are not required for the core functionality, but are
still required to get the bridging functionality to work |
diff --git a/autopep8.py b/autopep8.py
index <HASH>..<HASH> 100755
--- a/autopep8.py
+++ b/autopep8.py
@@ -1840,10 +1840,9 @@ def main():
assert not opts.recursive
filenames = args[:1]
- if sys.version_info[0] >= 3:
- output = sys.stdout
- else:
- output = codecs.getwriter('utf-8')(sys.stdout)
+ output = codecs.getwriter('utf-8')(sys.stdout.buffer
+ if sys.version_info[0] >= 3
+ else sys.stdout)
output = LineEndingWrapper(output) | Use codecs.getwriter() for Python 3
This makes things work the same as in Python 2, where we were always
outputting as Unicode. |
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -3,7 +3,7 @@ from setuptools import setup, find_packages
setup(name='tweet_parser',
packages=find_packages(),
scripts=["tools/parse_tweets.py"],
- version='1.0.1.dev1',
+ version='1.0.2.dev1',
license='MIT',
author='Fiona Pigott',
author_email='fpigott@twitter.com', | different version of the pkg in setup.py |
diff --git a/core/common/src/main/java/alluxio/underfs/BaseUnderFileSystem.java b/core/common/src/main/java/alluxio/underfs/BaseUnderFileSystem.java
index <HASH>..<HASH> 100644
--- a/core/common/src/main/java/alluxio/underfs/BaseUnderFileSystem.java
+++ b/core/common/src/main/java/alluxio/underfs/BaseUnderFileSystem.java
@@ -50,8 +50,8 @@ public abstract class BaseUnderFileSystem implements UnderFileSystem {
* @param ufsConf UFS configuration
*/
protected BaseUnderFileSystem(AlluxioURI uri, UnderFileSystemConfiguration ufsConf) {
- mUri = Preconditions.checkNotNull(uri);
- mUfsConf = Preconditions.checkNotNull(ufsConf);
+ mUri = Preconditions.checkNotNull(uri, "uri");
+ mUfsConf = Preconditions.checkNotNull(ufsConf, "ufsConf");
}
@Override | [SMALLFIX] Supply the variable name to Preconditions.checkNotNull in BaseUnderFileSystem.java |
diff --git a/lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/rasterable/RasterableModel.java b/lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/rasterable/RasterableModel.java
index <HASH>..<HASH> 100644
--- a/lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/rasterable/RasterableModel.java
+++ b/lionengine-game/src/main/java/com/b3dgs/lionengine/game/feature/rasterable/RasterableModel.java
@@ -140,7 +140,7 @@ public class RasterableModel extends FeatureModel implements Rasterable
if (enabled)
{
final int index = getRasterIndex(transformable.getY());
- if (index >= 0)
+ if (index > 0)
{
raster = rastersAnim.get(index);
} | #<I>: Raster minimum index fixed. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.