patch stringlengths 18 160k | callgraph stringlengths 4 179k | summary stringlengths 4 947 | msg stringlengths 6 3.42k |
|---|---|---|---|
@@ -180,7 +180,7 @@ class EpisodeRecord < ApplicationRecord
end
def facebook_share_body
- return self.comment if self.comment.present?
+ return self.body if self.body.present?
if user.locale == "ja"
"見ました。"
| [EpisodeRecord->[update_share_record_status->[share_record_to_twitter?,update_column,shared_twitter?],share_to_sns->[perform_later,shared_twitter?],twitter_share_body->[hashtag_with_hash,local_title,sub,local_number,share_url_with_query,present?,length,truncate,comment,locale],rating_state_order->[order,upcase,in?],facebook_share_body->[present?,comment,locale],setup_shared_sns->[shared_twitter,present?,authorized_to?,share_record_to_twitter?],generate_url_hash->[slice],shared_sns?->[present?,shared_twitter?],work->[work],share_url->[username,id,preferred_annict_url],initial->[first],facebook_share_title->[title,title_with_number],initial?->[id],transitions,aasm,between?,include,state,belongs_to,write_attribute,scope,validates,extend,event,enumerize,where,has_many,not]] | return a string with a message that can be used to share the body of a facebook message. | Style/RedundantSelf: Redundant self detected. |
@@ -5,14 +5,9 @@
<% if @user_phone_form.phone && @user_phone_form.errors.blank?%>
<div class="mb1 h4">
- <%= :phone %>:
+ <%= t('two_factor_authentication.phone_label') %>:
<strong><%= @user_phone_form.masked_number %></strong>
- </div><br/>
-
- <div style="display:none">
- <%= f.hidden_field :international_code, :value => @user_phone_form.international_code %>
- <%= f.hidden_field :phone, :value => @user_phone_form.phone %>
- </div>
+ </div><br/>
<% else %>
<%= render 'users/shared/phone_number_edit', f: f %>
<% end %>
| [No CFG could be retrieved] | Renders the user s phone number form. | Hidden fields not needed. The phone form gets the phone configuration from the controller if one is associated. |
@@ -379,6 +379,7 @@ public class DisplayDataTest implements Serializable {
public void populateDisplayData(Builder builder) {
builder
.addIfNotNull(DisplayData.item("nullString", (String) null))
+ .addIfNotNull(DisplayData.item("nullVPString", (ValueProvider<String>) null))
.addIfNotNull(DisplayData.item("notNullString", "foo"))
.addIfNotNull(DisplayData.item("nullLong", (Long) null))
.addIfNotNull(DisplayData.item("notNullLong", 1234L))
| [DisplayDataTest->[testToString->[toString],testPathToString->[toString],hasExpectedJson->[toString,hasExpectedJson],IncludeSubComponent->[populateDisplayData->[getId]]]] | This test method creates a new data structure with all items of the type that are not null. | Should it also handle `addIfNotNull(DisplayData.item("nullVPValue", ValueProvider.of((String) null))` ? |
@@ -99,10 +99,7 @@ class Agent:
) -> None:
self.name = name or config.cloud.agent.get("name", "agent")
- self.labels = labels or config.cloud.agent.get("labels", [])
- # quick hack in case config has not been evaluated to a list yet
- if isinstance(self.labels, str):
- self.labels = ast.literal_eval(self.labels)
+ self.labels = labels or list(config.cloud.agent.get("labels", []))
self.env_vars = env_vars or config.cloud.agent.get("env_vars", dict())
self.max_polls = max_polls
self.log_to_cloud = False if no_cloud_logs else True
| [Agent->[start->[exit_handler],agent_process->[run],setup->[run->[start],start],__init__->[get]],Agent] | Initialize a new object with the given parameters. Get a from config. cloud. agent. | I found some failing tests that were being caused by this manipulating the _same_ list with each test run, hence the `list()` wrapper. |
@@ -3144,9 +3144,9 @@ class Function(object):
save_context.get_save_options().experimental_variable_policy)
else:
variable_policy = save_options.VariablePolicy.EXPAND_DISTRIBUTED_VARIABLES
-
+
return CacheKey(
- _make_input_signature_hashable(input_signature), parent_graph,
+ hashable_input_signature, parent_graph,
device_functions, colocation_stack, in_cross_replica_context,
variable_policy, xla_context_id)
| [_FirstOrderTapeGradientFunctions->[_forward_and_backward_functions->[_build_functions_for_outputs]],_convert_numpy_inputs->[_is_ndarray,_as_ndarray],Function->[_maybe_define_function->[canonicalize_function_inputs,_create_graph_function,_define_function_with_shape_relaxation,_cache_key],_create_graph_function->[ConcreteFunction],_get_concrete_function_internal->[_get_concrete_function_internal_garbage_collected],_get_concrete_function_garbage_collected->[is_same_structure],_define_function_with_shape_relaxation->[_is_type_subset,_create_graph_function,_type_spec_for,_cache_key],__init__->[FunctionCache,from_function_and_signature],get_concrete_function->[_get_concrete_function_garbage_collected],_cache_key->[_enclosing_xla_context,_make_input_signature_hashable],__call__->[_filtered_call]],_ForwardBackwardCall->[record->[record],forward->[forward]],defun_with_attributes->[decorated->[Function],validate_signature,decorated],class_method_to_instance_method->[TfMethodTarget],_DelayedRewriteGradientFunctions->[_rewrite_forward_and_call_backward->[add_to_graph,forward_backward],_backward->[_backward_function->[_rewrite_forward_and_call_backward]],record->[_backward],_construct_forward_backward->[_forward_name,_backward_name,_parse_func_attrs,_EagerDefinedFunction],__init__->[_EagerDefinedFunction,_inference_name]],_convert_inputs_to_signature->[format_error_message],register->[get_concrete_function,add_gradient_functions_to_graph,add_to_graph],ConcreteFunction->[__repr__->[__repr__,_flat_signature_summary,pretty_printed_signature],_call_flat->[record,call,forward],add_to_graph->[forward],__init__->[_DelayedRewriteGradientFunctions,forward,_parse_func_attrs],add_gradient_functions_to_graph->[add_to_graph,forward,forward_backward],_experimental_with_cancellation_manager->[cancellable_call->[_call_impl]],name->[forward],pretty_printed_signature->[pretty_print_spec->[pretty_print_spec],_structured_signature_summary,pretty_print_spec],function_def->[forward],_select_forward_and_backward_functions->[_FirstOrderTapeGradientFunctions,_ForwardBackwardCall,_HigherOrderTapeGradientFunctions],__str__->[__repr__,pretty_printed_signature]],_structure_summary->[type_name,_Marker],FunctionSpec->[canonicalize_function_inputs->[_convert_annotated_args_to_tensors,signature_summary,_convert_variables_to_tensors,_deterministic_dict_values],from_function_and_signature->[FunctionSpec]],_TapeGradientFunctions->[_wrap_backward_function_with_jvp_backprop->[_backward_name],record->[_wrap_backward_function],_build_functions_for_outputs->[_forward_name,_backward_name,_parse_func_attrs,_EagerDefinedFunction],_wrap_forward_function_with_jvps->[_forward_name,call]],_HigherOrderTapeGradientFunctions->[_forward_and_backward_functions->[_build_functions_for_outputs]],_EagerDefinedFunction->[call->[_InterpolateFunctionError],__init__->[_EagerDefinedFunctionDeleter]]] | Computes the cache key given the given inputs and execution context. Create a concrete function that creates a concrete function from the given arguments. Construct a ConcreteFunction from a base function and a list of missing args. | nit: remove trailing white space |
@@ -628,7 +628,7 @@ uint32_t mplay_state::screen_update_megplay(screen_device &screen, bitmap_rgb32
screen_update_megadriv(screen, bitmap, cliprect);
//m_vdp1->screen_update(screen, bitmap, cliprect);
- // i'm not sure if the overlay (256 pixels wide) is meant to be stretched over the 320 resolution genesis output, or centered.
+ // TODO : the overlay (256 pixels wide) is actually stretched over the 320 resolution genesis output, reference is https://youtu.be/Oir1Wp6yOq0.
// if it's meant to be stretched we'll have to multiply the entire outut x4 for the Genesis VDP and x5 for the SMS VDP to get a common 1280 pixel wide image
// overlay, only drawn for pixels != 0
| [No CFG could be retrieved] | region Megadriv - Screen Update 256 pixels wide image. | This is called superimposition effect, something that MAME barely supports for laserdisc games. |
@@ -113,6 +113,12 @@ define([
return;
}
+ //>>includeStart('debug', pragmas.debug);
+ if (!style.ready) {
+ throw new DeveloperError('The style is not loaded. Use Cesium3DTileStyle.readyPromise or wait for Cesium3DTileStyle.ready to be true.');
+ }
+ //>>includeEnd('debug');
+
// PERFORMANCE_IDEA: we can create a slightly faster internal interface by directly
// using Cesium3DTileBatchTableResources. We might also be able to use less memory
// by using reusing a batchValues array across tiles.
| [No CFG could be retrieved] | Style composite tile. | Move this check to inside `evaluateColor` and `evaluate`. That is the object that isn't ready, not this. |
@@ -82,8 +82,11 @@ public class DefaultSchedulerMessageSource extends AbstractComponent
this.muleContext = muleContext;
this.scheduler = scheduler;
this.disallowConcurrentExecution = disallowConcurrentExecution;
- this.notificationHelper =
- new NotificationHelper(muleContext.getNotificationManager(), ConnectorMessageNotification.class, false);
+
+ notificationFunctions = new LinkedList<>();
+ // Add message received notification
+ notificationFunctions
+ .add((event, component) -> createConnectorMessageNotification(this, event, component.getLocation(), MESSAGE_RECEIVED));
}
@Override
| [DefaultSchedulerMessageSource->[disposeScheduler->[stop]]] | Starts the task. | isn't this the exact same notification that the FlowProcessMediator is already sending? |
@@ -188,6 +188,9 @@ func (orm *ORM) preloadJobs() *gorm.DB {
}).
Preload("Tasks", func(db *gorm.DB) *gorm.DB {
return db.Unscoped().Order("id asc")
+ }).
+ Preload("Errors", func(db *gorm.DB) *gorm.DB {
+ return db.Unscoped().Order("id asc")
})
}
| [FindTxsBySenderAndRecipient->[MustEnsureAdvisoryLock],Close->[Close],JobRunsFor->[MustEnsureAdvisoryLock,preloadJobRuns],SetConfigValue->[MustEnsureAdvisoryLock],IdempotentInsertEthTaskRunTx->[Transaction],SaveUser->[MustEnsureAdvisoryLock],FindInitiator->[MustEnsureAdvisoryLock],FindTxByAttempt->[FindTx,MustEnsureAdvisoryLock],ClobberDiskKeyStoreWithDBKeys->[Keys],CreateSession->[MustEnsureAdvisoryLock,FindUser],TxAttempts->[MustEnsureAdvisoryLock],CreateTx->[MustEnsureAdvisoryLock,convenientTransaction],FindUser->[MustEnsureAdvisoryLock],FindExternalInitiatorByName->[MustEnsureAdvisoryLock],CreateLogConsumption->[MustEnsureAdvisoryLock],DeleteUser->[MustEnsureAdvisoryLock,FindUser,convenientTransaction],DeleteEncryptedSecretVRFKey->[MustEnsureAdvisoryLock],RawDB->[MustEnsureAdvisoryLock],CreateJob->[MustEnsureAdvisoryLock,convenientTransaction],preloadJobRuns->[Unscoped],ArchiveJob->[MustEnsureAdvisoryLock,FindJob,convenientTransaction],JobRunsSortedFor->[MustEnsureAdvisoryLock,JobRunsCountFor,preloadJobRuns],CreateBridgeType->[MustEnsureAdvisoryLock],UpdateBridgeType->[MustEnsureAdvisoryLock],AddTxAttempt->[MustEnsureAdvisoryLock],UnconfirmedTxAttempts->[MustEnsureAdvisoryLock],AuthorizedUserWithSession->[MustEnsureAdvisoryLock,FindUser],AnyJobWithType->[MustEnsureAdvisoryLock],DeleteUserSession->[MustEnsureAdvisoryLock],FindBridgesByNames->[MustEnsureAdvisoryLock],SaveJobRun->[MustEnsureAdvisoryLock,Unscoped,convenientTransaction],CreateServiceAgreement->[MustEnsureAdvisoryLock,createJob,convenientTransaction],FirstOrCreateKey->[MustEnsureAdvisoryLock],JobRunsCountFor->[MustEnsureAdvisoryLock],FindExternalInitiator->[MustEnsureAdvisoryLock],SaveSession->[MustEnsureAdvisoryLock],CreateJobRun->[MustEnsureAdvisoryLock],FindOrCreateFluxMonitorRoundStats->[MustEnsureAdvisoryLock],FindBridge->[MustEnsureAdvisoryLock],FindEncryptedSecretVRFKeys->[MustEnsureAdvisoryLock],UnscopedJobRunsWithStatus->[MustEnsureAdvisoryLock,Unscoped,preloadJobRuns],FindJobRun->[MustEnsureAdvisoryLock,preloadJobRuns],GetConfigValue->[MustEnsureAdvisoryLock],CountOf->[MustEnsureAdvisoryLock],Jobs->[MustEnsureAdvisoryLock,Unscoped,preloadJobs],PendingBridgeType->[MustEnsureAdvisoryLock,FindBridge],DeleteStaleSessions->[MustEnsureAdvisoryLock],BulkDeleteRuns->[MustEnsureAdvisoryLock,convenientTransaction],TxFrom->[MustEnsureAdvisoryLock],DeleteBridgeType->[MustEnsureAdvisoryLock],JobsSorted->[MustEnsureAdvisoryLock],GetLastNonce->[MustEnsureAdvisoryLock],BridgeTypes->[MustEnsureAdvisoryLock],preloadJobs->[Unscoped],FirstOrCreateEncryptedSecretVRFKey->[MustEnsureAdvisoryLock],Transactions->[MustEnsureAdvisoryLock],getRecords->[MustEnsureAdvisoryLock],FindTx->[MustEnsureAdvisoryLock],IncrFluxMonitorRoundSubmissions->[MustEnsureAdvisoryLock],FindServiceAgreement->[MustEnsureAdvisoryLock],MarkTxSafe->[MustEnsureAdvisoryLock],AllSyncEvents->[MustEnsureAdvisoryLock],DeleteTransaction->[MustEnsureAdvisoryLock,convenientTransaction],FindAllTxsInNonceRange->[MustEnsureAdvisoryLock],createJob->[MustEnsureAdvisoryLock],ClearNonCurrentSessions->[MustEnsureAdvisoryLock],CreateInitiator->[MustEnsureAdvisoryLock],FindLogConsumer->[MustEnsureAdvisoryLock,FindJob],MarkRan->[MustEnsureAdvisoryLock,convenientTransaction],SaveTx->[MustEnsureAdvisoryLock],DeleteFluxMonitorRoundsBackThrough->[MustEnsureAdvisoryLock],LinkEarnedFor->[MustEnsureAdvisoryLock],convenientTransaction->[MustEnsureAdvisoryLock,Transaction],FindTxAttempt->[MustEnsureAdvisoryLock],ClearSessions->[MustEnsureAdvisoryLock],DeleteExternalInitiator->[MustEnsureAdvisoryLock],Unscoped->[Unscoped],FindJob->[MustEnsureAdvisoryLock],Sessions->[MustEnsureAdvisoryLock],JobRunsSorted->[MustEnsureAdvisoryLock],MostRecentFluxMonitorRoundID->[MustEnsureAdvisoryLock],getDefaultKey->[Keys],CreateExternalInitiator->[MustEnsureAdvisoryLock],Unscoped] | preloadJobs preload jobs. | I think this will add an extra DB call for errors every time we pull back jobs, but we probably only need it in the JobSpecController#Show route. Maybe we explicitly pull these errors back then, and otherwise skip the query? |
@@ -88,6 +88,7 @@ See the @{$python/nn} guide.
@@ctc_beam_search_decoder
@@top_k
@@in_top_k
+@@nth_element
@@nce_loss
@@sampled_softmax_loss
@@uniform_candidate_sampler
| [remove_undocumented] | Yields the average of all hits in a sequence of sequence numbers. Imports the nn - associated functionality into this package. | New symbols should be introduced in contrib first, and only moved to core tensorflow after their API has stabilized a little. Removing this line will make the API test failure go away. |
@@ -28,7 +28,8 @@ class LoggerFactory
$logger = new Monolog\Logger($channel);
$logger->pushProcessor(new Monolog\Processor\PsrLogMessageProcessor());
$logger->pushProcessor(new Monolog\Processor\ProcessIdProcessor());
- $logger->pushProcessor(new FriendicaProcessor(LogLevel::DEBUG, 1));
+ $logger->pushProcessor(new Monolog\Processor\UidProcessor());
+ $logger->pushProcessor(new FriendicaProcessor(LogLevel::DEBUG, ['Friendica\Core\Logger']));
return $logger;
}
| [LoggerFactory->[createDev->[pushProcessor,pushHandler],create->[pushProcessor],addStreamHandler->[pushHandler,setFormatter],enableTest->[pushHandler,setFormatter]]] | Create a new instance of Monolog \ Logger. | As said, we can change `LogLevel::DEBUG` to any loglevel we want. So the log details won't appear at every log, just above the level we want. => Maybe we can decrease the amount of logs in this way |
@@ -8,7 +8,6 @@ define([
/**
* Style options for corners.
*
- * @demo The {@link http://cesiumjs.org/Cesium/Apps/Sandcastle/index.html?src=Corridor.html&label=Geometries|Corridor Demo}
* demonstrates the three corner types, as used by {@link CorridorGraphics}.
*
* @exports CornerType
| [No CFG could be retrieved] | Defines the corners of an object. | Remove this line too |
@@ -46,8 +46,17 @@ public class QueryPhrasesTest extends SingleCacheManagerTest {
cleanup = CleanupPhase.AFTER_METHOD;
}
+ @SuppressWarnings("unused")
+ public QueryPhrasesTest(EmbeddedCacheManager cacheManager) {
+ this.cacheManager = cacheManager;
+ cleanup = CleanupPhase.AFTER_METHOD;
+ }
+
@Override
protected EmbeddedCacheManager createCacheManager() throws Exception {
+ if (this.cacheManager != null) {
+ return this.cacheManager;
+ }
ConfigurationBuilder cfg = getDefaultStandaloneCacheConfig(true);
cfg
.indexing().index(Index.ALL)
| [QueryPhrasesTest->[createCacheManager->[createCacheManager]]] | Creates a cache manager that uses the default configuration. | What is the purpose of this unused constructor? |
@@ -134,7 +134,14 @@ namespace Dynamo.PackageManager
{
if (assem.IsNodeLibrary)
{
- OnRequestLoadNodeLibrary(assem.Assembly);
+ try
+ {
+ OnRequestLoadNodeLibrary(assem.Assembly);
+ }
+ catch(Dynamo.Exceptions.LibraryLoadFailedException ex)
+ {
+ Log(ex.GetType() + ": " + ex.Message);
+ }
}
}
| [PackageLoader->[DoCachedPackageUninstalls->[Add],Load->[OnRequestLoadNodeLibrary,OnRequestLoadCustomNodeDirectory,Add],Add->[OnPackageAdded,Add],LoadAll->[Load],IsUnderPackageControl->[IsUnderPackageControl],Remove->[OnPackageRemoved,Remove],Package->[Add]]] | Load a package. | I wonder why, if there is no ZT library, does the `assembly.IsNodeLibrary` condition turn out to be true? |
@@ -135,7 +135,7 @@ public class PbemMessagePoster implements Serializable {
final StringBuilder sb = new StringBuilder("Post Turn Summary");
if (forumPoster != null) {
sb.append(" to ").append(forumPoster.getDisplayName()).append(" success = ")
- .append(String.valueOf(forumSuccess));
+ .append(forumSuccess.isDone() && !forumSuccess.isCancelled());
}
if (emailSender != null) {
if (forumPoster != null) {
| [PbemMessagePoster->[post->[getTurnSummaryRef],postTurn->[getEmailSender,getForumPoster]]] | Post a game to the appropriate forum. Check if the message is not null and if so send it to the appropriate sender. | My static analyzer is flagging `forumSuccess` as potentially `null` here. Might want to investigate above what should be done if an exception is thrown when initializing `forumSuccess`. |
@@ -813,6 +813,10 @@ def test_add_checkout_lines(
api_client.post_graphql(MUTATION_CHECKOUT_LINES_ADD, variables)
)
assert not response["data"]["checkoutLinesAdd"]["errors"]
+ # Two API calls:
+ # - mutate() logic
+ # - dataloader for lines totalPrice
+ assert mock_send_request.call_count == 2
@pytest.mark.django_db
| [test_checkout_payment_charge->[fetch_checkout_info,get_plugins_manager,checkout_total,post_graphql,get_graphql_content,fetch_checkout_lines],test_complete_checkout_with_out_of_stock_webhook->[assert_called_once_with,update,post_graphql,get_graphql_content,last],test_update_checkout_lines->[post_graphql,to_global_id,get_graphql_content,first,last],test_customer_complete_checkout->[save,post_graphql,get_graphql_content],test_customer_complete_checkout_for_cc->[save,post_graphql,get_graphql_content],test_add_delivery_to_checkout->[post_graphql,to_global_id,get_graphql_content],test_create_checkout_with_reservations->[Stock,django_assert_num_queries,ProductVariantChannelListing,all,append,bulk_create,post_graphql,to_global_id,get_graphql_content,Decimal,first,range,ProductVariant],test_complete_checkout_with_single_line->[first,post_graphql,set,get_graphql_content],test_add_billing_address_to_checkout->[post_graphql,get_graphql_content],test_complete_checkout->[post_graphql,get_graphql_content],test_create_checkout_for_cc->[post_graphql,to_global_id,get_graphql_content,count],test_create_checkout->[post_graphql,to_global_id,get_graphql_content,first,last,count],test_update_checkout_lines_with_reservations->[Stock,django_assert_num_queries,ProductVariantChannelListing,variables,add_variants_to_checkout,bulk_create,post_graphql,to_global_id,get_graphql_content,Decimal,range,ProductVariant],test_checkout_voucher_code->[post_graphql,get_graphql_content],test_complete_checkout_preorder->[post_graphql,get_graphql_content],test_add_checkout_lines_with_reservations->[Stock,django_assert_num_queries,ProductVariantChannelListing,append,exclude,Decimal,post_graphql,to_global_id,get_graphql_content,bulk_create,first,range,ProductVariant],test_checkout_shipping_address_update->[post_graphql,get_graphql_content],test_checkout_email_update->[post_graphql,get_graphql_content],test_add_checkout_lines->[post_graphql,to_global_id,get_graphql_content,first,last],test_add_shipping_to_checkout->[post_graphql,to_global_id,get_graphql_content],count_queries,patch] | This test creates a checkout with a single line and a list of products that can be added Bulk create product - variant channel listing and Stock objects. | This API call should be avoided - totalPrice of an individual line should not depend on the selected shipping method. I believe that I've already covered it on my cleanup branch |
@@ -345,6 +345,7 @@ namespace Dynamo.Configuration
set
{
defaultPythonEngine = value;
+ RaisePropertyChanged(nameof(DefaultPythonEngine));
}
}
| [PreferenceSettings->[SaveInternal->[Save],GetIsBackgroundPreviewActive,SetIsBackgroundPreviewActive]] | Displays a list of recent backup files. This function is used to initialize the window of the windowed active state. | If you follow my previous advice then you don't need this line. |
@@ -185,11 +185,11 @@ RtpsUdpTransport::use_datalink(const RepoId& local_id,
{
bool requires_inline_qos;
unsigned int blob_bytes_read;
- ACE_INET_Addr addr = get_connection_addr(remote_data, &requires_inline_qos,
+ ACE_INET_Addr raddr = get_connection_addr(remote_data, &requires_inline_qos,
&blob_bytes_read);
if (link_) {
- link_->add_locator(remote_id, addr, requires_inline_qos);
+ link_->add_locator(remote_id, raddr, requires_inline_qos);
#if defined(OPENDDS_SECURITY)
if (remote_data.length() > blob_bytes_read) {
| [No CFG could be retrieved] | This is called when a datalink is opened. - - - - - - - - - - - - - - - - - -. | Not sure why this is changing, but if the new name is preferred I'm OK with that. |
@@ -197,13 +197,16 @@ public class ServerManager implements QuerySegmentWalker
}
// segmentMapFn maps each base Segment into a joined Segment if necessary.
- final Function<SegmentReference, SegmentReference> segmentMapFn = Joinables.createSegmentMapFn(
+ final Function<SegmentReference, SegmentReference> segmentMapFn = joinables.createSegmentMapFn(
analysis.getPreJoinableClauses(),
- joinableFactory,
cpuTimeAccumulator,
analysis.getBaseQuery().orElse(query)
);
+ final Optional<byte[]> cacheKeyPrefix = analysis.isJoin()
+ ? joinables.computeJoinDataSourceCacheKey(analysis)
+ : Optional.of(StringUtils.EMPTY_BYTES);
+
final FunctionalIterable<QueryRunner<T>> queryRunners = FunctionalIterable
.create(specs)
.transformCat(
| [ServerManager->[buildAndDecorateQueryRunner->[segment,withWaitMeasuredFromNow,PerSegmentQueryOptimizationContext,SpecificSegmentSpec,safeBuild,toString,getId,getStart,getDataInterval],getQueryRunnerForSegments->[getQuery,getPreJoinableClauses,isQuery,safeBuild,singletonList,mergeRunners,emit,orElse,AtomicLong,getDataSource,getToolchest,newArrayList,mergeResults,findFactory,isPresent,forDataSource,transformCat,format,ISE,buildQueryRunnerForSegment,QueryUnsupportedException,get,canPerformSubquery,getTimeline,getClass,createSegmentMapFn],buildQueryRunnerForSegment->[buildAndDecorateQueryRunner,getPartitionNumber,findEntry,apply,getObject,getInterval,getChunk,getVersion],getQueryRunnerForIntervals->[isPresent,get,forDataSource,transformCat,getTimeline,getInterval,getQueryRunnerForSegments,getDataSource,SegmentDescriptor,getChunkNumber,transform,getVersion],EmittingLogger]] | Gets a query runner for the given segments. Build a final query runner that is safe to call from within a query. | How about supplying a `Supplier<Optional<byte[]>>` to the `CachingQueryRunner`? Then, computing `cacheKeyPrefix` can be done only when `useCache` or `populateCache` is true which seems more legit. |
@@ -41,6 +41,7 @@ import gobblin.source.workunit.WorkUnit;
*
* @author ynli
*/
+@Deprecated
public class WorkUnitManager extends AbstractIdleService {
private static final Logger LOG = LoggerFactory.getLogger(WorkUnitManager.class);
| [WorkUnitManager->[addWorkUnit->[add],shutDown->[info,shutdown,stop],startUp->[info,execute],addWorkUnits->[addAll],WorkUnitHandler->[run->[TaskContext,poll,absent,Task,execute]],WorkUnitHandler,getLogger,newSingleThreadExecutor,newLinkedBlockingQueue]] | Creates a new instance of WorkUnitManager. Start the work unit manager. | Why is this deprecated? We should have a javadic what is to be used instead. |
@@ -18,3 +18,5 @@ class Itstool(AutotoolsPackage):
version('2.0.1', sha256='ec6b1b32403cbe338b6ac63c61ab1ecd361f539a6e41ef50eae56a4f577234d1')
version('2.0.0', sha256='14708111b11b4a70e240e3b404d7a58941e61dbb5caf7e18833294d654c09169')
version('1.2.0', sha256='46fed63fb89c72dbfc03097b4477084ff05ad6f171212d8f1f1546ea543978aa')
+
+ depends_on('libxml2+python', type=('build', 'run'))
| [Itstool->[version]] | Version of the Ethereum Ethereum Ethereum Ethereum Ethereum. | Probably type=build/run? It doesn't sound like it links to the library. |
@@ -407,6 +407,10 @@ func (c *RaftCluster) putStore(store *metapb.Store) error {
// Case 3: store id does not exist, check duplicated address.
for _, s := range c.cachedCluster.getStores() {
+ // It's OK to start a new store on the same address if the old store has been removed.
+ if s.store.GetState() == metapb.StoreState_Tombstone {
+ continue
+ }
if s.store.GetAddress() == store.GetAddress() {
return errors.Errorf("duplicated store address: %v, already registered by %v", store, s.store)
}
| [NewAddPeerOperator->[GetRegionByID,GetStore],NewRemovePeerOperator->[GetRegionByID],RemoveStore->[saveStore,GetStore],getRegion->[getRegion],bootstrapCluster->[start,getClusterRootPath],stop->[stop],checkStores->[BuryStore],SetAdminOperator->[GetRegionByID],runBackgroundJobs->[checkStores],createRaftCluster->[start,isRunning,getClusterRootPath],GetRaftCluster->[isRunning],BuryStore->[saveStore,GetStore]] | putStore saves a store to the cluster. | If the store is tombstone, should we check more conditions before restart this store? |
@@ -22,6 +22,7 @@ from tensorflow.contrib.timeseries.python.timeseries import ar_model
from tensorflow.contrib.timeseries.python.timeseries import feature_keys
from tensorflow.contrib.timeseries.python.timeseries import math_utils
from tensorflow.contrib.timeseries.python.timeseries import model_utils
+from tensorflow.contrib.timeseries.python.timeseries import ts_head_lib
from tensorflow.contrib.timeseries.python.timeseries import state_management
from tensorflow.contrib.timeseries.python.timeseries.state_space_models import state_space_model
from tensorflow.contrib.timeseries.python.timeseries.state_space_models import structural_ensemble
| [StateSpaceRegressor->[__init__->[,super,ValueError,isinstance,ChainingStateManager]],ARRegressor->[__init__->[AdagradOptimizer,FilteringOnlyStateManager,super,ValueError,ARModel,AnomalyMixtureARModel]],StructuralEnsembleRegressor->[__init__->[StateSpaceModelConfiguration,super,MultiResolutionStructuralEnsemble,StateInterpolatingAnomalyDetector]],TimeSeriesRegressor->[__init__->[make_model_fn,PassthroughStateManager,super,AdamOptimizer,InputStatisticsFromMiniBatch],build_raw_serving_input_receiver_fn->[_serving_input_receiver_fn->[placeholder,placeholder_with_default,TensorShape,state_to_dictionary,initialize_graph,get_start_state,get_shape,Graph,items,ServingInputReceiver,zeros,convert_to_tensor]]]] | Constructor for a time series model. | The model_utils import should now be unused here, right? There is a model_utils.state_to_dictionary call, but that got moved and looks like it needs updating. You could even move the serving input receiver stuff to the head lib if you wanted. |
@@ -973,8 +973,8 @@ describe('JHipster generator', () => {
`${TEST_DIR}features/user/user.feature`
]);
assert.noFile([
- `${TEST_DIR}gatling/gatling.conf`,
- `${TEST_DIR}gatling/logback.xml`
+ `${TEST_DIR}gatling/conf/gatling.conf`,
+ `${TEST_DIR}gatling/conf/logback.xml`
]);
});
});
| [No CFG could be retrieved] | Creates the expected files with Cucumber enabled. Creates expected files for default configuration with skip client option enabled. | I dont see the renamed files in this PR |
@@ -120,7 +120,6 @@ func newPlugin(ctx *Context, bin string, prefix string, args []string) (*plugin,
break
}
- msg = strings.TrimRightFunc(msg, unicode.IsSpace)
if strings.TrimSpace(msg) != "" {
if stderr {
ctx.Diag.Infoerrf(diag.StreamMessage("" /*urn*/, msg, errStreamID))
| [Close->[Append,IgnoreError,Kill,Close,KillChildren],Error->[Sprintf,String],Close,WithInsecure,RegisterProcessGroup,StdinPipe,StderrPipe,Code,Atoi,Itoa,Dial,IgnoreError,Start,WaitForStateChange,Errorf,Assert,AddInt32,TrimSpace,Wrapf,Invoke,Infof,ReadString,Kill,V,StdoutPipe,Read,GetState,Command,WithUnaryInterceptor,NewReader,Infoerrf,OpenTracingClientInterceptor,WithTimeout,Background,FromError,TrimRightFunc,StreamMessage,Sleep] | Launches the plugin and waits for it to finish. byte at a time so that it can be read from the standard out. | Note: this line is still a bit suspect. Effectively, if we have a blank line in the output we don't bother sending it along. Doesn't seem sensible. But i don't wan't to touch it because it might degrade something we care about. |
@@ -405,6 +405,17 @@ void Server::init()
m_max_chatmessage_length = g_settings->getU16("chat_message_max_size");
m_csm_restriction_flags = g_settings->getU64("csm_restriction_flags");
m_csm_restriction_noderange = g_settings->getU32("csm_restriction_noderange");
+
+ // Register metrics
+ m_tick_count_metric = g_monitoring->createCounter(
+ "minetest_engine_tick_count",
+ "The server tick count"
+ );
+
+ m_async_run_count_metric = g_monitoring->createCounter(
+ "minetest_engine_async_run_count",
+ "The async step run count"
+ );
}
void Server::start()
| [No CFG could be retrieved] | Initialize the server and the connection to the server Server - side action stream for running and waiting threads. | useless metric but interesting example |
@@ -101,7 +101,7 @@ def check_ownership(users):
users = set(user.lower() for user in users)
non_expected_users = users.difference(expected_package_owners)
if non_expected_users:
- raise ValueError('{} are not expected releasers. You may want to get added, as per https://www.pantsbuild.org/release.html#owners and then add yourself to expected_package_owners in file build-support/bin/release.py'.format(", ".join(non_expected_users)))
+ raise ValueError('{} are not expected releasers. You may want to get added, as per https://www.pantsbuild.org/release.html#owners and then add yourself to expected_package_owners in file src/python/pants/releases/packages.py'.format(", ".join(non_expected_users)))
unowned = dict()
| [all_packages->[contrib_packages],check_ownership->[banner,check_ownership,all_packages],Package->[owners->[latest_version]],contrib_packages->[Package],all_packages,check_ownership,get_pypi_config,exists,owners,Package] | Check that all packages in the given list of users are owned by the given packages. | Hm. Given where it runs, this check seems more annoying than helpful. |
@@ -74,7 +74,11 @@ public interface RetryPolicy {
Consumer<Throwable> onExhausted,
Function<Throwable, Throwable> errorFunction,
Scheduler retryScheduler) {
- return publisher;
+ return from(publisher).onErrorMap(e -> {
+ e = unwrap(e);
+ onExhausted.accept(e);
+ return errorFunction.apply(e);
+ });
}
}
| [applyPolicy->[applyPolicy]] | default implementation of applyPolicy which returns a publisher if the given lease is found. | isn't this same (or very similar code) repeated in `SimpleRetryPolicy`? |
@@ -456,11 +456,11 @@ def compute_raw_covariance(raw, tmin=0, tmax=None, tstep=0.2, reject=None,
n_samples = 0
mu = 0
# Read data in chunks
- for raw_segment in epochs:
- raw_segment = raw_segment[pick_mask]
- mu += raw_segment.sum(axis=1)
- data += np.dot(raw_segment, raw_segment.T)
- n_samples += raw_segment.shape[1]
+ for make_fixed_length_epochs in epochs:
+ make_fixed_length_epochs = make_fixed_length_epochs[pick_mask]
+ mu += make_fixed_length_epochs.sum(axis=1)
+ data += np.dot(make_fixed_length_epochs, make_fixed_length_epochs.T)
+ n_samples += make_fixed_length_epochs.shape[1]
_check_n_samples(n_samples, len(picks))
data -= mu[:, None] * (mu[None, :] / n_samples)
data /= (n_samples - 1.0)
| [make_ad_hoc_cov->[Covariance],compute_raw_covariance->[Covariance,_check_n_samples],_RegCovariance->[score->[score],fit->[fit,Covariance],get_precision->[get_precision]],_smart_eigh->[_get_ch_whitener,_eigvec_subspace,Covariance],write_cov->[save],Covariance->[__iadd__->[_check_covs_algebra],__add__->[copy,_check_covs_algebra]],regularize->[copy,_smart_eigh],_ShrunkCovariance->[score->[get_precision],fit->[fit],get_precision->[get_precision]],compute_covariance->[_unpack_epochs,_check_method_params,Covariance,_check_n_samples,_get_tslice],read_cov->[Covariance],_compute_covariance_auto->[copy,_get_iid_kwargs],whiten_evoked->[compute_whitener,copy,as_diag],compute_whitener->[prepare_noise_cov],_auto_low_rank_model->[_cross_val],_regularized_covariance->[_check_method_params,_compute_covariance_auto],prepare_noise_cov->[Covariance]] | Estimate the covariance matrix from a continuous segment of raw data. Determines the cross - validation of a single node. Compute the covariance of a single chunk of data from a fixed - length event epoch and a Compute the covariance of a single - long . | I would not change these |
@@ -948,13 +948,11 @@ class Trainer:
patience = params.pop_int("patience", None)
validation_metric = params.pop("validation_metric", "-loss")
num_epochs = params.pop_int("num_epochs", 20)
- cuda_device = params.pop_int("cuda_device", -1)
+ cuda_device = params.pop( "cuda_device")
grad_norm = params.pop_float("grad_norm", None)
grad_clipping = params.pop_float("grad_clipping", None)
lr_scheduler_params = params.pop("learning_rate_scheduler", None)
- if cuda_device >= 0:
- model = model.cuda(cuda_device)
parameters = [[n, p] for n, p in model.named_parameters() if p.requires_grad]
optimizer = Optimizer.from_params(parameters, params.pop("optimizer"))
| [Trainer->[_parameter_and_gradient_statistics_to_tensorboard->[add_train_scalar,is_sparse],train->[_enable_activation_logging,_validation_loss,_should_stop_early,_metrics_to_tensorboard,_enable_gradient_clipping,_metrics_to_console,_train_epoch,_get_metrics],_enable_activation_logging->[hook->[add_train_histogram]],_rescale_gradients->[sparse_clip_norm],_validation_loss->[_get_metrics,_batch_loss],_restore_checkpoint->[find_latest_checkpoint,move_optimizer_to_cuda],_batch_loss->[_data_parallel],__init__->[TensorboardWriter],_metrics_to_tensorboard->[add_validation_scalar,add_train_scalar],_train_epoch->[add_train_scalar,time_to_str,_rescale_gradients,_batch_loss,_get_metrics],from_params->[Trainer,from_params],_histograms_to_tensorboard->[add_train_histogram]],sparse_clip_norm->[is_sparse],TensorboardWriter->[add_validation_scalar->[_item],add_train_scalar->[_item]]] | Construct a Trainer from a list of params. Missing parameters. | This parameter still needs to have a default - this is causing a lot of the CI to break. |
@@ -182,7 +182,7 @@ if ($object->id)
print dol_get_fiche_end();
$modulepart = 'don';
- $permission = $user->rights->don->lire;
+ $permission = $user->rights->don->creer;
$permtoedit = $user->rights->don->creer;
$param = '&id='.$object->id;
include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
| [fetch,select_projects,form_project,loadLangs,trans,fetch_thirdparty,setProject,close,load] | Dol function for showing neccesary number of files and permissions. | permission may be to read and permtoedit to edit. So should be lire, shouldn't it ? |
@@ -14,9 +14,13 @@
* limitations under the License.
*/
+import {AmpStoryPlayer} from './amp-story-player-impl';
import {AmpStoryPlayerManager} from './amp-story-player-manager';
self.onload = () => {
const manager = new AmpStoryPlayerManager(self);
manager.loadPlayers();
};
+
+// eslint-disable-next-line no-undef
+globalThis.ampStoryPlayer = AmpStoryPlayer;
| [No CFG could be retrieved] | Load AmpStoryPlayers from an AmpStoryPlayerManager. | Nit: uppercase A as it's usually good practice to start constructors with a capital letter |
@@ -15,7 +15,7 @@ namespace Microsoft.Internal
internal static class GenerationServices
{
// Type.GetTypeFromHandle
- private static readonly MethodInfo _typeGetTypeFromHandleMethod = typeof(Type).GetMethod("GetTypeFromHandle");
+ private static readonly MethodInfo _typeGetTypeFromHandleMethod = typeof(Type).GetMethod("GetTypeFromHandle")!;
// typeofs are pretty expensive, so we cache them statically
private static readonly Type TypeType = typeof(System.Type);
| [GenerationServices->[LoadEnumerable->[LoadValue],LoadString->[LoadNull],AddItemToLocalDictionary->[LoadValue],AddLocalToLocalDictionary->[LoadValue]]] | Creates a generic type that can be used to create an object of the specified type. | Not necessarily for this PR, but at some point it'd be nice to fix the naming here, e.g. s_typeGetTypeFromHandleMethod |
@@ -327,8 +327,11 @@ class SubtypeVisitor(TypeVisitor[bool]):
else:
return False
- def visit_literal_type(self, t: LiteralType) -> bool:
- raise NotImplementedError()
+ def visit_literal_type(self, left: LiteralType) -> bool:
+ if isinstance(self.right, LiteralType):
+ return left == self.right
+ else:
+ return self._is_subtype(left.fallback, self.right)
def visit_overloaded(self, left: Overloaded) -> bool:
right = self.right
| [are_args_compatible->[is_different],is_protocol_implementation->[build_subtype_kind,pop_on_exit,is_subtype],ProperSubtypeVisitor->[visit_union_type->[_is_proper_subtype],visit_callable_type->[is_callable_compatible,_is_proper_subtype],visit_typeddict_type->[_is_proper_subtype],visit_instance->[check_argument->[_is_proper_subtype],find_member,is_protocol_implementation,_is_proper_subtype,check_argument],visit_tuple_type->[_is_proper_subtype],visit_type_type->[_is_proper_subtype],__init__->[build_subtype_kind],_is_proper_subtype->[is_proper_subtype],visit_type_var->[_is_proper_subtype]],is_subtype->[is_subtype],is_more_precise->[is_proper_subtype],is_subtype_ignoring_tvars->[is_subtype],SubtypeVisitor->[visit_union_type->[_is_subtype],visit_callable_type->[_is_subtype],visit_typeddict_type->[_is_subtype,is_equivalent],visit_instance->[check_argument->[],_is_subtype,check_type_parameter],visit_tuple_type->[_is_subtype],visit_type_type->[_is_subtype],visit_overloaded->[_is_subtype],visit_type_var->[_is_subtype],_is_subtype->[is_subtype]],is_equivalent->[is_subtype],is_proper_subtype->[is_proper_subtype],is_callable_compatible->[_incompatible],non_method_protocol_members->[find_member]] | Visit typeddict types. Check if the left and right items are compatible with the caveat. | Shouldn't we also add logic where a literal type appears on the right? At least * `is_subtype(AnyType(), LiteralType(...))` * `is_subtype(UninhabitedType(), LiteralType(...))` * `is_subtype(LiteralType(42), LiteralType(42))` should be all true (maybe also `NoneTyp()` with `strict_optional = False`?) |
@@ -493,6 +493,17 @@ public interface Configuration {
*/
Configuration setManagementAddress(SimpleString address);
+ /**
+ * Sets whether {@link #getManagementAddress()} ignores Global Max Size limit.
+ */
+ Configuration setManagementAddressIgnoreGlobalMaxSize(boolean value);
+
+ /**
+ * Returns {@code true} if {@link #getManagementAddress()} ignores Global Max Size limit.
+ */
+ boolean isManagementAddressIgnoreGlobalMaxSize();
+
+
/**
* Returns the management notification address of this server. <br>
* Clients can bind queues to this address to receive management notifications emitted by this
| [isJDBC->[getStoreConfiguration,getStoreType]] | Sets the address of the management service. | Why not simply configure the management address as -1, which would be unlimited? |
@@ -45,14 +45,12 @@ public class WrapperComparator implements Comparator<Object> {
Class clazz1 = (Class) o1;
Class clazz2 = (Class) o2;
-
- Class<?> inf = findSpi(clazz1);
-
+
OrderInfo a1 = parseOrder(clazz1);
OrderInfo a2 = parseOrder(clazz2);
- int n1 = a1 == null ? 0 : a1.order;
- int n2 = a2 == null ? 0 : a2.order;
+ int n1 = a1.order;
+ int n2 = a2.order;
// never return 0 even if n1 equals n2, otherwise, o1 and o2 will override each other in collection like HashSet
return n1 > n2 ? 1 : -1;
}
| [WrapperComparator->[findSpi->[findSpi],WrapperComparator]] | Compares two objects. | method findSpi is unused, may remove it ? |
@@ -1,9 +1,10 @@
class Api::UserProgramsController < ApplicationController
before_action :authenticate_user!
-
def index(page: nil)
@programs = current_user.programs.unchecked
+ .work_published
+ .episode_published
.where('started_at < ?', Date.tomorrow + 1.day + 5.hours)
.includes(:channel, :work, episode: [:work])
.order(started_at: :desc)
| [index->[page],before_action] | index all the nagios. | Place the . on the previous line, together with the method call receiver.<br>Align the operands of an expression in an assignment spanning multiple lines. |
@@ -14,3 +14,12 @@ def traced_resolver(func):
return func(*args, **kwargs)
return wrapper
+
+
+@contextmanager
+def traced_atomic_transaction():
+ with transaction.atomic():
+ with opentracing.global_tracer().start_active_span("transaction") as scope:
+ span = scope.span
+ span.set_tag(opentracing.tags.COMPONENT, "db")
+ yield
| [traced_resolver->[wrapper->[next,global_tracer,set_tag,isinstance,func]]] | A decorator to trace a function call when a node resolves a node. | I'm not sure that's the correct component. |
@@ -33,7 +33,7 @@ window.addEventListener ('load', function () {
$faqlinks = $('a.reference.internal[href^="FAQ.html#"]')
}
$faqlinks.each (function () {
- this.innerText = this.innerText.split ('?')[0] + '?';
+ this.parentNode.parentNode.remove ()
});
// set the height values for the sticky css property
const $linkGroups = $links.parents ('ul');
| [No CFG could be retrieved] | This function is used to link the sidebar and the sections. private function to find the next link in the list. | What is this line for? |
@@ -156,8 +156,10 @@ class Theme < ActiveRecord::Base
all_ids = [parent, *components]
- disabled_ids = Theme.where(id: all_ids).includes(:remote_theme)
- .reject(&:enabled?).pluck(:id)
+ disabled_ids = Theme.where(id: all_ids)
+ .includes(:remote_theme)
+ .select { |t| !t.supported? || t.disabled? }
+ .pluck(:id)
all_ids - disabled_ids
end
| [Theme->[set_default!->[expire_site_cache!],list_baked_fields->[targets,list_baked_fields,transform_ids],component_validations->[default?],user_theme_ids->[get_set_cache],lookup_field->[transform_ids],remove_from_cache!->[remove_from_cache!],components_for->[get_set_cache],all_theme_variables->[transform_ids],theme_ids->[get_set_cache],add_child_theme!->[clear_cache!],transform_ids->[get_set_cache,components_for],switch_to_component!->[default?,clear_default!],notify_theme_change->[transform_ids,notify_theme_change],set_field->[targets],included_settings->[cached_settings],clear_default!->[expire_site_cache!]]] | transform_ids takes a list of ids and returns an array of all missing missing ids if. | This select is a bit confusing to me ... can't it use a `.where` here? |
@@ -44,15 +44,9 @@ def cmd_build(app, conanfile_path, source_folder, build_folder, package_folder,
conan_file.source_folder = source_folder
conan_file.package_folder = package_folder
conan_file.install_folder = install_folder
- app.hook_manager.execute("pre_build", conanfile=conan_file,
- conanfile_path=conanfile_path)
- with get_env_context_manager(conan_file):
- conan_file.output.highlight("Running build()")
- with conanfile_exception_formatter(str(conan_file), "build"):
- conan_file.build()
- app.hook_manager.execute("post_build", conanfile=conan_file,
- conanfile_path=conanfile_path)
- if test:
+ build_conanfile(conan_file, app.hook_manager, conanfile_path=conanfile_path)
+ if test:
+ with get_env_context_manager(conan_file):
conan_file.output.highlight("Running test()")
with conanfile_exception_formatter(str(conan_file), "test"):
conan_file.test()
| [cmd_build->[debug,get_env_context_manager,ConanException,build,conanfile_exception_formatter,add_ref,str,load_consumer_conanfile,chdir,test,format_exc,mkdir,join,highlight,execute]] | Build a single node. Build a single node in the conan file. | Not pure refactor: now this message will be `Calling build()` |
@@ -21,10 +21,10 @@ logger = logging.getLogger(__name__)
@Model.register("coref")
class CoreferenceResolver(Model):
"""
- This `Model` implements the coreference resolution model described "End-to-end Neural
- Coreference Resolution"
- <https://www.semanticscholar.org/paper/End-to-end-Neural-Coreference-Resolution-Lee-He/3f2114893dc44eacac951f148fbff142ca200e83>
- by Lee et al., 2017.
+ This `Model` implements the coreference resolution model described in
+ "Higher-order Coreference Resolution with Coarse-to-fine Inference"
+ <https://arxiv.org/pdf/1804.05392.pdf>
+ by Lee et al., 2018.
The basic outline of this model is to get an embedded representation of each span in the
document. These span representations are scored and used to prune away spans that are unlikely
to occur in a coreference cluster. For the remaining spans, the model decides which antecedent
| [CoreferenceResolver->[forward->[,_compute_span_pair_embeddings,size,max,masked_topk,_endpoint_span_extractor,_lexical_dropout,_text_field_embedder,_attentive_span_extractor,_context_layer,int,logsumexp,min,get_device_of,_mention_recall,cat,flatten_and_batch_shift_indices,masked_log_softmax,log,get_text_field_mask,long,batched_index_select,_compute_coreference_scores,flattened_index_select,_conll_coref_scores,floor,_compute_antecedent_gold_labels,_generate_valid_antecedents,_mention_scorer,relu,unsqueeze],_compute_span_pair_embeddings->[size,_distance_embedding,cat,bucket_values,expand,unsqueeze],make_output_human_readable->[output_dict,item,append,len,span,zip,enumerate,clusters],_compute_coreference_scores->[cat,new_zeros,_antecedent_scorer,size],_compute_antecedent_gold_labels->[,expand_as,cat],_generate_valid_antecedents->[,get_range_vector,relu],get_metrics->[get_metric],__init__->[SelfAttentiveSpanExtractor,EndpointSpanExtractor,TimeDistributed,get_output_dim,InitializerApplicator,Linear,super,Dropout,ConllCorefScores,initializer,MentionRecall,Embedding]],register,getLogger] | The model that is used to compute the coreference of a single word. Feedforward network is applied to pairs of span representation along with any pairwise features. | Can you use a markdown link? |
@@ -417,7 +417,6 @@ def main():
if not args.store_only:
metrics_results, metrics_meta = evaluator.extract_metrics_results(
print_results=True, ignore_results_formatting=args.ignore_result_formatting,
- ignore_metric_reference=args.ignore_metric_reference
)
if args.csv_result:
write_csv_result(
| [build_arguments_parser->[add_tool_settings_args,add_common_args,add_openvino_specific_args,add_profiling_related_args,add_config_filtration_args,add_dataset_related_args],main->[build_arguments_parser],main] | Main function for the evaluator. Get the base - key of the next non - empty object. | please revert changes in this file, these lines introduced in current develop |
@@ -242,7 +242,7 @@ public class FederatedAddress extends FederatedAbstract implements ActiveMQServe
if (entry.getKey().getDivert().getForwardAddress().equals(queue.getAddress())) {
final AddressInfo addressInfo = server.getPostOffice().getAddressInfo(binding.getAddress());
//check if the queue has been tracked by this divert and if so remove the consumer
- if (entry.getValue().remove(queue)) {
+ if (entry.getValue().remove(queue.getAddress())) {
removeRemoteConsumer(getKey(addressInfo));
}
}
| [FederatedAddress->[Matcher->[test->[test]],afterAddBinding->[conditionalCreateRemoteConsumer],start->[start],createRemoteConsumer->[createRemoteConsumer],match->[match]]] | Remove a binding and remove any consumers that have been removed. This method is called when a binding could not be resolved. | The best would be to have a JIRA, and a test exposing it. if you can't do it, just open the JIRA, and reference this as the patch, with some instructions on how to hit the issue. |
@@ -236,7 +236,13 @@ class Jetpack_Options {
}
private static function get_grouped_option( $group, $name, $default ) {
- $options = get_option( self::$grouped_options[ $group ] );
+ if ( self::is_network_option( $name ) ) {
+ $options = get_site_option( self::$grouped_options[ $group ] );
+ }
+ else {
+ $options = get_option( self::$grouped_options[ $group ] );
+ }
+
if ( is_array( $options ) && isset( $options[ $name ] ) ) {
return $options[ $name ];
}
| [No CFG could be retrieved] | Get a grouped option. | Should be on previous line -- `} else {` |
@@ -343,7 +343,7 @@ public class DirectDruidClient<T> implements QueryRunner<T>
}
}
catch (IOException | InterruptedException | ExecutionException e) {
- throw new RE(e, "Failure getting results from[%s]", url);
+ throw new RE(e, "Failure getting results from[%s]. Likely a timeout occurred.", url);
}
catch (CancellationException e) {
throw new QueryInterruptedException("Query cancelled");
| [DirectDruidClient->[run->[handleChunk->[handleChunk],handleResponse->[handleResponse],done->[done]],JsonParserIterator->[close->[close]]]] | Initialize the object. | Can we add the underlying cause to the exception message? That would make it easier to see what's going on, instead of having to dig through the stack-trace |
@@ -93,6 +93,9 @@ export const TFCD = 'tagForChildDirectedTreatment';
/** @private {?Promise} */
let sraRequests = null;
+/** @private {?Promise} */
+let pageLevelParameters_ = null;
+
/**
* Array of functions used to combine block level request parameters for SRA
* request.
| [AmpAdNetworkDoubleclickImpl->[extractSize->[height,width],getBlockParameters_->[serializeTargeting_,dev,isInManualExperiment,Number,assign,join,googleBlockParameters,getMultiSizeDimensions,map],delayAdRequestEnabled->[experimentFeatureEnabled,DELAYED_REQUEST],constructor->[resolver,experimentFeatureEnabled,extensionsFor,rejector,getMode,promise,SRA],generateAdKey_->[getAttribute,domFingerprintPlain,stringHash32],populateAdUrlState->[isNaN,isExperimentOn,tryParseJson,Number],getAdUrl->[getPageLevelParameters_,googleAdUrl,dev,assign,now],unlayoutCallback->[promise,rejector,removeElement,resolver],groupSlotsForSra->[groupAmpAdsByType],initLifecycleReporter->[googleLifecycleReporterFactory],initiateSraRequests->[all,dev,shift,lineDelimitedStreamer,attemptCollapse,SAFEFRAME,map,metaJsonCreativeGrouper,hasAdPromise,resetAdUrl,user,element,length,isCancellation,sraResponseRejector,keys,xhrFor,checkStillCurrent,assignAdUrlToError,sraResponseResolver,constructSRARequest_,forEach,utf8Encode],isValidElement->[querySelector,isGoogleAdsA4AValidEnvironment],onCreativeRender->[dev,addCsiSignalsToAmpAnalyticsConfig,insertAnalyticsElement,isReportingEnabled,setStyles],extractCreativeAndSignature->[extractGoogleAdCreativeAndSignature,get,setGoogleLifecycleVarsFromHeaders,extractAmpAnalyticsConfig]],dev,isInManualExperiment,join,encodeURIComponent,map,isArray,googlePageParameters,registerElement,devicePixelRatio,getAttribute,truncAndTimeUrl,size_,adKey_,constructSRABlockParameters,now,assign,element,length,serializeItem_,push,getPageLevelParameters_,split,serializeTargeting_,keys,getFirstInstanceValue_,jsonTargeting_,extractFn,forEach,combiner] | Provides a function to combine block level request parameters for a single - component SRA. This function is called from the page level to check if there is a block - level component. | Type here can be more precise (e.g. ?Promise<!Object<string,string>>) |
@@ -66,7 +66,7 @@ namespace Content.Server.Nutrition.Components
}
}
- SoundSystem.Play(Filter.Pvs(Owner), _sound, Owner.Transform.Coordinates,
+ SoundSystem.Play(Filter.Pvs(Owner), _sound.GetSound(), Owner.Transform.Coordinates,
AudioParams.Default.WithVolume(-2));
Count--;
| [SliceableFoodComponent->[Initialize->[Initialize]]] | InteractUsing - if you want to remove a reagent from the list of reagents. | This can be shortened to `Owner` instead of `Owner.Transform.Coordinates` right? |
@@ -1,5 +1 @@
-var globalShortcut
-
-globalShortcut = process.atomBinding('global_shortcut').globalShortcut
-
-module.exports = globalShortcut
+module.exports = process.atomBinding('global_shortcut').globalShortcut
| [No CFG could be retrieved] | export global_shortcut. | I think it should be `module.exports = process.atomBinding('global_shortcut').globalShortcut`? |
@@ -148,15 +148,10 @@ class RestV1Methods(RestCommonMethods):
output.rewrite_line("Uploading %s" % filename)
auth, dedup = self._file_server_capabilities(resource_url)
try:
- response = uploader.upload(resource_url, files[filename], auth=auth, dedup=dedup,
- retry=retry, retry_wait=retry_wait,
- headers=self._put_headers)
+ uploader.upload(resource_url, files[filename], auth=auth, dedup=dedup,
+ retry=retry, retry_wait=retry_wait,
+ headers=self._put_headers)
output.writeln("")
- if not response.ok:
- output.error("\nError uploading file: %s, '%s'" % (filename, response.content))
- failed.append(filename)
- else:
- pass
except Exception as exc:
output.error("\nError uploading file: %s, '%s'" % (filename, exc))
failed.append(filename)
| [RestV1Methods->[get_recipe_sources->[_download_files_to_folder],get_package->[_download_files_to_folder],get_package_info->[_download_files],remove_packages->[remove_packages],_get_package_urls->[_get_file_to_url_dict],_get_path->[_get_file_to_url_dict,_file_server_capabilities,is_dir],_upload_recipe->[_get_file_to_url_dict],get_package_manifest->[_download_files],_get_recipe_urls->[_get_file_to_url_dict],_get_file_to_url_dict->[complete_url],_upload_package->[_get_file_to_url_dict],get_recipe_manifest->[_download_files],_upload_files->[_file_server_capabilities],_download_files_to_folder->[_file_server_capabilities],get_recipe->[_download_files_to_folder]]] | Upload files to the server. | This code shouldn't be reached anymore. |
@@ -61,7 +61,7 @@ function photo_albums($uid, $update = false) {
$albums = qu("SELECT DISTINCT(`album`), '' AS `total`
FROM `photo`
WHERE `uid` = %d AND `album` != '%s' AND `album` != '%s' $sql_extra
- GROUP BY `album` ORDER BY `created` DESC",
+ GROUP BY `album`, `created` ORDER BY `created` DESC",
intval($uid),
dbesc('Contact Photos'),
dbesc(t('Contact Photos'))
| [No CFG could be retrieved] | Get the list of albums for a given user. | Same problem, I suggest using `MAX(created) AS created` in the SELECT instead. |
@@ -224,7 +224,7 @@ class MultiScaleRoIAlign(nn.Module):
if torchvision._is_tracing():
tracing_results.append(result_idx_in_level.to(dtype))
else:
- result[idx_in_level] = result_idx_in_level
+ result[idx_in_level] = result_idx_in_level.to(result.dtype)
if torchvision._is_tracing():
result = _onnx_merge_levels(levels, tracing_results)
| [MultiScaleRoIAlign->[forward->[setup_scales,convert_to_roi_format,_onnx_merge_levels],setup_scales->[initLevelMapper,infer_scale]]] | Computes the missing - missing tensor for a given set of feature maps. Compute ROI alignment for missing node. | instead of casting the result back to fp16 in the user code, I wonder if we shouldn't cast back to `fp16` in the `ROIAlign_autocast` function, after performing the function call? |
@@ -15,10 +15,16 @@ class MfaPolicy
mfa_user.enabled_mfa_methods_count > 1
end
- def three_or_more_factors_enabled?
+ def more_than_two_factors_enabled?
mfa_user.enabled_mfa_methods_count > 2
end
+ def sufficient_factors_enabled?
+ mfa_user.enabled_mfa_methods_count > 1 ||
+ (FeatureManagement.backup_codes_2fa? &&
+ mfa_user.backup_code_configurations.to_a.length.positive?)
+ end
+
def unphishable?
mfa_user.phishable_configuration_count.zero? &&
mfa_user.unphishable_configuration_count.positive?
| [MfaPolicy->[no_factors_enabled?->[zero?],three_or_more_factors_enabled?->[enabled_mfa_methods_count],unphishable?->[zero?,positive?],two_factor_enabled?->[any?],initialize->[new],multiple_factors_enabled?->[enabled_mfa_methods_count],attr_reader]] | check if there is a NI - specific MFA method in the system. | One suggestion I'd have is to make the name of the flag a bit more descriptive. Something like `allow_backup_codes_only_enabled?` or something like that. That way we won't have to refer to the code when decided how to toggle it. |
@@ -88,6 +88,7 @@ def rules():
def target_types():
return [
PexBinary,
+ PexBinariesGeneratorTarget,
PythonDistribution,
PythonRequirementsFile,
PythonRequirementTarget,
| [rules->[rules],build_file_aliases->[BuildFileAliases]] | Return a list of all target types that are not in the system. | Nit: not alphabetical sort order.. not blocking, just noting. So if there's other changes, could fix.. otherwise, save a tree ;) |
@@ -259,6 +259,8 @@ public class SearchQueryParser {
return new FieldValue(Integer.parseInt(pair.getLeft()), pair.getRight(), negate);
case LONG:
return new FieldValue(Long.parseLong(pair.getLeft()), pair.getRight(), negate);
+ case ID:
+ return new FieldValue(new ObjectId(pair.getLeft()), pair.getRight(), negate);
default:
throw new IllegalArgumentException("Unhandled field type: " + fieldType.toString());
}
| [SearchQueryParser->[FieldValue->[hashCode->[isNegate,getValue],toString->[toString],equals->[isNegate,getValue,getOperator,equals]],parse->[querySplitterMatcher],createFieldValue->[parseDate,extractOperator]]] | Creates a FieldValue object based on the given field and quoted string value. | Can you please rename this to `OBJECT_ID` to make it a bit more explicit? :slightly_smiling_face: Thank you! |
@@ -120,7 +120,7 @@ class DistMetricsCalculator(MetricsCalculator):
metric = torch.ones(*reorder_tensor.size()[:len(keeped_dim)], device=reorder_tensor.device)
across_dim = list(range(len(keeped_dim), len(reorder_dim)))
- idxs = metric.nonzero()
+ idxs = metric.nonzero(as_tuple=False)
for idx in idxs:
other = reorder_tensor
for i in idx:
| [MultiDataNormMetricsCalculator->[calculate_metrics->[super,items,sum]],DistMetricsCalculator->[calculate_metrics->[list,size,nonzero,clone,extend,len,norm,permute,ones,items,range,abs],__init__->[super]],NormMetricsCalculator->[calculate_metrics->[list,size,pop,len,norm,reversed,items,range,abs],__init__->[super]],APoZRankMetricsCalculator->[calculate_metrics->[ones_like,list,size,pop,cat,len,sum,eq,reversed,items,enumerate,range,zeros_like]],MeanRankMetricsCalculator->[calculate_metrics->[list,size,mean,pop,cat,len,reversed,items,range]]] | Calculate the n - node metrics for a given data. | the default value of `as_tuple` is False, so why add it? |
@@ -118,8 +118,8 @@ public class JLabelBuilder {
return this;
}
- public JLabelBuilder tooltip(final String tooltip) {
- this.tooltip = tooltip;
+ public JLabelBuilder toolTip(final String tooltip) {
+ this.toolTip = tooltip;
return this;
}
| [JLabelBuilder->[builder->[JLabelBuilder],html->[text]]] | Sets the border of the label. | Not consistent with the parameter name |
@@ -995,8 +995,8 @@ class Archiver:
"""Delete archives"""
manifest, key = Manifest.load(repository, (Manifest.Operation.DELETE,))
- if args.location.archive:
- archive_names = (args.location.archive,)
+ if args.location.archive or args.archives:
+ archive_names = tuple([args.location.archive] + args.archives )
else:
archive_names = tuple(x.name for x in manifest.archives.list_considering(args))
if not archive_names:
| [main->[get_args,run,Archiver],with_repository->[decorator->[wrapper->[argument]]],Archiver->[_export_tar->[item_to_tarinfo->[print_warning,item_content_stream],build_filter,print_warning,build_matcher,item_to_tarinfo],do_prune->[print_error,write],do_mount->[print_error],do_check->[print_error],do_extract->[build_filter,print_warning,build_matcher],_list_archive->[_list_inner->[write],_list_inner,build_matcher],do_debug_get_obj->[write],run->[_setup_topic_debugging,prerun_checks,_setup_implied_logging],do_debug_dump_archive->[output->[write,do_indent],output],do_recreate->[print_error,write,build_matcher],_list_repository->[write],do_key_export->[print_error],do_upgrade->[write],do_benchmark_crud->[measurement_run,test_files],_info_archives->[format_cmdline],_process->[print_file_status,_process,print_warning],do_debug_dump_archive_items->[write],build_parser->[define_archive_filters_group->[add_argument],define_exclusion_group->[define_exclude_and_patterns],add_common_group,define_archive_filters_group,CommonOptions,add_argument,process_epilog,define_exclusion_group],do_key_import->[print_error],CommonOptions->[add_common_group->[add_argument->[add_argument]]],do_diff->[build_matcher,print_output,print_warning],do_debug_dump_repo_objs->[write],parse_args->[parse_args,build_parser,resolve,preprocess_args],do_list->[write->[write],print_error],do_change_passphrase_deprecated->[do_change_passphrase],do_create->[create_inner->[print_file_status,print_warning],create_inner],with_repository],main] | Delete all the archives in the specified repository. Get the last unknown exit code. | pep8, space before ). |
@@ -17,7 +17,7 @@
<div class="grid-item"><%= listing.category %></div>
<div class="grid-item"><%= listing.cached_tag_list %></div>
<div class="grid-item"><%= listing.published ? "Yes" : "No" %></div>
- <div class="grid-item"><%= time_ago_in_words(listing.bumped_at) %> ago</div>
+ <div class="grid-item"><%= "#{time_ago_in_words(listing.bumped_at)} ago" if listing.bumped_at %></div>
<div class="grid-item">
<a class="btn btn-success" href="/internal/listings/<%= listing.id %>/edit">Edit</a>
</div>
| [No CFG could be retrieved] | Displays a list of all tag - related items that are tagged with a user. | This was breaking the page locally with no listings that had been bumped |
@@ -93,7 +93,7 @@ public abstract class StructuredDataSource implements DataSource {
TimestampExtractionPolicy policy);
public String getTopicName() {
- return ksqlTopic.getTopicName();
+ return ksqlTopic.getKsqlTopicName();
}
public String getKafkaTopicName() {
| [StructuredDataSource->[getKafkaTopicName->[getKafkaTopicName],getTopicName->[getTopicName],isSerdeFormat->[getKsqlTopicSerde]]] | get topic name. | Can we rename this one too please? |
@@ -184,6 +184,14 @@ public abstract class AbstractTestRestApi {
}
}
}
+
+ protected static void startUpWithAutenticationEnabled() throws Exception {
+ start(true);
+ }
+
+ protected static void startUp() throws Exception {
+ start(false);
+ }
private static String getHostname() {
try {
| [AbstractTestRestApi->[isNotAllowed->[responsesWith],isCreated->[responsesWith],getSparkHomeRecursively->[getSparkHomeRecursively],isNotFound->[responsesWith],isBadRequest->[responsesWith],isAllowed->[responsesWith],isForbiden->[responsesWith]]] | Starts the server. This method is called when the interpreter is started. | There was a typo! :) `startUpWithAutenticationEnabled` -> `startUpWithAuthenticationEnabled` |
@@ -186,6 +186,17 @@ func (c *lruCache) get(key uint64) (interface{}, bool) {
return nil, false
}
+func (c *lruCache) getWithoutMove(key uint64) (interface{}, bool) {
+ c.Lock()
+ defer c.Unlock()
+
+ if ele, ok := c.cache[key]; ok {
+ return ele.Value.(*cacheItem).value, true
+ }
+
+ return nil, false
+}
+
func (c *lruCache) remove(key uint64) {
c.Lock()
defer c.Unlock()
| [doGC->[Before,Stop,Unlock,NewTicker,Now,Lock,Debugf],remove->[Unlock,removeElement,Back,Remove,Lock],removeOldest->[removeElement,Back],fromElems->[Back,RLock,Prev,Len,RUnlock],get->[Before,Unlock,get,Now,RLock,MoveToFront,Lock,RUnlock],removeElement->[Remove],len->[RUnlock,Len,RLock],delete->[Lock,Unlock],set->[setWithTTL,set],add->[Unlock,PushFront,Remove,Back,MoveToFront,Lock,Len,removeOldest],setWithTTL->[Now,Lock,Unlock,Add],elems->[Next,Back,RLock,Front,Prev,Len,RUnlock],count->[RUnlock,RLock],doGC,New] | get returns the value of the item with the given key. | `silentlyGet` or `getWithoutUpdatePos`? |
@@ -403,10 +403,9 @@ public class ParallelIndexSupervisorTask extends AbstractTask implements ChatHan
Interval interval;
String version;
- boolean justLockedInterval = false;
if (bucketIntervals.isPresent()) {
- // If the granularity spec has explicit intervals, we just need to find the interval (of the segment
- // granularity); we already tried to lock it at task startup.
+ // If granularity spec has explicit intervals, we just need to find the version accociated to the interval.
+ // This is because we should have gotten all required locks up front when the task starts up.
final Optional<Interval> maybeInterval = granularitySpec.bucketInterval(timestamp);
if (!maybeInterval.isPresent()) {
throw new IAE("Could not find interval for timestamp [%s]", timestamp);
| [ParallelIndexSupervisorTask->[runParallel->[createRunner,run],isReady->[isReady],stopGracefully->[stopGracefully],getSubTaskState->[getSubTaskState],runSequential->[run],getCompleteSubTaskSpecAttemptHistory->[getCompleteSubTaskSpecAttemptHistory],getSubTaskSpec->[getSubTaskSpec]]] | Allocate a new segment. Get a segment id that can be used to acquire a lock. | accociated -> associated |
@@ -381,7 +381,8 @@ public class GobblinHelixJobLauncher extends AbstractJobLauncher {
}
/**
- * Add a single {@link WorkUnit} (flattened).
+ * Add a single {@link WorkUnit} (flattened) to persisted storage so that worker could fetch that based on information
+ * fetched in Helix task.
*/
private void addWorkUnit(WorkUnit workUnit, ParallelRunner stateSerDeRunner,
Map<String, TaskConfig> taskConfigMap) throws IOException {
| [GobblinHelixJobLauncher->[waitForJobCompletion->[getJobId],createJob->[getJobId],getJobId->[getJobId],launchJob->[launchJob,getJobId],addWorkUnit->[getJobId],cleanupWorkingDirectory->[getJobId],runWorkUnits->[getJobId],close->[close],submitJobToHelix->[getJobId]]] | Adds a work unit to the taskConfigMap. | Nit: "persisted" -> "persistent". "could" -> "can". |
@@ -277,9 +277,9 @@ class MultiTaskDataLoader(DataLoader):
def _make_data_loader(self, key: str) -> MultiProcessDataLoader:
kwargs: Dict[str, Any] = {}
- kwargs["reader"] = self.readers[key]
+ kwargs["reader"] = _MultitaskDatasetReaderShim(self.readers[key], key)
kwargs["data_path"] = self.data_paths[key]
- kwargs["batch_size"] = 1
+ kwargs["batch_size"] = 1 # So that the loader gives us one instance at a time.
if key in self._num_workers:
kwargs["num_workers"] = self._num_workers[key]
if key in self._max_instances_in_memory:
| [MultiTaskDataLoader->[index_with->[index_with],_get_instances_for_epoch->[maybe_shuffle_instances],iter_instances->[iter_instances],__init__->[maybe_shuffle_instances]]] | Creates a MultiProcessDataLoader object for the given key. | Line 259-262 can be removed. Those params to the data loader don't exist anymore. |
@@ -582,7 +582,7 @@ define(function() {
/**
* @method jsep.addLiteral
* @param {string} literal_name The name of the literal to add
- * @param {*} literal_value The value of the literal
+ * @param {Object} literal_value The value of the literal
* @return jsep
*/
jsep.addLiteral = function(literal_name, literal_value) {
| [No CFG could be retrieved] | XML 1. 1 Expression Parser Remove all unary and binary op from the jsep object. | Don't update anything in the `ThirdParty` directory- It's third party code, and we don't want to make changes unless necessary. |
@@ -502,7 +502,7 @@ def test_finder_installs_pre_releases_with_version_spec():
assert link.url == "https://foo/bar-2.0b1.tar.gz"
-class test_link_package_versions(object):
+class TestLinkPackageVersions(object):
# patch this for travis which has distribute in its base env for now
@patch(
| [test_finder_deplink->[find_requirement,PackageFinder,startswith,install_req_from_line,PipSession,add_dependency_links],test_tilde->[find_requirement,PackageFinder,install_req_from_line,patch,raises,PipSession],test_finder_priority_page_over_deplink->[find_requirement,all_versions,PackageFinder,startswith,install_req_from_line,PipSession,find_all_candidates,add_dependency_links],test_finder_only_installs_data_require->[append,PackageFinder,index_url,str,set,PipSession,find_all_candidates],test_finder_installs_pre_releases->[find_requirement,object,PackageFinder,index_url,endswith,install_req_from_line,reverse,PipSession],test_no_partial_name_match->[find_requirement,PackageFinder,endswith,install_req_from_line,PipSession],test_finder_only_installs_stable_releases->[find_requirement,object,PackageFinder,index_url,endswith,install_req_from_line,reverse,PipSession],test_finder_installs_pre_releases_with_version_spec->[find_requirement,object,PackageFinder,install_req_from_line,reverse,PipSession],test_finder_installs_dev_releases->[find_requirement,PackageFinder,index_url,endswith,install_req_from_line,PipSession],test_finder_detects_latest_already_satisfied_pypi_links->[find_requirement,PackageFinder,parse_version,install_req_from_line,raises,PipSession,Mock],test_finder_priority_file_over_page->[all,find_requirement,PackageFinder,startswith,install_req_from_line,PipSession,find_all_candidates],test_finder_priority_nonegg_over_eggfragments->[find_requirement,all_versions,object,PackageFinder,endswith,install_req_from_line,reverse,PipSession,find_all_candidates],test_get_index_urls_locations->[install_req_from_line,PipSession,PackageFinder,_get_index_urls_locations],test_finder_detects_latest_already_satisfied_find_links->[find_requirement,PackageFinder,parse_version,install_req_from_line,raises,PipSession,Mock],test_duplicates_sort_ok->[find_requirement,PackageFinder,endswith,install_req_from_line,PipSession],test_link_package_versions->[setup->[PipSession,parse_version,PackageFinder],test_link_package_versions_match_wheel->[Link,_link_package_versions],test_link_package_versions_substring_fails->[Link,_link_package_versions],Distribution,patch],test_find_all_candidates_find_links->[str,PipSession,find_all_candidates,PackageFinder],test_finder_detects_latest_find_links->[find_requirement,PackageFinder,endswith,install_req_from_line,PipSession],test_find_all_candidates_index->[PackageFinder,index_url,str,PipSession,find_all_candidates],test_find_all_candidates_nothing->[PipSession,find_all_candidates,PackageFinder],test_incorrect_case_file_index->[find_requirement,PackageFinder,endswith,install_req_from_line,PipSession],TestWheel->[test_wheel_over_sdist_priority->[find_requirement,PackageFinder,endswith,install_req_from_line,PipSession],test_existing_over_wheel_priority->[find_requirement,PackageFinder,parse_version,install_req_from_line,raises,PipSession,Mock],test_not_find_wheel_not_supported->[find_requirement,setattr,get_supported,PackageFinder,install_req_from_line,raises,PipSession],test_skip_invalid_wheel_link->[find_requirement,PackageFinder,set_level,install_req_from_line,raises,PipSession],test_link_sorting_wheels_with_build_tags->[Link,PackageFinder,sorted,reversed,InstallationCandidate,PipSession],test_link_sorting->[Link,PackageFinder,sorted,reversed,InstallationCandidate,PipSession],test_find_wheel_supported->[find_requirement,setattr,PackageFinder,endswith,install_req_from_line,PipSession]],test_no_mpkg->[find_requirement,PackageFinder,endswith,install_req_from_line,PipSession],test_find_all_candidates_find_links_and_index->[PackageFinder,index_url,str,PipSession,find_all_candidates]] | PackageFinder setup and test_link_package_versions. Test that pytest archives match for pytest. | Pytest is quite strict on how tests in a class are picked up. |
@@ -81,7 +81,9 @@ class RubricCriterion < Criterion
# does not evaluate to a float, or if the criterion is not
# successfully saved.
def self.create_or_update_from_csv_row(row, assignment)
- if row.length < RUBRIC_LEVELS + 2
+ # get number of required fields
+ required_fields = Level.validators.grep(ActiveRecord::Validations::PresenceValidator).length
+ if row.length < required_fields + 1
raise CsvInvalidLineError, I18n.t('upload_errors.invalid_csv_row_format')
end
| [RubricCriterion->[add_tas->[create,size,to_a,each,assignment],mark_for->[first],load_from_yml->[to_s,max_mark,new,nil?,ta_visible,peer_visible,each,name],update_assigned_groups_count->[get_groupings_by_assignment,concat,assigned_groups_count,each,length],remove_tas->[empty?,to_a,criterion_ta_associations,destroy,each,delete],get_ta_names->[user_name,collect],set_default_levels->[t,create,each_with_index],create_or_update_from_csv_row->[position,create,shift,rubric_criterion_id,new_record?,exists?,updated_at,mark,t,upsert,created_at,max_mark,find_or_create_by,each,length,id,clone,next_criterion_position,raise,find_by,save],round_max_mark->[round,max_mark],has_associated_ta?->[first,ta?],to_yml->[level_0_description,peer_visible,level_3_description,level_4_description,level_4_name,ta_visible,to_f,level_0_name,level_1_name,level_1_description,level_2_description,level_3_name,name,level_2_name],all_assigned_groups->[concat,each,uniq,get_groupings_by_assignment],accepts_nested_attributes_for,belongs_to,before_save,validate,validates_numericality_of,table_name,has_many,validates_presence_of,before_validation,order]] | Creates or updates a specific node in the database from a CSV row. | We can allow the user to upload a rubric criterion with no levels. So really the only thing to check here is that `working_row` has at least *one* element (the name of the criterion). So don't worry about the Level required fields here. |
@@ -3,6 +3,8 @@ require 'net/https'
module PivCacService
class << self
+ RANDOM_HOSTNAME_BYTES = 2
+
include Rails.application.routes.url_helpers
def decode_token(token)
| [token_decoded->[decode_token_response,decode_test_token,post_form,identity_pki_disabled?,start_with?],decode_token->[token_present,token_decoded],decode_token_response->[parse,body,to_i],piv_cac_available_for_agency?->[piv_cac_agencies,parse,piv_cac_enabled?,include?,blank?],piv_cac_service_link->[to_s,query,development_and_piv_cac_entry_enabled?,escape,piv_cac_service_url],decode_test_token->[development_and_piv_cac_entry_enabled?,parse],token_present->[raise,blank?],piv_cac_verify_token_link->[piv_cac_verify_token_url],require,include,url_helpers] | Decode a token if it is present and decoded otherwise nil. | I'm open to argument but I'd vote to make this bigger, maybe 4? Every time somebody gets confused and hits Esc or something, they increase their probability of a collision. The longer the random string, the uglier the URL, but the lower the probability of a user-hostile collision. |
@@ -26,6 +26,7 @@
$cyberoam_data = snmp_get_multi_oid($device, ['applianceModel.0', 'cyberoamVersion.0'], '-OQUs', 'CYBEROAM-MIB');
$hardware = $cyberoam_data['applianceModel.0'];
$version = $cyberoam_data['cyberoamVersion.0'];
+$serial = $cyberoam_data['applianceKey.0'];
unset(
$cyberoam_data
| [No CFG could be retrieved] | Get the cyberoam data. | Hello, Thank you for your first PR ! It seems that you do not load applianceKey.0 value at all in the patch you submitted. May be you created the PR out of copy/pastes, but them you probably missed one :) Could you correct the snmp_get_multi_oid, validate it in your environnement, provide the tests and submit it again ? Thanx |
@@ -303,6 +303,10 @@ func createEvents(svc cloudwatchiface.CloudWatchAPI, listMetricsTotal []cloudwat
if len(labels) == 4 {
identifierValue := labels[identifierValueIdx]
events[identifierValue] = insertMetricSetFields(events[identifierValue], output.Values[timestampIdx], labels)
+ tags := resourceTagMap[identifierValue]
+ for _, tag := range tags {
+ events[identifierValue].ModuleFields.Put("tags."+*tag.Key, *tag.Value)
+ }
} else {
eventNew := aws.InitEvent(metricsetName, regionName)
eventNew = insertMetricSetFields(eventNew, output.Values[timestampIdx], labels)
| [Fetch->[Copy,Error,GetStartTimeEndTime,New,GetListMetricsOutput,Wrap,Info,Logger],DefaultMetricSet,MustAddMetricSet,CheckTimestampInArray,StringInSlice,IsZero,NewMetricSet,Wrap,Put,Itoa,Seconds,GetMetricDataResults,New,Module,Split,UnpackConfig,Beta,FindTimestamp,InitEvent,Event] | Construct metric queries and insert the events into the metricSetEvents. | This more looks like `labels` in ECS then tags. The question is now if we want naming wise be consistent with ECS or AWS. It's under the AWS prefix but I would prefer using the ECS naming even inside if possible. |
@@ -147,7 +147,7 @@ public class HoodieMultiTableDeltaStreamer {
}
private void populateSchemaProviderProps(HoodieDeltaStreamer.Config cfg, TypedProperties typedProperties) {
- if (cfg.schemaProviderClassName.equals(SchemaRegistryProvider.class.getName())) {
+ if (cfg.schemaProviderClassName != null && cfg.schemaProviderClassName.equals(SchemaRegistryProvider.class.getName())) {
String schemaRegistryBaseUrl = typedProperties.getString(Constants.SCHEMA_REGISTRY_BASE_URL_PROP);
String schemaRegistrySuffix = typedProperties.getString(Constants.SCHEMA_REGISTRY_URL_SUFFIX_PROP);
typedProperties.setProperty(Constants.SOURCE_SCHEMA_REGISTRY_URL_PROP, schemaRegistryBaseUrl + typedProperties.getString(Constants.KAFKA_TOPIC_PROP) + schemaRegistrySuffix);
| [HoodieMultiTableDeltaStreamer->[sync->[sync,getTableWithDatabase],populateTableExecutionContextList->[checkIfTableConfigFileExists]]] | Populates the schemaProvider properties. | It would be better to use `Objects.equals()`? |
@@ -2,12 +2,14 @@ import graphene
from graphql_jwt.decorators import permission_required
from ..core.fields import PrefetchingConnectionField
-from ..descriptions import DESCRIPTIONS
+# FIXME: Types are imported before mutations on purpose. Otherwise these types
+# are missing in Graphene's type registry and mutations cannot be created
+# properly. This happens only in the `saleor.graphql.discount` module.
+from .types import Sale, Voucher
from .mutations import (
SaleCreate, SaleDelete, SaleUpdate, VoucherCreate, VoucherDelete,
VoucherUpdate)
from .resolvers import resolve_sales, resolve_vouchers
-from .types import Sale, Voucher
class DiscountQueries(graphene.ObjectType):
| [DiscountQueries->[resolve_sales->[resolve_sales],resolve_vouchers->[resolve_vouchers]]] | The base class for all of the methods that are defined in this module. Fields for Sale and Voucher. | What if we imported these at the beginning of `mutations.py`? |
@@ -46,8 +46,6 @@ func (t *basicSupersedesTransform) transformDelete(msg chat1.MessageUnboxed, sup
}
explodedBy := superMsg.Valid().SenderUsername
mvalid.ClientHeader.EphemeralMetadata.ExplodedBy = &explodedBy
- var emptyBody chat1.MessageBody
- mvalid.MessageBody = emptyBody
newMsg := chat1.NewMessageUnboxedWithValid(mvalid)
return &newMsg
}
| [Run->[transform],transform->[transformAttachment,transformEdit,transformDelete]] | transformDelete transforms a message that is deleted from the server. | this is handled fully in `updateSupersedBy` |
@@ -80,11 +80,9 @@ if ( ! function_exists('directory_map'))
continue;
}
- is_dir($source_dir.$file) && $file .= DIRECTORY_SEPARATOR;
-
if (($directory_depth < 1 OR $new_depth > 0) && is_dir($source_dir.$file))
{
- $filedata[$file] = directory_map($source_dir.$file, $new_depth, $hidden);
+ $filedata[$file] = directory_map($source_dir.$file.DIRECTORY_SEPARATOR, $new_depth, $hidden);
}
else
{
| [No CFG could be retrieved] | This function is a recursive function that returns an array of all files in a directory. | This change is actually useless. |
@@ -497,6 +497,7 @@ var etcdStorageData = map[schema.GroupVersionResource]struct {
gvr("apiregistration.k8s.io", "v1beta1", "apiservices"): {
stub: `{"metadata": {"name": "as1.foo.com"}, "spec": {"group": "foo.com", "version": "as1", "groupPriorityMinimum":100, "versionPriority":10}}`,
expectedEtcdPath: "kubernetes.io/apiservices/as1.foo.com",
+ expectedGVK: gvkP("apiregistration.k8s.io", "v1", "APIService"),
},
// --
| [createPrerequisites->[create],destroy->[verb],cleanup->[destroy],create->[verb]] | returns a description of the last known version of a resource This module provides a way to specify the path to the APIService. | write a high severity bugzilla for the master team to fix apiservice and SCC in 4.0 for migration. |
@@ -0,0 +1,17 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+internal static partial class Interop
+{
+ internal static partial class User32
+ {
+ public enum MA
+ {
+ ACTIVATE = 1,
+ ACTIVATEANDEAT = 2,
+ NOACTIVATE = 3,
+ NOACTIVATEANDEAT = 4
+ }
+ }
+}
| [No CFG could be retrieved] | No Summary Found. | Should these be IntPtr instead since they are LRESULT? |
@@ -1042,7 +1042,7 @@ a = 10;
// expected: sum = 21
// result: sum = 11";
ExecutionMirror mirror = thisTest.RunScriptSource(src);
- Assert.IsTrue((Int64)mirror.GetValue("sum").Payload == 11);
+ Assert.IsTrue((Int64)mirror.GetValue("sum").Payload == 21);
}
| [TestScope->[T050_Test_Identifier_Name_Tailer_26->[RunScriptSource,Throws],T050_Test_Identifier_Name_Tailer_24->[RunScriptSource,Throws],T050_Test_Identifier_Name_04->[RunScriptSource,Throws],T050_Test_Identifier_Name_Tailer_28->[RunScriptSource,Throws],T050_Test_Identifier_Name_10->[RunScriptSource,Throws],T050_Test_Identifier_Name_15->[RunScriptSource,Throws],T050_Test_Identifier_Name_31->[RunScriptSource,Payload,IsTrue],T051_Test_Identifier_Scope_07->[RunScriptSource,CompareArrays,IsTrue],T050_Test_Identifier_Name_08->[RunScriptSource,Throws],T050_Test_Identifier_Name_07->[RunScriptSource,Throws],T050_Test_Identifier_Name_09->[RunScriptSource,Throws],T001_LanguageBlockScope_AssociativeNestedAssociative->[RunScriptSource,Throws],T050_Test_Identifier_Name_32->[RunScriptSource,Payload,IsTrue],T004_LanguageBlockScope_AssociativeNestedImperative->[RunScriptSource,Payload,ToBoolean,IsTrue],T016_LanguageBlockScope_ParallelInsideNestedBlock_ImperativeNested_AA->[RunScriptSource,Payload,IsTrue],T050_Test_Identifier_Name_Tailer_06->[RunScriptSource,Throws],T050_Test_Identifier_Name_22->[RunScriptSource,Payload,IsTrue],T050_Test_Identifier_Name_Tailer_10->[RunScriptSource,Throws],T022_LanguageBlockScope_DeepNested_AIA_Function->[RunScriptSource,Payload,IsTrue],T021_LanguageBlockScope_DeepNested_IAI_Function->[RunScriptSource,Verify],T051_Test_Identifier_Scope_04->[RunScriptSource,Payload,IsTrue],T014_LanguageBlockScope_MultipleParallelLanguageBlocks_IAI->[RunScriptSource,IsNull,IsTrue],T019_LanguageBlockScope_ImperativeNestedAssociative_Function->[RunScriptSource,Verify],T050_Test_Identifier_Name_26->[RunScriptSource,Throws],T050_Test_Identifier_Name_13->[RunScriptSource,Throws],T050_Test_Identifier_Name_06->[RunScriptSource,Throws],T050_Test_Identifier_Name_Tailer_20->[RunScriptSource,Throws],T050_Test_Identifier_Name_Tailer_01->[RunScriptSource,Throws],T007_LanguageBlockScope_AssociativeParallelImperative->[RunScriptSource,IsNull,IsTrue],T050_Test_Identifier_Name_29->[RunScriptSource,Throws],T051_Test_Identifier_Scope_03->[RunScriptSource,Payload,IsTrue],T050_Test_Identifier_Name_Tailer_27->[RunScriptSource,Throws],T050_Test_Identifier_Name_18->[RunScriptSource,Throws],Z001_LanguageBlockScope_Defect_1453539->[RunScriptSource],T029_LanguageBlockScope_ParallelInsideNestedBlock_AssociativeNested_II_Function->[RunScriptSource,Payload,IsTrue],T051_Test_Identifier_Scope_05->[RunScriptSource,Payload,IsTrue],T050_Test_Identifier_Name_01->[RunScriptSource,Throws],T050_Test_Identifier_Name_02->[RunScriptSource,Throws],T027_LanguageBlockScope_MultipleParallelLanguageBlocks_AIA_Function->[RunScriptSource,IsNull,IsTrue],T050_Test_Identifier_Name_Tailer_12->[RunScriptSource,Throws],T050_Test_Identifier_Name_Tailer_14->[RunScriptSource,Throws],T050_Test_Identifier_Name_Tailer_25->[RunScriptSource,Throws],T028_LanguageBlockScope_MultipleParallelLanguageBlocks_IAI_Function->[RunScriptSource,IsNull,IsTrue],T018_LanguageBlockScope_ImperativeNestedImperaive_Function->[RunScriptSource,Throws],T011_LanguageBlockScope_AssociativeParallelAssociative->[RunScriptSource,IsNull,IsTrue],T050_Test_Identifier_Name_28->[RunScriptSource,Throws],T015_LanguageBlockScope_ParallelInsideNestedBlock_AssociativeNested_II->[RunScriptSource,Payload,IsTrue],T050_Test_Identifier_Name_Tailer_08->[RunScriptSource,Throws],T050_Test_Identifier_Name_Tailer_30->[RunScriptSource,Throws],T050_Test_Identifier_Name_20->[RunScriptSource,Throws],T050_Test_Identifier_Name_14->[RunScriptSource,Throws],T050_Test_Identifier_Name_05->[RunScriptSource,Throws],T009_LanguageBlockScope_UpdateVariableInNestedLanguageBlock_IA->[RunScriptSource,Payload,ToBoolean,IsTrue],T050_Test_Identifier_Name_Tailer_23->[RunScriptSource,Throws],T017_LanguageBlockScope_AssociativeNestedAssociative_Function->[RunScriptSource,Throws],T030_LanguageBlockScope_ParallelInsideNestedBlock_ImperativeNested_AA->[RunScriptSource,Verify],T050_Test_Identifier_Name_Tailer_18->[RunScriptSource,Throws],T031_Defect_1450594->[Payload,kIdUnboundIdentifier,IsTrue,RunScriptSource,VerifyBuildWarning,IsNull],T050_Test_Identifier_Name_30->[RunScriptSource,Throws],T050_Test_Identifier_Name_Tailer_13->[RunScriptSource,Throws],T013_LanguageBlockScope_MultipleParallelLanguageBlocks_AIA->[RunScriptSource,IsNull,IsTrue],T025_LanguageBlockScope_AssociativeParallelAssociative_Function->[RunScriptSource,IsNull,IsTrue],T032_Cross_Language_Variables->[RunScriptSource,Payload,IsTrue],T024_LanguageBlockScope_ImperativeParallelAssociative_Function->[RunScriptSource,IsNull,IsTrue],T050_Test_Identifier_Name_Tailer_03->[RunScriptSource,Throws],T050_Test_Identifier_Name_Tailer_22->[RunScriptSource,Throws],T050_Test_Identifier_Name_Tailer_21->[RunScriptSource,Throws],T050_Test_Identifier_Name_19->[RunScriptSource,Throws],T050_Test_Identifier_Name_03->[RunScriptSource,Throws],T010_LanguageBlockScope_UpdateVariableInNestedLanguageBlock_AI->[RunScriptSource,Payload,ToBoolean,IsTrue],T020_LanguageBlockScope_AssociativeNestedImperative_Function->[RunScriptSource,Payload,IsTrue],T050_Test_Identifier_Name_17->[RunScriptSource,Throws],T050_Test_Identifier_Name_Tailer_02->[RunScriptSource,Throws],T050_Test_Identifier_Name_Tailer_09->[RunScriptSource,Throws],T050_Test_Identifier_Name_Tailer_16->[RunScriptSource,Throws],T005_LanguageBlockScope_DeepNested_IAI->[RunScriptSource,Payload,ToBoolean,IsTrue],T023_LanguageBlockScope_AssociativeParallelImperative_Function->[RunScriptSource,IsNull,IsTrue],T050_Test_Identifier_Name_25->[RunScriptSource,Throws],T051_Test_Identifier_Scope_01->[RunScriptSource,Payload,IsTrue],T050_Test_Identifier_Name_Tailer_19->[RunScriptSource,Throws],T050_Test_Identifier_Name_Tailer_31->[RunScriptSource,Payload,IsTrue],T051_Test_Identifier_Scope_06->[RunScriptSource,Payload,IsTrue],T050_Test_Identifier_Name_Tailer_32->[RunScriptSource,Payload,IsTrue],T050_Test_Identifier_Name_27->[RunScriptSource,Throws],T008_LanguageBlockScope_ImperativeParallelAssociative->[RunScriptSource,IsNull,IsTrue],T050_Test_Identifier_Name_Tailer_15->[RunScriptSource,Throws],T006_LanguageBlockScope_DeepNested_AIA->[RunScriptSource,Payload,ToBoolean,IsTrue],T050_Test_Identifier_Name_Tailer_07->[RunScriptSource,Throws],T050_Test_Identifier_Name_24->[RunScriptSource,Throws],T002_LanguageBlockScope_ImperativeNestedImperaive->[RunScriptSource,Throws],T050_Test_Identifier_Name_Tailer_11->[RunScriptSource,Throws],T050_Test_Identifier_Name_21->[RunScriptSource,Throws],T003_LanguageBlockScope_ImperativeNestedAssociative->[RunScriptSource,Payload,ToBoolean,IsTrue],T050_Test_Identifier_Name_23->[RunScriptSource,Throws],T050_Test_Identifier_Name_Tailer_04->[RunScriptSource,Throws],T050_Test_Identifier_Name_11->[RunScriptSource,Throws],T051_Test_Identifier_Scope_02->[RunScriptSource,Payload,IsTrue],T050_Test_Identifier_Name_16->[RunScriptSource,Throws],T052_DNL_1467464->[RunScriptSource,Verify],T050_Test_Identifier_Name_Tailer_29->[RunScriptSource,Throws],T012_LanguageBlockScope_ImperativeParallelImperative->[RunScriptSource,IsNull,IsTrue],T050_Test_Identifier_Name_12->[RunScriptSource,Throws],T050_Test_Identifier_Name_Tailer_17->[RunScriptSource,Throws],T026_LanguageBlockScope_ImperativeParallelImperative_Function->[RunScriptSource,IsNull,IsTrue],T050_Test_Identifier_Name_Tailer_05->[RunScriptSource,Throws]]] | T032 cross language variables. | Interesting, we expected 21, but the result was 11, so verified with 11 and made it pass. Can we rename the variable name to "count" instead of "sum"? |
@@ -1937,7 +1937,7 @@ class Spec(object):
stream -- string or file object to read from.
"""
try:
- data = syaml.load(stream)
+ data = yaml.load(stream)
return Spec.from_dict(data)
except MarkedYAMLError as e:
raise syaml.SpackYAMLError("error parsing YAML spec:", str(e))
| [colorize_spec->[insert_color],save_dependency_spec_yamls->[to_yaml,format,from_yaml,traverse,write],DependencySpec->[copy->[DependencySpec]],ConflictsInSpecError->[__init__->[format,tree]],SpecParser->[check_identifier->[format],spec->[_dup,_add_version,_set_compiler,satisfies,Spec,_add_flag,spec_by_hash,dag_hash],version_list->[version],spec_from_file->[from_yaml,format],compiler->[version_list,_add_version],do_parse->[_set_architecture,copy,traverse,platform]],parse->[SpecParser],AmbiguousHashError->[__init__->[format]],SpecBuildInterface->[ForwardQueryToPackage],FlagMap->[copy->[FlagMap]],InvalidDependencyError->[__init__->[format]],ArchSpec->[copy->[_dup],os->[platform],from_dict->[ArchSpec],satisfies->[_autospec],__init__->[_string_or_none],constrain->[_autospec,satisfies],target->[platform,target_or_none,target],_autospec->[ArchSpec]],Spec->[dependents_dict->[_find_deps],dep_difference->[traverse],from_node_dict->[valid_compiler_flags,Spec,from_dict,from_node_dict],dependencies_dict->[_find_deps],_evaluate_dependency_conditions->[Spec,satisfies],satisfies_dependencies->[_autospec,traverse,common_dependencies,satisfies],constrain->[_autospec,constrain,satisfies],_merge_dependency->[_replace_with,_find_provider,_add_dependency],_normalize_helper->[_evaluate_dependency_conditions,_merge_dependency],dep_string->[sorted_deps,format],eq_node->[_cmp_node],_add_dependency->[DependencySpec],to_record_dict->[to_node_dict,dag_hash],common_dependencies->[traverse],to_json->[to_dict],normalized->[copy,normalize],copy->[_dup],_set_architecture->[ArchSpec],from_dict->[read_yaml_dep_specs,from_node_dict,DependencySpec],__contains__->[_autospec,traverse,satisfies],cformat->[copy,format],_dup->[DependencyMap,copy],_cached_hash->[_spec_hash],_find_provider->[satisfies],virtual_dependencies->[traverse],_replace_with->[_add_dependency],_cmp_key->[_cmp_node],_constrain_dependencies->[_autospec,copy,get_dependency,_add_dependency],ne_node->[_cmp_node],ne_dag->[eq_dag],old_format->[write,format,dag_hash],to_dict->[traverse,build_hash,to_node_dict,dag_hash],traverse_edges->[return_val->[DependencySpec],validate,return_val],dag_hash_bit_prefix->[dag_hash],__str__->[dep_string,format],_expand_virtual_packages->[copy,traverse,_dup,DependencyMap,_replace_with,feq],sorted_deps->[flat_dependencies],format->[write_attribute->[write,dag_hash],write_attribute,write],eq_dag->[_eq_dag],colorized->[colorize_spec],tree->[prefix,traverse_edges,format,dependents_dict,dag_hash],__init__->[DependencyMap,_dup,FlagMap],from_json->[from_dict],constrained->[copy,constrain],__getitem__->[traverse,SpecBuildInterface],build_hash->[_cached_hash],satisfies->[_autospec,satisfies,dag_hash],_autospec->[Spec],normalize->[flat_dependencies,_normalize_helper,_mark_concrete],from_literal->[spec_builder->[spec_builder,spec_and_dependency_types,Spec,_add_dependency,name_and_dependency_types],spec_builder],dag_hash->[_cached_hash],to_yaml->[to_dict],_dup_deps->[copy,traverse_edges],_mark_concrete->[traverse],flat_dependencies->[copy,traverse],from_yaml->[from_dict],validate_or_raise->[traverse],dependencies->[_find_deps],concretize->[copy,traverse_edges,_expand_virtual_packages,traverse,satisfies,_concretize_helper],dependents->[_find_deps],concretized->[copy,concretize],to_node_dict->[_cached_hash,to_dict,dependencies_dict],_eq_dag->[_eq_dag],index->[DependencyMap,traverse],_add_flag->[valid_compiler_flags],full_hash->[_cached_hash],_concretize_helper->[constrain]],CompilerSpec->[copy->[copy],from_dict->[from_dict,CompilerSpec],__init__->[copy],constrain->[_autospec,satisfies],satisfies->[_autospec,satisfies],_autospec->[CompilerSpec],to_dict->[to_dict]],SpecLexer] | Construct a Spec object from a YAML file object or string. | is there a reason not to use `syaml` here? Or is this intentional to fail fast if ordered reads suddenly become necessary for a consistent hash? |
@@ -560,12 +560,12 @@ func streamPathToBuild(repo git.Repository, in io.Reader, out io.Writer, client
// NOTE: It's important that this stays false unless we change the
// path to something else, otherwise we will delete whatever path the
// user provided.
- var usedTempDir bool = false
- var tempDirectory string = ""
+ var usedTempDir bool
+ var tempDirectory string
if asRepo {
- var contextDir string = ""
+ var contextDir string
fmt.Fprintf(out, "Uploading %q at commit %q as binary input for the build ...\n", clean, commit)
if gitErr != nil {
return nil, fmt.Errorf("the directory %q is not a valid Git repository: %v", clean, gitErr)
| [RunStartBuildWebHook->[ClientConfig,NewBuffer,Infof,DefaultServerURL,CanonicalAddr,Marshal,UniversalDecoder,Post,Unmarshal,Close,V,String,Parse,Errorf,ReadAll,DecodeInto,PrintSuccess,TransportFor],RunListBuildWebHooks->[Fprintf,BuildConfigs,WebHookURL,String,Errorf,Get],Run->[IsAlreadyExists,Copy,Stream,Fprintf,BuildConfigs,BuildLogs,Close,Clone,RunListBuildWebHooks,Builds,Errorf,Get,IsTimeoutErr,RunStartBuildWebHook,PrintSuccess,Instantiate],Complete->[Resource,GetFlagString,WarnAboutCommaSeparation,NewRepository,Errorf,ParseBuildArg,Clients,HasSuffix,DefaultNamespace,ParseEnv,Lookup,IsResourceOrLegacy,Builds,Get,OpenShiftClientConfig,Object,Fprintf,ResolveResource,UsageError,Flags],RemoveAll,IsInvalid,StringVar,ParsePostReceive,Examples,NewFileSystem,GetRootDir,Close,TempDir,CloseWithError,HasPrefix,IsGitInstalled,Stop,Clean,Stat,Pipe,Error,LongDesc,New,StringArrayVarP,InstantiateBinary,CloneWithOptions,Checkout,ParseMediaType,Errorf,Complete,Watch,Run,PotentialPRRetryAsFetch,CheckErr,SplitN,StringArrayVar,AddOutputFlagsForMutation,NewWriter,AsSelector,Join,Equal,Infof,ResultChan,V,Base,Get,Rel,Split,Peek,Fprintf,NewReaderSize,IsDir,CreateTarStream,Sprintf,List,ShowFormat,String,Open,Abs,BoolVarP,Flags,BoolVar] | if is a directory it will return the path of the n - tuple in the git if clones the contents of the specified commit into a temporary directory for future tar -. | nit, I prefer the old code. |
@@ -737,8 +737,10 @@ class DBStructure
self::checkInitialValues();
if ($action && !$install) {
- DI::config()->set('system', 'maintenance', 0);
- DI::config()->set('system', 'maintenance_reason', '');
+ if (!$in_maintenance) {
+ DI::config()->set('system', 'maintenance', 0);
+ DI::config()->set('system', 'maintenance_reason', '');
+ }
if ($errors) {
DI::config()->set('system', 'dbupdate', self::UPDATE_FAILED);
| [DBStructure->[printUpdateError->[t],setDatabaseVersion->[t,set],update->[t,set],convertToInnoDB->[t],dropTables->[t]]] | Updates the structure of a database. This function create the necessary tables and indexes if they don t exist in the database. This function will create the necessary indexes for the table. This function create the index if the index don t exist in the database or the field structure This function is called to get the name of the foreign key constraint in the database. | This condition should be the opposite. |
@@ -38,8 +38,11 @@ def apply_generic_arguments(callable: CallableType, types: List[Type],
types[i] = value
break
else:
- msg.incompatible_typevar_value(callable, i + 1, type, context)
-
+ constraints = get_incompatible_arg_constraints(msg, callable.arg_types, type, i + 1)
+ if constraints:
+ msg.incompatible_constrained_arguments(callable, i + 1, constraints, context)
+ else:
+ msg.incompatible_typevar_value(callable, i + 1, type, context)
upper_bound = callable.variables[i].upper_bound
if (type and not isinstance(type, PartialType) and
not mypy.subtypes.is_subtype(type, upper_bound)):
| [apply_generic_arguments->[all,any,incompatible_typevar_value,len,expand_type,is_same_type,isinstance,enumerate,copy_modified,is_subtype]] | Apply generic type arguments to a callable type. A copy of the object that is modified by applying the callable s return_type and. | Could you please also fix the lint issue -- this line is too long (more than 99 allowed chars). |
@@ -212,8 +212,9 @@ func (ds *DeleteStore) GetPendingDeleteRequestsForUser(ctx context.Context, user
func (ds *DeleteStore) queryDeleteRequests(ctx context.Context, deleteQuery []chunk.IndexQuery) ([]DeleteRequest, error) {
deleteRequests := []DeleteRequest{}
+ var itr chunk.ReadBatchIterator
err := ds.indexClient.QueryPages(ctx, deleteQuery, func(query chunk.IndexQuery, batch chunk.ReadBatch) (shouldContinue bool) {
- itr := batch.Iterator()
+ itr = batch.Iterator(itr)
for itr.Next() {
userID, requestID := splitUserIDAndRequestID(string(itr.RangeValue()))
| [GetPendingDeleteRequestsForUser->[GetDeleteRequestsForUserByStatus],RegisterFlags->[RegisterFlags]] | queryDeleteRequests queries the delete requests that match the given index query. | I think this is introducing a bug, if there are multiple `delete queries`, since this iterator will now be shared between multiple concurrently running goroutines. If there is only one, there is no need to reuse iterator. Access to `deleteRequests` is not protected either. :confused: |
@@ -38,6 +38,14 @@ export const DEFAULT_THRESHOLD =
[0, 0.05, 0.1, 0.15, 0.2, 0.25, 0.3, 0.35, 0.4,
0.45, 0.5, 0.55, 0.6, 0.65, 0.7, 0.75, 0.8, 0.85, 0.9, 0.95, 1];
+/** @typedef {{
+ * element: !Element,
+ * currentThresholdSlot: number,
+ * }}
+ */
+let observeEntryDef;
+
+/** @const @private */
const INIT_TIME = Date.now();
/**
| [No CFG could be retrieved] | Exports a structure that defines the rectangle used in intersection observers. A base class to help amp - iframe and amp - ad nested iframe listen to intersection of. | How about `IntersectionStateDef` |
@@ -892,11 +892,15 @@ dsl_props_set_sync_impl(dsl_dataset_t *ds, zprop_source_t source,
while ((elem = nvlist_next_nvpair(props, elem)) != NULL) {
nvpair_t *pair = elem;
+ const char *name = nvpair_name(pair);
if (nvpair_type(pair) == DATA_TYPE_NVLIST) {
/*
- * dsl_prop_get_all_impl() returns properties in this
- * format.
+ * This usually happens when we reuse the nvlist_t data
+ * returned by the counterpart dsl_prop_get_all_impl().
+ * For instance we do this to restore the original
+ * received properties when an error occurs in the
+ * zfs_ioc_recv() codepath.
*/
nvlist_t *attrs = fnvpair_value_nvlist(pair);
pair = fnvlist_lookup_nvpair(attrs, ZPROP_VALUE);
| [No CFG could be retrieved] | ZAP - specific functions Private functions - functions - functions - functions - functions - functions - functions - functions - functions. | @behlendorf I don't know if this is what you had in mind ... i'm not good at explaining things. |
@@ -164,7 +164,9 @@ class TestAvro(unittest.TestCase):
# No extra avro parameters for AvroSource.
expected_items = [
DisplayDataItemMatcher('compression', 'auto'),
- DisplayDataItemMatcher('file_pattern', file_name)]
+ DisplayDataItemMatcher(
+ 'file_pattern',
+ 'StaticValueProvider(type=str, value=\'%s\')' % file_name)]
hc.assert_that(dd.items, hc.contains_inanyorder(*expected_items))
def test_read_display_data(self):
| [TestAvro->[test_read_without_splitting_compressed_deflate->[_write_data,_run_avro_test],test_read_reentrant_without_splitting->[_write_data],test_read_without_splitting_multiple_blocks->[_write_data,_run_avro_test],test_read_without_splitting->[_write_data,_run_avro_test],test_read_reantrant_with_splitting->[_write_data],test_read_without_splitting_compressed_snappy->[_write_data,_run_avro_test],test_read_with_splitting_pattern->[_run_avro_test,_write_pattern],test_read_with_splitting_multiple_blocks->[_write_data,_run_avro_test],test_read_with_splitting->[_write_data,_run_avro_test],_write_pattern->[_write_data],test_dynamic_work_rebalancing_exhaustive->[_write_data],test_read_with_splitting_compressed_deflate->[_write_data,_run_avro_test],test_source_transform->[_write_data],test_read_without_splitting_pattern->[_run_avro_test,_write_pattern],test_read_with_splitting_compressed_snappy->[_write_data,_run_avro_test],test_corrupted_file->[_write_data]]] | Test source display data. | Please make sure that this DisplayData format matches (in spirit at least) with Java SDK. (sync with @pabloem) |
@@ -13,6 +13,7 @@ namespace Microsoft.Extensions.Logging.Console
/// <summary>
/// A provider of <see cref="ConsoleLogger"/> instances.
/// </summary>
+ [UnsupportedOSPlatform("android")]
[UnsupportedOSPlatform("browser")]
[ProviderAlias("Console")]
public class ConsoleLoggerProvider : ILoggerProvider, ISupportExternalScope
| [ConsoleLoggerProvider->[ILogger->[Format,TryGetValue,CurrentValue,Systemd,Simple,UpdateFormatterOptions,FormatterName,GetOrAdd],Dispose->[Dispose],SetScopeProvider->[ScopeProvider],ReloadLoggerOptions->[Format,TryGetValue,Options,Formatter,Systemd,Simple,UpdateFormatterOptions,FormatterName],DoesConsoleSupportAnsi->[IsOSPlatform,GetStdHandle,STD_OUTPUT_HANDLE,GetConsoleMode,ENABLE_VIRTUAL_TERMINAL_PROCESSING,Windows],SetFormatters->[Name,Systemd,Json,Simple,OrdinalIgnoreCase,TryAdd],UpdateFormatterOptions->[DisableColors,UseUtcTimestamp,IncludeScopes,FormatterOptions,Disabled,Enabled,TimestampFormat],ErrorConsole,CurrentValue,OnChange,Console,ReloadLoggerOptions,DoesConsoleSupportAnsi,SetFormatters,Instance,Array]] | Provides a provider of the console logger instances. Reload logger options. | Why is it not supported? There does not seem to be anything notworking? |
@@ -20,6 +20,7 @@ require "zonebie/rspec"
# This makes Rspec fail if there's any output
RSpec::Matchers.define_negated_matcher :avoid_outputting, :output
+RSpec::Matchers.define_negated_matcher :exclude, :include
############
RSpec.configure do |config|
# makes example fail if there's any output
| [verify_partial_doubles,mock_with,srand,define_negated_matcher,expect_with,seed,include_chain_clauses_in_custom_matcher_descriptions,filter_run_when_matching,require,shared_context_metadata_behavior,configure] | This is the main entry point for the RSpec RSpec specification. It is the main rspec - mocks config goes here. | I noticed this matcher was missing on one of my own PRs and I forgot how to add negated matchers so I just wrote `.not_to include` and forgot to look into it :joy: |
@@ -42,7 +42,10 @@ public class KeyAffinityServiceImpl<K> implements KeyAffinityService<K> {
// TODO During state transfer, we should try to assign keys to a node only if they are owners in both CHs
public final static float THRESHOLD = 0.5f;
-
+
+ //interval between key/queue poll
+ private static final int POOL_INTERVAL = 50;
+
private static final Log log = LogFactory.getLog(KeyAffinityServiceImpl.class);
private final Set<Address> filter;
| [KeyAffinityServiceImpl->[handleCacheStopped->[stop],stop->[stop],getDistributionManager->[getDistributionManager],isKeyGeneratorThreadActive->[isActive]]] | Implementation of the key affinity service. private class KeyAffinityService. | I suggest `POLL_INTERVAL_MILLIS` to make it clear what the unit is. |
@@ -207,6 +207,8 @@ int crl_main(int argc, char **argv)
if (argc != 0)
goto opthelp;
+ if (digestname != NULL && !opt_md(digestname, &digest))
+ goto opthelp;
x = load_crl(infile, "CRL");
if (x == NULL)
goto end;
| [No CFG could be retrieved] | Parse the command line options and return the index of the first non - NULL element. finds all missing entries in the store. | not sure why you did this as an && and then do the other files differently? |
@@ -217,7 +217,7 @@ public class LdapRealm extends JndiLdapRealm {
*/
@Override
protected AuthenticationInfo queryForAuthenticationInfo(AuthenticationToken token,
- LdapContextFactory ldapContextFactory) throws NamingException {
+ LdapContextFactory ldapContextFactory) throws NamingException {
AuthenticationInfo info = super.queryForAuthenticationInfo(token, ldapContextFactory);
// Credentials were verified. Verify that the principal has all allowedRulesForAuthentication
if (!hasAllowedAuthenticationRules(info.getPrincipals(), ldapContextFactory)) {
| [LdapRealm->[doGetAuthenticationInfo->[doGetAuthenticationInfo],getUserDn->[matchPrincipal,getUserSearchAttributeTemplate,getUserObjectClass,getUserSearchBase,getUserSearchControls,getUserSearchAttributeName],queryForAuthenticationInfo->[queryForAuthenticationInfo]]] | Override the queryForAuthenticationInfo method to verify that the principal has all of the allowedRoles. | There were a lot of empty spaces, have tried to clean up all of those with this PR. |
@@ -135,14 +135,10 @@ func newMonitorUnsafe(
internalsMtx: sync.Mutex{},
config: config,
stats: pluginFactory.Stats,
+ state: MON_INIT,
}
- if m.stdFields.ID != "" {
- // Ensure we don't have duplicate IDs
- if _, loaded := uniqueMonitorIDs.LoadOrStore(m.stdFields.ID, m); loaded {
- return m, ErrDuplicateMonitorID{m.stdFields.ID}
- }
- } else {
+ if m.stdFields.ID == "" {
// If there's no explicit ID generate one
hash, err := m.configHash()
if err != nil {
| [makeTasks->[Wrap,Unpack,Critical],Error->[Sprintf],Stop->[Stop,Unlock,Error,StopMonitor,Lock,freeID,Errorf,close,String],Start->[Start,StartMonitor,Lock,Unlock],String->[Sprintf],freeID->[Delete],configHash->[Unpack,Hash],MonitorNames,Create,makeTasks,Stop,Sprintf,New,ConfigToStdMonitorFields,WrapCommon,Enabled,Errorf,LoadOrStore,Get,configHash] | newMonitorUnsafe creates a new monitor instance from the given config. configHash - function to generate a task hash for the given endpoints. | Prevents weird situations with dual stops, makes `stop()` idempotent. |
@@ -137,7 +137,7 @@ func GetBootstrapClusterRoles() []authorizationapi.ClusterRole {
authorizationapi.NewRule(read...).Groups(certificatesGroup).Resources("certificatesigningrequests", "certificatesigningrequests/approval", "certificatesigningrequests/status").RuleOrDie(),
authorizationapi.NewRule(read...).Groups(authzGroup).Resources("clusterpolicies", "clusterpolicybindings", "clusterroles", "clusterrolebindings",
- "policies", "policybindings", "roles", "rolebindings").RuleOrDie(),
+ "policies", "policybindings", "roles", "rolebindings", "rolebindingrestrictions").RuleOrDie(),
authorizationapi.NewRule(read...).Groups(buildGroup).Resources("builds", "builds/details", "buildconfigs", "buildconfigs/webhooks", "builds/log").RuleOrDie(),
| [NormalizeResources,Sprintf,RuleOrDie,NewRule,Names,Convert,Groups,NewString,AllRoles,Resources] | Create a new authorization rule. RuleOrDie - Enforces that all resources in the system are granted granted permissions on all. | a project admin should be allowed to see the `rolebindingrestrictions` |
@@ -115,7 +115,7 @@ nvme_recov_1(void **state)
* is ready.
*/
print_message("Waiting for faulty reaction done...\n");
- sleep(60);
+ sleep(180);
print_message("Done\n");
}
| [bool->[test_pool_get_info,assert_int_equal],run_daos_nvme_recov_test->[MPI_Barrier,run_daos_sub_tests,ARRAY_SIZE],void->[dts_oid_gen,print_message,DP_OID,sleep,strlen,daos_mgmt_set_params,ioreq_fini,skip,MPI_Barrier,is_nvme_enabled,dts_key_gen,dts_oid_set_rank,test_rebuild_wait,insert_single,ioreq_init,set_fail_loc,dts_oid_set_tgt]] | DTS - OOV test for NVMe - Recov 1 Fail location check. | Do we really need to wait that long? Some value larger than the monitoring check interval (60) like 70 isn't enough? |
@@ -208,6 +208,10 @@ namespace Microsoft.Extensions.Hosting
try
{
+ // Set the async local to the instance of the HostingListener so we can filter events that
+ // aren't scoped to this execution of the entry point.
+ _currentListener.Value = this;
+
var parameters = _entryPoint.GetParameters();
if (parameters.Length == 0)
{
| [HostFactoryResolver->[ResolveServiceProviderFactory->[ResolveHostFactory]]] | Creates a new host object. return null if no task is waiting. | Do you ever have to "unset" this? |
@@ -3691,6 +3691,7 @@ public class ApiResponseHelper implements ResponseGenerator {
builder.append(" for VM ").append(vmInstance.getHostName()).append(" (").append(vmInstance.getUuid()).append(") ")
.append("with size ").append(usageRecord.getVirtualSize());
}
+ usageRecResponse.setSize(usageRecord.getVirtualSize());
usageRecResponse.setDescription(builder.toString());
}
}
| [ApiResponseHelper->[createSite2SiteVpnGatewayResponse->[populateAccount,populateDomain],findUserVmById->[findUserVmById],createStoragePoolResponse->[createStoragePoolResponse],toSerializedString->[toSerializedString],createTemplateUpdateResponse->[createTemplateUpdateResponse],createUsageResponse->[createUsageResponse,findTemplateById],createAutoScaleVmGroupResponse->[createAutoScalePolicyResponse],createImageStoreResponse->[createImageStoreResponse],findTemplateById->[findTemplateById],createStoragePoolForMigrationResponse->[createStoragePoolForMigrationResponse],createSite2SiteCustomerGatewayResponse->[populateAccount,populateDomain],createDomainRouterResponse->[createDomainRouterResponse],createSite2SiteVpnConnectionResponse->[populateAccount,populateDomain],createStaticRouteResponse->[populateAccount,createResourceTagResponse,populateDomain],createDedicatedGuestVlanRangeResponse->[populateAccount,populateDomain],createExtractResponse->[findTemplateById],createVpcResponse->[createNetworkResponse,createResourceTagResponse,populateOwner],createAutoScalePolicyResponse->[createConditionResponse,populateOwner],createTemplateResponses->[findHostById,findUserVmById,findVolumeById,createTemplateResponses,findTemplateById],findDiskOfferingById->[findDiskOfferingById],createHostResponse->[createHostResponse],createPrivateGatewayResponse->[populateAccount,populateDomain],createSnapshotScheduleResponse->[findVolumeById],findUserById->[findUserById],createNicResponse->[setResponseIpAddress],createProjectResponse->[createProjectResponse],createAutoScaleVmProfileResponse->[populateOwner,findUserById,findTemplateById],createSystemVmInstanceResponse->[findHostById],createProjectAccountResponse->[createProjectAccountResponse],findHostById->[findHostById],createLoadBalancerContainerReponse->[createResourceTagResponse,populateOwner],findAccountByNameDomain->[findAccountByNameDomain],createConditionResponse->[createCounterResponse,populateOwner],createClusterResponse->[getStatsCapacityresponse],createUserVmResponse->[createUserVmResponse],createGlobalLoadBalancerResponse->[createLoadBalancerResponse],findVolumeById->[findVolumeById],createVolumeResponse->[createVolumeResponse],createTemplatePermissionsResponse->[findAccountByNameDomain,findTemplateById],createHostForMigrationResponse->[createHostForMigrationResponse],createVlanIpRangeResponse->[createVlanIpRangeResponse],isForSystemVms->[isForSystemVms]]] | Creates a new usage record response. This method is used to retrieve the offering information for a given usage record. This method is called when a usage record is received from the AZ Private method to fill usageRecord with missing data. | Should this be outside `if (!oldFormat)` block? |
@@ -5,10 +5,11 @@ module AccountReset
if email.blank?
redirect_to root_url
else
- render :show, locals: {
- email: email,
- sms_phone: TwoFactorAuthentication::PhonePolicy.new(current_user).configured?,
- }
+ render :show,
+ locals: {
+ email: email,
+ sms_phone: TwoFactorAuthentication::PhonePolicy.new(current_user).configured?,
+ }
sign_out
end
end
| [ConfirmRequestController->[show->[redirect_to,configured?,render,blank?]]] | Shows a single node identifier. | There are cases where this style of indenting can make some lines way too long (I know because I haven't figured out how to get RubyMine to stop doing this) |
@@ -507,10 +507,13 @@ class StreamingDataFeeder(DataFeeder):
inp[i, :] = six.next(self._x)
except StopIteration:
self.stopped = True
- inp = inp[:i, :]
- if self._y is not None:
- out = out[:i]
- break
+ if i==0:
+ raise StopIteration
+ else:
+ inp = inp[:i, :]
+ if self._y is not None:
+ out = out[:i]
+ break
if self._y is not None:
y = six.next(self._y)
| [setup_predict_data_feeder->[_is_iterable,_batch_data],StreamingDataFeeder->[__init__->[_get_in_out_shape,_check_dtype]],DaskDataFeeder->[__init__->[_get_in_out_shape,_check_dtype]],setup_train_data_feeder->[_is_iterable,_data_type_filter],DataFeeder->[get_feed_dict_fn->[_feed_dict_fn->[_access]],__init__->[check_array,_check_dtype,_get_in_out_shape]]] | Returns a function that can be called when samples a random subset of batch size from x. | Should this just be `raise` in to preserve the original stack? |
@@ -36,6 +36,13 @@ class Mark < ApplicationRecord
self.update!(mark: deduction > self.markable.max_mark ? 0.0 : self.markable.max_mark - deduction)
end
+ def ensure_mark_value
+ return unless previous_changes.key?('override')
+ if previous_changes['override'].first == true && previous_changes['override'].second == false
+ update_deduction
+ end
+ end
+
def scale_mark(curr_max_mark, prev_max_mark, update: true)
return if mark.nil?
return 0 if prev_max_mark == 0 || mark == 0 # no scaling occurs if prev_max_mark is 0 or mark is 0
| [Mark->[calculate_deduction->[markable_type,sum,override?],update_deduction->[update!,max_mark,override?],ensure_not_released_to_students->[released_to_students,throw],scale_mark->[is_a?,nil?,update_columns,round],update_result->[update,nil?,mark_changed?,update_total_mark],belongs_to,max_mark,after_save,before_save,validates_uniqueness_of,validates_numericality_of,validates_presence_of,validates_inclusion_of]] | Updates the n - node relation relation with the current deduction count. | Style/GuardClause: Use a guard clause instead of wrapping the code inside a conditional expression. |
@@ -155,7 +155,6 @@ define([
var color = Property.getValueOrUndefined(this._color, time, result.color);
if (!defined(color)) {
color = Color.clone(defaultColor, result.color);
- color.alpha = Property.getValueOrDefault(this._alpha, time, defaultAlpha);
}
result.color = color;
if (Property.getValueOrDefault(this._transparent, time, defaultTransparent)) {
| [No CFG could be retrieved] | Determines the type of material the value of the property at the provided time. Returns true if the two ImageMaterialProperties are equal ; false otherwise. | Replace this if block with `result.color = Property.getValueOrClonedDefault(this._color, time, defaultColor, result.color);` |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.