diff
stringlengths
65
26.7k
message
stringlengths
7
9.92k
diff --git a/src/Two/GoogleProvider.php b/src/Two/GoogleProvider.php index <HASH>..<HASH> 100644 --- a/src/Two/GoogleProvider.php +++ b/src/Two/GoogleProvider.php @@ -77,8 +77,12 @@ class GoogleProvider extends AbstractProvider implements ProviderInterface protected function mapUserToObject(array $user) { return (new User)->setRaw($user)->map([ - 'id' => $user['id'], 'nickname' => Arr::get($user, 'nickname'), 'name' => $user['displayName'], - 'email' => $user['emails'][0]['value'], 'avatar' => Arr::get($user, 'image')['url'], + 'id' => $user['id'], + 'nickname' => Arr::get($user, 'nickname'), + 'name' => $user['displayName'], + 'email' => $user['emails'][0]['value'], + 'avatar' => Arr::get($user, 'image')['url'], + 'avatar_original' => preg_replace('/\?sz=([0-9]+)/', '', Arr::get($user, 'image')['url']), ]); } }
Added "avatar_original" which returns a full size photo instead of <I>x<I> for Google provider.
diff --git a/sem/cli.py b/sem/cli.py index <HASH>..<HASH> 100644 --- a/sem/cli.py +++ b/sem/cli.py @@ -282,7 +282,7 @@ def export(results_dir, filename, do_not_try_parsing, parameters): required=True) @click.argument('sources', nargs=-1, - (type)=click.Path(exists=True, resolve_path=True), + type=click.Path(exists=True, resolve_path=True), required=True) @click.option("--move", default=False,
Fix Python <I> SyntaxError in cli.py Python error was `SyntaxError: expression cannot contain assignment, perhaps you meant "=="?` Not sure from which Python version the language semantics changed such that this error occured. Sure thing this was happening with <I>, this commit addresses that.
diff --git a/pythonzombie/server/__init__.py b/pythonzombie/server/__init__.py index <HASH>..<HASH> 100644 --- a/pythonzombie/server/__init__.py +++ b/pythonzombie/server/__init__.py @@ -37,7 +37,7 @@ class ZombieProxyServer(object): print "Starting Zombie.js..." # - # Execute the node proxy server in a subprocess. + # Spawn the node proxy server in a subprocess. # This is a simple socket server that listens for data, # evaluates it as Javascript, and passes the eval'ed # input to a Zombie.js Browser object. @@ -45,10 +45,11 @@ class ZombieProxyServer(object): args = ['node', self.__proxy_path__()] self.process = subprocess.Popen( args, + stdin = subprocess.PIPE, stdout = subprocess.PIPE, - stderr = subprocess.STDOUT, - universal_newlines = True + stderr = subprocess.STDOUT ) + self.process.stdin.close() time.sleep(.5) # @@ -75,7 +76,7 @@ class ZombieProxyServer(object): # Read the response response = [] while True: - data = self.sock.recv(1024) + data = self.sock.recv(4096) if not data: break response.append(data)
Closing stdin for the spawned node child process.
diff --git a/response.go b/response.go index <HASH>..<HASH> 100644 --- a/response.go +++ b/response.go @@ -7,6 +7,13 @@ import ( "strings" ) +// If Accept header matching fails, fall back to this type, otherwise +// a "406: Not Acceptable" response is returned. +// Valid values are restful.MIME_JSON and restful.MIME_XML +// Example: +// restful.DefaultResponseMimeType = restful.MIME_JSON +var DefaultResponseMimeType string + // Response is a wrapper on the actual http ResponseWriter // It provides several convenience methods to prepare and write response content. type Response struct { @@ -57,7 +64,14 @@ func (self Response) WriteEntity(value interface{}) Response { } } } - self.WriteHeader(http.StatusNotAcceptable) + if DefaultResponseMimeType == MIME_JSON { + self.WriteAsJson(value) + } else if DefaultResponseMimeType == MIME_XML { + self.WriteAsXml(value) + } else { + self.WriteHeader(http.StatusNotAcceptable) + self.Write([]byte("406: Not Acceptable")) + } return self }
Allow falling back to a mime type instead of sending a <I> response.
diff --git a/lib/fastlane/actions/mailgun.rb b/lib/fastlane/actions/mailgun.rb index <HASH>..<HASH> 100644 --- a/lib/fastlane/actions/mailgun.rb +++ b/lib/fastlane/actions/mailgun.rb @@ -103,8 +103,8 @@ module Fastlane message: options[:message], app_link: options[:app_link] } - hash[:success] = options[:success] if options[:success] - hash[:ci_build_link] = options[:success] if options[:ci_build_link] + hash[:success] = options[:success] + hash[:ci_build_link] = options[:ci_build_link] Fastlane::ErbTemplateHelper.render( Fastlane::ErbTemplateHelper.load("mailgun_html_template"), hash
Update mailgun.rb to fix missing values Fixed bug: HTML template of mailgun doesn't have CI Build link if build has failed. Fixed bug: CI Build link is pointing to the result of the build, and not the build link.
diff --git a/browser/http.js b/browser/http.js index <HASH>..<HASH> 100644 --- a/browser/http.js +++ b/browser/http.js @@ -155,16 +155,34 @@ connect.define(String, function(uri) { return connect(request({ uri: uri })) }) exports.connect = connect function readHead(request) { + /** + Read the head data for a single request. + Returns a reducible. + **/ return take(connect(request), 1) } exports.readHead = readHead function readHeaders(request) { + /** + Read the headers for a single request. + Returns a reducible. + **/ return map(readHead(request), function(head) { return head.headers }) } exports.readHeaders = readHeaders function read(request) { + /** + Read the request body for a single request. + Returns a reducible. + + Example: + + var body = http.read('http://example.com'); + reduce(body, writeBodyToDOM); + + **/ return drop(connect(request), 1) } exports.read = read
Add doc comments for read, readHead, readHeaders
diff --git a/src/Google/Service/AppState.php b/src/Google/Service/AppState.php index <HASH>..<HASH> 100644 --- a/src/Google/Service/AppState.php +++ b/src/Google/Service/AppState.php @@ -45,6 +45,7 @@ class Google_Service_AppState extends Google_Service public function __construct(Google_Client $client) { parent::__construct($client); + $this->rootUrl = 'https://www.googleapis.com/'; $this->servicePath = 'appstate/v1/'; $this->version = 'v1'; $this->serviceName = 'appstate';
Updated AppState.php This change has been generated by a script that has detected changes in the discovery doc of the API. Check <URL>
diff --git a/autopep8.py b/autopep8.py index <HASH>..<HASH> 100755 --- a/autopep8.py +++ b/autopep8.py @@ -1783,9 +1783,6 @@ class Container(object): def __getitem__(self, idx): return self._items[idx] - def _get_item(self, index): - return self._items[index] if 0 <= index < len(self._items) else None - def reflow(self, reflowed_lines, continued_indent, break_after_open_bracket=False): for (index, item) in enumerate(self._items): @@ -1794,7 +1791,7 @@ class Container(object): else: # isinstance(item, Container) reflowed_lines.add(item, len(continued_indent)) - next_item = self._get_item(index + 1) + next_item = get_item(self._items, index + 1) if ( break_after_open_bracket and index == 0 and # Prefer to keep empty containers together instead of
Use get_item that has exists
diff --git a/redis-cache.php b/redis-cache.php index <HASH>..<HASH> 100644 --- a/redis-cache.php +++ b/redis-cache.php @@ -16,6 +16,8 @@ if ( ! defined( 'ABSPATH' ) ) { exit; } +define( 'REDIS_CACHE_VERSION', '1.5.1' ); + if ( defined( 'WP_CLI' ) && WP_CLI ) { require_once dirname( __FILE__ ) . '/includes/wp-cli-commands.php'; } @@ -116,8 +118,7 @@ class RedisObjectCache { public function enqueue_admin_styles( $hook_suffix ) { if ( $hook_suffix === $this->screen ) { - $plugin = get_plugin_data( __FILE__ ); - wp_enqueue_style( 'redis-cache', plugin_dir_url( __FILE__ ) . 'includes/admin-page.css', null, $plugin[ 'Version' ] ); + wp_enqueue_style( 'redis-cache', plugin_dir_url( __FILE__ ) . 'includes/admin-page.css', null, WP_REDIS_VERSION ); } }
added `WP_REDIS_VERSION`
diff --git a/cqlengine/tests/columns/test_container_columns.py b/cqlengine/tests/columns/test_container_columns.py index <HASH>..<HASH> 100644 --- a/cqlengine/tests/columns/test_container_columns.py +++ b/cqlengine/tests/columns/test_container_columns.py @@ -67,6 +67,16 @@ class TestSetColumn(BaseCassEngTestCase): m = TestSetModel.get(partition=m.partition) self.assertNotIn(5, m.int_set) + def test_blind_deleting_last_item_should_succeed(self): + m = TestSetModel.create() + m.int_set.add(5) + m.save() + + TestSetModel.objects(partition=m.partition).update(int_set=set()) + + m = TestSetModel.get(partition=m.partition) + self.assertNotIn(5, m.int_set) + def test_empty_set_retrieval(self): m = TestSetModel.create() m2 = TestSetModel.get(partition=m.partition)
test to show blind update of empty set causes CQLEngineException
diff --git a/pose-detection/demo/src/option_panel.js b/pose-detection/demo/src/option_panel.js index <HASH>..<HASH> 100644 --- a/pose-detection/demo/src/option_panel.js +++ b/pose-detection/demo/src/option_panel.js @@ -135,10 +135,10 @@ function addPoseNetControllers(modelConfigFolder) { // settings. function addMoveNetControllers(modelConfigFolder, type) { params.STATE.modelConfig = {...params.MOVENET_CONFIG}; - params.STATE.modelConfig.type = type != null ? type : 'thunder'; + params.STATE.modelConfig.type = type != null ? type : 'lightning'; const typeController = modelConfigFolder.add( - params.STATE.modelConfig, 'type', ['thunder', 'lightning']); + params.STATE.modelConfig, 'type', ['lightning', 'thunder']); typeController.onChange(_ => { // Set isModelChanged to true, so that we don't render any result during // changing models.
[pose-detection]Default to lightning model for MoveNet demo. (#<I>) PROCESS
diff --git a/tests/unit/states/test_network.py b/tests/unit/states/test_network.py index <HASH>..<HASH> 100644 --- a/tests/unit/states/test_network.py +++ b/tests/unit/states/test_network.py @@ -2,14 +2,9 @@ :codeauthor: Rahul Handay <rahulha@saltstack.com> """ -# Import Python Libs - import logging -# Import Salt Libs import salt.states.network as network - -# Import Salt Testing Libs from tests.support.mixins import LoaderModuleMockMixin from tests.support.mock import MagicMock, patch from tests.support.unit import TestCase
Drop Py2 and six on tests/unit/states/test_network.py
diff --git a/src/analyzer/properties/prefixed.js b/src/analyzer/properties/prefixed.js index <HASH>..<HASH> 100644 --- a/src/analyzer/properties/prefixed.js +++ b/src/analyzer/properties/prefixed.js @@ -1,9 +1,9 @@ const arrayUniq = require('array-uniq') -const PREFIX_RE = /^-(?:webkit|moz|ms|o)-/ +const PREFIXED_REGEX = /^-(?:webkit|moz|ms|o)-/ module.exports = properties => { - const all = properties.filter(property => PREFIX_RE.test(property)) + const all = properties.filter(property => PREFIXED_REGEX.test(property)) const unique = arrayUniq(all).sort() const share = (() => {
Cleanup (#<I>) * Cleans up unused files * Convert filters to user regex.test(string) instead of String.match(regex) * Convert one more regex to the new form
diff --git a/automat/_methodical.py b/automat/_methodical.py index <HASH>..<HASH> 100644 --- a/automat/_methodical.py +++ b/automat/_methodical.py @@ -78,7 +78,7 @@ class MethodicalInput(object): automaton = attr.ib(repr=False) method = attr.ib() symbol = attr.ib(repr=False) - collectors = attr.ib(default=attr.Factory(dict)) + collectors = attr.ib(default=attr.Factory(dict), repr=False) def __get__(self, oself, type=None):
Exclude MethodicalInput.collectors from repr
diff --git a/utxonursery.go b/utxonursery.go index <HASH>..<HASH> 100644 --- a/utxonursery.go +++ b/utxonursery.go @@ -938,7 +938,7 @@ func (u *utxoNursery) createSweepTx(kgtnOutputs []kidOutput, // sweep. case lnwallet.HtlcOfferedTimeoutSecondLevel: weightEstimate.AddWitnessInput( - lnwallet.OfferedHtlcTimeoutWitnessSize, + lnwallet.SecondLevelHtlcSuccessWitnessSize, ) csvOutputs = append(csvOutputs, input) @@ -947,7 +947,7 @@ func (u *utxoNursery) createSweepTx(kgtnOutputs []kidOutput, // sweep. case lnwallet.HtlcAcceptedSuccessSecondLevel: weightEstimate.AddWitnessInput( - lnwallet.AcceptedHtlcSuccessWitnessSize, + lnwallet.SecondLevelHtlcSuccessWitnessSize, ) csvOutputs = append(csvOutputs, input)
utxonursery: use proper weight estimation for second-level spends
diff --git a/src/index.js b/src/index.js index <HASH>..<HASH> 100644 --- a/src/index.js +++ b/src/index.js @@ -8,7 +8,15 @@ import {ensureHTMLTemplateElement} from './html-template-element'; import {ensureElementMatches} from './element-matches'; import {ensureClassList} from './class-list'; +let isInitialized = false; + export function initialize(): void { + if (isInitialized) { + return; + } + + isInitialized = true; + ensureCustomEvent(); ensureFunctionName(); ensureHTMLTemplateElement();
fix(all): ensure initialization happens only once
diff --git a/includes/class-github-api.php b/includes/class-github-api.php index <HASH>..<HASH> 100644 --- a/includes/class-github-api.php +++ b/includes/class-github-api.php @@ -138,7 +138,7 @@ class GitHub_Updater_GitHub_API { preg_match( '/^[ \t\/*#@]*Version\:\s*(.*)$/im', base64_decode( $remote->content ), $matches ); if ( ! empty( $matches[1] ) ) - $this->type->remote_version = $matches[1]; + $this->type->remote_version = trim( $matches[1] ); }
trim line endings from remote_version
diff --git a/tcpport.js b/tcpport.js index <HASH>..<HASH> 100644 --- a/tcpport.js +++ b/tcpport.js @@ -83,7 +83,8 @@ TcpPort.prototype.write = function (data) { var buffer = new Buffer(data.length + 6 - 2); buffer.writeUInt16BE(1, 0); buffer.writeUInt16BE(0, 2); - buffer.writeUInt16BE(data.length, 4); + // subtract crc bytes + buffer.writeUInt16BE(data.length - 2, 4); data.copy(buffer, 6); // send buffer to slave
fix mbap payload length Even though it's not copied to the payload, data already includes the CRC. This leads to an invalid payload length in the MBAP header.
diff --git a/src/Symfony/Components/DependencyInjection/Loader/Extension/SymfonyTemplatingExtension.php b/src/Symfony/Components/DependencyInjection/Loader/Extension/SymfonyTemplatingExtension.php index <HASH>..<HASH> 100644 --- a/src/Symfony/Components/DependencyInjection/Loader/Extension/SymfonyTemplatingExtension.php +++ b/src/Symfony/Components/DependencyInjection/Loader/Extension/SymfonyTemplatingExtension.php @@ -85,7 +85,7 @@ class SymfonyTemplatingExtension extends LoaderExtension } else { - $helpers = array( + $helpers = null === $config['helper'] ? array() : array( new Reference('symfony.templating.helper.javascripts'), new Reference('symfony.templating.helper.stylesheets'), );
[DependencyInjection] allowed to disabled the helpers in the templating extension
diff --git a/packages/ream/vue-app/get-before-resolve.js b/packages/ream/vue-app/get-before-resolve.js index <HASH>..<HASH> 100644 --- a/packages/ream/vue-app/get-before-resolve.js +++ b/packages/ream/vue-app/get-before-resolve.js @@ -6,7 +6,7 @@ import { getServerPreloadPath } from 'ream/dist/runtime-utils' * @param {import('vue').App} vm vm is the root Vue app instance */ export const getBeforeResolve = (vm) => - function beforeResolve(to, from, next) { + async function beforeResolve(to, from, next) { if (!to.matched || to.matched.length === 0) { return next() } @@ -16,7 +16,7 @@ export const getBeforeResolve = (vm) => return next() } const fetchProps = (next) => { - Promise.all( + return Promise.all( [ preload && preload({ params: to.params }), hasServerPreload && @@ -40,6 +40,6 @@ export const getBeforeResolve = (vm) => next() fetchProps() } else { - fetchProps(next) + await fetchProps(next) } }
Fix beforeResolve (#<I>)
diff --git a/lib/reference/keywordSets.js b/lib/reference/keywordSets.js index <HASH>..<HASH> 100644 --- a/lib/reference/keywordSets.js +++ b/lib/reference/keywordSets.js @@ -642,6 +642,7 @@ keywordSets.atRules = uniteSets(keywordSets.pageMarginAtRules, [ 'font-feature-values', 'import', 'keyframes', + 'layer', 'media', 'namespace', 'nest', diff --git a/lib/rules/at-rule-no-unknown/__tests__/index.js b/lib/rules/at-rule-no-unknown/__tests__/index.js index <HASH>..<HASH> 100644 --- a/lib/rules/at-rule-no-unknown/__tests__/index.js +++ b/lib/rules/at-rule-no-unknown/__tests__/index.js @@ -82,6 +82,9 @@ testRule({ { code: '.foo { color: red; @nest .parent & { color: blue; } }', }, + { + code: '@layer framework { h1 { background: white; } }', + }, ], reject: [
Fix `at-rule-no-unknown` false positives for `@layer` (#<I>)
diff --git a/lib/itamae/handler.rb b/lib/itamae/handler.rb index <HASH>..<HASH> 100644 --- a/lib/itamae/handler.rb +++ b/lib/itamae/handler.rb @@ -1,5 +1,4 @@ require 'itamae/handler/base' -require 'itamae/handler/debug' module Itamae module Handler
Do not require handler/debug explicitly.
diff --git a/plugins/commands/serve/mappers.rb b/plugins/commands/serve/mappers.rb index <HASH>..<HASH> 100644 --- a/plugins/commands/serve/mappers.rb +++ b/plugins/commands/serve/mappers.rb @@ -249,6 +249,10 @@ module VagrantPlugins end logger.debug("map of #{value.class} to #{to.nil? ? 'unknown' : to.inspect} => #{result}") result + rescue => err + logger.debug("mapping failed of #{value.class} to #{to.nil? ? 'unknown' : to.inspect}") + logger.debug("#{err.class}: #{err}\n" + err.backtrace.join("\n")) + raise end # Generate the given type based on given and/or
Log error and stacktrace on mapping errors
diff --git a/datumbox-framework-core/src/main/java/com/datumbox/framework/core/machinelearning/modelselection/splitters/ShuffleSplitter.java b/datumbox-framework-core/src/main/java/com/datumbox/framework/core/machinelearning/modelselection/splitters/ShuffleSplitter.java index <HASH>..<HASH> 100644 --- a/datumbox-framework-core/src/main/java/com/datumbox/framework/core/machinelearning/modelselection/splitters/ShuffleSplitter.java +++ b/datumbox-framework-core/src/main/java/com/datumbox/framework/core/machinelearning/modelselection/splitters/ShuffleSplitter.java @@ -59,7 +59,7 @@ public class ShuffleSplitter extends AbstractSplitter { } @Override - public Iterable<Split> split(Dataframe dataset) { + public Iterable<ShuffleSplitter.Split> split(Dataframe dataset) { final int n = dataset.size(); if(proportion <=0.0 || proportion >=1.0) { throw new IllegalArgumentException("The train size should be between 0.0 and 1.0.");
Change return type on ShuffleSplitter.
diff --git a/src/Admin42/Permission/Rbac/Identity/IdentityRoleProvider.php b/src/Admin42/Permission/Rbac/Identity/IdentityRoleProvider.php index <HASH>..<HASH> 100644 --- a/src/Admin42/Permission/Rbac/Identity/IdentityRoleProvider.php +++ b/src/Admin42/Permission/Rbac/Identity/IdentityRoleProvider.php @@ -9,7 +9,7 @@ namespace Admin42\Permission\Rbac\Identity; -use Core42\Authentication\AuthenticationService; +use Admin42\Authentication\AuthenticationService; use Core42\Permission\Rbac\Identity\IdentityRoleProviderInterface; use Core42\Permission\Rbac\Role\RoleInterface;
reverted change - why was this changed anyways?
diff --git a/src/navigation-plan.js b/src/navigation-plan.js index <HASH>..<HASH> 100644 --- a/src/navigation-plan.js +++ b/src/navigation-plan.js @@ -41,6 +41,8 @@ export function buildNavigationPlan(navigationContext, forceLifecycleMinimum) { //TODO: should we tell them if the parent had a lifecycle min change? viewPortPlan.strategy = prevViewPortInstruction.component.executionContext .determineActivationStrategy(...next.lifecycleArgs); + } else if(next.config.activationStrategy){ + viewPortPlan.strategy = next.config.activationStrategy; } else if (newParams || forceLifecycleMinimum) { viewPortPlan.strategy = activationStrategy.invokeLifecycle; } else { @@ -55,7 +57,7 @@ export function buildNavigationPlan(navigationContext, forceLifecycleMinimum) { .createNavigationContext(childInstruction); return buildNavigationPlan( - viewPortPlan.childNavigationContext, + viewPortPlan.childNavigationContext, viewPortPlan.strategy == activationStrategy.invokeLifecycle) .then(childPlan => { viewPortPlan.childNavigationContext.plan = childPlan;
feat(navigation-plan): enable configuring the activationStrategy on the route config instead of the view model
diff --git a/internal/pipeline/pipeline.go b/internal/pipeline/pipeline.go index <HASH>..<HASH> 100644 --- a/internal/pipeline/pipeline.go +++ b/internal/pipeline/pipeline.go @@ -37,10 +37,10 @@ type Piper interface { // BuildPipeline contains all build-related pipe implementations in order // nolint:gochecknoglobals var BuildPipeline = []Piper{ - before.Pipe{}, // run global hooks before build env.Pipe{}, // load and validate environment variables git.Pipe{}, // get and validate git repo state semver.Pipe{}, // parse current tag to a semver + before.Pipe{}, // run global hooks before build defaults.Pipe{}, // load default configs snapshot.Pipe{}, // snapshot version handling dist.Pipe{}, // ensure ./dist is clean
feat(pipeline): change the pipeline order to support additional template variables in the before pipe (#<I>) This change allows us to use all the template variables in the named templates in the before hook. Issue: GH-<I>
diff --git a/lib/crash_reporter.rb b/lib/crash_reporter.rb index <HASH>..<HASH> 100644 --- a/lib/crash_reporter.rb +++ b/lib/crash_reporter.rb @@ -1,5 +1,6 @@ require 'crash_reporter/version' require 'crash_reporter/configure' +require 'crash_reporter/dsl' module CrashReporter class << self
include dsl in the main requires
diff --git a/src/main/java/com/hubspot/jinjava/objects/collections/PyMap.java b/src/main/java/com/hubspot/jinjava/objects/collections/PyMap.java index <HASH>..<HASH> 100644 --- a/src/main/java/com/hubspot/jinjava/objects/collections/PyMap.java +++ b/src/main/java/com/hubspot/jinjava/objects/collections/PyMap.java @@ -6,9 +6,7 @@ import java.util.Iterator; import java.util.Map; import java.util.Set; -public class PyMap - extends ForwardingMap<String, Object> - implements PyWrapper, Iterable<String> { +public class PyMap extends ForwardingMap<String, Object> implements PyWrapper { private Map<String, Object> map; public PyMap(Map<String, Object> map) {
fixed pymap post rever revert
diff --git a/lib/dm-core/query.rb b/lib/dm-core/query.rb index <HASH>..<HASH> 100644 --- a/lib/dm-core/query.rb +++ b/lib/dm-core/query.rb @@ -486,10 +486,10 @@ module DataMapper # # @api semipublic def filter_records(records) - records = records.uniq if unique? - records = match_records(records) - records = sort_records(records) - records = limit_records(records) + records = records.uniq if unique? + records = match_records(records) if conditions + records = sort_records(records) if order + records = limit_records(records) if limit || offset > 0 records end @@ -504,7 +504,6 @@ module DataMapper # @api semipublic def match_records(records) conditions = self.conditions - return records if conditions.nil? records.select { |record| conditions.matches?(record) } end
Updated Query#filter_records to have guard clauses for each method it calls
diff --git a/test/cli/test_run.py b/test/cli/test_run.py index <HASH>..<HASH> 100644 --- a/test/cli/test_run.py +++ b/test/cli/test_run.py @@ -17,6 +17,7 @@ from nameko.constants import ( from nameko.exceptions import CommandError from nameko.runners import ServiceRunner from nameko.standalone.rpc import ClusterRpcProxy +from nameko.testing.waiting import wait_for_call from test.sample import Service @@ -35,8 +36,10 @@ def test_run(rabbit_config): 0, 'test.sample:Service', ]) - gt = eventlet.spawn(main, args) - eventlet.sleep(1) + + # start runner and wait for it to come up + with wait_for_call(ServiceRunner, 'start'): + gt = eventlet.spawn(main, args) # make sure service launches ok with ClusterRpcProxy(rabbit_config) as proxy: @@ -116,8 +119,9 @@ def test_main_with_logging_config(rabbit_config, tmpdir): 'test.sample', ]) - gt = eventlet.spawn(main, args) - eventlet.sleep(1) + # start runner and wait for it to come up + with wait_for_call(ServiceRunner, 'start'): + gt = eventlet.spawn(main, args) with ClusterRpcProxy(rabbit_config) as proxy: proxy.service.ping()
use waiter rather than sleeping for runner to come up
diff --git a/scout/server/links.py b/scout/server/links.py index <HASH>..<HASH> 100644 --- a/scout/server/links.py +++ b/scout/server/links.py @@ -420,7 +420,7 @@ def ensembl_link(variant_obj, build=37): """Compose (sv) variant link to ensembl""" my_end = variant_obj["end"] - if variant_obj["chromosome"] != variant_obj["end_chrom"]: + if variant_obj["chromosome"] != variant_obj.get("end_chrom"): my_end = variant_obj["position"] if build == 37: @@ -434,7 +434,7 @@ def decipher_link(variant_obj, build=37): """Compose DECIPHER SV variant links""" my_end = variant_obj["end"] - if variant_obj["chromosome"] != variant_obj["end_chrom"]: + if variant_obj["chromosome"] != variant_obj.get("end_chrom"): my_end = variant_obj["position"] if build == 37:
fix missing end_chrom key when creating links
diff --git a/mod/quiz/format.php b/mod/quiz/format.php index <HASH>..<HASH> 100644 --- a/mod/quiz/format.php +++ b/mod/quiz/format.php @@ -148,6 +148,13 @@ class quiz_default_format { // Export functions + function export_file_extension() { + /// return the files extension appropriate for this type + /// override if you don't want .txt + + return ".txt"; + } + function exportpreprocess($category, $course) { /// Does any pre-processing that may be desired @@ -191,7 +198,7 @@ class quiz_default_format { } // write file - $filepath = $path."/".$filename; + $filepath = $path."/".$filename . $this->export_file_extension(); if (!$fh=fopen($filepath,"w")) { error("Cannot open for writing: $filepath"); }
Changed export part so that export file extension can be changed by overriding export_file_extension() method
diff --git a/ci/ci_build.rb b/ci/ci_build.rb index <HASH>..<HASH> 100755 --- a/ci/ci_build.rb +++ b/ci/ci_build.rb @@ -19,7 +19,7 @@ puts "[CruiseControl] Rails build" build_results = {} # Install required version of bundler. -bundler_install_cmd = "gem install bundler -v 0.9.3 --no-ri --no-rdoc" +bundler_install_cmd = "gem install bundler -v 0.9.6 --no-ri --no-rdoc" puts "Running command: #{bundler_install_cmd}" build_results[:install_bundler] = system bundler_install_cmd
Have CI use the current version of bundler
diff --git a/src/plone/app/mosaic/browser/static/js/mosaic.layout.js b/src/plone/app/mosaic/browser/static/js/mosaic.layout.js index <HASH>..<HASH> 100644 --- a/src/plone/app/mosaic/browser/static/js/mosaic.layout.js +++ b/src/plone/app/mosaic/browser/static/js/mosaic.layout.js @@ -1143,11 +1143,11 @@ define([ } // Notify user - $.plone.notify({ - title: "Info", - message: "You can't have more then 4 columns", - sticky: false - }); + //$.plone.notify({ + // title: "Info", + // message: "You can't have more then 4 columns", + // sticky: false + //}); // Dropped on row } else {
Comment failing plone.notify call, because missing notify framework
diff --git a/src/test/java/edu/jhu/pacaya/util/JUnitUtils.java b/src/test/java/edu/jhu/pacaya/util/JUnitUtils.java index <HASH>..<HASH> 100644 --- a/src/test/java/edu/jhu/pacaya/util/JUnitUtils.java +++ b/src/test/java/edu/jhu/pacaya/util/JUnitUtils.java @@ -57,4 +57,22 @@ public class JUnitUtils { } } + public static void assertArrayEquals(String[][][] a1, String[][][] a2) { + Assert.assertEquals(a1.length, a2.length); + for (int i=0; i<a1.length; i++) { + assertArrayEquals(a1[i], a2[i]); + } + } + + public static void assertArrayEquals(String[][] a1, String[][] a2) { + Assert.assertEquals(a1.length, a2.length); + for (int i=0; i<a1.length; i++) { + assertArrayEquals(a1[i], a2[i]); + } + } + + public static void assertArrayEquals(String[] a1, String[] a2) { + Assert.assertArrayEquals(a1, a2); + } + }
Bug fix: NerEvaluator wasn't correctly evaluating conlleval style F1 on chunks
diff --git a/barcode/ean.py b/barcode/ean.py index <HASH>..<HASH> 100755 --- a/barcode/ean.py +++ b/barcode/ean.py @@ -41,6 +41,9 @@ class EuropeanArticleNumber13(Barcode): ean = ean[:self.digits] if not ean.isdigit(): raise IllegalCharacterError('EAN code can only contain numbers.') + if len(ean) != self.digits: + raise NumberOfDigitsError('EAN must have {0} digits, not ' + '{1}.'.format(self.digits, len(ean))) self.ean = ean self.ean = '{0}{1}'.format(ean, self.calculate_checksum()) self.writer = writer or Barcode.default_writer()
Adding the same length check and exception as for PZN.
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -173,7 +173,7 @@ prototype._flush = function (callback) { if (missingBytes !== 0) { var error = new Error('incomplete blob') error.incomplete = true - error.missingBytes = this.missingBytes + error.missingBytes = missingBytes this.emit('error', error) } callback()
Fix missing bytes properties of error objects
diff --git a/activemodel/test/cases/railtie_test.rb b/activemodel/test/cases/railtie_test.rb index <HASH>..<HASH> 100644 --- a/activemodel/test/cases/railtie_test.rb +++ b/activemodel/test/cases/railtie_test.rb @@ -5,10 +5,10 @@ class RailtieTest < ActiveModel::TestCase include ActiveSupport::Testing::Isolation def setup - require 'rails/all' + require 'active_model/railtie' - @app ||= Class.new(::Rails::Application).tap do |app| - app.config.eager_load = false + @app ||= Class.new(::Rails::Application) do + config.eager_load = false end end
Require active_model/railtie directly instead of rails/all Use Class.new with a block instead of tap to configure it.
diff --git a/src/imageTools/freehand.js b/src/imageTools/freehand.js index <HASH>..<HASH> 100755 --- a/src/imageTools/freehand.js +++ b/src/imageTools/freehand.js @@ -170,13 +170,12 @@ function mouseMoveCallback (e) { data.highlight = true; data.handles[currentHandle].x = config.mouseLocation.handles.start.x; data.handles[currentHandle].y = config.mouseLocation.handles.start.y; - if (currentHandle) { - const lastLineIndex = data.handles[currentHandle - 1].lines.length - 1; - const lastLine = data.handles[currentHandle - 1].lines[lastLineIndex]; + const neighbourIndex = currentHandle === 0 ? data.handles.length - 1 : currentHandle - 1; + const lastLineIndex = data.handles[neighbourIndex].lines.length - 1; + const lastLine = data.handles[neighbourIndex].lines[lastLineIndex]; - lastLine.x = config.mouseLocation.handles.start.x; - lastLine.y = config.mouseLocation.handles.start.y; - } + lastLine.x = config.mouseLocation.handles.start.x; + lastLine.y = config.mouseLocation.handles.start.y; } if (config.freehand) {
Fixed first two points line stuck to old position upon shape modification (#<I>)
diff --git a/tests/cysqlite.py b/tests/cysqlite.py index <HASH>..<HASH> 100644 --- a/tests/cysqlite.py +++ b/tests/cysqlite.py @@ -114,10 +114,6 @@ class TestCySqliteHelpers(CyDatabaseTestCase): ('DELETE', 'main', 'register', 2)]) def test_properties(self): - mem_used, mem_high = self.database.memory_used - self.assertTrue(mem_high >= mem_used) - self.assertFalse(mem_high == 0) - self.assertTrue(self.database.cache_used is not None)
Remove tests that may fail due to compiler flags.
diff --git a/astropy_helpers/tests/test_setup_helpers.py b/astropy_helpers/tests/test_setup_helpers.py index <HASH>..<HASH> 100644 --- a/astropy_helpers/tests/test_setup_helpers.py +++ b/astropy_helpers/tests/test_setup_helpers.py @@ -246,7 +246,7 @@ def test_missing_cython_c_files(capsys, pyx_extension_test_package, assert msg in stderr -@pytest.mark.parametrize('mode', ['cli', 'cli-w', 'cli-sphinx', 'cli-l']) +@pytest.mark.parametrize('mode', ['cli', 'cli-w', 'cli-sphinx', 'cli-l', 'cli-parallel']) def test_build_docs(capsys, tmpdir, mode): """ Test for build_docs @@ -309,6 +309,8 @@ def test_build_docs(capsys, tmpdir, mode): run_setup('setup.py', ['build_docs', '-l']) elif mode == 'cli-sphinx': run_setup('setup.py', ['build_sphinx']) + elif mode == 'cli-parallel': + run_setup('setup.py', ['build_docs', '--parallel=2']) assert os.path.exists(docs_dir.join('_build', 'html', 'index.html').strpath)
Added test of --parallel option
diff --git a/openquake/hazardlib/shakemap/gmfs.py b/openquake/hazardlib/shakemap/gmfs.py index <HASH>..<HASH> 100644 --- a/openquake/hazardlib/shakemap/gmfs.py +++ b/openquake/hazardlib/shakemap/gmfs.py @@ -19,7 +19,7 @@ import math import logging import numpy -from scipy.stats import truncnorm, norm +from scipy.stats import truncnorm from scipy import interpolate from openquake.baselib.general import CallableDict diff --git a/openquake/hazardlib/shakemap/parsers.py b/openquake/hazardlib/shakemap/parsers.py index <HASH>..<HASH> 100644 --- a/openquake/hazardlib/shakemap/parsers.py +++ b/openquake/hazardlib/shakemap/parsers.py @@ -278,6 +278,12 @@ def get_shakemap_array(grid_file, uncertainty_file=None): :returns: array with fields lon, lat, vs30, val, std """ data = _get_shakemap_array(grid_file) + count = sum(imt in data.dtype['val'].names + for imt in ('PGA', 'SA(0.3)', 'SA(1.0)')) + if count < 4: + logging.warning('%s does not contain (PGA, SA03, SA10)', + grid_file.fp.name) + if uncertainty_file: data2 = _get_shakemap_array(uncertainty_file) # sanity check: lons and lats must be the same
Added warning for invalid IMTs in ShakeMaps
diff --git a/src/Utils/Formatter.php b/src/Utils/Formatter.php index <HASH>..<HASH> 100644 --- a/src/Utils/Formatter.php +++ b/src/Utils/Formatter.php @@ -488,7 +488,7 @@ class Formatter // Finishing the line. if ($lineEnded) { $ret .= $this->options['line_ending'] - . str_repeat($this->options['indentation'], $indent); + . str_repeat($this->options['indentation'], (int) $indent); $lineEnded = false; } else {
Fix uncaught TypeError with CASE Statement Related to #<I>
diff --git a/salt/states/boto_lambda.py b/salt/states/boto_lambda.py index <HASH>..<HASH> 100644 --- a/salt/states/boto_lambda.py +++ b/salt/states/boto_lambda.py @@ -508,6 +508,13 @@ def _function_code_present( )["function"] update = False if ZipFile: + if '://' in ZipFile: # Looks like a remote URL to me... + dlZipFile = __salt__['cp.cache_file'](path=ZipFile) + if dlZipFile is False: + ret['result'] = False + ret['comment'] = 'Failed to cache ZipFile `{0}`.'.format(ZipFile) + return ret + ZipFile = dlZipFile size = os.path.getsize(ZipFile) if size == func["CodeSize"]: sha = hashlib.sha256()
INFRA-<I> - allow boto_lambda.function_present() to support remote URLs for ZipFile param
diff --git a/profile.go b/profile.go index <HASH>..<HASH> 100644 --- a/profile.go +++ b/profile.go @@ -21,7 +21,7 @@ type Profile struct { // GetProfile fetches the recipient's profile from facebook platform // Non empty UserID has to be specified in order to receive the information func (m *Messenger) GetProfile(userID string) (*Profile, error) { - resp, err := m.doRequest("GET", fmt.Sprintf(GraphAPI+"/v2.6/%s?fields=first_name,last_name,profile_pic,locale,timezone,gender", userID), nil) + resp, err := m.doRequest("GET", fmt.Sprintf(GraphAPI+"/v2.6/%s?fields=first_name,last_name,picture,locale,timezone,gender", userID), nil) if err != nil { return nil, err }
Changed field name from profile_pic to picture Got an error using profile_pic "(#<I>) Tried accessing nonexisting field (profile_pic) on node type (User)" while picture is working
diff --git a/storage/io/src/test/java/org/openscience/cdk/io/cml/JmolTest.java b/storage/io/src/test/java/org/openscience/cdk/io/cml/JmolTest.java index <HASH>..<HASH> 100644 --- a/storage/io/src/test/java/org/openscience/cdk/io/cml/JmolTest.java +++ b/storage/io/src/test/java/org/openscience/cdk/io/cml/JmolTest.java @@ -32,6 +32,7 @@ import java.io.InputStream; import javax.vecmath.Vector3d; import org.junit.Assert; +import org.junit.Ignore; import org.junit.Test; import org.openscience.cdk.CDKTestCase; import org.openscience.cdk.geometry.GeometryTools; @@ -100,7 +101,8 @@ public class JmolTest extends CDKTestCase { * Special CML characteristics: * - Jmol Animation */ - @Test public void testAnimation() throws Exception { + @Ignore("It is broken, but not used, AFAIK") + public void testAnimation() throws Exception { String filename = "data/cml/SN1_reaction.cml"; logger.info("Testing: " + filename); InputStream ins = this.getClass().getClassLoader().getResourceAsStream(filename);
Ignore this old test; this convention is not used anymore, AFAIK Change-Id: I<I>ea<I>a<I>cce<I>f<I>aac1c4e<I>ebabcaa2c
diff --git a/git/test/test_base.py b/git/test/test_base.py index <HASH>..<HASH> 100644 --- a/git/test/test_base.py +++ b/git/test/test_base.py @@ -5,6 +5,7 @@ # This module is part of GitPython and is released under # the BSD License: http://www.opensource.org/licenses/bsd-license.php import os +import sys import tempfile import git.objects.base as base @@ -116,6 +117,14 @@ class TestBase(TestBase): filename = u"שלום.txt" file_path = os.path.join(rw_repo.working_dir, filename) + + # verify first that we could encode file name in this environment + try: + _ = file_path.encode(sys.getfilesystemencoding()) + except UnicodeEncodeError: + from nose import SkipTest + raise SkipTest("Environment doesn't support unicode filenames") + open(file_path, "wb").write(b'something') if os.name == 'nt':
BF: skip unicode filename test in env not supporting unicode encodings
diff --git a/buildbot/status/tinderbox.py b/buildbot/status/tinderbox.py index <HASH>..<HASH> 100644 --- a/buildbot/status/tinderbox.py +++ b/buildbot/status/tinderbox.py @@ -172,7 +172,7 @@ class TinderboxMailNotifier(mail.MailNotifier): text += "%s build: %s\n" % (t, self.columnName) elif isinstance(self.columnName, WithProperties): # interpolate the WithProperties instance, use that - text += "%s build: %s\n" % (t, self.columnName.render(build)) + text += "%s build: %s\n" % (t, build.getProperties().render(self.columnName)) else: raise Exception("columnName is an unhandled value") text += "%s errorparser: %s\n" % (t, self.errorparser)
axel-tinderbox-fix.patch Fix by Axel Hecht <l<I><EMAIL>> to a regression in tinderbox
diff --git a/src/vis/vis.js b/src/vis/vis.js index <HASH>..<HASH> 100644 --- a/src/vis/vis.js +++ b/src/vis/vis.js @@ -554,13 +554,6 @@ var Vis = cdb.core.View.extend({ } this._setLayerOptions(options); - if (this.mobile_enabled) { - if (options.legends === undefined) { - options.legends = this.legends ? true : false; - } - this.addMobile(data, options); - } - if (data.slides) { function odysseyLoaded() { self._createSlides([data].concat(data.slides)); @@ -573,6 +566,13 @@ var Vis = cdb.core.View.extend({ } } + if (this.mobile_enabled) { + if (options.legends === undefined) { + options.legends = this.legends ? true : false; + } + this.addMobile(data, options); + } + _.defer(function() { self.trigger('done', self, self.getLayers()); })
load the mobile overlay after generating the slides
diff --git a/lib/parser.js b/lib/parser.js index <HASH>..<HASH> 100644 --- a/lib/parser.js +++ b/lib/parser.js @@ -338,6 +338,7 @@ Parser.prototype = { case 'conditional': case 'keyframe': case 'function': + case 'media': case 'for': switch (type) { case 'color':
Fixed support for * selector within @media block
diff --git a/src/Rules/Classes/AccessStaticPropertiesRule.php b/src/Rules/Classes/AccessStaticPropertiesRule.php index <HASH>..<HASH> 100644 --- a/src/Rules/Classes/AccessStaticPropertiesRule.php +++ b/src/Rules/Classes/AccessStaticPropertiesRule.php @@ -32,7 +32,11 @@ class AccessStaticPropertiesRule implements \PHPStan\Rules\Rule */ public function processNode(Node $node, Scope $scope): array { - $name = (string) $node->name; + if (!is_string($node->name)) { + return []; + } + + $name = $node->name; $currentClass = $scope->getClass(); if ($currentClass === null) { return []; diff --git a/tests/PHPStan/Rules/Classes/data/access-static-properties.php b/tests/PHPStan/Rules/Classes/data/access-static-properties.php index <HASH>..<HASH> 100644 --- a/tests/PHPStan/Rules/Classes/data/access-static-properties.php +++ b/tests/PHPStan/Rules/Classes/data/access-static-properties.php @@ -41,6 +41,7 @@ class IpsumAccessStaticProperties parent::$lorem; // does not have a parent FooAccessStaticProperties::$test; FooAccessStaticProperties::$foo; // protected and not from a parent + FooAccessStaticProperties::$$foo; } }
Fixed checking access to static properties with dynamic name
diff --git a/src/de/lmu/ifi/dbs/elki/KDDTask.java b/src/de/lmu/ifi/dbs/elki/KDDTask.java index <HASH>..<HASH> 100644 --- a/src/de/lmu/ifi/dbs/elki/KDDTask.java +++ b/src/de/lmu/ifi/dbs/elki/KDDTask.java @@ -110,6 +110,11 @@ public class KDDTask<O extends DatabaseObject> extends AbstractApplication { * Output handler. */ private ResultHandler<O, Result> resulthandler = null; + + /** + * Store the result. + */ + MultiResult result = null; /** * Provides a KDDTask. @@ -184,7 +189,6 @@ public class KDDTask<O extends DatabaseObject> extends AbstractApplication { public void run() throws IllegalStateException { Database<O> db = databaseConnection.getDatabase(normalization); algorithm.run(db); - MultiResult result; Result res = algorithm.getResult(); // standard annotations from the source file @@ -216,6 +220,15 @@ public class KDDTask<O extends DatabaseObject> extends AbstractApplication { } resulthandler.processResult(db, result); } + + /** + * Get the algorithms result. + * + * @return the result + */ + public MultiResult getResult() { + return result; + } /** * Runs a KDD task accordingly to the specified parameters.
Give access to the result of an Algorithm running within a KDDTask
diff --git a/lib/pdk.rb b/lib/pdk.rb index <HASH>..<HASH> 100644 --- a/lib/pdk.rb +++ b/lib/pdk.rb @@ -1,12 +1,20 @@ -require 'pdk/analytics' -require 'pdk/answer_file' -require 'pdk/config' -require 'pdk/generate' require 'pdk/i18n' require 'pdk/logger' -require 'pdk/report' -require 'pdk/validate' -require 'pdk/version' module PDK + autoload :Analytics, 'pdk/analytics' + autoload :AnswerFile, 'pdk/answer_file' + autoload :Config, 'pdk/config' + autoload :Generate, 'pdk/generate' + autoload :Report, 'pdk/report' + autoload :TEMPLATE_REF, 'pdk/version' + autoload :Util, 'pdk/util' + autoload :Validate, 'pdk/validate' + autoload :VERSION, 'pdk/version' + + # TODO - Refactor backend code to not raise CLI errors + module CLI + autoload :FatalError, 'pdk/cli/errors' + autoload :ExitWithError, 'pdk/cli/errors' + end end
(maint) Convert base requires to autoloads
diff --git a/lib/twilio-ruby/rest/pricing/countries.rb b/lib/twilio-ruby/rest/pricing/countries.rb index <HASH>..<HASH> 100644 --- a/lib/twilio-ruby/rest/pricing/countries.rb +++ b/lib/twilio-ruby/rest/pricing/countries.rb @@ -1,7 +1,7 @@ module Twilio module REST module Pricing - class Countries < ListResource + class Countries < NextGenListResource def initialize(path, client) super @list_key = 'countries' diff --git a/lib/twilio-ruby/rest/pricing/voice/numbers.rb b/lib/twilio-ruby/rest/pricing/voice/numbers.rb index <HASH>..<HASH> 100644 --- a/lib/twilio-ruby/rest/pricing/voice/numbers.rb +++ b/lib/twilio-ruby/rest/pricing/voice/numbers.rb @@ -1,7 +1,7 @@ module Twilio module REST module Pricing - class Numbers < ListResource + class Numbers < NextGenListResource def initialize(path, client) super @submodule = :Pricing
Switch Pricing resources to next-gen lists
diff --git a/lib/mongo_mapper/query.rb b/lib/mongo_mapper/query.rb index <HASH>..<HASH> 100644 --- a/lib/mongo_mapper/query.rb +++ b/lib/mongo_mapper/query.rb @@ -79,7 +79,11 @@ module MongoMapper key = normalized_key(key.field) end - criteria[key] = normalized_value(key, value) + if criteria[key] && criteria.kind_of?(Hash) && value.kind_of?(Hash) + value.keys.each {|k| criteria[key][k] = value[k]} + else + criteria[key] = normalized_value(key, value) + end end criteria @@ -133,4 +137,4 @@ module MongoMapper end end end -end \ No newline at end of file +end diff --git a/test/unit/test_query.rb b/test/unit/test_query.rb index <HASH>..<HASH> 100644 --- a/test/unit/test_query.rb +++ b/test/unit/test_query.rb @@ -53,6 +53,12 @@ class QueryTest < Test::Unit::TestCase criteria[:created_at]['$gt'].should be_utc end + should "work with multiple symbol operators on the same field" do + Query.new(Message, :position.gt => 0, :position.lte => 10).criteria.should == { + :position => {"$gt" => 0, "$lte" => 10} + } + end + should "work with simple criteria" do Query.new(Room, :foo => 'bar').criteria.should == { :foo => 'bar'
Allow multiple symbol operators on the same field
diff --git a/media_tree/templatetags/media_tree_thumbnail.py b/media_tree/templatetags/media_tree_thumbnail.py index <HASH>..<HASH> 100644 --- a/media_tree/templatetags/media_tree_thumbnail.py +++ b/media_tree/templatetags/media_tree_thumbnail.py @@ -295,4 +295,3 @@ def thumbnail(parser, token): return ThumbnailNode(source_var, opts=opts, context_name=context_name) register.tag(thumbnail) -raise_
Update media_tree_thumbnail.py
diff --git a/spec/deploy_hook_spec.rb b/spec/deploy_hook_spec.rb index <HASH>..<HASH> 100644 --- a/spec/deploy_hook_spec.rb +++ b/spec/deploy_hook_spec.rb @@ -194,7 +194,7 @@ describe "the deploy-hook API" do it "returns a brief problem description for hook files containing valid Ruby syntax" do hook_path = File.expand_path('../fixtures/invalid_hook.rb', __FILE__) desc = "spec/fixtures/invalid_hook.rb:1: syntax error, unexpected '^'" - match = /\A.*#{Regexp.escape desc}\Z/ + match = /#{Regexp.escape desc}/ @hook.syntax_error(hook_path).should =~ match end end
Fix deploy hook test broken by pull request merge.
diff --git a/io/eolearn/io/sentinelhub_service.py b/io/eolearn/io/sentinelhub_service.py index <HASH>..<HASH> 100644 --- a/io/eolearn/io/sentinelhub_service.py +++ b/io/eolearn/io/sentinelhub_service.py @@ -96,6 +96,10 @@ class SentinelHubOGCInput(EOTask): return 1.0 if name == 'time_difference': return datetime.timedelta(seconds=-1) + if name == 'size_x': + return None + if name == 'size_y': + return None raise ValueError('Parameter {} was neither defined in initialization of {} nor is contained in ' 'EOPatch'.format(name, self.__class__.__name__))
Bug fix: size_x or size_y can be None when making the very first request.
diff --git a/lib/sensu/io.rb b/lib/sensu/io.rb index <HASH>..<HASH> 100644 --- a/lib/sensu/io.rb +++ b/lib/sensu/io.rb @@ -68,7 +68,7 @@ module Sensu if wait_on_group wait_on_process_group(process.pid) end - [output, status.exited? ? status.exitstatus : 2] + [output, status.exitstatus || 2] end end end
exited?() can let nil exit statuses through
diff --git a/pkg/tsdb/loki/loki.go b/pkg/tsdb/loki/loki.go index <HASH>..<HASH> 100644 --- a/pkg/tsdb/loki/loki.go +++ b/pkg/tsdb/loki/loki.go @@ -141,10 +141,12 @@ func (s *Service) QueryData(ctx context.Context, req *backend.QueryDataRequest) span.SetTag("stop_unixnano", query.End.UnixNano()) defer span.Finish() - //Currently hard coded as not used - applies to log queries - limit := 1000 - //Currently hard coded as not used - applies to queries which produce a stream response - interval := time.Second * 1 + // `limit` only applies to log-producing queries, and we + // currently only support metric queries, so this can be set to any value. + limit := 1 + + // we do not use `interval`, so we set it to zero + interval := time.Duration(0) value, err := client.QueryRange(query.Expr, limit, query.Start, query.End, logproto.BACKWARD, query.Step, interval, false) if err != nil {
loki: alerting: simplified config (#<I>) * loki: alerting: simplified config * adjusted config handling
diff --git a/core/typechecker/src/test/java/org/overture/typechecker/tests/external/ExternalClassesRtTypeCheckTest.java b/core/typechecker/src/test/java/org/overture/typechecker/tests/external/ExternalClassesRtTypeCheckTest.java index <HASH>..<HASH> 100644 --- a/core/typechecker/src/test/java/org/overture/typechecker/tests/external/ExternalClassesRtTypeCheckTest.java +++ b/core/typechecker/src/test/java/org/overture/typechecker/tests/external/ExternalClassesRtTypeCheckTest.java @@ -17,7 +17,7 @@ public class ExternalClassesRtTypeCheckTest extends BaseTestSuite InvocationTargetException, NoSuchMethodException, IOException { Properties.recordTestResults = false; - String name = "Type_Check_Rt_Classes_TestSuite_External"; + String name = "Type_Check_RT_Classes_TestSuite_External"; File root = ExternalTestSettings.getBasePath("rttest/tc"); TestSuite test = null; if (root != null && root.exists())
fixing the path for the RT files
diff --git a/asammdf/mdf.py b/asammdf/mdf.py index <HASH>..<HASH> 100644 --- a/asammdf/mdf.py +++ b/asammdf/mdf.py @@ -2,7 +2,7 @@ """ common MDF file format module """ import csv -from datetime import datetime +from datetime import datetime, timezone import logging import xml.etree.ElementTree as ET from collections import OrderedDict, defaultdict @@ -1863,7 +1863,15 @@ class MDF(object): timestamps.append(header.start_time) - oldest = timestamps[0] + try: + oldest = min(timestamps) + except TypeError: + timestamps = [ + timestamp.astimezone(timezone.utc) + for timestamp in timestamps + ] + oldest = min(timestamps) + offsets = [(timestamp - oldest).total_seconds() for timestamp in timestamps] offsets = [offset if offset > 0 else 0 for offset in offsets] @@ -2212,7 +2220,15 @@ class MDF(object): timestamps.append(header.start_time) - oldest = min(timestamps) + try: + oldest = min(timestamps) + except TypeError: + timestamps = [ + timestamp.astimezone(timezone.utc) + for timestamp in timestamps + ] + oldest = min(timestamps) + offsets = [(timestamp - oldest).total_seconds() for timestamp in timestamps] stacked.header.start_time = oldest
handle mixed local time and utc time
diff --git a/test/test_list.rb b/test/test_list.rb index <HASH>..<HASH> 100644 --- a/test/test_list.rb +++ b/test/test_list.rb @@ -3,8 +3,17 @@ require "minitest/autorun" require "dreck" +# Tests for list results. class DreckListTest < Minitest::Test - # Tests for list results. + def test_list_bad_count + # requesting a non-positive sized list throws a bad count error + assert_raises Dreck::BadCountError do + Dreck.parse [] do + list :string, :stuff, count: -1 + end + end + end + def test_list_absorb_empty # parsing an empty list into a greedy list throws a greedy absorption error assert_raises Dreck::GreedyAbsorptionError do
test: Add test for BadCountError
diff --git a/lib/tri/table/__init__.py b/lib/tri/table/__init__.py index <HASH>..<HASH> 100644 --- a/lib/tri/table/__init__.py +++ b/lib/tri/table/__init__.py @@ -241,15 +241,12 @@ class Column(RefinableObject): return bound_column - EVALUATED_ATTRIBUTES = [ - 'after', 'attr', 'auto_rowspan', 'bulk', 'cell', 'choices', 'display_name', 'extra', 'group', 'model', 'model_field', 'query', 'show', 'sort_default_desc', 'sort_key', 'sortable', 'title', 'url' - ] - def _evaluate(self): """ Evaluates callable/lambda members. After this function is called all members will be values. """ - for k in self.EVALUATED_ATTRIBUTES: + evaluated_attributes = self.get_declared('refinable_members').keys() + for k in evaluated_attributes: v = getattr(self, k) new_value = evaluate_recursive(v, table=self.table, column=self) if new_value is not v:
Removed EVALUATED_MEMBERS
diff --git a/packages/openneuro-server/src/graphql/resolvers/dataset-search.js b/packages/openneuro-server/src/graphql/resolvers/dataset-search.js index <HASH>..<HASH> 100644 --- a/packages/openneuro-server/src/graphql/resolvers/dataset-search.js +++ b/packages/openneuro-server/src/graphql/resolvers/dataset-search.js @@ -81,7 +81,7 @@ export const datasetSearchConnection = async ( { q, after, first = 25 }, ) => { const requestBody = { - sort: [{ _score: 'asc', id: 'desc' }], + sort: [{ _score: 'asc', 'id.keyword': 'desc' }], } if (after) { try { @@ -93,7 +93,7 @@ export const datasetSearchConnection = async ( const result = await elasticClient.search({ index: elasticIndex, size: first, - q, + q: `${q} AND public:true`, body: requestBody, }) return elasticRelayConnection(result)
fix(search): Limit the basic search to public datasets
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -20,7 +20,7 @@ def check_setuptools(): check_setuptools() setup(name='instana', - version='1.8.1', + version='1.8.2', download_url='https://github.com/instana/python-sensor', url='https://www.instana.com/', license='MIT',
Bump package version to <I>
diff --git a/polysquarelinter/lint_spelling_only.py b/polysquarelinter/lint_spelling_only.py index <HASH>..<HASH> 100644 --- a/polysquarelinter/lint_spelling_only.py +++ b/polysquarelinter/lint_spelling_only.py @@ -122,7 +122,7 @@ def main(arguments=None): # suppress(unused-function) num_errors = 0 for found_filename in result.files: file_path = os.path.abspath(found_filename) - with open(file_path, "r+") as found_file: + with open(file_path, "rb+") as found_file: jobstamps_dependencies = [file_path] if os.path.exists(dictionary_path): diff --git a/polysquarelinter/linter.py b/polysquarelinter/linter.py index <HASH>..<HASH> 100644 --- a/polysquarelinter/linter.py +++ b/polysquarelinter/linter.py @@ -732,7 +732,7 @@ def _run_lint_on_file(file_path, If fix_what_you_can is specified, then the first error that has a possible replacement will be automatically fixed on this file. """ - with open(file_path, "r+") as found_file: + with open(file_path, "rb+") as found_file: file_contents = found_file.read().decode("utf-8") file_lines = file_contents.splitlines(True) try:
polysquarelinter: Read as binary
diff --git a/tests/unit/phpDocumentor/Parser/Middleware/EmittingMiddlewareTest.php b/tests/unit/phpDocumentor/Parser/Middleware/EmittingMiddlewareTest.php index <HASH>..<HASH> 100644 --- a/tests/unit/phpDocumentor/Parser/Middleware/EmittingMiddlewareTest.php +++ b/tests/unit/phpDocumentor/Parser/Middleware/EmittingMiddlewareTest.php @@ -29,14 +29,13 @@ use function md5; final class EmittingMiddlewareTest extends TestCase { /** - * Test is ran in a separate process because sometimes a Parser in another test registers itself to the - * EventDispatcher; this should be fixed. - * * @covers ::execute - * @runInSeparateProcess */ public function testEmitsPreParsingEvent() : void { + // start with a clean dispatcher + Dispatcher::setInstance('default', new Dispatcher()); + $filename = __FILE__; $file = new FileDescriptor(md5('result')); $file->setPath($filename);
Re-set Dispatcher for EmittingMiddleware test
diff --git a/molecule/core.py b/molecule/core.py index <HASH>..<HASH> 100644 --- a/molecule/core.py +++ b/molecule/core.py @@ -189,7 +189,7 @@ class Molecule(object): :return: None """ - inventory = '' + inventory = '[all]\n' for instance in self.driver.instances: inventory += self.driver.inventory_entry(instance)
Added ungrouped hosts under all (#<I>) This works around an Ansible <I> bug [1]. [1] <URL>
diff --git a/src/pylast/__init__.py b/src/pylast/__init__.py index <HASH>..<HASH> 100644 --- a/src/pylast/__init__.py +++ b/src/pylast/__init__.py @@ -1798,9 +1798,14 @@ class Artist(_Taggable): else: params = None - return self._extract_cdata_from_request( - self.ws_prefix + ".getInfo", section, params - ) + try: + bio = self._extract_cdata_from_request( + self.ws_prefix + ".getInfo", section, params + ) + except IndexError: + bio = None + + return bio def get_bio_published_date(self): """Returns the date on which the artist's biography was published."""
Last.fm now even skips an empty <content/> when no bio
diff --git a/subconvert/subparser/FrameTime.py b/subconvert/subparser/FrameTime.py index <HASH>..<HASH> 100644 --- a/subconvert/subparser/FrameTime.py +++ b/subconvert/subparser/FrameTime.py @@ -63,11 +63,21 @@ class FrameTime(object): 'miliseconds': self.miliseconds }) - def getTimeStr(self): - return "%d:%02d:%02d.%03d" % (self.hours, self.minutes, self.seconds, self.miliseconds) + def toStr(self, strType="time"): + """Convert FrameTime to string representation""" + if strType == "time": + return "%d:%02d:%02d.%03d" % (self.hours, self.minutes, self.seconds, self.miliseconds) + elif strType == "frame": + return "%s" % (self.frame) + else: + raise AttributeError(_("Incorrect string type: '%s'") % strType) - def getFrameStr(self): - return "%s" % (self.frame) + def changeFps(self, newFps): + if fps > 0: + self.fps = float(fps) + else: + raise ValueError(_("Incorrect FPS value: %s.") % fps) + self.frame = int(round(self.full_seconds * self.fps)) def __set_time__(self, seconds): """Set frame from a given time"""
Added changing FPS to FrameTime interface
diff --git a/python/ccxt/bitmex.py b/python/ccxt/bitmex.py index <HASH>..<HASH> 100644 --- a/python/ccxt/bitmex.py +++ b/python/ccxt/bitmex.py @@ -245,7 +245,10 @@ class bitmex (Exchange): # why the hassle? urlencode in python is kinda broken for nested dicts. # E.g. self.urlencode({"filter": {"open": True}}) will return "filter={'open':+True}" # Bitmex doesn't like that. Hence resorting to self hack. - request['filter'] = self.json(request['filter']) + + # There would be no 'filter' key in request when you call self.fetch_closed_orders or fetch_orders directly. + if 'filter' in request: + request['filter'] = self.json(request['filter']) response = self.privateGetOrder(request) return self.parse_orders(response, market, since, limit) @@ -255,6 +258,7 @@ class bitmex (Exchange): def fetch_closed_orders(self, symbol=None, since=None, limit=None, params={}): # Bitmex barfs if you set 'open': False in the filter... + # fetch_closed_orders doesn't set a 'filter' param. orders = self.fetch_orders(symbol, since, limit, params) return self.filter_by(orders, 'status', 'closed')
Fix bitmex fetch_orders functions fix fetch_orders and fetch_closed_orders cause they do not set a filter key by default.
diff --git a/bbs/task_bbs/convergence.go b/bbs/task_bbs/convergence.go index <HASH>..<HASH> 100644 --- a/bbs/task_bbs/convergence.go +++ b/bbs/task_bbs/convergence.go @@ -29,7 +29,11 @@ type compareAndSwappableTask struct { NewTask models.Task } -func (bbs *TaskBBS) ConvergeTasks(logger lager.Logger, expirePendingTaskDuration, convergenceInterval, timeToResolve time.Duration, cellsLoader *services_bbs.CellsLoader) { +func (bbs *TaskBBS) ConvergeTasks( + logger lager.Logger, + expirePendingTaskDuration, convergenceInterval, timeToResolve time.Duration, + cellsLoader *services_bbs.CellsLoader, +) { taskLog := logger.Session("converge-tasks") taskLog.Info("starting-convergence") defer taskLog.Info("finished-convergence")
Make function signature multi-line for readability
diff --git a/test/e2e/federated-service.go b/test/e2e/federated-service.go index <HASH>..<HASH> 100644 --- a/test/e2e/federated-service.go +++ b/test/e2e/federated-service.go @@ -214,6 +214,11 @@ func waitForFederatedServiceShard(cs *release_1_3.Clientset, namespace string, s if numSvcs > 0 && service != nil { // Renaming for clarity/readability clSvc := clSvcList.Items[0] + + // The federation service has no cluster IP. Clear any cluster IP before + // comparison. + clSvc.Spec.ClusterIP = "" + Expect(clSvc.Name).To(Equal(service.Name)) Expect(clSvc.Spec).To(Equal(service.Spec)) }
Clear ClusterIP in the local service before comparison.
diff --git a/haproxy/main.py b/haproxy/main.py index <HASH>..<HASH> 100644 --- a/haproxy/main.py +++ b/haproxy/main.py @@ -157,7 +157,7 @@ def print_commands(): description = eval('dummy_log_file.cmd_{0}.__doc__'.format(cmd)) if description: description = re.sub(r'\n\s+', ' ', description) - description.strip() + description = description.strip() print('{0}: {1}\n'.format(cmd, description))
strip() returns a new string It must be assigned to a variable.
diff --git a/tests/test_core.py b/tests/test_core.py index <HASH>..<HASH> 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -123,6 +123,9 @@ class TestResource: user = User() assert repr(user) == '<mysite.User: foo>' + del User.__str__ + assert repr(user) == '<mysite.User: [no __str__]>' + class TestSession: @@ -168,3 +171,6 @@ class TestSession: session = MySession() assert repr(session) == '<mysite.MySession: foo>' + + del MySession.__str__ + assert repr(session) == '<mysite.MySession: [no __str__]>'
test rebustness of session, resource repr
diff --git a/lib/createTask.js b/lib/createTask.js index <HASH>..<HASH> 100644 --- a/lib/createTask.js +++ b/lib/createTask.js @@ -78,6 +78,7 @@ var plugins = { , wrapper : require('./plugins/wrapper') , log : require('./plugins/logger') , compress : require('./plugins/compressor') + , preprocess : require('./plugins/preprocessor') }; function buildTask(task) { @@ -96,6 +97,7 @@ function buildTask(task) { if(task.filter) gulpTask = plugins.filter(gulpTask, task.filter, task); if(task.preLog || task.log) gulpTask = plugins.log(gulpTask, task.preLog, task); if(task.concat) gulpTask = plugins.concat(gulpTask, task.concat, task); + if(task.preprocess) gulpTask = plugins.preprocess(gulpTask, task.preprocess, task); if(task.rename) gulpTask = plugins.rename(gulpTask, task.rename, task); if(task.wrapper) gulpTask = plugins.wrapper(gulpTask, task.wrapper, task); if(task.replace) gulpTask = plugins.replace(gulpTask, task.replace, task);
Added preprocessor support scss for now hot fix
diff --git a/lib/listen/silencer.rb b/lib/listen/silencer.rb index <HASH>..<HASH> 100644 --- a/lib/listen/silencer.rb +++ b/lib/listen/silencer.rb @@ -34,6 +34,9 @@ module Listen | \.swpx | ^4913 + # Emacs backup/swap files + | (?:\.\#.+|\#.+\#) + # Sed temporary files - but without actual words, like 'sedatives' | (?:^ sed diff --git a/spec/lib/listen/silencer_spec.rb b/spec/lib/listen/silencer_spec.rb index <HASH>..<HASH> 100644 --- a/spec/lib/listen/silencer_spec.rb +++ b/spec/lib/listen/silencer_spec.rb @@ -34,6 +34,9 @@ RSpec.describe Listen::Silencer do # Vim swap files ignored += %w[foo.swp foo.swx foo.swpx 4913] + # Emacs backup/swap files + ignored += %w[#hello.rb# .#hello.rb] + # sed temp files ignored += %w[sedq7eVAR sed86w1kB]
Ignore emacs backup/swap files by default.
diff --git a/lib/jellyfish/swagger.rb b/lib/jellyfish/swagger.rb index <HASH>..<HASH> 100644 --- a/lib/jellyfish/swagger.rb +++ b/lib/jellyfish/swagger.rb @@ -5,9 +5,8 @@ module Jellyfish class Swagger include Jellyfish controller_include Jellyfish::NormalizedPath, Module.new{ - def block_call argument, block - headers_merge 'Content-Type' => 'application/json; charset=utf-8', - 'Access-Control-Allow-Origin' => '*' + def dispatch + headers_merge 'Content-Type' => 'application/json; charset=utf-8' super end }
swagger: use dispatch and do not add cors headers by default remove Access-Control-Allow-Origin by default
diff --git a/core/sdk/src/main/java/com/mongodb/stitch/core/auth/internal/CoreStitchAuth.java b/core/sdk/src/main/java/com/mongodb/stitch/core/auth/internal/CoreStitchAuth.java index <HASH>..<HASH> 100644 --- a/core/sdk/src/main/java/com/mongodb/stitch/core/auth/internal/CoreStitchAuth.java +++ b/core/sdk/src/main/java/com/mongodb/stitch/core/auth/internal/CoreStitchAuth.java @@ -203,6 +203,9 @@ public abstract class CoreStitchAuth<StitchUserT extends CoreStitchUser> @Override public <T> Stream<T> openAuthenticatedStream(final StitchAuthRequest stitchReq, final Decoder<T> decoder) { + if (!isLoggedIn()) { + throw new StitchClientException(StitchClientErrorCode.MUST_AUTHENTICATE_FIRST); + } try { return new Stream<>( requestClient.doStreamRequest(stitchReq.builder().withPath(
Throw if not logged in for stream request
diff --git a/src/emailjs-imap-client.js b/src/emailjs-imap-client.js index <HASH>..<HASH> 100644 --- a/src/emailjs-imap-client.js +++ b/src/emailjs-imap-client.js @@ -1095,6 +1095,11 @@ value: sequence }] }; + + if (options.valueAsString !== undefined) { + command.valueAsString = options.valueAsString; + } + var query = []; items.forEach((item) => { diff --git a/test/unit/emailjs-imap-client-test.js b/test/unit/emailjs-imap-client-test.js index <HASH>..<HASH> 100644 --- a/test/unit/emailjs-imap-client-test.js +++ b/test/unit/emailjs-imap-client-test.js @@ -1447,6 +1447,21 @@ }] }); }); + + it('should build FETCH with the valueAsString option', () => { + expect(br._buildFETCHCommand('1:*', ['body[]'], {valueAsString: false})).to.deep.equal({ + command: 'FETCH', + attributes: [{ + type: 'SEQUENCE', + value: '1:*' + }, { + type: 'ATOM', + value: 'BODY', + section: [] + }], + valueAsString: false + }); + }); }); describe('#_parseFETCH', () => {
Added valueAsString to the fetch command.
diff --git a/auto_ml/utils.py b/auto_ml/utils.py index <HASH>..<HASH> 100644 --- a/auto_ml/utils.py +++ b/auto_ml/utils.py @@ -15,13 +15,19 @@ import scipy import xgboost as xgb -def split_output(X, output_column_name): +def split_output(X, output_column_name, verbose=False): y = [] for row in X: y.append( row.pop(output_column_name) ) + if verbose: + print('Just to make sure that your y-values make sense, here are the first 100 sorted values:') + print(sorted(y)[:100]) + print('And here are the final 100 sorted values:') + print(sorted(y)[-100:]) + return X, y
adds some logging for our output values just so the user can catch any outliers
diff --git a/cake/libs/model/datasources/dbo_source.php b/cake/libs/model/datasources/dbo_source.php index <HASH>..<HASH> 100755 --- a/cake/libs/model/datasources/dbo_source.php +++ b/cake/libs/model/datasources/dbo_source.php @@ -515,7 +515,7 @@ class DboSource extends DataSource { * @return integer Number of rows in resultset */ function lastNumRows() { - return $this->lastAffected($source); + return $this->lastAffected(); } /**
Removed the unused var.
diff --git a/lib/qprompt.py b/lib/qprompt.py index <HASH>..<HASH> 100644 --- a/lib/qprompt.py +++ b/lib/qprompt.py @@ -289,10 +289,10 @@ def ask(msg="Enter input", fmt=None, dft=None, vld=None, shw=True, blk=False): msg += " [%s]" % (dft if type(dft) is str else repr(dft)) vld.append(dft) if vld: - # Input cannot be blank if validity check provided. - blk = False # Sanitize valid inputs. vld = list(set([fmt(v) if fmt(v) else v for v in vld])) + if str not in vld: + blk = False # NOTE: The following fixes a Py3 related bug found in `0.8.1`. try: vld = sorted(vld) except: pass @@ -303,7 +303,7 @@ def ask(msg="Enter input", fmt=None, dft=None, vld=None, shw=True, blk=False): ans = get_input(msg) if "?" == ans: if vld: - echo(vld) + echo("%r %s" % (vld, "(may be blank)" if blk else "")) ans = None continue if "" == ans:
Minor update to how blk is handled in ask.
diff --git a/spec/unit/validation_errors/enumerable_spec.rb b/spec/unit/validation_errors/enumerable_spec.rb index <HASH>..<HASH> 100644 --- a/spec/unit/validation_errors/enumerable_spec.rb +++ b/spec/unit/validation_errors/enumerable_spec.rb @@ -16,7 +16,8 @@ describe DataMapper::Validate::ValidationErrors do seen << i end - seen.should == [["must have valid format"], ["can't be blank"]] + seen.should include(["must have valid format"]) + seen.should include(["can't be blank"]) end end @@ -26,7 +27,10 @@ describe DataMapper::Validate::ValidationErrors do @model.add(:ip_address, "must belong to a local subnet") end it "maps error message arrays using provided block" do - @model.map { |ary| ary.size }.should == [2, 1] + projection = @model.map { |ary| ary.size } + + projection.should include(2) + projection.should include(1) end end end
[dm-validations] Hash enumeration does not guarantee order of iteration, update spec examples
diff --git a/openhtf/io/frontend/__init__.py b/openhtf/io/frontend/__init__.py index <HASH>..<HASH> 100644 --- a/openhtf/io/frontend/__init__.py +++ b/openhtf/io/frontend/__init__.py @@ -338,7 +338,7 @@ class WebGuiServer(tornado.web.Application): ] + dash_router.urls + station_router.urls super(WebGuiServer, self).__init__( handler_routes, template_path=path, static_path=path, debug=dev_mode) - self.listen(self.port) + self.listen(http_port) def remove_handlers_by_url(self, url): """Remove any handlers with the given URL pattern (must match exactly)."""
Fix a small bug that prevents the frontend from running. (#<I>)
diff --git a/asammdf/mdf.py b/asammdf/mdf.py index <HASH>..<HASH> 100644 --- a/asammdf/mdf.py +++ b/asammdf/mdf.py @@ -3452,7 +3452,7 @@ class MDF(object): else: index = msg_map[entry] - sigs = [(t, None)] + sigs = [] for name_, signal in signals.items(): @@ -3465,6 +3465,10 @@ class MDF(object): and signal["is_max"] ) + t = signal["t"] + + sigs.insert(0, (t, None)) + out.extend(index, sigs) self._set_temporary_master(None) cntr += 1 diff --git a/asammdf/version.py b/asammdf/version.py index <HASH>..<HASH> 100644 --- a/asammdf/version.py +++ b/asammdf/version.py @@ -1,4 +1,4 @@ # -*- coding: utf-8 -*- """ asammdf version module """ -__version__ = "5.16.0.dev17" +__version__ = "5.16.0.dev18"
fix can extraction for OBD2 muxed signals
diff --git a/core/packet.go b/core/packet.go index <HASH>..<HASH> 100644 --- a/core/packet.go +++ b/core/packet.go @@ -32,7 +32,7 @@ func (p Packet) DevAddr() (lorawan.DevAddr, error) { } // FCnt returns the frame counter of the given packet -func (p Packet) Fcnt() (uint16, error) { +func (p Packet) Fcnt() (uint32, error) { if p.Payload.MACPayload == nil { return 0, fmt.Errorf("MACPayload should not be empty") }
brocaar/lorawan changed FCnt to uint<I>
diff --git a/fcrepo-kernel/src/main/java/org/fcrepo/spring/ModeShapeRepositoryFactoryBean.java b/fcrepo-kernel/src/main/java/org/fcrepo/spring/ModeShapeRepositoryFactoryBean.java index <HASH>..<HASH> 100644 --- a/fcrepo-kernel/src/main/java/org/fcrepo/spring/ModeShapeRepositoryFactoryBean.java +++ b/fcrepo-kernel/src/main/java/org/fcrepo/spring/ModeShapeRepositoryFactoryBean.java @@ -49,6 +49,7 @@ public class ModeShapeRepositoryFactoryBean implements } s.save(); + s.logout(); } @Override
make sure to log-out our repository initialization session
diff --git a/fulfil_client/client.py b/fulfil_client/client.py index <HASH>..<HASH> 100755 --- a/fulfil_client/client.py +++ b/fulfil_client/client.py @@ -96,7 +96,8 @@ class Model(object): def __getattr__(self, name): @json_response def proxy_method(*args, **kwargs): - context = kwargs.pop('context', self.client.context) + context = self.client.context.copy() + context.update(kwargs.pop('context', {})) request_logger.debug( "%s.%s::%s::%s" % ( self.model_name, name, args, kwargs diff --git a/tests/test_fulfil_client.py b/tests/test_fulfil_client.py index <HASH>..<HASH> 100755 --- a/tests/test_fulfil_client.py +++ b/tests/test_fulfil_client.py @@ -30,4 +30,4 @@ def test_find_no_filter(client): def test_raises_server_error(client): Model = client.model('ir.model') with pytest.raises(ServerError): - Model.search([], context=1) + Model.search(1)
Update existing context for requests While this was the behavior on the the get request it seems to have been forgotten on the context for geenric method handler.
diff --git a/choix/utils.py b/choix/utils.py index <HASH>..<HASH> 100644 --- a/choix/utils.py +++ b/choix/utils.py @@ -358,7 +358,7 @@ def compare(items, params, rank=False): def probabilities(items, params): - """Compute the comparison outcome probabilities. + """Compute the comparison outcome probabilities given a subset of items. This function computes, for each item in ``items``, the probability that it would win (i.e., be chosen) in a comparison involving the items, given
Improved dosctring for `probabilities`. The docstring of the function `probabilities` was a little bit too minimalistic. Now it states more clearly that it computes the distribution for the subset of items passed as argument.
diff --git a/src/gitgraph.js b/src/gitgraph.js index <HASH>..<HASH> 100644 --- a/src/gitgraph.js +++ b/src/gitgraph.js @@ -78,7 +78,8 @@ break; default: this.orientation = "vertical"; - this.template.branch.labelRotation = options.template.branch !== undefined && + + this.template.branch.labelRotation = _isDefined(options, 'template.branch.labelRotation') && options.template.branch.labelRotation !== null ? options.template.branch.labelRotation : 0; break; @@ -1557,6 +1558,15 @@ return (typeof object === "object"); } + function _isDefined(obj, key) { + return key.split(".").every(function(x) { + if(typeof obj != "object" || obj === null || ! x in obj) + return false; + obj = obj[x]; + return true; + }); + } + // Expose GitGraph object window.GitGraph = GitGraph; window.GitGraph.Branch = Branch;
Added utility function to check for undefined values in nested object properties.
diff --git a/Commands/StartCommand.php b/Commands/StartCommand.php index <HASH>..<HASH> 100644 --- a/Commands/StartCommand.php +++ b/Commands/StartCommand.php @@ -32,7 +32,8 @@ class StartCommand extends Command { $config = $this->initializeConfig($input, $output); - $handler = new ProcessManager($output, $config['port'], $config['host'], $config['workers']); + $class = isset($config['processmanager']) ? $config['processmanager'] : ProcessManager::class; + $handler = new $class($output, $config['port'], $config['host'], $config['workers']); $handler->setBridge($config['bridge']); $handler->setAppEnv($config['app-env']);
Create ProcessManager from optional factory (#<I>) * Create ProcessManager from optional factory * Instantiate user-defined process manager class * Remove command line option
diff --git a/wicket-orientdb/src/main/java/ru/ydn/wicket/wicketorientdb/model/ODocumentWrapperModel.java b/wicket-orientdb/src/main/java/ru/ydn/wicket/wicketorientdb/model/ODocumentWrapperModel.java index <HASH>..<HASH> 100644 --- a/wicket-orientdb/src/main/java/ru/ydn/wicket/wicketorientdb/model/ODocumentWrapperModel.java +++ b/wicket-orientdb/src/main/java/ru/ydn/wicket/wicketorientdb/model/ODocumentWrapperModel.java @@ -26,7 +26,7 @@ public class ODocumentWrapperModel<T extends ODocumentWrapper> extends Model<T> T ret= super.getObject(); if(ret!=null && needToReload) { - ret.reload(); + ret.load(); needToReload = false; } return ret; @@ -44,6 +44,4 @@ public class ODocumentWrapperModel<T extends ODocumentWrapper> extends Model<T> super.detach(); } - - }
Reload() shouldn't cross transation: replace my load()
diff --git a/Neos.Flow/Classes/Security/Aspect/LoggingAspect.php b/Neos.Flow/Classes/Security/Aspect/LoggingAspect.php index <HASH>..<HASH> 100644 --- a/Neos.Flow/Classes/Security/Aspect/LoggingAspect.php +++ b/Neos.Flow/Classes/Security/Aspect/LoggingAspect.php @@ -15,7 +15,6 @@ namespace Neos\Flow\Security\Aspect; use Neos\Flow\Annotations as Flow; use Neos\Flow\Aop\JoinPointInterface; -use Neos\Flow\Log\PsrSecurityLoggerInterface; use Neos\Flow\Security\Authentication\AuthenticationManagerInterface; use Neos\Flow\Security\Authentication\TokenInterface; use Neos\Flow\Security\Exception\NoTokensAuthenticatedException; @@ -29,8 +28,8 @@ use Neos\Flow\Security\Exception\NoTokensAuthenticatedException; class LoggingAspect { /** - * @var PsrSecurityLoggerInterface - * @Flow\Inject + * @var \Psr\Log\LoggerInterface + * @Flow\Inject(name="Neos.Flow:SecurityLogger") */ protected $securityLogger;
TASK: Use virtual object injection for security logger
diff --git a/Neos.Flow/Classes/Command/RoutingCommandController.php b/Neos.Flow/Classes/Command/RoutingCommandController.php index <HASH>..<HASH> 100644 --- a/Neos.Flow/Classes/Command/RoutingCommandController.php +++ b/Neos.Flow/Classes/Command/RoutingCommandController.php @@ -143,7 +143,7 @@ class RoutingCommandController extends CommandController $this->outputLine(' Pattern: ' . $route->getUriPattern()); $this->outputLine('<b>Generated Path:</b>'); - $this->outputLine(' ' . $route->getResolvedUriPath()); + $this->outputLine(' ' . $route->getResolvedUriConstraints()->getPathConstraint()); if ($controllerObjectName !== null) { $this->outputLine('<b>Controller:</b>');
BUGFIX: Replace missing getResolvedUriPath
diff --git a/Kwc/Abstract/Admin.php b/Kwc/Abstract/Admin.php index <HASH>..<HASH> 100644 --- a/Kwc/Abstract/Admin.php +++ b/Kwc/Abstract/Admin.php @@ -67,10 +67,11 @@ class Kwc_Abstract_Admin extends Kwf_Component_Abstract_Admin $s = array('ignoreVisible'=>true); foreach ($source->getChildComponents($s) as $c) { - if ($c->generator->hasSetting('inherit') && $c->generator->getSetting('inherit')) { - if ($c->generator->hasSetting('unique') && $c->generator->getSetting('unique')) { + if ($c->generator->hasSetting('inherit') && $c->generator->getSetting('inherit') && + $c->generator->hasSetting('unique') && $c->generator->getSetting('unique') && + $source->componentId != $c->parent->componentId + ) { continue; - } } if ($c->generator->getGeneratorFlag('pageGenerator')) { continue;
Skip duplicating of unique boxes only for child pages
diff --git a/public/javascript/pump.js b/public/javascript/pump.js index <HASH>..<HASH> 100644 --- a/public/javascript/pump.js +++ b/public/javascript/pump.js @@ -70,6 +70,12 @@ if (!window.Pump) { if (Pump.principalUser) { Pump.principalUser = Pump.User.unique(Pump.principalUser); Pump.principal = Pump.principalUser.profile; + Pump.body.nav = new Pump.UserNav({el: Pump.body.$(".navbar-inner .container"), + model: Pump.principalUser, + data: { + messages: Pump.principalUser.majorDirectInbox, + notifications: Pump.principalUser.minorDirectInbox + }}); } else if (Pump.principal) { Pump.principal = Pump.Person.unique(Pump.principal); } else {
Initialize nav if user is set by server
diff --git a/actionpack/lib/action_view/helpers/number_helper.rb b/actionpack/lib/action_view/helpers/number_helper.rb index <HASH>..<HASH> 100644 --- a/actionpack/lib/action_view/helpers/number_helper.rb +++ b/actionpack/lib/action_view/helpers/number_helper.rb @@ -100,10 +100,10 @@ module ActionView # number_to_currency(1234567890.50) # => $1,234,567,890.50 # number_to_currency(1234567890.506) # => $1,234,567,890.51 # number_to_currency(1234567890.506, :precision => 3) # => $1,234,567,890.506 - # number_to_currency(1234567890.506, :locale => :fr) # => 1 234 567 890,506 € + # number_to_currency(1234567890.506, :locale => :fr) # => 1 234 567 890,51 € # # number_to_currency(-1234567890.50, :negative_format => "(%u%n)") - # # => ($1,234,567,890.51) + # # => ($1,234,567,890.50) # number_to_currency(1234567890.50, :unit => "&pound;", :separator => ",", :delimiter => "") # # => &pound;1234567890,50 # number_to_currency(1234567890.50, :unit => "&pound;", :separator => ",", :delimiter => "", :format => "%n %u")
Cosmetic fix in number_to_currency docs