diff
stringlengths 65
26.7k
| message
stringlengths 7
9.92k
|
|---|---|
diff --git a/carrot/messaging.py b/carrot/messaging.py
index <HASH>..<HASH> 100644
--- a/carrot/messaging.py
+++ b/carrot/messaging.py
@@ -36,7 +36,7 @@ class Message(object):
"""Reject this message.
The message will then be discarded by the server.
"""
- return self.channel.basic_reject(self.delivery_tag)
+ return self.channel.basic_reject(self.delivery_tag, requeue=False)
def requeue(self):
"""Reject this message and put it back on the queue.
|
requeue is a requirement argument to basic_reject.
|
diff --git a/lib/metadata/VmConfig/VmConfig.rb b/lib/metadata/VmConfig/VmConfig.rb
index <HASH>..<HASH> 100644
--- a/lib/metadata/VmConfig/VmConfig.rb
+++ b/lib/metadata/VmConfig/VmConfig.rb
@@ -390,7 +390,10 @@ class VmConfig
creds = $miqHostCfg.ems[$miqHostCfg.emsLocal]
elsif $miqHostCfg.vimHost
c = $miqHostCfg.vimHost
- return nil if c[:username].nil?
+ if c[:username].nil?
+ $log.warn "Host credentials are missing: skipping snapshot information."
+ return nil
+ end
creds = {'host' => (c[:hostname] || c[:ipaddress]), 'user' => c[:username], 'password' => c[:password], 'use_vim_broker' => c[:use_vim_broker]}
end
end
@@ -611,7 +614,12 @@ class VmConfig
hostVim = nil
if miqvm.vim.isVirtualCenter?
hostVim = connect_to_host_vim('snapshot_metadata', miqvm.vmConfigFile)
- return if hostVim.nil?
+
+ if hostVim.nil?
+ $log.warn "Snapshots information will be skipped due to EMS host missing credentials."
+ return
+ end
+
vimDs = hostVim.getVimDataStore(ds)
else
vimDs = miqvm.vim.getVimDataStore(ds)
|
Add waning messages when snapshots missed due to host credentials
|
diff --git a/openpnm/core/_models.py b/openpnm/core/_models.py
index <HASH>..<HASH> 100644
--- a/openpnm/core/_models.py
+++ b/openpnm/core/_models.py
@@ -233,6 +233,28 @@ class ModelWrapper(dict):
This class is used to hold individual models and provide some extra
functionality, such as pretty-printing.
"""
+
+ def __call__(self):
+ f = self['model']
+ target = self._find_parent()
+ kwargs = self.copy()
+ for kw in ['regen_mode', 'target', 'model']:
+ kwargs.pop(kw, None)
+ vals = f(target=target, **kwargs)
+ return vals
+
+ def _find_parent(self):
+ r"""
+ Finds and returns the parent object to self.
+ """
+ for proj in ws.values():
+ for obj in proj:
+ if hasattr(obj, "models"):
+ for mod in obj.models.keys():
+ if obj.models[mod] is self:
+ return obj
+ raise Exception("No parent object found!")
+
@property
def propname(self):
for proj in ws.values():
|
Giving model wrappers the ability to 'call' themselves
|
diff --git a/rllib/agents/dqn/simple_q.py b/rllib/agents/dqn/simple_q.py
index <HASH>..<HASH> 100644
--- a/rllib/agents/dqn/simple_q.py
+++ b/rllib/agents/dqn/simple_q.py
@@ -17,7 +17,10 @@ from ray.rllib.agents.dqn.simple_q_torch_policy import SimpleQTorchPolicy
from ray.rllib.agents.trainer import Trainer
from ray.rllib.agents.trainer_config import TrainerConfig
from ray.rllib.utils.metrics import SYNCH_WORKER_WEIGHTS_TIMER
-from ray.rllib.utils.replay_buffers.utils import validate_buffer_config
+from ray.rllib.utils.replay_buffers.utils import (
+ validate_buffer_config,
+ update_priorities_in_replay_buffer,
+)
from ray.rllib.execution.rollout_ops import (
synchronous_parallel_sample,
)
@@ -352,6 +355,14 @@ class SimpleQTrainer(Trainer):
else:
train_results = multi_gpu_train_one_step(self, train_batch)
+ # Update replay buffer priorities.
+ update_priorities_in_replay_buffer(
+ self.local_replay_buffer,
+ self.config,
+ train_batch,
+ train_results,
+ )
+
# TODO: Move training steps counter update outside of `train_one_step()` method.
# # Update train step counters.
# self._counters[NUM_ENV_STEPS_TRAINED] += train_batch.env_steps()
|
[RLlib] Prioritized Replay (if required) in SimpleQ and DDPG. (#<I>)
|
diff --git a/lib/benchmark_driver/runner/time.rb b/lib/benchmark_driver/runner/time.rb
index <HASH>..<HASH> 100644
--- a/lib/benchmark_driver/runner/time.rb
+++ b/lib/benchmark_driver/runner/time.rb
@@ -6,7 +6,7 @@ class BenchmarkDriver::Runner::Time < BenchmarkDriver::Runner::Ips
# Dynamically fetched and used by `BenchmarkDriver::JobParser.parse`
JobParser = BenchmarkDriver::DefaultJobParser.for(Job)
- METRICS_TYPE = BenchmarkDriver::Metrics::Type.new(unit: 's')
+ METRICS_TYPE = BenchmarkDriver::Metrics::Type.new(unit: 's', larger_better: false)
# Overriding BenchmarkDriver::Runner::Ips#set_metrics_type
def set_metrics_type
|
Fix time runner to regard small number as better
|
diff --git a/app/models/curated_list.rb b/app/models/curated_list.rb
index <HASH>..<HASH> 100644
--- a/app/models/curated_list.rb
+++ b/app/models/curated_list.rb
@@ -4,6 +4,9 @@ class CuratedList
include Mongoid::Document
include Mongoid::Timestamps
+ include Taggable
+ stores_tags_for :sections
+
field "slug", type: String
field "artefact_ids", type: Array, default: [] # order is important
diff --git a/test/models/curated_list_test.rb b/test/models/curated_list_test.rb
index <HASH>..<HASH> 100644
--- a/test/models/curated_list_test.rb
+++ b/test/models/curated_list_test.rb
@@ -6,4 +6,14 @@ class CuratedListTest < ActiveSupport::TestCase
assert !cl.valid?
assert cl.errors[:slug].any?, "Doesn't have error on slug"
end
+
+ test "should include ability to have a section tag" do
+ cl = FactoryGirl.create(:curated_list)
+ tag = FactoryGirl.create(:tag, tag_id: 'batman', title: 'Batman', tag_type: 'section')
+
+ cl.sections = ['batman']
+ cl.save
+
+ assert_equal [tag], cl.sections
+ end
end
\ No newline at end of file
|
Make curated lists taggable
Primary use case for this is to enable a curated list to be tagged with a single section.
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -18,6 +18,7 @@ general_requirements = [
]
api_requirements = [
+ 'markupsafe == 2.0.1', # While flask revision < 2
'flask == 1.1.4',
'flask-cors == 3.0.10',
'gunicorn >= 20.0.0, < 21.0.0',
|
Fix MarkupSafe revision
As dependency of Flask <I> through Jinja2 <I>
|
diff --git a/lib/metriks/timer.rb b/lib/metriks/timer.rb
index <HASH>..<HASH> 100644
--- a/lib/metriks/timer.rb
+++ b/lib/metriks/timer.rb
@@ -12,6 +12,10 @@ module Metriks
@interval = Hitimes::Interval.now
end
+ def restart
+ @interval.split
+ end
+
def stop
@interval.stop
@timer.update(@interval.duration)
|
Add restart() method to Timer context to restart timing
|
diff --git a/src/main/java/com/deathrayresearch/outlier/columns/packeddata/PackedLocalDateTime.java b/src/main/java/com/deathrayresearch/outlier/columns/packeddata/PackedLocalDateTime.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/deathrayresearch/outlier/columns/packeddata/PackedLocalDateTime.java
+++ b/src/main/java/com/deathrayresearch/outlier/columns/packeddata/PackedLocalDateTime.java
@@ -91,11 +91,11 @@ public class PackedLocalDateTime {
return (((long) date) << 32) | (time & 0xffffffffL);
}
- static int date(long packedDateTIme) {
+ public static int date(long packedDateTIme) {
return (int) (packedDateTIme >> 32);
}
- static int time(long packedDateTIme) {
+ public static int time(long packedDateTIme) {
return (int) packedDateTIme;
}
|
fixed access level in PackedLocalDateTime
|
diff --git a/src/main/java/org/jboss/pressgang/ccms/docbook/processing/DocbookXMLPreProcessor.java b/src/main/java/org/jboss/pressgang/ccms/docbook/processing/DocbookXMLPreProcessor.java
index <HASH>..<HASH> 100644
--- a/src/main/java/org/jboss/pressgang/ccms/docbook/processing/DocbookXMLPreProcessor.java
+++ b/src/main/java/org/jboss/pressgang/ccms/docbook/processing/DocbookXMLPreProcessor.java
@@ -259,7 +259,7 @@ public class DocbookXMLPreProcessor {
document.getDocumentElement().appendChild(additionalXMLEditorLinkPara);
final Element editorULink = document.createElement("ulink");
- editorLinkPara.appendChild(editorULink);
+ additionalXMLEditorLinkPara.appendChild(editorULink);
editorULink.setTextContent("Edit the Additional Translated XML");
editorULink.setAttribute("url", additionalXMLEditorUrl);
}
|
Fixed a bug where the additional xml editor link was being included in the wrong para.
|
diff --git a/actionpack/lib/action_dispatch/http/mime_negotiation.rb b/actionpack/lib/action_dispatch/http/mime_negotiation.rb
index <HASH>..<HASH> 100644
--- a/actionpack/lib/action_dispatch/http/mime_negotiation.rb
+++ b/actionpack/lib/action_dispatch/http/mime_negotiation.rb
@@ -48,7 +48,7 @@ module ActionDispatch
@env["action_dispatch.request.formats"] ||=
if parameters[:format]
Array(Mime[parameters[:format]])
- elsif xhr? || (accept && !accept.include?(?,))
+ elsif xhr? || (accept && accept !~ /,\s*\*\/\*/)
accepts
else
[Mime::HTML]
@@ -87,4 +87,4 @@ module ActionDispatch
end
end
end
-end
\ No newline at end of file
+end
|
Slightly less annoying check for acceptable mime_types. This allows Accept: application/json, application/jsonp (and the like), but still blacklists browsers. Essentially, we use normal content negotiation unless you include */* in your list, in which case we assume you're a browser and send HTML [#<I> state:resolved]
|
diff --git a/src/Password/Rule.php b/src/Password/Rule.php
index <HASH>..<HASH> 100644
--- a/src/Password/Rule.php
+++ b/src/Password/Rule.php
@@ -394,9 +394,10 @@ class Rule extends Relational
* @param array $rules
* @param mixed $user
* @param string $name
+ * @param bool $isNew
* @return array
*/
- public static function verify($password, $rules, $user, $name=null)
+ public static function verify($password, $rules, $user, $name=null, $isNew=true)
{
if (empty($rules))
{
@@ -581,7 +582,7 @@ class Rule extends Relational
$current = Password::getInstance($user);
// [HUBZERO][#10274] Check the current password too
- if (Password::passwordMatches($user, $password, true))
+ if ($isNew && Password::passwordMatches($user, $password, true))
{
$fail[] = $rule['failuremsg'];
}
|
Adding flag to indicate is an existing or new password is being rule checked (#<I>)
|
diff --git a/packages/vaex-core/vaex/remote.py b/packages/vaex-core/vaex/remote.py
index <HASH>..<HASH> 100644
--- a/packages/vaex-core/vaex/remote.py
+++ b/packages/vaex-core/vaex/remote.py
@@ -120,7 +120,7 @@ class ServerRest(object):
self.io_loop.make_current()
# if async:
self.http_client_async = AsyncHTTPClient()
- self.http_client = HTTPClient()
+ # self.http_client = HTTPClient()
self.user_id = vaex.settings.webclient.get("cookie.user_id")
self.use_websocket = websocket
self.websocket = None
@@ -135,7 +135,7 @@ class ServerRest(object):
def close(self):
# self.http_client_async.
- self.http_client.close()
+ # self.http_client.close()
if self.use_websocket:
if self.websocket:
self.websocket.close()
|
fix(remote): only use async websocket/http, since sync conflicts with kernel ioloop
|
diff --git a/openquake/commands/webui.py b/openquake/commands/webui.py
index <HASH>..<HASH> 100644
--- a/openquake/commands/webui.py
+++ b/openquake/commands/webui.py
@@ -39,7 +39,7 @@ def webui(cmd, hostport='127.0.0.1:8800'):
"""
db_path = os.path.expanduser(config.get('dbserver', 'file'))
- if not os.access(db_path, os.W_OK):
+ if os.path.isfile(db_path) and not os.access(db_path, os.W_OK):
sys.exit('This command must be run by the proper user: '
'see the documentation for details')
if cmd == 'start':
|
Allow the WebUI to bootstrap the DB
Former-commit-id: <I>dbd<I>a4e9c<I>ecdef1aabb<I>
|
diff --git a/libraries/client.js b/libraries/client.js
index <HASH>..<HASH> 100644
--- a/libraries/client.js
+++ b/libraries/client.js
@@ -519,6 +519,7 @@ client.prototype._fastReconnectMessage = function(message) {
/* Connect to the server */
client.prototype.connect = function() {
var self = this;
+ var deferred = q.defer();
var connection = self.options.connection || {};
@@ -527,6 +528,8 @@ client.prototype.connect = function() {
var serverType = connection.serverType || 'chat';
servers.getServer(self, serverType, preferredServer, preferredPort, function(server){
+ deferred.resolve(true);
+
var authenticate = function authenticate() {
var identity = self.options.identity || {};
var nickname = identity.username || 'justinfan' + Math.floor((Math.random() * 80000) + 1000);
@@ -543,6 +546,8 @@ client.prototype.connect = function() {
self.socket.pipe(self.stream);
});
+
+ return deferred.promise;
};
/* Gracefully reconnect to the server */
|
Method connect() is now supporting promises.
|
diff --git a/tests/cases/analysis/LoggerTest.php b/tests/cases/analysis/LoggerTest.php
index <HASH>..<HASH> 100644
--- a/tests/cases/analysis/LoggerTest.php
+++ b/tests/cases/analysis/LoggerTest.php
@@ -18,7 +18,16 @@ use lithium\tests\mocks\analysis\MockLoggerAdapter;
class LoggerTest extends \lithium\test\Unit {
public function skip() {
- $this->_testPath = Libraries::get(true, 'resources') . '/tmp/tests';
+ $path = Libraries::get(true, 'resources');
+
+ if (is_writable($path)) {
+ foreach (array("{$path}/tmp/tests", "{$path}/tmp/logs") as $dir) {
+ if (!is_dir($dir)) {
+ mkdir($dir, 0777, true);
+ }
+ }
+ }
+ $this->_testPath = "{$path}/tmp/tests";
$this->skipIf(!is_writable($this->_testPath), "{$this->_testPath} is not readable.");
}
|
`Logger` test now generates its own temp directories instead of skipping.
|
diff --git a/src/main.js b/src/main.js
index <HASH>..<HASH> 100644
--- a/src/main.js
+++ b/src/main.js
@@ -33,6 +33,6 @@ if (typeof module !== "undefined" && typeof module.exports !== "undefined") {
if (typeof window !== "undefined") {
window["GeoTIFF"] = {parse:parse};
} else if (typeof self !== "undefined") {
- self["GeoTIFF"] = { parse: parse };
+ self["GeoTIFF"] = { parse: parse }; // jshint ignore:line
}
|
ignore jshint error about self being undefined
|
diff --git a/src/Router/IndexedRouter.php b/src/Router/IndexedRouter.php
index <HASH>..<HASH> 100644
--- a/src/Router/IndexedRouter.php
+++ b/src/Router/IndexedRouter.php
@@ -66,7 +66,7 @@ class IndexedRouter extends Router
*/
public function resolve(Request $request): ?Route
{
- foreach( $this->indexes[$request->getMethod()] as $route ){
+ foreach( $this->indexes[$request->getMethod()] ?? [] as $route ){
if( $route->matchUri($request->getPathInfo()) &&
$route->matchMethod($request->getMethod()) &&
|
Fixing bad array access on IdexedRouter.
|
diff --git a/src/main/java/org/arp/javautil/collections/Collections.java b/src/main/java/org/arp/javautil/collections/Collections.java
index <HASH>..<HASH> 100644
--- a/src/main/java/org/arp/javautil/collections/Collections.java
+++ b/src/main/java/org/arp/javautil/collections/Collections.java
@@ -1,6 +1,9 @@
package org.arp.javautil.collections;
+import java.util.ArrayList;
import java.util.Collection;
+import java.util.List;
+import java.util.Map;
/**
* Extra utilities for collections.
@@ -33,4 +36,22 @@ public class Collections {
return Iterators.join(c.iterator(), separator);
}
}
+
+ /**
+ * Puts a value into a map of key -> list of values. If the specified key
+ * is new, it creates an {@link ArrayList} as its value.
+ * @param map a {@link Map}.
+ * @param key a key.
+ * @param valueElt a value.
+ */
+ public static <K, V> void putList(Map<K, List<V>> map, K key, V valueElt) {
+ if (map.containsKey(key)) {
+ List<V> l = map.get(key);
+ l.add(valueElt);
+ } else {
+ List<V> l = new ArrayList<V>();
+ l.add(valueElt);
+ map.put(key, l);
+ }
+ }
}
|
Added Collections.putList to simplify putting new values into maps to lists.
|
diff --git a/pygsp/graphs/nngraphs/nngraph.py b/pygsp/graphs/nngraphs/nngraph.py
index <HASH>..<HASH> 100644
--- a/pygsp/graphs/nngraphs/nngraph.py
+++ b/pygsp/graphs/nngraphs/nngraph.py
@@ -92,6 +92,10 @@ class NNGraph(Graph):
N, d = np.shape(self.Xin)
Xout = self.Xin
+ if k >= N:
+ raise ValueError('The number of neighbors (k={}) must be smaller '
+ 'than the number of nodes ({}).'.format(k, N))
+
if self.center:
Xout = self.Xin - np.kron(np.ones((N, 1)),
np.mean(self.Xin, axis=0))
|
error if #neighbors greater than #nodes
|
diff --git a/src/components/Header/HeaderView.js b/src/components/Header/HeaderView.js
index <HASH>..<HASH> 100644
--- a/src/components/Header/HeaderView.js
+++ b/src/components/Header/HeaderView.js
@@ -26,8 +26,8 @@ const HeaderView = ({
href={githubLink}
>
On Github
- </div>
-</nav>);
+ </a>
+</div>);
HeaderView.propTypes = {
items: PropTypes.arrayOf(PropTypes.shape({
|
fix: Fix syntax errors made in previous commit
|
diff --git a/src/main/java/com/gistlabs/mechanize/MechanizeAgent.java b/src/main/java/com/gistlabs/mechanize/MechanizeAgent.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/gistlabs/mechanize/MechanizeAgent.java
+++ b/src/main/java/com/gistlabs/mechanize/MechanizeAgent.java
@@ -309,15 +309,10 @@ public class MechanizeAgent {
/** Returns the page object received as response to the form submit action. */
public Page submit(Form form, Parameters formParams) {
- try {
- return request(createSubmitRequest(form, formParams));
- } catch (UnsupportedEncodingException e) {
- throw new MechanizeUnsupportedEncodingException(e);
- }
+ return request(createSubmitRequest(form, formParams));
}
- private HttpRequestBase createSubmitRequest(Form form, Parameters formParams)
- throws UnsupportedEncodingException {
+ private HttpRequestBase createSubmitRequest(Form form, Parameters formParams) {
String uri = form.getUri();
HttpRequestBase request = null;
|
Minor Refactoring by removing unnecessary try catch block.
|
diff --git a/src/toil/provisioners/aws/awsProvisioner.py b/src/toil/provisioners/aws/awsProvisioner.py
index <HASH>..<HASH> 100644
--- a/src/toil/provisioners/aws/awsProvisioner.py
+++ b/src/toil/provisioners/aws/awsProvisioner.py
@@ -172,7 +172,7 @@ class AWSProvisioner(AbstractProvisioner):
for nodeType, workers in zip(nodeTypes, numWorkers):
workersCreated += self.addNodes(nodeType=nodeType, numNodes=workers, preemptable=False)
for nodeType, workers in zip(preemptableNodeTypes, numPreemptableWorkers):
- workersCreated += self.addNodes(nodeType=nodeType, numNodes=workers, preemptable=True, spotBids=self.spotBids)
+ workersCreated += self.addNodes(nodeType=nodeType, numNodes=workers, preemptable=True)
logger.info('Added %d workers', workersCreated)
return leader
|
Fix creation of spot instances in launchCluster
|
diff --git a/Template/Filter/AssetsPath.php b/Template/Filter/AssetsPath.php
index <HASH>..<HASH> 100644
--- a/Template/Filter/AssetsPath.php
+++ b/Template/Filter/AssetsPath.php
@@ -23,9 +23,7 @@ class AssetsPath extends SimpleTemplateFilter implements SimpleTemplateFilterInt
$application = Application::getInstance();
- if($application->hasNiceUris() || !($assetsPath = $application->getRelativeAssetsPath())) {
- $assetsPath = '/';
- }
+ $assetsPath = '/' . ($application->hasNiceUris() ? '' : $application->getRelativeAssetsPath());
// extend <img src="$..." ...> with path to site images
@@ -43,6 +41,7 @@ class AssetsPath extends SimpleTemplateFilter implements SimpleTemplateFilterInt
if($application->getRelativeAssetsPath() && !$application->hasNiceUris()) {
+
// src attributes
$templateString = preg_replace_callback(
|
Bugfix: Wrong filtering of assets path with nice uris off.
|
diff --git a/TextFormatter/ConfigBuilder.php b/TextFormatter/ConfigBuilder.php
index <HASH>..<HASH> 100644
--- a/TextFormatter/ConfigBuilder.php
+++ b/TextFormatter/ConfigBuilder.php
@@ -847,6 +847,21 @@ class ConfigBuilder
// replace (?:x)? with x?
$regexp = preg_replace('#\\(\\?:(.)\\)\\?#us', '$1?', $regexp);
+ // replace (?:x|y) with [xy]
+ $regexp = preg_replace_callback(
+ /**
+ * Here, we only try to match single letters and numbers because trying to match escaped
+ * characters is much more complicated and increases the potential of letting a bug slip
+ * by unnoticed, without much gain in return. Just letters and numbers is simply safer
+ */
+ '#\\(\\?:([\\pL\\pN](?:\\|[\\pL\\pN])*)\\)#u',
+ function($m)
+ {
+ return '[' . preg_quote(str_replace('|', '', $m[1]), '#') . ']';
+ },
+ $regexp
+ );
+
return $regexp;
}
|
Updated the regexp builder to produce slightly optimized regexps in some cases
|
diff --git a/jsftp.js b/jsftp.js
index <HASH>..<HASH> 100644
--- a/jsftp.js
+++ b/jsftp.js
@@ -129,7 +129,7 @@ var Ftp = module.exports = function(cfg) {
if (this.onTimeout)
this.onTimeout(new Error("FTP socket timeout"));
- self.destroy();
+ this.destroy();
}.bind(this));
socket.on("connect", function() {
diff --git a/lib/ftpPasv.js b/lib/ftpPasv.js
index <HASH>..<HASH> 100644
--- a/lib/ftpPasv.js
+++ b/lib/ftpPasv.js
@@ -10,7 +10,7 @@ var S;
try {
S = require("streamer");
} catch (e) {
- S = require("./support/streamer");
+ S = require("../support/streamer/streamer");
}
var ftpPasv = module.exports = function(host, port, mode, callback, onConnect) {
|
Small bugfixes of scope and require
|
diff --git a/api/grpc_server.go b/api/grpc_server.go
index <HASH>..<HASH> 100644
--- a/api/grpc_server.go
+++ b/api/grpc_server.go
@@ -49,13 +49,13 @@ func NewGrpcServer(b *server.BgpServer, hosts string) *Server {
func NewServer(b *server.BgpServer, g *grpc.Server, hosts string) *Server {
grpc.EnableTracing = false
- server := &Server{
+ s := &Server{
bgpServer: b,
grpcServer: g,
hosts: hosts,
}
- RegisterGobgpApiServer(g, server)
- return server
+ RegisterGobgpApiServer(g, s)
+ return s
}
func (s *Server) Serve() error {
|
api/grpc_server: Avoid name collision "server"
To improve code inspection result, this patch renames "server"
variables in NewServer() to "s" because "server" collides the
imported package name "github.com/osrg/gobgp/server".
|
diff --git a/openpnm/topotools/topotools.py b/openpnm/topotools/topotools.py
index <HASH>..<HASH> 100644
--- a/openpnm/topotools/topotools.py
+++ b/openpnm/topotools/topotools.py
@@ -2392,10 +2392,10 @@ def find_clusters(network, mask=[], t_labels=False):
Examples
--------
>>> import openpnm as op
- >>> from scipy import rand
+ >>> import numpy as np
>>> pn = op.network.Cubic(shape=[25, 25, 1])
- >>> pn['pore.seed'] = rand(pn.Np)
- >>> pn['throat.seed'] = rand(pn.Nt)
+ >>> pn['pore.seed'] = np.random.rand(pn.Np)
+ >>> pn['throat.seed'] = np.random.rand(pn.Nt)
"""
|
[ci skip] changed doc import
|
diff --git a/src/DateRange.js b/src/DateRange.js
index <HASH>..<HASH> 100644
--- a/src/DateRange.js
+++ b/src/DateRange.js
@@ -41,13 +41,14 @@ class DateRange extends Component {
}
}
- setRange(range) {
+ setRange(range, {silent = false}={}) {
const { onChange } = this.props;
range = this.orderRange(range);
this.setState({ range });
- onChange && onChange(range);
+ if (!silent)
+ onChange && onChange(range);
}
handleSelect(date) {
@@ -99,7 +100,7 @@ class DateRange extends Component {
this.setRange({
startDate: startDate,
endDate: endDate
- });
+ }, {silent: true});
}
}
|
Added option "silent" to setRange
|
diff --git a/lib/deep_unrest.rb b/lib/deep_unrest.rb
index <HASH>..<HASH> 100644
--- a/lib/deep_unrest.rb
+++ b/lib/deep_unrest.rb
@@ -388,7 +388,7 @@ module DeepUnrest
record = res[:record]
errors = record&.errors&.messages
if errors
- base_key = "#{record.class.to_s.underscore.pluralize}[#{i}]"
+ base_key = "#{record.class.to_s.camelize(:lower).pluralize}[#{i}]"
errors.keys.map do |attr|
if record.respond_to? attr
errors["#{base_key}.#{attr}".to_sym] = errors.delete(attr)
|
[bugfix] casing of error key on root resource errors
|
diff --git a/ospd/parser.py b/ospd/parser.py
index <HASH>..<HASH> 100644
--- a/ospd/parser.py
+++ b/ospd/parser.py
@@ -91,6 +91,10 @@ def create_args_parser(description: str) -> ParserType:
return string
parser.add_argument(
+ '--version', action='store_true', help='Print version then exit.'
+ )
+
+ parser.add_argument(
'-p',
'--port',
default=DEFAULT_PORT,
@@ -141,9 +145,6 @@ def create_args_parser(description: str) -> ParserType:
'-l', '--log-file', type=filename, help='Path to the logging file.'
)
parser.add_argument(
- '--version', action='store_true', help='Print version then exit.'
- )
- parser.add_argument(
'--niceness',
default=DEFAULT_NICENESS,
type=int,
|
Move version switch to the top
Display version switch info as second item if help is displayed.
|
diff --git a/buildbot_travis/loader.py b/buildbot_travis/loader.py
index <HASH>..<HASH> 100644
--- a/buildbot_travis/loader.py
+++ b/buildbot_travis/loader.py
@@ -34,7 +34,7 @@ class Loader(object):
slaves = [s.slavename for s in self.config['slaves']]
return slaves[1:]
- def define_travis_builder(self, name, repository, vcs_type=None, username=None, password=None, browserlink=None):
+ def define_travis_builder(self, name, repository, vcs_type=None, username=None, password=None):
job_name = "%s-job" % name
spawner_name = name
@@ -112,6 +112,5 @@ class Loader(object):
split_file = svnpoller.split_file_branches,
svnuser = username,
svnpasswd = password,
- revlinktmpl = browserlink,
))
|
Use buildbot.revlinks instead of doing this.
|
diff --git a/jacquard/vcf.py b/jacquard/vcf.py
index <HASH>..<HASH> 100644
--- a/jacquard/vcf.py
+++ b/jacquard/vcf.py
@@ -228,7 +228,7 @@ class VcfRecord(object): #pylint: disable=too-many-instance-attributes
try:
return int(string)
except ValueError:
- return sys.maxint
+ return sys.maxsize
#TODO: (cgates): Could we make filter an OrderedSet
#TODO: (cgates) adjust info field to be stored as dict only instead of string
#pylint: disable=too-many-arguments
|
(jebene) changed maxint to maxsize
|
diff --git a/twosheds/twosheds.py b/twosheds/twosheds.py
index <HASH>..<HASH> 100644
--- a/twosheds/twosheds.py
+++ b/twosheds/twosheds.py
@@ -61,11 +61,6 @@ class Shell(object):
def eval(self, line):
if line:
exit_code = call(line, shell=True)
- if exit_code != 0:
- # hide the error
- self._raise_cursor()
- self._clear_line()
- return run_python(line, self.env)
def interact(self):
while True:
@@ -120,6 +115,18 @@ class Shell(object):
readline.write_history_file(histfile)
+class PythonShell(Shell):
+ def eval(self, line):
+ if line:
+ exit_code = call(line, shell=True)
+ if exit_code != 0:
+ # hide the error
+ self._raise_cursor()
+ self._clear_line()
+ return run_python(line, self.env)
+
+
+
def coroutine(func):
def start(*args, **kwargs):
cr = func(*args, **kwargs)
|
Separate Python from Shell
`Shell` should just be a regular shell so as to not commit users to any
particular customizations.
|
diff --git a/pgmpy/tests/test_factors/test_discrete/test_Factor.py b/pgmpy/tests/test_factors/test_discrete/test_Factor.py
index <HASH>..<HASH> 100644
--- a/pgmpy/tests/test_factors/test_discrete/test_Factor.py
+++ b/pgmpy/tests/test_factors/test_discrete/test_Factor.py
@@ -558,7 +558,6 @@ class TestTabularCPDMethods(unittest.TestCase):
[0.1, 0.7, 0.1, 0.7, 0.2, 0.2, 0.6, 0.6]],
evidence=['A', 'B', 'C'], evidence_card=[2, 2, 2])
-
def test_marginalize_1(self):
self.cpd.marginalize(['diff'])
self.assertEqual(self.cpd.variable, 'grade')
|
Fix erroneously added whitespace
|
diff --git a/tests/events/test_events_cme.py b/tests/events/test_events_cme.py
index <HASH>..<HASH> 100644
--- a/tests/events/test_events_cme.py
+++ b/tests/events/test_events_cme.py
@@ -15,7 +15,7 @@
from unittest import TestCase
import pandas as pd
-from test_events import StatefulRulesTests, StatelessRulesTests, \
+from .test_events import StatefulRulesTests, StatelessRulesTests, \
minutes_for_days
from zipline.utils.events import AfterOpen
diff --git a/tests/events/test_events_nyse.py b/tests/events/test_events_nyse.py
index <HASH>..<HASH> 100644
--- a/tests/events/test_events_nyse.py
+++ b/tests/events/test_events_nyse.py
@@ -22,7 +22,7 @@ from zipline.utils.events import NDaysBeforeLastTradingDayOfWeek, AfterOpen, \
BeforeClose
from zipline.utils.events import NthTradingDayOfWeek
-from test_events import StatelessRulesTests, StatefulRulesTests, \
+from .test_events import StatelessRulesTests, StatefulRulesTests, \
minutes_for_days
T = partial(pd.Timestamp, tz='UTC')
|
TST: Need relative imports in py3
|
diff --git a/js/dsx.js b/js/dsx.js
index <HASH>..<HASH> 100644
--- a/js/dsx.js
+++ b/js/dsx.js
@@ -887,7 +887,6 @@ module.exports = class dsx extends Exchange {
}, orders[id]));
result.push (order);
}
- console.log(`result: ${result.length}`, {symbol, since, limit})
return this.filterBySymbolSinceLimit (result, symbol, since, limit);
}
|
[dsx] oops!
|
diff --git a/docs/src/ComponentsPage.js b/docs/src/ComponentsPage.js
index <HASH>..<HASH> 100644
--- a/docs/src/ComponentsPage.js
+++ b/docs/src/ComponentsPage.js
@@ -1,4 +1,4 @@
-/* eslint no-path-concat: 0, react/no-did-mount-set-state: 0 */
+/* eslint react/no-did-mount-set-state: 0 */
import React from 'react';
|
Remove extraneous eslint disabling comment.
|
diff --git a/src/svg/graphic.js b/src/svg/graphic.js
index <HASH>..<HASH> 100644
--- a/src/svg/graphic.js
+++ b/src/svg/graphic.js
@@ -159,7 +159,7 @@ function pathDataToString(path) {
var clockwise = data[i++];
var dThetaPositive = Math.abs(dTheta);
- var isCircle = isAroundZero(dThetaPositive % PI2)
+ var isCircle = isAroundZero(dThetaPositive - PI2)
&& !isAroundZero(dThetaPositive);
var large = false;
|
fix(svg): rendering circle bug due to svg arc
fix and close ecomfe/echarts#<I>
|
diff --git a/lib/router/metatag.js b/lib/router/metatag.js
index <HASH>..<HASH> 100644
--- a/lib/router/metatag.js
+++ b/lib/router/metatag.js
@@ -70,7 +70,7 @@ module.exports = {
'" />';
}
- if (res.locals.data.avatar) {
+ if (res.locals.data.avatar && res.locals.data.avatar[0]) {
var img = res.locals.data.avatar[0];
res.locals.metatag +=
|
add check to skip error in user image metatag without avatar
|
diff --git a/uncompyle6/parser.py b/uncompyle6/parser.py
index <HASH>..<HASH> 100644
--- a/uncompyle6/parser.py
+++ b/uncompyle6/parser.py
@@ -442,6 +442,7 @@ class PythonParser(GenericASTBuilder):
def p_expr(self, args):
'''
expr ::= _mklambda
+ expr ::= LOAD_ASSERT
expr ::= LOAD_FAST
expr ::= LOAD_NAME
expr ::= LOAD_CONST
diff --git a/uncompyle6/verify.py b/uncompyle6/verify.py
index <HASH>..<HASH> 100755
--- a/uncompyle6/verify.py
+++ b/uncompyle6/verify.py
@@ -321,6 +321,9 @@ def cmp_code_objects(version, is_pypy, code_obj1, code_obj2,
elif tokens1[i1].type == 'LOAD_GLOBAL' and tokens2[i2].type == 'LOAD_NAME' \
and tokens1[i1].pattr == tokens2[i2].pattr:
pass
+ elif tokens1[i1].type == 'LOAD_ASSERT' and tokens2[i2].type == 'LOAD_NAME' \
+ and tokens1[i1].pattr == tokens2[i2].pattr:
+ pass
elif (tokens1[i1].type == 'RETURN_VALUE' and
tokens2[i2].type == 'RETURN_END_IF'):
pass
|
LOAD_ASSERT can also be an expr
This may have the undesirable property that assert statements might get
tagged with equivalant low-level Python code that uses "raise
AssertionError", but so be it.
Fixes #<I>
|
diff --git a/lib/util/simple-hint.js b/lib/util/simple-hint.js
index <HASH>..<HASH> 100644
--- a/lib/util/simple-hint.js
+++ b/lib/util/simple-hint.js
@@ -2,6 +2,10 @@
CodeMirror.simpleHint = function(editor, getHints) {
// We want a single cursor position.
if (editor.somethingSelected()) return;
+ //don't show completion if the token is empty
+ var tempToken = editor.getTokenAt(editor.getCursor());
+ if(!(/[\S]/gi.test(tempToken.string))) return;
+
var result = getHints(editor);
if (!result || !result.list.length) return;
var completions = result.list;
|
bug fix - don't show autocompletion hints if the token is empty
|
diff --git a/lib/fog/aws/models/rds/subnet_group.rb b/lib/fog/aws/models/rds/subnet_group.rb
index <HASH>..<HASH> 100644
--- a/lib/fog/aws/models/rds/subnet_group.rb
+++ b/lib/fog/aws/models/rds/subnet_group.rb
@@ -12,8 +12,11 @@ module Fog
attribute :vpc_id, :aliases => 'VpcId'
attribute :subnet_ids, :aliases => 'Subnets'
- # TODO: ready?
- #
+ def ready?
+ requires :status
+ status == 'Complete'
+ end
+
def save
requires :description, :id, :subnet_ids
service.create_db_subnet_group(id, subnet_ids, description)
|
[aws|rds] Implement `ready?` for subnet group.
|
diff --git a/spyder/widgets/tests/test_pathmanager.py b/spyder/widgets/tests/test_pathmanager.py
index <HASH>..<HASH> 100644
--- a/spyder/widgets/tests/test_pathmanager.py
+++ b/spyder/widgets/tests/test_pathmanager.py
@@ -36,6 +36,10 @@ def test_pathmanager(qtbot):
def test_check_uncheck_path(qtbot):
+ """
+ Test that checking and unchecking a path in the PathManager correctly
+ update the not active path list.
+ """
pathmanager = setup_pathmanager(qtbot, None, pathlist=sys.path[:-10],
ro_pathlist=sys.path[-10:])
|
Added a description for the test
|
diff --git a/vexbot/commands/create_vexdir.py b/vexbot/commands/create_vexdir.py
index <HASH>..<HASH> 100644
--- a/vexbot/commands/create_vexdir.py
+++ b/vexbot/commands/create_vexdir.py
@@ -1,14 +1,26 @@
from os import path, mkdir
-def get_vexdir_filepath():
+def _get_config_dir():
home_direct = path.expanduser("~")
- vexdir = path.abspath(path.join(home_direct, '.vexbot'))
+ config = path.abspath(path.join(home_direct,
+ '.config'))
+
+ return config
+
+def get_vexdir_filepath():
+ vexdir = path.join(_get_config_dir(),
+ 'vexbot')
+
return vexdir
def create_vexdir():
+ config_dir = _get_config_dir()
vexdir = get_vexdir_filepath()
+
+ if not path.isdir(config_dir):
+ mkdir(config_dir)
if not path.isdir(vexdir):
mkdir(vexdir)
|
moved vedir to `.config` in home directory
|
diff --git a/starlette/responses.py b/starlette/responses.py
index <HASH>..<HASH> 100644
--- a/starlette/responses.py
+++ b/starlette/responses.py
@@ -107,7 +107,7 @@ class Response:
cookie[key]["secure"] = True # type: ignore
if httponly:
cookie[key]["httponly"] = True # type: ignore
- cookie_val = cookie.output(header="")
+ cookie_val = cookie.output(header="").strip()
self.raw_headers.append((b"set-cookie", cookie_val.encode("latin-1")))
def delete_cookie(self, key: str, path: str = "/", domain: str = None) -> None:
|
fixed issue <I>,trailing spaces not allowed in header (#<I>)
|
diff --git a/servers/src/main/java/tachyon/worker/block/BlockWorker.java b/servers/src/main/java/tachyon/worker/block/BlockWorker.java
index <HASH>..<HASH> 100644
--- a/servers/src/main/java/tachyon/worker/block/BlockWorker.java
+++ b/servers/src/main/java/tachyon/worker/block/BlockWorker.java
@@ -117,7 +117,7 @@ public class BlockWorker {
mThriftServer = createThriftServer();
mWorkerNetAddress =
new NetAddress(BlockWorkerUtils.getWorkerAddress(mTachyonConf).getAddress()
- .getCanonicalHostName(), thriftServerPort, mDataServer.getPort());
+ .getHostAddress(), thriftServerPort, mDataServer.getPort());
// Set up web server
int webPort = mTachyonConf.getInt(Constants.WORKER_WEB_PORT, Constants.DEFAULT_WORKER_WEB_PORT);
|
use raw ip instead of canonical hostname as worker address to fix spark locality issue
|
diff --git a/lib/discordrb/bot.rb b/lib/discordrb/bot.rb
index <HASH>..<HASH> 100644
--- a/lib/discordrb/bot.rb
+++ b/lib/discordrb/bot.rb
@@ -201,8 +201,7 @@ module Discordrb
# The bot's OAuth application.
# @return [Application, nil] The bot's application info. Returns `nil` if bot is not a bot account.
def bot_application
- gateway_check
- return nil unless @type == :bot
+ return unless @type == :bot
response = API.oauth_application(token)
Application.new(JSON.parse(response), self)
end
|
remove gateway_check from Bot#bot_application
|
diff --git a/src/Repository.php b/src/Repository.php
index <HASH>..<HASH> 100644
--- a/src/Repository.php
+++ b/src/Repository.php
@@ -12,7 +12,7 @@ use RudyMas\PDOExt\DBconnect;
* @author Rudy Mas <rudy.mas@rmsoft.be>
* @copyright 2017-2018, rmsoft.be. (http://www.rmsoft.be/)
* @license https://opensource.org/licenses/GPL-3.0 GNU General Public License, version 3 (GPL-3.0)
- * @version 2.1.3.32
+ * @version 2.2.1.34
* @package EasyMVC\Repository
*/
class Repository
@@ -72,7 +72,7 @@ class Repository
public function getByIndex(int $id)
{
foreach ($this->data as $value) {
- if ($value->getId() === $id) {
+ if ($value->getData('id') === $id) {
return $value;
}
}
@@ -80,6 +80,8 @@ class Repository
}
/**
+ * This function needs following function to be inside the Model Class
+ *
* @param string $field
* @param string $search
* @return array
@@ -88,7 +90,7 @@ class Repository
{
$output = [];
foreach ($this->data as $value) {
- if ($value[$field] == $search) {
+ if ($value->getData($field) == $search) {
$output[] = $value;
}
}
|
Updated functions getByIndex & getBy for new Model-structure
|
diff --git a/client/v2/shield/auth.go b/client/v2/shield/auth.go
index <HASH>..<HASH> 100644
--- a/client/v2/shield/auth.go
+++ b/client/v2/shield/auth.go
@@ -73,6 +73,19 @@ type AuthID struct {
Name string `json:"name"`
Role string `json:"role"`
} `json:"tenant"`
+
+ Is struct {
+ System struct {
+ Admin bool `json:"admin"`
+ Manager bool `json:"manager"`
+ Engineer bool `json:"engineer"`
+ } `json:"system"`
+ Tenants map[string]struct {
+ Admin bool `json:"admin"`
+ Engineer bool `json:"engineer"`
+ Operator bool `json:"operator"`
+ } `json:"tenant"`
+ } `json:"is"`
}
func (c *Client) AuthID() (*AuthID, error) {
|
Provide Grants in AuthID() response (client lib)
|
diff --git a/esteid/digidocservice/service.py b/esteid/digidocservice/service.py
index <HASH>..<HASH> 100644
--- a/esteid/digidocservice/service.py
+++ b/esteid/digidocservice/service.py
@@ -135,13 +135,15 @@ class DigiDocService(object):
if wsdl_url == 'https://tsp.demo.sk.ee/dds.wsdl': # pragma: no branch
assert service_name == 'Testimine', 'When using Test DigidocService the service name must be `Testimine`'
+ the_transport = transport or Transport(cache=SqliteCache())
+
if ZeepSettings is not None: # pragma: no branch
settings = ZeepSettings(strict=False)
- self.client = Client(wsdl_url, transport=transport or Transport(cache=SqliteCache()), settings=settings)
+ self.client = Client(wsdl_url, transport=the_transport, settings=settings)
else:
- self.client = Client(wsdl_url, transport=transport or Transport(cache=SqliteCache()), strict=False)
+ self.client = Client(wsdl_url, transport=the_transport, strict=False)
def start_session(self, b_hold_session, sig_doc_xml=None, datafile=None):
"""Start a DigidocService session
|
Digidocservice: Make Client transport creation more DRY
|
diff --git a/custodian/qchem/handlers.py b/custodian/qchem/handlers.py
index <HASH>..<HASH> 100644
--- a/custodian/qchem/handlers.py
+++ b/custodian/qchem/handlers.py
@@ -253,7 +253,7 @@ class QChemErrorHandler(ErrorHandler):
if len(old_strategy_text) > 0:
comments = scf_pattern.sub(strategy_text, comments)
else:
- comments = strategy_text
+ comments += "\n" + strategy_text
self.fix_step.params["comment"] = comments
return method
@@ -314,7 +314,7 @@ class QChemErrorHandler(ErrorHandler):
if len(old_strategy_text) > 0:
comments = geom_pattern.sub(strategy_text, comments)
else:
- comments = strategy_text
+ comments += "\n" + strategy_text
self.fix_step.params["comment"] = comments
return method
|
additional fix info should be append to the current title rather than replace
|
diff --git a/src/post.js b/src/post.js
index <HASH>..<HASH> 100644
--- a/src/post.js
+++ b/src/post.js
@@ -34,7 +34,7 @@ return function ()
};
return_val = {
- postMessage: function send_message(str)
+ postMessage: function send_message(str, sync)
{
function ccall()
{
@@ -47,7 +47,11 @@ return function ()
cmds.push(str);
- wait(ccall, 1);
+ if (sync) {
+ ccall();
+ } else {
+ wait(ccall, 1);
+ }
}
};
@@ -120,7 +124,7 @@ return function ()
stockfish = STOCKFISH();
onmessage = function(event) {
- stockfish.postMessage(event.data);
+ stockfish.postMessage(event.data, true);
};
stockfish.onmessage = function onlog(line)
|
Don't delay ccalls in Web Workers.
|
diff --git a/integration/integration_test.go b/integration/integration_test.go
index <HASH>..<HASH> 100644
--- a/integration/integration_test.go
+++ b/integration/integration_test.go
@@ -5173,6 +5173,9 @@ func testSessionStartContainsAccessRequest(t *testing.T, suite *integrationTestS
userRole, err := types.NewRole(userRoleName, types.RoleSpecV4{
Options: types.RoleOptions{},
Allow: types.RoleConditions{
+ Logins: []string{
+ suite.me.Username,
+ },
Request: &types.AccessRequestConditions{
Roles: []string{requestedRoleName},
},
|
Fixed TestSessionStartContainsAccessRequest.
Fixed issue with TestSessionStartContainsAccessRequest where the login
was not being injected into the user role.
|
diff --git a/js-modules/numberLines.js b/js-modules/numberLines.js
index <HASH>..<HASH> 100644
--- a/js-modules/numberLines.js
+++ b/js-modules/numberLines.js
@@ -30,7 +30,7 @@ function numberLines(node, startLineNum, isPreformatted) {
function walk(node) {
var type = node.nodeType;
if (type == 1 && !nocode.test(node.className)) { // Element
- if ('br' === node.nodeName) {
+ if ('br' === node.nodeName.toLowerCase()) {
breakAfter(node);
// Discard the <BR> since it is now flush against a </LI>.
if (node.parentNode) {
|
element nodeName is case sensitive (fix #<I>)
this fixes a failing test in numberLines_test.html
|
diff --git a/lib/polisher/cli/bin/missing_deps.rb b/lib/polisher/cli/bin/missing_deps.rb
index <HASH>..<HASH> 100644
--- a/lib/polisher/cli/bin/missing_deps.rb
+++ b/lib/polisher/cli/bin/missing_deps.rb
@@ -22,10 +22,11 @@ end
def check_missing_deps(source)
source.dependency_tree(:recursive => true,
- :dev_deps => conf[:devel_deps]) do |gem, dep, resolved_dep|
- versions = Polisher::VersionChecker.matching_versions(dep)
- alt = Polisher::VersionChecker.versions_for(dep.name)
- puts "#{gem.name} #{gem.version} missing dep #{dep.name} #{dep.requirement} - alt versions: #{alt}" if versions.empty?
+ :dev_deps => conf[:devel_deps]) do |source, dep, resolved_dep|
+ versions = Polisher::VersionChecker.matching_versions(dep)
+ alt = Polisher::VersionChecker.versions_for(dep.name)
+ source_str = source.is_a?(Polisher::Gemfile) ? "Gemfile" : "#{source.name} #{source.version}"
+ puts "#{source_str} missing dep #{dep.name} #{dep.requirement} - alt versions: #{alt}" if versions.empty?
end
end
|
Handle both Gem/Gemfile parsing edge cases in output
|
diff --git a/openquake/job/__init__.py b/openquake/job/__init__.py
index <HASH>..<HASH> 100644
--- a/openquake/job/__init__.py
+++ b/openquake/job/__init__.py
@@ -33,6 +33,7 @@ from openquake import flags
from openquake import java
from openquake import kvs
from openquake import logs
+from openquake import OPENQUAKE_ROOT
from openquake import shapes
from openquake.supervising import supervisor
from openquake.db.alchemy.db_utils import get_db_session
@@ -91,6 +92,9 @@ def spawn_job_supervisor(job_id, pid):
LOG.warn('If you want to run supervised jobs it\'s better '
'to set [logging] backend=amqp in openquake.cfg')
+ if not os.path.isabs(exe):
+ exe = os.path.join(OPENQUAKE_ROOT, exe)
+
cmd = [exe, str(job_id), str(pid)]
supervisor_pid = subprocess.Popen(cmd, env=os.environ).pid
|
Made explicit the root of a relative path to the supervisor executable.
Former-commit-id: 2bd<I>fec<I>b<I>ad9f<I>bcc<I>ec<I>d4e5
|
diff --git a/overpy/__init__.py b/overpy/__init__.py
index <HASH>..<HASH> 100644
--- a/overpy/__init__.py
+++ b/overpy/__init__.py
@@ -469,6 +469,7 @@ class Element(object):
self._result = result
self.attributes = attributes
+ self.id = None
self.tags = tags
|
src - All elements must have an ID
|
diff --git a/main.go b/main.go
index <HASH>..<HASH> 100644
--- a/main.go
+++ b/main.go
@@ -511,6 +511,10 @@ func _main(ctx context.Context) error {
// ExchangeBot
var xcBot *exchanges.ExchangeBot
+ if cfg.EnableExchangeBot && activeChain.Name != "mainnet" {
+ log.Warnf("disabling exchange monitoring. only available on mainnet")
+ cfg.EnableExchangeBot = false
+ }
if cfg.EnableExchangeBot {
botCfg := exchanges.ExchangeBotConfig{
BtcIndex: cfg.ExchangeCurrency,
|
exchanges: disable exchanges on testnet
|
diff --git a/superset/connectors/druid/models.py b/superset/connectors/druid/models.py
index <HASH>..<HASH> 100644
--- a/superset/connectors/druid/models.py
+++ b/superset/connectors/druid/models.py
@@ -1018,7 +1018,7 @@ class DruidDatasource(Model, BaseDatasource):
del qry['dimensions']
qry['metric'] = list(qry['aggregations'].keys())[0]
client.topn(**qry)
- elif len(groupby) > 1 or having_filters or not order_desc:
+ else:
# If grouping on multiple fields or using a having filter
# we have to force a groupby query
if timeseries_limit and is_timeseries:
|
Fixed branching condition with dimension spec (#<I>)
|
diff --git a/Logger/ApiCallLogger.php b/Logger/ApiCallLogger.php
index <HASH>..<HASH> 100644
--- a/Logger/ApiCallLogger.php
+++ b/Logger/ApiCallLogger.php
@@ -2,7 +2,7 @@
namespace Lsw\ApiCallerBundle\Logger;
-use Symfony\Component\HttpKernel\Log\LoggerInterface;
+use Psr\Log\LoggerInterface;
use Lsw\ApiCallerBundle\Call\ApiCallInterface;
/**
|
replaced Symfony LoggerInterface by Psr LoggerInterface, compatibility to symfony <I>
|
diff --git a/theme/clean/layout/secure.php b/theme/clean/layout/secure.php
index <HASH>..<HASH> 100644
--- a/theme/clean/layout/secure.php
+++ b/theme/clean/layout/secure.php
@@ -14,6 +14,9 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
+// Get the HTML for the settings bits.
+$html = theme_clean_get_html_for_settings($OUTPUT, $PAGE);
+
echo $OUTPUT->doctype() ?>
<html <?php echo $OUTPUT->htmlattributes(); ?>>
<head>
|
MDL-<I> theme_clean: Layout "secure.php" missing settings.
|
diff --git a/lib/plugin/variable-collector.js b/lib/plugin/variable-collector.js
index <HASH>..<HASH> 100644
--- a/lib/plugin/variable-collector.js
+++ b/lib/plugin/variable-collector.js
@@ -60,9 +60,9 @@ VariableCollector.prototype = {
for (var name in this.mVariables) {
if (this.mVariables.hasOwnProperty(name)) {
var oVar = this.mVariables[name];
- var dirname = path.dirname(oVar.filename);
- var baseFileName = path.basename(oVar.rootFilename); // usually library.source.less
- var libraryBaseFile = path.normalize(path.join(dirname, baseFileName));
+ var dirname = path.posix.dirname(oVar.filename);
+ var baseFileName = path.posix.basename(oVar.rootFilename); // usually library.source.less
+ var libraryBaseFile = path.posix.normalize(path.posix.join(dirname, baseFileName));
// Only add variable if the corresponding library "base file" has been imported
if (aImports.indexOf(libraryBaseFile) > -1 || libraryBaseFile === oVar.rootFilename) {
|
Changed paths in variable collector to posix variant. Since they are
already posix, it does not work on windows machines.
|
diff --git a/bin/post-install.js b/bin/post-install.js
index <HASH>..<HASH> 100755
--- a/bin/post-install.js
+++ b/bin/post-install.js
@@ -28,7 +28,7 @@ function gruntBuildHandlebars(){
function gruntBuildRebound(){
console.log("Starting Grunt Build");
ps = spawn('grunt', ['build'], {stdio: "inherit", cwd: filepath});
- spawn.on('error', function (err) {
+ ps.on('error', function (err) {
console.log('Error Running Grunt Build:', err);
})
}
|
testing in travis env. something is different...
|
diff --git a/holoviews/core/pprint.py b/holoviews/core/pprint.py
index <HASH>..<HASH> 100644
--- a/holoviews/core/pprint.py
+++ b/holoviews/core/pprint.py
@@ -228,7 +228,7 @@ class InfoPrinter(object):
@classmethod
def options_info(cls, plot_class, ansi=False, pattern=None):
if plot_class.style_opts:
- backend_name = plot_class.renderer.backend
+ backend_name = plot_class.backend
style_info = ("\n(Consult %s's documentation for more information.)" % backend_name)
style_keywords = '\t%s' % ', '.join(plot_class.style_opts)
style_msg = '%s\n%s' % (style_keywords, style_info)
|
Small fix for Plot pprint
|
diff --git a/doradus-server/src/com/dell/doradus/search/aggregate/Aggregate.java b/doradus-server/src/com/dell/doradus/search/aggregate/Aggregate.java
index <HASH>..<HASH> 100644
--- a/doradus-server/src/com/dell/doradus/search/aggregate/Aggregate.java
+++ b/doradus-server/src/com/dell/doradus/search/aggregate/Aggregate.java
@@ -1059,7 +1059,7 @@ class PathEntry {
for (int i=0; i < branches.size(); i++){
if (branches.get(i).name.equals(name)){
branch = branches.get(i);
- mergeParameters(this, branch);
+ mergeParameters(branch, entry);
break;
}
}
@@ -1088,12 +1088,17 @@ class PathEntry {
if (entry1.query != null){
AndQuery query = new AndQuery();
query.subqueries.add(entry1.query);
- query.subqueries.add(entry1.query);
+ query.subqueries.add(entry2.query);
entry1.query = query;
}
else {
entry1.query = entry2.query;
+ if (USEQUERYCACHE) {
+ entry1.queryCache = new LRUCache<ObjectID, Boolean>(QUERYCACHECAPACITY);
+ }
}
+ QueryExecutor qe = new QueryExecutor(entry1.tableDef);
+ entry1.filter = qe.filter(entry1.query);
}
}
|
Fixed BD-<I>: Spider: multi-level aggregate query with filtering causes NPE
|
diff --git a/src/Operation/FindOne.php b/src/Operation/FindOne.php
index <HASH>..<HASH> 100644
--- a/src/Operation/FindOne.php
+++ b/src/Operation/FindOne.php
@@ -33,7 +33,6 @@ use MongoDB\Exception\UnsupportedException;
class FindOne implements Executable
{
private $find;
- private $options;
/**
* Constructs a find command for finding a single document.
@@ -105,8 +104,6 @@ class FindOne implements Executable
$filter,
['limit' => 1] + $options
);
-
- $this->options = $options;
}
/**
|
Remove unused $options property in FindOne
|
diff --git a/mama_cas/models.py b/mama_cas/models.py
index <HASH>..<HASH> 100644
--- a/mama_cas/models.py
+++ b/mama_cas/models.py
@@ -215,8 +215,8 @@ class ServiceTicketManager(TicketManager):
if gevent:
size = getattr(settings, 'MAMA_CAS_ASYNC_CONCURRENCY', 2)
pool = Pool(size) if size else None
- requests = [spawn(t, pool=pool) for t in tickets]
- gevent.joinall(requests)
+ sign_out_requests = [spawn(t, pool=pool) for t in tickets]
+ gevent.joinall(sign_out_requests)
else:
for ticket in tickets:
ticket.request_sign_out()
|
Refactor variable within request_sign_out()
|
diff --git a/jquery.uniform.js b/jquery.uniform.js
index <HASH>..<HASH> 100644
--- a/jquery.uniform.js
+++ b/jquery.uniform.js
@@ -355,6 +355,7 @@ Enjoy!
// suspends tiemouts until after the file has been selected.
bindMany($el, {
"click": function () {
+ $el.trigger("change");
setTimeout(filenameUpdate, 0);
}
});
|
Fire a "change" event after the file get selected
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -12,7 +12,6 @@ sponsor_url = "https://github.com/sponsors/fabiocaccamo/"
twitter_url = "https://twitter.com/fabiocaccamo"
package_name = "django-admin-interface"
package_url = "{}/{}".format(github_url, package_name)
-package_issues_url = "{}/issues".format(github_url)
package_path = os.path.abspath(os.path.dirname(__file__))
long_description_file_path = os.path.join(package_path, "README.md")
long_description_content_type = "text/markdown"
@@ -39,8 +38,8 @@ setup(
url=package_url,
download_url="{}/archive/{}.tar.gz".format(package_url, __version__),
project_urls={
- "Documentation": package_url,
- "Issues": package_issues_url,
+ "Documentation": "{}#readme".format(package_url),
+ "Issues": "{}/issues".format(package_url),
"Funding": sponsor_url,
"Twitter": twitter_url,
},
|
Corrected wrong PyPI project urls.
|
diff --git a/gwpy/tests/test_plotter.py b/gwpy/tests/test_plotter.py
index <HASH>..<HASH> 100644
--- a/gwpy/tests/test_plotter.py
+++ b/gwpy/tests/test_plotter.py
@@ -287,7 +287,7 @@ class TestPlot(PlottingTestBase):
assert not isinstance(mappable.norm, LogNorm)
# add colorbar and check everything went through
- cbar = fig.add_colorbar(log=True, label='Test label', cmap='plasma')
+ cbar = fig.add_colorbar(log=True, label='Test label', cmap='YlOrRd')
assert len(fig.axes) == 2
assert cbar in fig.colorbars
assert cbar.ax in fig._coloraxes
@@ -295,7 +295,7 @@ class TestPlot(PlottingTestBase):
assert cbar.get_clim() == mappable.get_clim() == (1, 119)
assert isinstance(mappable.norm, LogNorm)
assert isinstance(cbar.formatter, CombinedLogFormatterMathtext)
- assert cbar.get_cmap().name == 'plasma'
+ assert cbar.get_cmap().name == 'YlOrRd'
assert cbar.ax.get_ylabel() == 'Test label'
self.save_and_close(fig)
assert ax.get_position().width < width
|
tests: use older colormap for tests
allows testing with an older version of matplotlib
|
diff --git a/ambry/metadata/schema.py b/ambry/metadata/schema.py
index <HASH>..<HASH> 100644
--- a/ambry/metadata/schema.py
+++ b/ambry/metadata/schema.py
@@ -81,10 +81,6 @@ class Build(VarDictGroup):
"""Build parameters"""
-class Requirements(VarDictGroup):
- """Requirements parameters"""
-
-
class ExtDocTerm(DictTerm):
url = ScalarTerm()
title = ScalarTerm()
|
redundant requirements definition removed. CivicKnowledge/ambry#<I>.
|
diff --git a/src/main/java/nl/hsac/fitnesse/junit/JUnitTeamcityReporter.java b/src/main/java/nl/hsac/fitnesse/junit/JUnitTeamcityReporter.java
index <HASH>..<HASH> 100644
--- a/src/main/java/nl/hsac/fitnesse/junit/JUnitTeamcityReporter.java
+++ b/src/main/java/nl/hsac/fitnesse/junit/JUnitTeamcityReporter.java
@@ -35,7 +35,7 @@ public class JUnitTeamcityReporter extends RunListener {
println("##teamcity[testSuiteStarted flowId='%s' name='%s']", flowId, testClassName);
currentTestClassName = testClassName;
}
- println("##teamcity[testStarted flowId='%s' name='%s' captureStandardOutput='true']", flowId, testClassName, testName);
+ println("##teamcity[testStarted flowId='%s' name='%s' captureStandardOutput='true']", flowId, testName);
}
@Override
|
Oops, should not have passed test class name for that message...
|
diff --git a/multilingual/translation.py b/multilingual/translation.py
index <HASH>..<HASH> 100644
--- a/multilingual/translation.py
+++ b/multilingual/translation.py
@@ -93,6 +93,17 @@ def fill_translation_cache(instance):
translation = instance._meta.translation_model(**field_data)
instance._translation_cache[language_id] = translation
+ # In some situations an (existing in the DB) object is loaded
+ # without using the normal QuerySet. In such case fallback to
+ # loading the translations using a separate query.
+
+ # Unfortunately, this is indistinguishable from the situation when
+ # an object does not have any translations. Oh well, we'll have
+ # to live with this for the time being.
+ if len(instance._translation_cache.keys()) == 0:
+ for translation in instance.get_translation_set().all():
+ instance._translation_cache[translation.language_id] = translation
+
class TranslatedFieldProxy(object):
def __init__(self, field_name, alias, field, language_id=None):
self.field_name = field_name
|
Added a fallback to the translation cache to load translations using normal mechanisms if an object is created without using its standard QuerySet.
This fixes the problem with admin log.
git-svn-id: <URL>
|
diff --git a/src/NafUtil.js b/src/NafUtil.js
index <HASH>..<HASH> 100644
--- a/src/NafUtil.js
+++ b/src/NafUtil.js
@@ -50,4 +50,4 @@ module.exports.now = function() {
return Date.now();
};
-module.exports.delimiter = '|||';
\ No newline at end of file
+module.exports.delimiter = '---';
|
use Firebase-friendly delimiter; note that Firebase does not like . or # which are in almost all selectors
|
diff --git a/src/Tonic/Request.php b/src/Tonic/Request.php
index <HASH>..<HASH> 100644
--- a/src/Tonic/Request.php
+++ b/src/Tonic/Request.php
@@ -97,7 +97,8 @@ class Request
$uri = $this->getOption($options, 'uri');
if (!$uri) { // use given URI in config options
if (isset($_SERVER['REDIRECT_URL']) && isset($_SERVER['SCRIPT_NAME'])) { // use redirection URL from Apache environment
- $uri = substr($_SERVER['REDIRECT_URL'], strlen(dirname($_SERVER['SCRIPT_NAME'])));
+ $dirname = dirname($_SERVER['SCRIPT_NAME']);
+ $uri = substr($_SERVER['REDIRECT_URL'], strlen($dirname == '/' ? '' : $dirname));
} elseif (isset($_SERVER['PHP_SELF']) && isset($_SERVER['SCRIPT_NAME'])) { // use PHP_SELF from Apache environment
$uri = substr($_SERVER['PHP_SELF'], strlen($_SERVER['SCRIPT_NAME']));
} else { // fail
@@ -106,7 +107,7 @@ class Request
}
// get mimetype
- $parts = explode('/', $uri);
+ $parts = explode('/', rtrim($uri, '/'));
$lastPart = array_pop($parts);
$uri = join('/', $parts);
|
Fix for issue #<I> for when application root is "/"
|
diff --git a/lib/linkscape/response.rb b/lib/linkscape/response.rb
index <HASH>..<HASH> 100644
--- a/lib/linkscape/response.rb
+++ b/lib/linkscape/response.rb
@@ -12,7 +12,7 @@ module Linkscape
class Flags
def initialize(bitfield, type)
@value = bitfield
- @flags = Linkscape::Constants::LinkMetrics::ResponseFlags.to_a.collect{|k,vv| k if (@value & vv[:flag]).nonzero?}.compact if type == :link
+ @flags = Linkscape::Constants::LinkMetrics::ResponseFlags.to_a.collect{|k,vv| k if (@value & vv[:flag]) == vv[:flag]}.compact if type == :link
end
def [](key); @flags.include? key.to_sym; end
def to_a; @flags; end
|
Being more paranoid about flags
|
diff --git a/Util/Inflector.php b/Util/Inflector.php
index <HASH>..<HASH> 100644
--- a/Util/Inflector.php
+++ b/Util/Inflector.php
@@ -100,7 +100,7 @@ class Inflector
*
* @return string
*/
- public static function classify($string, $singularize = true)
+ public static function classify($string, $singularize = false)
{
$class = ($singularize) ? static::singularize($string) : $string;
return static::camelize($class);
|
Changed the `Inflector::classify()` method to not singularize by default.
|
diff --git a/src/finalisers/umd.js b/src/finalisers/umd.js
index <HASH>..<HASH> 100644
--- a/src/finalisers/umd.js
+++ b/src/finalisers/umd.js
@@ -51,7 +51,7 @@ export default function umd ( bundle, magicString, { exportMode, indentString },
var exports = factory(${globalDeps});
global.${options.moduleName} = exports;
exports.noConflict = function() { global.${options.moduleName} = current; return exports; };
- })()` : `(${defaultExport}factory(${globalDeps}))`
+ })()` : `(${defaultExport}factory(${globalDeps}))`;
const intro =
`(function (global, factory) {
|
delint - oops missed a semi
|
diff --git a/vault/token_store_test.go b/vault/token_store_test.go
index <HASH>..<HASH> 100644
--- a/vault/token_store_test.go
+++ b/vault/token_store_test.go
@@ -935,7 +935,7 @@ func TestTokenStore_RevokeSelf(t *testing.T) {
t.Fatalf("err: %v\nresp: %#v", err, resp)
}
- time.Sleep(200 * time.Millisecond)
+ time.Sleep(1000 * time.Millisecond)
lookup := []string{ent1.ID, ent2.ID, ent3.ID, ent4.ID}
for _, id := range lookup {
|
Give more time for the self revocation test to run
|
diff --git a/service/http/request.go b/service/http/request.go
index <HASH>..<HASH> 100644
--- a/service/http/request.go
+++ b/service/http/request.go
@@ -151,7 +151,7 @@ func (r *Request) Payload() (p *roadrunner.Payload, err error) {
// contentType returns the payload content type.
func (r *Request) contentType() int {
- if r.Method == "GET" || r.Method == "HEAD" || r.Method == "OPTIONS" {
+ if r.Method == "HEAD" || r.Method == "OPTIONS" {
return contentNone
}
|
handle body content on http GET method
|
diff --git a/pyang/plugins/tree.py b/pyang/plugins/tree.py
index <HASH>..<HASH> 100644
--- a/pyang/plugins/tree.py
+++ b/pyang/plugins/tree.py
@@ -237,7 +237,7 @@ def emit_tree(ctx, modules, fd, depth, llen, path):
if not section_delimiter_printed:
fd.write('\n')
section_delimiter_printed = True
- fd.write(" grouping %s\n" % g.arg)
+ fd.write(" grouping %s:\n" % g.arg)
print_children(g.i_children, m, fd,
' ', path, 'grouping', depth, llen,
ctx.opts.tree_no_expand_uses,
|
Fixes #<I> - as per RFC <I>, added : to grouping header
|
diff --git a/classes/phing/tasks/ext/ParallelTask.php b/classes/phing/tasks/ext/ParallelTask.php
index <HASH>..<HASH> 100755
--- a/classes/phing/tasks/ext/ParallelTask.php
+++ b/classes/phing/tasks/ext/ParallelTask.php
@@ -22,10 +22,6 @@
* @package phing.tasks.ext
*/
-require_once 'DocBlox/Parallel/Manager.php';
-require_once 'DocBlox/Parallel/Worker.php';
-require_once 'DocBlox/Parallel/WorkerPipe.php';
-
/**
* Uses the DocBlox_Parallel library to run nested Phing tasks concurrently.
*
@@ -61,6 +57,16 @@ class ParallelTask extends SequentialTask
public function main()
{
+ @include_once 'DocBlox/Parallel/Manager.php';
+ @include_once 'DocBlox/Parallel/Worker.php';
+ @include_once 'DocBlox/Parallel/WorkerPipe.php';
+ if (!class_exists('DocBlox_Parallel_Worker')) {
+ throw new BuildException(
+ 'ParallelTask depends on DocBlox being installed and on include_path.',
+ $this->getLocation()
+ );
+ }
+
foreach ($this->nestedTasks as $task) {
$worker = new DocBlox_Parallel_Worker(
function($task) { $task->perform(); },
|
Don't require_once DocBlox as it may not be available (re #<I>)
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -8,14 +8,6 @@ module.exports = {
__express: renderFile,
renderFile: renderFile,
render: getParser().compileSync,
- /**
- * @deprecated Since version "0.0.66". Will be deleted in version "1.0.0". Use 'render' instead.
- */
- compileSync: function () {
- console.warn("The 'compileSync' method is deprecated. Will be deleted in version '1.0.0'. Use 'render' instead.");
- var parser = getParser();
- parser.compileSync.apply(parser, arguments);
- },
register: registerRazorEngine,
handleErrors: handleErrors
};
|
- Depricated method removal.
|
diff --git a/Filter/Filter.php b/Filter/Filter.php
index <HASH>..<HASH> 100644
--- a/Filter/Filter.php
+++ b/Filter/Filter.php
@@ -24,7 +24,7 @@ abstract class Filter extends BaseFilter
public function apply($queryBuilder, $value)
{
$this->value = $value;
- if(is_array($value) && array_key_exists("value", $value)) {
+ if(is_array($value) && array_key_exists('value', $value)) {
list($alias, $field) = $this->association($queryBuilder, $value);
$this->filter($queryBuilder, $alias, $field, $value);
|
Fix double quotes to single quotes in Filter.php
|
diff --git a/python/src/cm_api_tests/test_yarn.py b/python/src/cm_api_tests/test_yarn.py
index <HASH>..<HASH> 100644
--- a/python/src/cm_api_tests/test_yarn.py
+++ b/python/src/cm_api_tests/test_yarn.py
@@ -15,13 +15,17 @@
# limitations under the License.
import datetime
-import json
import unittest
from cm_api.endpoints.clusters import *
from cm_api.endpoints.services import *
from cm_api.endpoints.types import *
from cm_api_tests import utils
+try:
+ import json
+except ImportError:
+ import simplejson as json
+
class TestYarn(unittest.TestCase):
def test_get_yarn_applications(self):
|
[python tests] Make test_yarn consistent with respect to importing 'json'
It's unclear if this is futile or not. I don't believe the library works
on Python < <I> any more, and I'm very sure unit tests don't work on
Python < <I>.
|
diff --git a/findbugsTestCases/src/java/nullnessAnnotations/packageDefault/TestNonNull2.java b/findbugsTestCases/src/java/nullnessAnnotations/packageDefault/TestNonNull2.java
index <HASH>..<HASH> 100644
--- a/findbugsTestCases/src/java/nullnessAnnotations/packageDefault/TestNonNull2.java
+++ b/findbugsTestCases/src/java/nullnessAnnotations/packageDefault/TestNonNull2.java
@@ -10,8 +10,13 @@ class TestNonNull2 extends TestNonNull1 implements Interface1 {
f(null); // should get a NonNull warning from TestNonNull1
}
- @ExpectWarning("NP")
+// @ExpectWarning("NP")
void report2() {
+ //
+ // FindBugs doesn't produce a warning here because the g()
+ // method in TestNonNull1 explicitly marks its parameter
+ // as @Nullable. So, we shouldn't expect a warning. (?)
+ //
g(null); // should get a NonNull warning from Interface1
}
|
I don't think we really are supposed to expect a warning in
report2().
git-svn-id: <URL>
|
diff --git a/tilequeue/worker.py b/tilequeue/worker.py
index <HASH>..<HASH> 100644
--- a/tilequeue/worker.py
+++ b/tilequeue/worker.py
@@ -116,7 +116,8 @@ def _ack_coord_handle(
stop_time = convert_seconds_to_millis(time.time())
tile_proc_logger.log_processed_pyramid(
parent_tile, start_time, stop_time)
- stats_handler.processed_pyramid(start_time, stop_time)
+ stats_handler.processed_pyramid(
+ parent_tile, start_time, stop_time)
else:
tile_queue.job_partially_done(queue_handle.handle)
except Exception as e:
|
Correct stats processed_pyramid call
|
diff --git a/mod/journal/lib.php b/mod/journal/lib.php
index <HASH>..<HASH> 100644
--- a/mod/journal/lib.php
+++ b/mod/journal/lib.php
@@ -1,6 +1,12 @@
<?PHP // $Id$
+if (!isset($CFG->journal_showrecentactivity)) {
+ set_config("journal_showrecentactivity", true);
+}
+
+
+
// STANDARD MODULE FUNCTIONS /////////////////////////////////////////////////////////
function journal_user_outline($course, $user, $mod, $journal) {
@@ -174,6 +180,10 @@ function journal_cron () {
function journal_print_recent_activity($course, $isteacher, $timestart) {
global $CFG;
+ if (empty($CFG->journal_showrecentactivity)) { // Don't even bother
+ return false;
+ }
+
$content = false;
$journals = NULL;
|
Can use $CFG->journal_showrecentactivity to hide recent activity for journals
|
diff --git a/web/src/main/javascript/webpack.config.js b/web/src/main/javascript/webpack.config.js
index <HASH>..<HASH> 100644
--- a/web/src/main/javascript/webpack.config.js
+++ b/web/src/main/javascript/webpack.config.js
@@ -46,7 +46,7 @@ module.exports = {
module: {
loaders: [
- {test: /expression-atlas\w+\/(((?!node_modules).)*)\.js$/, loader: 'babel', query: {presets: ['es2015']}, exclude: /node-libs-browser/},
+ {test: /expression-atlas[\w-]+\/(((?!node_modules).)*)\.js$/, loader: 'babel', query: {presets: ['es2015']}, exclude: /node-libs-browser/},
{test: /\.jsx$/, loader: 'babel', query: {presets: ['es2015', 'react']}},
{test: /\.css$/, loader: 'style-loader!css-loader'},
{test: /\.less$/, loader: 'style-loader!css-loader!less-loader'},
|
Fix regex - \w does not match -
|
diff --git a/quart/cli.py b/quart/cli.py
index <HASH>..<HASH> 100644
--- a/quart/cli.py
+++ b/quart/cli.py
@@ -56,8 +56,11 @@ class ScriptInfo:
import_name = module_path.with_suffix('').name
try:
module = import_module(import_name)
- except ModuleNotFoundError:
- raise NoAppException()
+ except ModuleNotFoundError as error:
+ if error.name == import_name: # type: ignore
+ raise NoAppException()
+ else:
+ raise
try:
self._app = eval(app_name, vars(module))
@@ -126,6 +129,7 @@ class QuartGroup(AppGroup):
for the inbuilt commands to be overridden.
"""
info = ctx.ensure_object(ScriptInfo)
+ command = None
try:
command = info.load_app().cli.get_command(ctx, name)
except NoAppException:
|
Fix minor CLI bugs
Notably unassigned variable and only raise NoAppExceptions if the
exception relates to the import tried. This ensures that if the import
fails due to a missing module within the imported file it shows a
different error than NoApp.
|
diff --git a/includes/functions-formatting.php b/includes/functions-formatting.php
index <HASH>..<HASH> 100644
--- a/includes/functions-formatting.php
+++ b/includes/functions-formatting.php
@@ -18,7 +18,7 @@ function yourls_int2string( $num, $chars = null ) {
$num = bcdiv( $num, $len );
$string = $chars[ $mod ] . $string;
}
- $string = $chars[ $num ] . $string;
+ $string = $chars[ intval( $num ) ] . $string;
return yourls_apply_filter( 'int2string', $string, $num, $chars );
}
|
Remove notice that has probably been here for decades.
<b>Warning</b>: Illegal string offset '<I>' in <b>D:\yourls\includes\functions-formatting.php</b> on line <b><I></b>
|
diff --git a/cake/console/shells/testsuite.php b/cake/console/shells/testsuite.php
index <HASH>..<HASH> 100644
--- a/cake/console/shells/testsuite.php
+++ b/cake/console/shells/testsuite.php
@@ -280,8 +280,7 @@ class TestSuiteShell extends Shell {
if (empty($testCases)) {
$this->out(__("No test cases available \n\n"));
- $this->help();
- $this->_stop();
+ return $this->out($this->OptionParser->help());
}
$this->out($title);
|
Fixing call to a help method that doesn't exist.
|
diff --git a/lib/will_filter/extensions/action_controller_extension.rb b/lib/will_filter/extensions/action_controller_extension.rb
index <HASH>..<HASH> 100644
--- a/lib/will_filter/extensions/action_controller_extension.rb
+++ b/lib/will_filter/extensions/action_controller_extension.rb
@@ -46,17 +46,17 @@ module WillFilter
# only if the filters need to be
if WillFilter::Config.user_filters_enabled?
begin
- wf_current_user = eval(WillFilter::Config.current_user_method)
+ wf_current_user = self.send(WillFilter::Config.current_user_method)
rescue Exception => ex
- raise WillFilter::FilterException.new("will_filter cannot be initialized because #{WillFilter::Config.current_user_method} failed with: #{ex.message}")
+ wf_current_user = nil
end
end
if WillFilter::Config.project_filters_enabled?
begin
- wf_current_project = eval(WillFilter::Config.current_project_method)
+ wf_current_project = self.send(WillFilter::Config.current_project_method)
rescue Exception => ex
- raise WillFilter::FilterException.new("will_filter cannot be initialized because #{WillFilter::Config.current_project_method} failed with: #{ex.message}")
+ wf_current_project = nil
end
end
|
current_user and project should not be mandatory
|
diff --git a/quickplots/charts.py b/quickplots/charts.py
index <HASH>..<HASH> 100644
--- a/quickplots/charts.py
+++ b/quickplots/charts.py
@@ -88,6 +88,10 @@ class AxisChart(Chart):
return list(self._all_series)
+ def series(self):
+ return self._all_series[0]
+
+
def add_series(self, series):
if not isinstance(series, Series):
raise TypeError("'%s' is not a Series" % str(series))
diff --git a/tests/test_axis_charts.py b/tests/test_axis_charts.py
index <HASH>..<HASH> 100644
--- a/tests/test_axis_charts.py
+++ b/tests/test_axis_charts.py
@@ -91,6 +91,13 @@ class AxisChartPropertyTests(AxisChartTest):
self.assertEqual(chart.all_series(), [self.series1])
+ def test_series_refers_to_first_series(self):
+ chart = AxisChart(self.series1)
+ self.assertIs(chart.series(), self.series1)
+ chart = AxisChart(self.series1, self.series2, self.series3)
+ self.assertIs(chart.series(), self.series1)
+
+
def test_can_update_axis_labels(self):
chart = AxisChart(self.series1)
chart.x_label("Input")
|
Add Series property to refer to first Series
|
diff --git a/src/main/java/com/j256/ormlite/dao/ForeignCollection.java b/src/main/java/com/j256/ormlite/dao/ForeignCollection.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/j256/ormlite/dao/ForeignCollection.java
+++ b/src/main/java/com/j256/ormlite/dao/ForeignCollection.java
@@ -102,4 +102,14 @@ public interface ForeignCollection<T> extends Collection<T>, CloseableIterable<T
* @return The number of objects loaded into the new collection.
*/
public int refreshCollection() throws SQLException;
+
+ /**
+ * Adds the object to the collection. This will also add it to the database by calling through to [@link
+ * {@link Dao#create(Object)}. If the object has already been created in the database then you just need to set the
+ * foreign field on the object and call {@link Dao#update(Object)}. If you add it here the DAO will try to create it
+ * in the database again which will most likely cause an error.
+ *
+ * @see Collection#add(Object)
+ */
+ public boolean add(T obj);
}
|
Added more docs around adding to the collection.
|
diff --git a/code/model/TrackedManyManyList.php b/code/model/TrackedManyManyList.php
index <HASH>..<HASH> 100644
--- a/code/model/TrackedManyManyList.php
+++ b/code/model/TrackedManyManyList.php
@@ -34,7 +34,7 @@ class TrackedManyManyList extends ManyManyList
if (class_exists($addingToClass)) {
$onItem = $addingToClass::get()->byID($addingTo);
if ($onItem) {
- if ($item && !$item instanceof DataObject) {
+ if ($item && !($item instanceof DataObject)) {
$class = $this->dataClass;
$item = $class::get()->byID($item);
}
|
style(TrackedManyManyList): Add brackets around instanceof check
|
diff --git a/config.go b/config.go
index <HASH>..<HASH> 100644
--- a/config.go
+++ b/config.go
@@ -38,7 +38,7 @@ const (
defaultPeerPort = 9735
defaultRPCHost = "localhost"
defaultMaxPendingChannels = 1
- defaultNumChanConfs = 1
+ defaultNumChanConfs = 3
defaultNoEncryptWallet = false
defaultTrickleDelay = 30 * 1000
)
diff --git a/networktest.go b/networktest.go
index <HASH>..<HASH> 100644
--- a/networktest.go
+++ b/networktest.go
@@ -178,6 +178,7 @@ func (l *lightningNode) genArgs() []string {
args = append(args, "--bitcoin.simnet")
args = append(args, "--nobootstrap")
args = append(args, "--debuglevel=debug")
+ args = append(args, "--defaultchanconfs=1")
args = append(args, fmt.Sprintf("--bitcoin.rpchost=%v", l.cfg.Bitcoin.RPCHost))
args = append(args, fmt.Sprintf("--bitcoin.rpcuser=%v", l.cfg.Bitcoin.RPCUser))
args = append(args, fmt.Sprintf("--bitcoin.rpcpass=%v", l.cfg.Bitcoin.RPCPass))
|
config+test: increase default num confs for funding flows to 3
In this commit, we increase the default number of confirmations we
require for funding flows from 1 to 3. The value of 1 was rather
unstable on testnet due to the frequent multi-block re-orgs.
Additionally, a value of 3 ensures our funding transaction is
sufficiently buried before we deem is usable.
|
diff --git a/test/tc_collections.rb b/test/tc_collections.rb
index <HASH>..<HASH> 100644
--- a/test/tc_collections.rb
+++ b/test/tc_collections.rb
@@ -352,24 +352,18 @@ class TestCollections < MiniTest::Unit::TestCase
def test_row_equality
rv = RowValueTest.new
- rv.run_bg
- rv.sync_do {
- rv.t1 <+ [[5, 10],
- [6, 11]]
- rv.t2 <+ [[5, 10],
- [6, 15],
- [7, 12]]
- }
-
- rv.sync_do {
- assert_equal(1, rv.t3.length)
- assert_equal(2, rv.t4.length)
-
- cnt = rv.t4.select {|t| t == [5, 10, 15]}
- assert_equal([], cnt)
- }
-
- rv.stop
+ rv.t1 <+ [[5, 10],
+ [6, 11]]
+ rv.t2 <+ [[5, 10],
+ [6, 15],
+ [7, 12]]
+ rv.tick
+
+ assert_equal(1, rv.t3.length)
+ assert_equal(2, rv.t4.length)
+
+ cnt = rv.t4.select {|t| t == [5, 10, 15]}
+ assert_equal([], cnt)
end
def test_types
|
Simplify a test case slightly.
|
diff --git a/contrib/pig/src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java b/contrib/pig/src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java
index <HASH>..<HASH> 100644
--- a/contrib/pig/src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java
+++ b/contrib/pig/src/java/org/apache/cassandra/hadoop/pig/CassandraStorage.java
@@ -502,7 +502,7 @@ public class CassandraStorage extends LoadFunc implements StoreFuncInterface, Lo
return DoubleType.instance.decompose((Double)o);
if (o instanceof UUID)
return ByteBuffer.wrap(UUIDGen.decompose((UUID) o));
- return null;
+ return ByteBuffer.wrap(((DataByteArray) o).get());
}
public void putNext(Tuple t) throws ExecException, IOException
|
Add catch-all cast back to CassandraStorage.
Patch by brandonwilliams reviewed by xedin for CASSANDRA-<I>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.