patch stringlengths 18 160k | callgraph stringlengths 4 179k | summary stringlengths 4 947 | msg stringlengths 6 3.42k |
|---|---|---|---|
@@ -5435,5 +5435,17 @@ namespace Dynamo.Wpf.Properties
return ResourceManager.GetString("ZeroTouchTypeShortString", resourceCulture);
}
}
+
+
+ /// <summary>
+ /// Could not find all dependencies for package {0}, based on versions specified by author.
+ /// </summary>
+ public static string MessagePackageMissingDependencies
+ {
+ get
+ {
+ return ResourceManager.GetString("MessagePackageMissingDependencies", resourceCulture);
+ }
+ }
}
}
| [Resources->[GetObject,Advanced,ReferenceEquals,GetString,Assembly]] | Returns a short string that can be used to display the zero touch type. | is this supposed to be auto generated ? |
@@ -0,0 +1,10 @@
+namespace NServiceBus
+{
+ /// <summary>
+ /// Allows customization of conversation ID's for individual messages. Return false to use the default COMB-Guid strategy.
+ /// </summary>
+ /// <param name="context">Context for the conversation id generation.</param>
+ /// <param name="customConverationId">The custom conversation id to be used for this message.</param>
+ /// <returns>`true` if the returned conversation id should be used, `false` otherwise.</returns>
+ public delegate bool TryGetConversationIdDelegate(ConversationIdStrategyContext context, out string customConverationId);
+}
\ No newline at end of file
| [No CFG could be retrieved] | No Summary Found. | I'm for introducing this type. But if we do end up keeping, at the very least, I think a better name is required. |
@@ -134,6 +134,8 @@ class CUDATargetContext(BaseContext):
argtypes: An iterable of the types of arguments to the kernel.
debug: Whether to compile with debug.
nvvm_options: Dict of NVVM options used when compiling the new library.
+ filename: The source filename that the function is contained in.
+ linenum: The source line that the function is on.
max_registers: The max_registers argument for the code library.
"""
kernel_name = itanium_mangler.prepend_namespace(func_name, ns='cudapy')
| [CUDATargetContext->[insert_addrspace_conv->[insert_addrspace_conv],generate_kernel_wrapper->[create_module,define_error_gv],prepare_cuda_kernel->[codegen],insert_string_const_addrspace->[insert_const_string]]] | Prepares a CUDA kernel with the given arguments. | What happens if someone materialized a function from a string? |
@@ -1119,12 +1119,13 @@ expect_query_resp_with_info(daos_pool_info_t *exp_info,
assert_int_equal(pq_resp->active_targets,
exp_info->pi_space.ps_ntargets);
- assert_non_null(pq_resp->scm);
- expect_storage_usage(&exp_info->pi_space, DAOS_MEDIA_SCM, pq_resp->scm);
+ assert_int_equal(pq_resp->n_tier_stats, DAOS_MEDIA_MAX);
+ assert_non_null(pq_resp->tier_stats[DAOS_MEDIA_SCM]);
+ expect_storage_usage(&exp_info->pi_space, DAOS_MEDIA_SCM, pq_resp->tier_stats[DAOS_MEDIA_SCM]);
- assert_non_null(pq_resp->nvme);
+ assert_non_null(pq_resp->tier_stats[DAOS_MEDIA_NVME]);
expect_storage_usage(&exp_info->pi_space, DAOS_MEDIA_NVME,
- pq_resp->nvme);
+ pq_resp->tier_stats[DAOS_MEDIA_NVME]);
assert_non_null(pq_resp->rebuild);
expect_rebuild_status(&exp_info->pi_rebuild_st, exp_state,
| [int->[mock_ds_mgmt_tgt_update_setup,mock_ds_mgmt_cont_set_owner_teardown,mock_ds_mgmt_pool_get_acl_setup,mock_ds_mgmt_pool_overwrite_acl_teardown,mock_ds_mgmt_pool_extend_setup,mock_ds_mgmt_pool_get_acl_teardown,mock_ds_mgmt_pool_update_acl_teardown,mock_ds_mgmt_pool_query_setup,mock_ds_mgmt_cont_set_owner_setup,mock_ds_mgmt_pool_list_cont_teardown,mock_ds_mgmt_pool_update_acl_setup,mock_ds_mgmt_pool_set_prop_setup,mock_ds_mgmt_pool_set_prop_teardown,mock_ds_mgmt_pool_evict_setup,mock_ds_mgmt_pool_list_cont_setup,mock_ds_mgmt_pool_overwrite_acl_setup,mock_ds_mgmt_pool_delete_acl_setup,mock_ds_mgmt_pool_delete_acl_teardown],main->[REINTEGRATE_TEST,EXCLUDE_TEST,POOL_CREATE_TEST,POOL_SET_PROP_TEST,PING_RANK_TEST,cmocka_run_group_tests_name,POOL_EVICT_TEST,POOL_EXTEND_TEST,ACL_TEST,PREP_SHUTDOWN_TEST,CONT_SET_OWNER_TEST,cmocka_unit_test,QUERY_TEST,LIST_CONT_TEST,DRAIN_TEST],daos_prop_t->[daos_prop_alloc,D_STRNDUP,new_access_prop,daos_acl_free,daos_acl_dup,get_valid_acl],Drpc__Call->[D_ALLOC_ARRAY,D_ALLOC,drpc__call__init,assert_non_null],daos_acl->[assert_rc_equal,daos_acl_from_strs],void->[ds_mgmt_drpc_pool_list_cont,ds_mgmt_drpc_pool_evict,pack_get_acl_req,pack_modify_acl_req,ds_mgmt_drpc_pool_reintegrate,expect_failure_for_bad_call_payload,pack_pool_evict_req,expect_drpc_extend_resp_with_error,expect_drpc_cont_set_owner_resp_with_status,pack_pool_query_req,mgmt__ping_rank_req__pack,assert_int_equal,mgmt__aclresp__free_unpacked,mgmt__modify_aclreq__pack,setup_pool_set_prop_drpc_call,mgmt__pool_drain_req__get_packed_size,expect_daos_resp_with_der,D_ALLOC_ARRAY,mgmt__pool_reintegrate_resp__unpack,mgmt__pool_exclude_req__get_packed_size,ds_mgmt_drpc_pool_extend,mgmt__delete_aclreq__get_packed_size,mgmt__pool_exclude_resp__unpack,uuid_parse,mock_ds_mgmt_list_cont_gen_cont,drpc_call_free,mgmt__cont_set_owner_req__get_packed_size,setup_get_acl_drpc_call,setup_cont_set_owner_drpc_call,ds_mgmt_drpc_pool_overwrite_acl,setup_exclude_drpc_call,mgmt__prep_shutdown_req__get_packed_size,assert_string_equal,setup_pool_query_drpc_call,new_drpc_call_with_bad_body,mgmt__pool_drain_req__pack,ds_mgmt_drpc_pool_set_prop,mgmt__pool_evict_resp__unpack,mgmt__pool_extend_resp__unpack,mgmt__cont_set_owner_resp__free_unpacked,assert_non_null,mgmt__pool_create_resp__unpack,mgmt__prep_shutdown_req__pack,expect_drpc_list_cont_resp_with_error,daos_acl_get_next_ace,expect_query_resp_with_info,init_test_rebuild_status,mgmt__pool_extend_req__get_packed_size,setup_evict_drpc_call,mgmt__pool_reintegrate_resp__free_unpacked,uuid_unparse,mgmt__pool_set_prop_resp__free_unpacked,ds_mgmt_drpc_pool_create,D_ALLOC,mgmt__list_cont_req__pack,mgmt__pool_query_req__get_packed_size,expect_drpc_evict_resp_with_status,new_access_prop,mgmt__list_cont_resp__unpack,expect_create_resp_with_error,mgmt__daos_resp__unpack,mgmt__cont_set_owner_req__pack,mgmt__get_aclreq__get_packed_size,mgmt__pool_extend_resp__free_unpacked,setup_list_cont_drpc_call,expect_drpc_acl_resp_with_error,mgmt__delete_aclreq__pack,ds_mgmt_drpc_pool_delete_acl,mgmt__pool_exclude_resp__free_unpacked,init_test_pool_info,mgmt__pool_evict_resp__free_unpacked,setup_delete_acl_drpc_call,mgmt__modify_aclreq__get_packed_size,ds_mgmt_drpc_pool_exclude,mgmt__pool_create_req__pack,mgmt__list_cont_resp__free_unpacked,setup_reintegrate_drpc_call,expect_drpc_exclude_resp_with_error,pack_list_cont_req,expect_drpc_pool_set_prop_resp_with_error,mgmt__pool_exclude_req__pack,daos_acl_free,pack_delete_acl_req,mgmt__pool_evict_req__get_packed_size,expect_rebuild_status,pack_pool_extend_req,expect_drpc_drain_resp_with_error,D_FREE,mgmt__pool_query_resp__free_unpacked,ds_mgmt_drpc_prep_shutdown,pack_prep_shutdown_req,D_STRNDUP,mgmt__pool_set_prop_req__pack,pack_pool_drain_req,ds_mgmt_drpc_pool_update_acl,mgmt__pool_set_prop_req__get_packed_size,mgmt__pool_drain_resp__free_unpacked,pack_pool_exclude_req,ds_mgmt_drpc_cont_set_owner,expect_storage_usage,ds_mgmt_drpc_pool_get_acl,pack_pool_create_req,mgmt__pool_set_prop_resp__unpack,mgmt__aclresp__unpack,mgmt__pool_query_req__pack,mgmt__pool_evict_req__pack,setup_modify_acl_drpc_call,get_valid_acl,expect_drpc_reintegrate_resp_with_error,ds_mgmt_drpc_ping_rank,mgmt__pool_reintegrate_req__pack,expect_drpc_pool_set_prop_resp_success,uuid_compare,mgmt__pool_query_resp__unpack,setup_drain_drpc_call,mgmt__pool_reintegrate_req__get_packed_size,mgmt__daos_resp__free_unpacked,mgmt__pool_create_resp__free_unpacked,func,daos_prop_alloc,mgmt__pool_extend_req__pack,mgmt__ping_rank_req__get_packed_size,ds_mgmt_drpc_pool_drain,setup_extend_drpc_call,assert_null,mgmt__cont_set_owner_resp__unpack,ds_mgmt_drpc_pool_query,expect_drpc_acl_resp_success,expect_drpc_list_cont_resp_with_containers,pack_pool_reintegrate_req,mgmt__list_cont_req__get_packed_size,default_access_prop,expect_drpc_pool_query_resp_with_error,mgmt__get_aclreq__pack,mgmt__pool_drain_resp__unpack,mgmt__pool_create_req__get_packed_size,pack_ping_rank_req]] | expect that the response from a pool query is in the correct state. | (style) line over 80 characters |
@@ -0,0 +1,5 @@
+<div class="category-list-item" <% if heading %> data-id="categories_<%= category.id %>"<% end %>>
+ <%= link_to(category.title, admin_category_edit_path(category), :title => "view full details") %>
+</div>
+
+
| [No CFG could be retrieved] | No Summary Found. | It would be better to name this `_category-list-item.html.erb`. |
@@ -21,7 +21,7 @@ module Dependabot
return false unless composer_json.key?("require")
composer_json["require"].keys.any? do |key|
- key != "php" && key !~ COMPOSER_V2_NAME_REGEX
+ key != "php" && key !~ PLATFORM_PACKAGE_REGEX && key !~ COMPOSER_V2_NAME_REGEX
end
end
private_class_method :invalid_v2_requirement?
| [composer_version->[first,invalid_v2_requirement?,new],invalid_v2_requirement?->[any?,key?],freeze,require,private_class_method] | Checks if the given Composer. json has a missing required v2 requirements. | We can remove the hard coded check for php, it's already in the regex |
@@ -324,13 +324,13 @@ func (c *Store) lookupMatchers(ctx context.Context, userID string, from, through
incomingErrors <- err
return
}
- incoming, err := c.lookupEntries(ctx, entries, matcher)
+ incoming, err := c.lookupEntries(ctx, entries, &matcher)
if err != nil {
incomingErrors <- err
} else {
incomingChunkSets <- incoming
}
- }(matcher)
+ }(*matcher)
}
var chunkSets []ByID
| [putChunk->[TimeRequestHistogram,reader,StoreChunkData,Warnf,String,PutObject],putChunks->[putChunk],fetchChunkData->[TimeRequestHistogram,GetObject,Close,decode,String],updateIndex->[BatchWrite,calculateDynamoWrites],lookupMatchers->[GetReadEntriesForMetricLabel,GetReadEntriesForMetricLabelValue,ExtractMetricNameFromMatchers,GetReadEntriesForMetric,lookupEntries],RegisterFlags->[Var,RegisterFlags],calculateDynamoWrites->[NewWriteBatch,Observe,GetWriteEntries,ExtractMetricNameFromMetric,Add],lookupEntry->[Errorf,QueryPages,Sort],Get->[Match,fetchChunkData,SplitFiltersAndMatchers,FetchChunkData,Extract,lookupMatchers,Warnf,Sort,Errorf,StoreChunks],lookupEntries->[lookupEntry],Put->[putChunks,Extract,updateIndex],Match,Value,schemaFactory,NewHashBucketHistogram,Sprintf,RangeValue,ExponentialBuckets,NewHistogramVec,String,NewHistogram,Errorf,Len,MustRegister,Debug] | lookupMatchers returns a list of Chunks that match the given matchers. | Given that this turns out not to matter, and makes the code harder to follow (IMO), should it be reverted? |
@@ -74,6 +74,11 @@ describe TextSentinel do
expect(TextSentinel.new(valid_string.upcase)).not_to be_valid
end
+ it "allows all caps topics when loud posts are allowed" do
+ SiteSetting.stubs(:allow_uppercase_posts).returns(true)
+ expect(TextSentinel.new(valid_string.upcase)).to be_valid
+ end
+
it "enforces the minimum entropy" do
expect(TextSentinel.new(valid_string, min_entropy: 16)).to be_valid
end
| [to,context,let,describe,not_to,returns,eq,each,it,require] | generates enough entropy for short foreign strings and repeated foreign characters enforces the minimum entropy and allows all foreign characters. | Instead of mocking here, could you just say `SiteSetting.allow_uppercase_posts = true`? We reset changes to site settings after every test. |
@@ -182,6 +182,14 @@ class PlainTextReporter(PlainTextReporterBase):
self.flush()
def emit(self, s, dest=ReporterDestination.OUT):
+ # In Py2, sys.stdout tries to coerce into ASCII, and will fail in coercing Unicode. So,
+ # we encode prematurely to handle unicode.
+ # In Py3, sys.stdout takes unicode, so will work normally.
+ #
+ # `self.settings.outfile` can also be `io.StringIO` instead of an std stream, in which case it only
+ # accepts unicode, so `s` does not need to be modified.
+ if PY2 and 'std' in str(self.settings.outfile):
+ s = s.encode('utf-8')
if dest == ReporterDestination.OUT:
self.settings.outfile.write(s)
elif dest == ReporterDestination.ERR:
| [PlainTextReporter->[_get_label_format->[_get_label_format],_prefix->[replace->[replace,_indent],replace],_show_output->[_get_tool_output_format],__init__->[keys],_emit_indented_workunit_label->[emit],flush->[flush]]] | Write a sequence of bytes to the file specified by dest. | It would be good to loop back and see whether there is a more reliable way to do this... would you mind including a TODO in your next PR? |
@@ -478,6 +478,16 @@ func (b *cloudBackend) Logout() error {
return workspace.DeleteAccessToken(b.CloudURL())
}
+// DoesProjectExist returns true if a project with the given name exists in this backend, or false otherwise.
+func (b *cloudBackend) DoesProjectExist(ctx context.Context, projectName string) (bool, error) {
+ owner, err := b.client.GetPulumiAccountName(ctx)
+ if err != nil {
+ return false, err
+ }
+
+ return b.client.DoesProjectExist(ctx, owner, projectName)
+}
+
func (b *cloudBackend) GetStack(ctx context.Context, stackRef backend.StackReference) (backend.Stack, error) {
stackID, err := b.getCloudStackIdentifier(stackRef)
if err != nil {
| [GetStack->[GetStack],RenameStack->[RenameStack],GetLogs->[GetStack],CloudConsoleURL->[CloudURL],tryNextUpdate->[CloudURL],GetPolicyPack->[CloudURL,Name,parsePolicyPackReference],CancelCurrentUpdate->[GetStack],GetLatestConfiguration->[GetLatestConfiguration],GetStackTags->[GetStack],GetStackResourceOutputs->[GetStackResourceOutputs],query->[Query],Query->[GetStack],GetStackOutputs->[GetStackOutputs],apply->[cloudConsoleStackPath,CloudConsoleURL,createAndStartUpdate],CreateStack->[CreateStack],runEngineAction->[Refresh,Update,Destroy],ListStacks->[ListStacks],Logout->[CloudURL],UpdateStackTags->[UpdateStackTags,getCloudStackIdentifier],GetStack] | Logout returns a stack with the given id. | When we get to adding the ideal experience for #2421 (prompting for the owner), I think we'll need to modify this to allow passing the owner to `DoesProjectExist` since this is always only checking if the project exists in the user's account. |
@@ -159,6 +159,10 @@ module ApplicationHelper
end
end
+ def show_logo(logo)
+ logo.presence || SiteConfig.logo_png
+ end
+
def community_name
@community_name ||= ApplicationConfig["COMMUNITY_NAME"]
end
| [title_with_timeframe->[title],sanitized_referer->[sanitized_referer]] | Returns an SVG tag that can be used to display a logo or a community. | I was wondering if we want to rename this to `logo_url`, since that's what the params represent and what this method returns. Maybe we could even make it a bit more explicit that there's a sensible default, i.e. `safe_logo_url` or something like that. |
@@ -216,6 +216,11 @@ namespace Dynamo.Controls
Vector v = start - e.GetPosition(this);
tt.X = origin.X - v.X;
tt.Y = origin.Y - v.Y;
+
+ // Reset Fit View Toggle
+ WorkspaceViewModel vm = DataContext as WorkspaceViewModel;
+ if (vm.ResetFitViewToggleCommand.CanExecute(null))
+ vm.ResetFitViewToggleCommand.Execute(null);
}
}
}
| [ZoomBorder->[IncrementTranslateOrigin->[GetTranslateTransform,Y,X],child_MouseMove->[IsMouseCaptured,GetPosition,X,GetTranslateTransform,Y],Reset->[ScaleY,ScaleX,X,GetScaleTransform,GetTranslateTransform,Y],child_MouseWheel->[GetPosition,Delta,OnRequestZoomToViewportPoint],TranslateTransform->[GetTranslateTransform,First],child_MouseDown->[GetPosition,X,Left,ChangedButton,Cursor,CaptureMouse,GetTranslateTransform,Middle,Y,HandPanActive],Point->[GetTranslateTransform,Y,X],SetTranslateTransformOrigin->[GetTranslateTransform,Y,X],ScaleTransform->[GetScaleTransform,First],Initialize->[PreviewMouseUp,PreviewMouseDown,RenderTransformOrigin,MouseWheel,RenderTransform,MouseMove,child,Add],SetZoom->[GetScaleTransform,ScaleY,ScaleX],child_MouseUp->[Left,Cursor,ChangedButton,HandPan,Arrow,Middle,ReleaseMouseCapture],Cursor,HandPan,Arrow,Initialize,Child]] | Mouse move event handler for child. | Please put a safety check/assersion in here to protect against vm being null. If yu're certain that it's a WVM, you should cast it, not use an 'as'. If you're not, then you need to check otherwise you'll through a Null Ref exception |
@@ -100,6 +100,15 @@ def test_plot_epochs():
plt.close('all')
+def test_plot_concat():
+ """ Test concatenated epoch plotting
+ """
+ import matplotlib.pyplot as plt
+ epochs = _get_epochs()
+ epochs.plot_concat(picks=[0, 2, 3], scalings=None, title_str='%s')
+ plt.close('all')
+
+
def test_plot_image_epochs():
"""Test plotting of epochs image
"""
| [test_plot_image_epochs->[_get_epochs],test_plot_drop_log->[_get_epochs],_get_epochs->[_get_picks,_get_raw,_get_events],_get_epochs_delayed_ssp->[_get_picks,_get_raw,_get_events],test_plot_psd_epochs->[_get_epochs],test_plot_epochs->[_get_epochs]] | Test plotting of epochs image . | you can save this line by appending it to the previous one. |
@@ -61,7 +61,7 @@ class SpanConstituencyParser(Model):
encoder : ``Seq2SeqEncoder``, required.
The encoder that we will use in between embedding tokens and
generating span representations.
- feedforward_layer : ``FeedForward``, required.
+ feedforward : ``FeedForward``, required.
The FeedForward layer that we will use in between the encoder and the linear
projection to a distribution over span labels.
pos_tag_embedding : ``Embedding``, optional.
| [SpanConstituencyParser->[construct_trees->[SpanInformation],from_params->[from_params],construct_tree_from_spans->[assemble_subtree->[assemble_subtree],assemble_subtree]]] | A class that can be used to parse a sequence of text and produce a label for each Initialize the SpanConstituencyParser. | This will break existing models in the demo - you'll need to update it manually |
@@ -520,10 +520,12 @@ func (t *Team) sigChangeItem(ctx context.Context, section SCTeamSection, linkTyp
Type: string(linkType),
SigInner: string(sigJSON),
TeamID: t.Chain.GetID(),
- PublicKeys: &libkb.SigMultiItemPublicKeys{
+ }
+ if linkType != libkb.LinkTypeLeave {
+ sigMultiItem.PublicKeys = &libkb.SigMultiItemPublicKeys{
Encryption: encryptionKey.GetKID(),
Signing: signingKey.GetKID(),
- },
+ }
}
return sigMultiItem, nil
}
| [AllApplicationKeys->[SharedSecretAllGenerations],rotateBoxes->[Members],ApplicationKey->[SharedSecret],Rotate->[SharedSecret],ChangeMembership->[getDowngradedUsers],sigChangeItem->[NextSeqno,loadMe],SharedSecret->[SharedSecret],changeMembershipSection->[SharedSecret,getAdminPermission],Members->[UsersWithRole],getDowngradedUsers->[isAdminOrOwner]] | sigChangeItem creates a sig for a new item in the given section. recipientBoxes creates a multi - item signature for the given recipient set. Get the shared secret boxes for the device. | can just say `if encryptKey != nil && signingKey != nil { ....` |
@@ -34,7 +34,7 @@ public abstract class AbstractTicket implements Ticket, TicketState {
* The {@link ExpirationPolicy} this is associated with.
**/
@Lob
- @Column(name="EXPIRATION_POLICY", length = 1000000, nullable=false)
+ @Column(name="EXPIRATION_POLICY", length = Integer.MAX_VALUE, nullable=false)
private ExpirationPolicy expirationPolicy;
/** The unique identifier for this ticket. */
| [AbstractTicket->[toString->[getId],isExpired->[isExpired,getGrantingTicket]]] | Abstract ticket implementation for a ticket. - The number of times this ticket was used. | Don't tell me we effectively reached the previous maximum? |
@@ -3876,8 +3876,15 @@ public final class String implements Serializable, Comparable<String>, CharSeque
@Override
public IntStream chars() {
- /* Following generic CharSequence method invoking need to be updated with optimized implementation specifically for this class */
- return CharSequence.super.chars();
+ final int len = lengthInternal();
+ char charBuff[] = new char[len];
+ getCharsNoBoundChecks(0, len, charBuff, 0);
+ int intBuff[] = new int[len];
+ for (int i = 0; i < len; ++i) {
+ intBuff[i] = charBuff[i];
+ }
+ return StreamSupport.intStream(Spliterators.spliterator(intBuff,Spliterator.IMMUTABLE | Spliterator.ORDERED),
+ false);
}
@Override
| [String->[contains->[charAtInternal,charAt,lengthInternal,length,indexOf],lastIndexOf->[charAtInternal,lastIndexOf,lengthInternal,codePointAt,String],getBytes->[lengthInternal,compress,compressedArrayCopy,decompress],replaceAll->[charAtInternal,replaceAll,isCompressed,lengthInternal,checkLastChar,hasMetaChars,String],equals->[regionMatchesInternal,deduplicateStrings,lengthInternal],join->[toString],endsWith->[regionMatches,lengthInternal],substring->[String,lengthInternal],regionMatchesInternal->[charAtInternal],offsetByCodePoints->[charAtInternal,lengthInternal],hashCode->[hashCodeImplCompressed,hashCodeImplDecompressed,lengthInternal],convertSigma->[lengthInternal,isWordStart,isWordPart,codePointAt,codePointBefore],repeat->[lengthInternal,decompressedArrayCopy,isEmpty,String,compressedArrayCopy],charAt->[lengthInternal],compareToIgnoreCase->[charAtInternal,lengthInternal,compareValue],toUpperCase->[isEmpty,toUpperCase,String,lengthInternal],isEmpty->[lengthInternal],isCombiningAbove->[binarySearchRange],chars->[chars],subSequence->[substring],valueOfCodePoint->[toString,String],concat->[lengthInternal,decompress,decompressedArrayCopy,String,compressedArrayCopy],codePointCount->[charAtInternal,lengthInternal],codePoints->[codePoints],stripTrailing->[stripTrailing],compareTo->[charAtInternal,lengthInternal],hasMetaChars->[charAtInternal,lengthInternal],startsWith->[charAtInternal,regionMatches,lengthInternal,length,startsWith],replace->[charAt,lengthInternal,decompressedArrayCopy,length,decompress,substring,indexOf,toString,String,compressedArrayCopy],UnsafeHelpers->[getValueFieldOffset],regionMatches->[charAtInternal,regionMatches,lengthInternal,regionMatchesInternal,toUpperCase,toLowerCase],toCharArray->[lengthInternal,decompress,decompressedArrayCopy],format->[toString],stripLeading->[stripLeading],initCompressionFlag->[StringCompressionFlag],checkBoundsBeginEnd->[newStringIndexOutOfBoundsException],cachedConstantString->[String],length->[lengthInternal],matches->[matches],contentEquals->[charAtInternal,regionMatches,lengthInternal,isCompressed,length,contentEquals,charAt,String],replaceFirst->[replaceFirst],codePointAt->[charAtInternal,lengthInternal],equalsIgnoreCase->[charAtInternal,toUpperCase,lengthInternal,toLowerCase],getCharsNoBoundChecks->[decompress,decompressedArrayCopy],strip->[strip],lines->[lines],trim->[charAtInternal,String,lengthInternal],toLowerCaseCore->[charAtInternal,lengthInternal,codePointAt,toLowerCase,toString],split->[charAtInternal,lengthInternal,split,hasMetaChars,String],CaseInsensitiveComparator->[compare->[compareToIgnoreCase]],getChars->[getCharsNoBoundChecks,lengthInternal,decompress],isBlank->[lengthInternal],compareValue->[toLowerCase,toUpperCase],indexOf->[charAtInternal,lengthInternal,length,codePointAt,indexOf],toLowerCase->[isEmpty,toLowerCase,String,lengthInternal],copyValueOf->[String],toUpperCaseCore->[charAtInternal,lengthInternal,upperIndex,codePointAt,charAt,toUpperCase,toString,indexOf],codePointBefore->[charAtInternal,lengthInternal],valueOf->[toString,String],lengthInternal,isCompressed,compress,initCompressionFlag,length,decompress,CaseInsensitiveComparator,compressible,decompressedArrayCopy,toString,compressedArrayCopy]] | Overrides the Char or CodePoint methods of this class. | Rather than copying the characters, we could return a stream based on either a byte or char spliterator which access the underlying data. As is, an ASCII string requires 6 times additional space and a lot of copying before returning. |
@@ -242,6 +242,8 @@ class _RetryQueue(Runnable):
self.transport._send_raw(self.receiver, "\n".join(message_texts))
def _run(self):
+ msg = f"_RetryQueue started before transport._raiden_service is set"
+ assert self.transport._raiden_service is not None, msg
self.greenlet.name = (
f"RetryQueue "
f"node:{pex(self.transport._raiden_service.address)} "
| [_RetryQueue->[enqueue->[_expiration_generator,_MessageData],_run->[_check_and_send],enqueue_global->[enqueue],_check_and_send->[message_is_in_queue]],MatrixTransport->[_send_with_retry->[enqueue,_get_retrier],_handle_to_device_message->[_receive_to_device,_get_user],send_to_device->[send_to_device],_get_retrier->[start,_RetryQueue],stop->[notify],start->[start],start_health_check->[whitelist],_global_send_worker->[_send_global],_address_reachability_changed->[notify],_leave_unused_rooms->[leave->[leave],_spawn],_user_presence_changed->[_spawn],_receive_message->[enqueue_global]]] | Run the task loop until the transport is stopped. | What do you think about adding adding a few more conditions here, i.e. use the new `self._started ` and check that all Semaphores are released? |
@@ -399,7 +399,7 @@ func resourceAwsS3BucketObjectRead(d *schema.ResourceData, meta interface{}) err
// The "STANDARD" (which is also the default) storage
// class when set would not be included in the results.
d.Set("storage_class", s3.StorageClassStandard)
- if resp.StorageClass != nil {
+ if resp.StorageClass != nil { // nosem: helper-schema-ResourceData-Set-extraneous-nil-check
d.Set("storage_class", resp.StorageClass)
}
| [ListObjectVersionsPages,Before,DescribeKey,GetChange,IgnoreAws,IsNewResource,Close,ObjectLockLegalHoldStatus_Values,StringInSlice,SetNewComputed,PutObjectAcl,NonRetryableError,Set,Format,GetOk,TimedOut,New,HasChange,HasChanges,Sequence,ServerSideEncryption_Values,Errorf,SetId,MustCompile,ObjectStorageClass_Values,RetryableError,Bool,Time,RemoveDefaultConfig,MergeTags,HeadObject,IgnoreConfig,S3ObjectUpdateTags,ToLower,Id,DecodeString,ObjectLockMode_Values,Get,ObjectCannedACL_Values,S3ObjectListTags,Map,TrimLeft,PutObjectRetention,Printf,PutObjectLegalHold,StringValue,Expand,ReplaceAllString,NewReader,DeleteObject,String,Parse,Open,UrlEncode,Retry,PutObject,Trim] | region Object Object Metadata tags - list object with tags. | And this is the same logic as its datasource counterpart, so checks could be reversed. |
@@ -103,6 +103,7 @@ static void *provider_store_new(OPENSSL_CTX *ctx)
provider_store_free(store);
return NULL;
}
+ store->libctx = ctx;
store->use_fallbacks = 1;
for (p = predefined_providers; p->name != NULL; p++) {
| [No CFG could be retrieved] | This function compares two OSSL providers. get the provider store. | You aren't using this anywhere as far as I can see. I suppose that was earlier experimentation? |
@@ -145,7 +145,13 @@ public abstract class HttpContentDecoder extends MessageToMessageDecoder<HttpObj
if (decoder == null) {
out.add(c.retain());
} else {
- decodeContent(c, out);
+ try {
+ decodeContent(c, out);
+ } finally {
+ if (!needRead) {
+ needRead = out.isEmpty();
+ }
+ }
}
}
}
| [HttpContentDecoder->[handlerRemoved->[handlerRemoved],channelInactive->[channelInactive],decodeContent->[decode],cleanupSafely->[cleanup],handlerAdded->[handlerAdded]]] | Decodes the given message. Decodes the message and writes it to out. | I think this variable handling is inverted. `needRead` should start as `true`, and if `!out.isEmpty()` it should be set to `false`. Then in channelReadComplete() it should be set to `true` again. If a read() causes three ByteBufs to be read (because using DefaultMaxBytesRecvByteBufAllocator), which calls decode() three times, the first two times may not put anything in `out` but the last decode does place something in `out`. It seems in that case we shouldn't call read. But there's also the case where the _second_ bytebuf placed something in `out`. That seems like it shouldn't call read either. |
@@ -1,7 +1,4 @@
class OrganizationMembership < ApplicationRecord
- # TODO: [@rhymes] remove this column, it is unused
- self.ignored_columns = [:user_title]
-
belongs_to :user
belongs_to :organization
| [OrganizationMembership->[upsert_chat_channel_membership->[call,slug,find_by,add_chat_channel_membership],update_user_organization_info_updated_at->[touch],add_chat_channel_membership->[role,save,id,find_or_initialize_by],freeze,belongs_to,after_save,ignored_columns,validates,after_create,after_destroy]] | This class is used to manage private group memberships. It is used to manage private group. | Verified via Blazer that this column is unused, so we're dropping it. |
@@ -21,10 +21,6 @@ import java.util.Map;
import java.util.Optional;
import java.util.Properties;
-import org.apache.commons.lang3.NotImplementedException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
/**
* Archive deployer for domains.
* <p/>
| [DomainArchiveDeployer->[getArtifactsZombieMap->[getArtifactsZombieMap],setArtifactFactory->[setArtifactFactory],undeployArtifact->[undeployArtifact],findApplicationsAssociated->[findApplicationsAssociated],getDeploymentDirectory->[getDeploymentDirectory],deployPackagedArtifact->[deployPackagedArtifact],deployExplodedArtifact->[deployExplodedArtifact],redeploy->[redeploy],setDeploymentListener->[setDeploymentListener],deployArtifact->[deployArtifact]]] | Package that provides a package that can be used to deploy and undeploy a domain and a This method is called by the applicationDeployer and deploymentService to check if the given artifact. | why move this? |
@@ -48,6 +48,11 @@ const (
NodeLeader // Node is the leader of some shard.
)
+const (
+ // TxPoolLimit is the limit of transaction pool.
+ TxPoolLimit = 20000
+)
+
func (state State) String() string {
switch state {
case NodeInit:
| [InitShardState->[Beaconchain],AddPendingTransaction->[addPendingTransactions],countNumTransactionsInBlockchain->[Blockchain],Blockchain,Beaconchain] | String returns a string representation of the state. | Can we make it bigger? what's the proper number? |
@@ -1610,5 +1610,7 @@ class BattleExtendedDelegateState implements Serializable {
boolean m_needToRecordBattleStatistics;
boolean m_needToCheckDefendingPlanesCanLand;
boolean m_needToCleanup;
+ boolean m_needToDoRockets;
+ RocketsFireHelper rocketHelper;
IBattle m_currentBattle;
}
| [BattleDelegate->[loadState->[loadState],saveState->[saveState],addBombardmentSources->[isShoreBombardPerGroundUnitRestricted],markDamaged->[markDamaged],getMaxScrambleCount->[getMaxScrambleCount],end->[end],start->[start],resetMaxScrambleCount->[getMaxScrambleCount],clearEmptyAirBattleAttacks->[clearEmptyAirBattleAttacks],setupUnitsInSameTerritoryBattles->[landParatroopers],setDelegateBridgeAndPlayer->[setDelegateBridgeAndPlayer],selectBombardingBattle->[isShoreBombardPerGroundUnitRestricted]]] | return true if the current battle is a new battle and false if it. | This is very likely to make this a non-backwards compatible change. |
@@ -21,7 +21,7 @@ import java.util.List;
import org.apache.activemq.artemis.core.filter.Filter;
import org.apache.activemq.artemis.spi.core.protocol.SessionCallback;
-public interface Consumer {
+public interface Consumer extends PriorityAware {
/**
*
| [No CFG could be retrieved] | This method is used to handle a single message reference. proceedDeliver is called when a message has not been delivered to the consumer. | Just a design q: why using a specific `PriorityAware` interface? I'm assuming that we can't have anymore a `Consumer` that doesn't provide a `default int getPriority()` |
@@ -56,9 +56,9 @@ setInterval(function() {
}
}, 1000);
-const middleware = [];
+const middleware = [app];
if (!quiet) {
- middleware.push(morgan('dev'), app);
+ middleware.push(morgan('dev'));
}
if (sendCachingHeaders) {
middleware.push(header({
| [No CFG could be retrieved] | Start the process. | Did you make sure that it's only `morgan('dev')` that's responsible for the URL switching? |
@@ -285,11 +285,13 @@ def get_supported(versions=None, noarch=False, platform=None,
# support macosx-10.6-intel on macosx-10.9-x86_64
match = _osx_arch_pat.match(arch)
if match:
- name, major, minor, actual_arch = match.groups()
+ # # https://github.com/python/mypy/issues/1174
+ name, major, minor, actual_arch = match.groups() # type: ignore # noqa: E501
tpl = '{}_{}_%i_%s'.format(name, major)
arches = []
for m in reversed(range(int(minor) + 1)):
- for a in get_darwin_arches(int(major), m, actual_arch):
+ # https://github.com/python/mypy/issues/1174
+ for a in get_darwin_arches(int(major), m, actual_arch): # type: ignore # noqa: E501
arches.append(tpl % (m, a))
else:
# arch pattern didn't match (?!)
| [get_impl_tag->[get_impl_ver,get_abbr_impl],get_abi_tag->[get_impl_ver,get_flag,get_abbr_impl,get_config_var],get_impl_ver->[get_abbr_impl,get_config_var],get_platform->[get_platform,_is_running_32bit],is_manylinux2010_compatible->[get_platform],get_darwin_arches->[_supports_arch->[_supports_arch],_supports_arch],get_supported->[get_abi_tag,get_platform,get_darwin_arches,is_manylinux2010_compatible,is_manylinux1_compatible,get_impl_version_info,get_abbr_impl],get_flag->[get_config_var],is_manylinux1_compatible->[get_platform],get_config_var->[get_config_var],get_impl_version_info->[get_abbr_impl],get_impl_tag] | Return a list of supported tags for each version specified in versions. This function returns a list of all possible missing items in a system. Returns a list of all possible cross - version compatible C ++ objects. | Again, please try avoiding `# noqa`. |
@@ -227,6 +227,13 @@ public abstract class BaseLivyInterprereter extends Interpreter {
}
Thread.sleep(pullStatusInterval);
sessionInfo = getSessionInfo(sessionInfo.id);
+ LOGGER.info("Session {} is in state {}, appId {}", sessionInfo.id, sessionInfo.state,
+ sessionInfo.appId);
+ if (sessionInfo.isFinished()) {
+ String msg = "Session " + sessionInfo.id + " is finished, appId: " + sessionInfo.appId
+ + ", log: " + sessionInfo.log;
+ throw new LivyException(msg);
+ }
}
return sessionInfo;
} catch (Exception e) {
| [BaseLivyInterprereter->[createSession->[getSessionInfo],CreateSessionRequest->[toJson->[toJson]],isSessionExpired->[getSessionInfo],LivyVersionResponse->[fromJson->[fromJson]],StatementInfo->[fromJson->[fromJson],StatementOutput->[toJson->[toJson]]],initLivySession->[getSessionKind],callRestAPI->[callRestAPI,getRestTemplate],ExecuteRequest->[toJson->[toJson]],SessionInfo->[fromJson->[fromJson]],closeSession->[callRestAPI],interpret->[initLivySession,interpret]]] | Creates a new session for the given user. | Just move the logging for more clean logging. |
@@ -9,10 +9,11 @@ from gevent.timeout import Timeout
from raiden.app import App
from raiden.constants import EMPTY_SIGNATURE, UINT64_MAX
from raiden.message_handler import MessageHandler
-from raiden.messages.abstract import Message
+from raiden.messages.abstract import SignedMessage
from raiden.messages.decode import balanceproof_from_envelope
from raiden.messages.metadata import Metadata, RouteMetadata
from raiden.messages.transfers import LockedTransfer, LockExpired, Unlock
+from raiden.messages.transfers import Lock, LockedTransfer, LockExpired, Unlock
from raiden.storage.restore import (
get_event_with_balance_proof_by_balance_hash,
get_state_change_with_balance_proof_by_locksroot,
| [assert_synced_channel_state->[assert_channel_values,assert_deposit,assert_balance_proof]] | Utilities to make and assert transfers. Imports a set of objects from raiden. utils. signer. Signer. | Duplicate names imported (see one line above). |
@@ -0,0 +1,15 @@
+module Reactions
+ class UpdateReactableWorker
+ include Sidekiq::Worker
+
+ sidekiq_options queue: :low_priority, retry: 10
+
+ def perform(reaction_id)
+ reaction = Reaction.find_by(id: reaction_id)
+ return unless reaction&.reactable
+
+ reaction.reactable.touch_by_reaction if reaction.reactable.respond_to?(:touch_by_reaction)
+ reaction.reactable.sync_reactions_count if rand(6) == 1 && reaction.reactable.respond_to?(:sync_reactions_count)
+ end
+ end
+end
| [No CFG could be retrieved] | No Summary Found. | I would raise the priority, what do you think @mstruve ? |
@@ -140,7 +140,7 @@ namespace System.Xml
public abstract int Depth { get; }
// Gets the base URI of the current node.
- public abstract string? BaseURI { get; }
+ public abstract string BaseURI { get; }
// Gets a value indicating whether the current node is an empty element (for example, <MyElement/>).
public abstract bool IsEmptyElement { get; }
| [XmlReader->[WriteAttributeValue->[MoveToAttribute,ReadAttributeValue],ReadToFollowing->[Read],ReadElementString->[ReadString,Read],XmlNodeType->[Read,MoveToElement],XmlReaderDebuggerDisplayProxy->[ToString->[ToString,GetAttribute]],ReadEndElement->[Read],ReadOuterXml->[WriteNode,Read,Close,WriteAttributeValue],ReadString->[Read,MoveToElement],ReadInnerXml->[Read,Close],ReadElementContentAsDecimal->[ReadContentAsDecimal,ReadElementContentAsDecimal],ReadElementContentAsObject->[ReadContentAsObject,ReadElementContentAsObject],ReadElementContentAsLong->[ReadElementContentAsLong,ReadContentAsLong],ReadStartElement->[Read],ReadElementContentAsFloat->[ReadElementContentAsFloat,ReadContentAsFloat],ReadElementContentAsInt->[ReadElementContentAsInt,ReadContentAsInt],ReadElementContentAs->[ReadContentAs,ReadElementContentAs],ReadElementContentAsString->[ReadElementContentAsString,ReadContentAsString],SetupReadElementContentAsXxx->[Read],ReadElementContentAsDouble->[ReadElementContentAsDouble,ReadContentAsDouble],InternalReadContentAsString->[ReadAttributeValue,Read,ResolveEntity],ReadToDescendant->[Read],CanReadContentAs->[CanReadContentAs],FinishReadElementContentAsXxx->[Read],SkipSubtree->[Read,MoveToElement],WriteNode->[Read,GetAttribute],ReadElementContentAsBoolean->[ReadContentAsBoolean,ReadElementContentAsBoolean],Dispose->[Close,Dispose],GetAttribute]] | XML Node abstract methods Gets the type of the current n - tuple scope. | Doesn't the ref need to be updated as well? |
@@ -469,9 +469,12 @@ class Flow:
self.tasks.add(task)
self._cache.clear()
- case = prefect.context.get("case", None)
- if case is not None:
- case.add_task(task, self)
+ # Parameters must be root tasks
+ # All other new tasks should be added to the current case (if any)
+ if not isinstance(task, Parameter):
+ case = prefect.context.get("case", None)
+ if case is not None:
+ case.add_task(task, self)
return task
| [Flow->[_run->[copy,update],reference_tasks->[terminal_tasks],chain->[add_edge],downstream_tasks->[edges_from],add_edge->[copy,add_task],register->[register,update],copy->[copy],upstream_tasks->[edges_to],update->[add_edge,add_task,update],run->[parameters,_run],edges_from->[all_downstream_edges],visualize->[get_color,edges_to],load->[load],_sorted_tasks->[copy,upstream_tasks,downstream_tasks,update],__exit__->[__exit__],__enter__->[__enter__,_flow_context],edges_to->[all_upstream_edges],set_dependencies->[add_edge,add_task],add_task->[add_task],validate->[reference_tasks],serialize->[validate,update]]] | Adds a task to the flow if it does not already exist. A base class method for creating a object. | I put this check here rather than in the `case` class since the check preventing `Parameter` upstream tasks is also handled in the `Flow` class. Made sense to keep things together. |
@@ -327,6 +327,10 @@ def concat(input, axis=0, name=None):
out = helper.create_variable_for_type_inference(dtype=helper.input_dtype())
if input[0].desc.type() == core.VarDesc.VarType.LOD_TENSOR_ARRAY:
+ # NOTE(liym27): Don't remove this if branch!
+ # This feature is supported for Dynamic-to-Static, because after transformed, the type of inputs[0] is LOD_TENSOR_ARRAY in some scenarios.
+ # But it's not recommended for users to use this feature in static mode.
+
assert len(input) == 1, "If the elements of 'input' in concat are Variable(LoDTensorArray), " \
"number of the elements must be 1, but received %s." % len(input)
out_index = helper.create_variable_for_type_inference(dtype="int32")
| [create_parameter->[create_parameter],zeros->[fill_constant],concat->[concat],range->[range,cast,fill_constant],eye->[eye],ones->[fill_constant],linspace->[linspace,fill_constant],diag->[assign],triu->[triu],cast->[cast],fill_constant->[cast,fill_constant]] | This OP concatenates the input along the axis and returns a new tensor with the whole sequence Computes the non - negative negative negative negative negative negative negative negative negative negative negative positive and positive Concatenate the sequence of nodes in the network. | Delete "not recommended for users". In my understanding, user still needs TensorArray at some time. |
@@ -188,4 +188,18 @@ public class FileSourceDto {
this.updatedAt = updatedAt;
return this;
}
+
+ public String getDataType() {
+ return dataType;
+ }
+
+ public FileSourceDto setDataType(String dataType) {
+ this.dataType = dataType;
+ return this;
+ }
+
+ public static class Type {
+ public static final String SOURCE = "SOURCE";
+ public static final String TEST = "TEST";
+ }
}
| [FileSourceDto->[decodeData->[parseFrom,LZ4BlockInputStream,decodeData,IllegalStateException,closeQuietly,ByteArrayInputStream],getData->[decodeData],encodeData->[IllegalStateException,toByteArray,closeQuietly,LZ4BlockOutputStream,ByteArrayOutputStream,close,writeTo],setData->[encodeData]]] | set updatedAt - Timestamp when source was updated. | As it's only used in internal, why not use an enum ? |
@@ -75,6 +75,11 @@ public class ImageDeployedEventMessageAction implements MessageAction {
LOG.info("System image of minion id '" + m.getId() + "' has changed. Re-applying activation key," +
" subscribing to channels and executing post-registration tasks.");
ValueMap grains = imageDeployedEvent.getGrains();
+
+ grains.getOptionalAsString("osarch").ifPresent(osarch -> {
+ m.setServerArch(ServerFactory.lookupServerArchByLabel(osarch + "-redhat-linux"));
+ });
+
Optional<String> activationKeyLabel = grains
.getMap("susemanager")
.flatMap(suma -> suma.getOptionalAsString("activation_key"));
| [ImageDeployedEventMessageAction->[execute->[getMachineId,applyActivationKeyProperties,flatMap,isPresent,getGrains,getOptionalAsString,finishRegistration,subscribeMinionToChannels,empty,ifPresent,warn,getId,info,clear,getImageDeployedEvent,map],getLogger]] | Execute post - registration tasks. | Will this never happen for Ubuntu/Debian? |
@@ -70,8 +70,10 @@ def unique_file(path, mode=0o777):
try:
file_d = os.open(fname, os.O_CREAT | os.O_EXCL | os.O_RDWR, mode)
return os.fdopen(file_d, "w"), fname
- except OSError:
- pass
+ except OSError, e:
+ # "File exists," is okay, try a different name.
+ if exception.errno != errno.EEXIST:
+ raise
count += 1
| [make_or_verify_dir->[LetsEncryptClientError,makedirs,check_permissions],check_permissions->[stat,S_IMODE],safely_remove->[remove],unique_file->[fdopen,open,split,join],namedtuple] | Safely finds a unique file for writing only. | `except OSError as error`, the above is deprecated syntax and `e` is too short variable name (pylint should complain) |
@@ -23,6 +23,9 @@ module Upaya
)
IdentityConfig.build_store(configuration)
+ AssetSources.manifest_path = Rails.root.join('public', 'packs', 'manifest.json')
+ AssetSources.cache_manifest = Rails.env.production?
+
console do
if ENV['ALLOW_CONSOLE_DB_WRITE_ACCESS'] != 'true' &&
IdentityConfig.store.database_readonly_username.present? &&
| [Application->[fetch,new,formatter,allow,retry_on_unhandled_error,belongs_to_required_by_default,read_configuration,queue_adapter,enable_cron,join,warn,build_store,any?,load_path,mkdir_p,domain_name,default_options,poll_interval,env,compact,log_formatter,use,unknown_asset_fallback,time_zone,good_job_queues,logger,execution_mode,require,origins,notice_error,queues,to_s,enable_rate_limiting,good_job_max_threads,squish,per_form_csrf_tokens,test?,resource,default_url_options,default_locale,legacy_connection_handling,present?,development?,delete,active_record_parent_class,split,insert_before,max_threads,raise,on_thread_error,available_locales,load_defaults,establish_connection,urlsafe_csrf_tokens,minutes,console],groups,freeze,require_relative,require] | The main entry point for the railtie application. This function is used to configure the active_job. | @mitchellhenke Thoughts on caching in `Rails.env.test?` as well? Might help a little with feature tests in CI. |
@@ -157,12 +157,12 @@ int main(int argc, char *argv[]) {
// *****************(can be user specified)******************
int maxits = dim/blocksize; // maximum number of iterations to run
int numBlocks = 100;
- int numRecycledBlocks = 80;
+ int numRecycledBlocks = 20;
int numIters1, numIters2, numIters3;
ParameterList belosList;
belosList.set( "Maximum Iterations", maxits ); // Maximum number of iterations allowed
belosList.set( "Convergence Tolerance", tol ); // Relative convergence tolerance requested
- belosList.set( "Verbosity", Belos::Errors + Belos::Warnings + Belos::StatusTestDetails);
+ belosList.set( "Verbosity", Belos::Errors + Belos::Warnings + Belos::StatusTestDetails + Belos::TimingDetails);
belosList.set( "Num Blocks", numBlocks );
belosList.set( "Num Recycled Blocks", numRecycledBlocks );
// Construct the right-hand side and solution multivectors.
| [No CFG could be retrieved] | Construct the problem matrix and return the result. - - - - - - - - - - - - - - - - - -. | This is a non-backward compatible change, no? |
@@ -247,6 +247,10 @@ func initRunner(tester IntegrationTester, dir string, passInEnv map[string]strin
env["MAGEFILE_VERBOSE"] = "1"
}
+ if runtime.GOOS == "windows" {
+ env["TEST_COVERAGE"] = "false"
+ }
+
runner := &IntegrationRunner{
steps: runnerSteps,
tester: tester,
| [teardownFrom->[Teardown,Name],Setup->[Name,Setup],Test->[Teardown,Name,Setup,Test],Name] | NewDockerIntegrationRunner creates a new integration runner that runs on the docker host. check if a test run is missing requirements and if so mark it as failed. | Why disable coverage information for integration tests? I though system tests are the only problem. We might also want to test the architecture. AFIAK only 32bit windows is having problems, right? |
@@ -328,6 +328,13 @@ class BOHB(MsgDispatcherBase):
# config generator
self.cg = None
+ # record the latest parameter_id of the trial job trial_job_id.
+ # if there is no running parameter_id, self.job_id_para_id_map[trial_job_id] == None
+ # new trial job is added to this dict and finished trial job is removed from it.
+ self.job_id_para_id_map = dict()
+ # record the unsatisfied parameter request from trial jobs
+ self.unsatisfied_jobs = []
+
def load_checkpoint(self):
pass
| [Bracket->[inform_trial_end->[get_n_r,create_bracket_parameter_id],_record_hyper_configs->[increase_i],get_hyperparameter_configurations->[create_bracket_parameter_id]],BOHB->[handle_trial_end->[_request_one_trial_job,generate_new_bracket],generate_new_bracket->[Bracket]],create_bracket_parameter_id->[create_parameter_id]] | Initialize the Bahb class with the given parameters and parameters. | load_checkpoint and save_checkpoint can be removed if they are empty. |
@@ -945,9 +945,10 @@ EOT;
}
echo \WP_CLI\Utils\mustache_render( 'versions.mustache', array(
- 'wp-version' => $details['wp_version'],
- 'db-version' => $details['wp_db_version'],
- 'mce-version' => ( $human_readable_tiny_mce ?
+ 'wp-version' => $details[ 'wp_version' ],
+ 'db-version' => $details[ 'wp_db_version' ],
+ 'local-package' => ! empty( $details[ 'wp_local_package' ] ) ? $details[ 'wp_local_package' ] : 'en_US',
+ 'mce-version' => ( $human_readable_tiny_mce ?
"$human_readable_tiny_mce ({$details['tinymce_version']})"
: $details['tinymce_version']
)
| [Core_Command->[install->[_install],_extract_tarball->[extractTo,getFileName],_multisite_convert->[get_error_message,tables,get_error_code],download->[cleanup_extra_files,getMessage,get_download_url,get_download_offer,has,import],_copy_overwrite_files->[isDir,getSubPathName],update->[upgrade,cleanup_extra_files,get_download_url,get_error_code],get_wp_core_files->[getPathname,isFile],_extract_zip->[open,extractTo,getNameIndex,close],verify_checksums->[get_wp_core_files],_rmdir->[isDir,getRealPath],multisite_install->[_install,_multisite_convert],create_initial_blog->[set_permalink_structure,insert],check_update->[display_items,get_updates],multisite_convert->[_multisite_convert]]] | Displays the version of the WordPress installation. | You could spare a `!` by reversing the two. |
@@ -84,14 +84,14 @@ class PropertyMetadataTest extends TestCase
$this->assertTrue($newMetadata->isInitializable());
}
- public function testShouldReturnRequiredFalseWhenRequiredTrueIsSetButMaskedByWritableFalse()
+ public function testShouldReturnRequiredTrueEvenIfWritableFalseSoClientCanAssumeValueCannotBeUndefinedOnReadOperation()
{
$metadata = new PropertyMetadata();
$metadata = $metadata->withRequired(true);
$metadata = $metadata->withWritable(false);
- $this->assertFalse($metadata->isRequired());
+ $this->assertTrue($metadata->isRequired());
}
public function testShouldReturnPreviouslySetRequiredTrueWhenWritableFalseUnmasked()
| [PropertyMetadataTest->[testShouldReturnRequiredFalseWhenRequiredTrueIsSetButMaskedByWritableFalse->[isRequired,assertFalse,withRequired,withWritable],testValueObject->[assertTrue,assertNotSame,getType,isRequired,isReadableLink,isWritable,withIri,getIri,assertFalse,withReadableLink,withAttributes,getAttribute,isInitializable,withType,isIdentifier,assertEquals,withReadable,isWritableLink,withInitializable,getDescription,withDescription,withWritableLink,isReadable,withIdentifier,withRequired,getAttributes,withWritable],testShouldReturnPreviouslySetRequiredTrueWhenWritableFalseUnmasked->[assertTrue,isRequired,withRequired,withWritable]]] | Tests if a property value is an object of a specific type. Tests if the given metadata is not empty and has a reserved reserved value. | maybe we should remove / rephrase this test |
@@ -188,8 +188,15 @@ if __name__ == "__main__":
"[generate.installer] Write the wrapper script with the bundled zip "
"file"
)
- with open(installer_path, "wb") as fp:
- fp.write(WRAPPER_SCRIPT.format(zipfile=base64.encodestring(data)))
+
+ zipdata = base64.b85encode(data).decode("utf8")
+ chunked = []
+
+ for i in range(0, len(zipdata), 79):
+ chunked.append(zipdata[i:i + 79])
+
+ with open(installer_path, "w") as fp:
+ fp.write(WRAPPER_SCRIPT.format(zipfile="\n".join(chunked)))
# Ensure the permissions on the newly created file
oldmode = os.stat(installer_path).st_mode & 0o7777
| [authors->[write,append,print,add,sorted,strip,set,run,join,splitlines,open,lower],installer->[,walk,splitext,split,ZipFile,write,mkdtemp,append,print,len,chmod,read,format,join,encodestring,open,stat,rmtree]] | The installer for the pip - related tasks. This function is called from the command line. It will install the latest version of the package Get all the files that should be zipped and zip the bundled version of pip. | `range(0, len(zipdata), 79)`? Also, won't the next line produce an out of range error unless `zipdata`'s length is a multiple of 79? |
@@ -919,6 +919,8 @@ iv_op(struct ds_iv_ns *ns, struct ds_iv_key *key, d_sg_list_t *value,
{
int rc;
+ if (ns->iv_master_rank == ((d_rank_t)-1))
+ return -DER_NOTLEADER;
retry:
rc = iv_op_internal(ns, key, value, sync, shortcut, opc);
if (retry && (daos_rpc_retryable_rc(rc) || rc == -DER_NOTLEADER)) {
| [No CFG could be retrieved] | Reads the next key from the chain. Fetches the value from the iv_entry if it does not exist. | this seems has been checked inside ivc_on_hash(), which should be called in iv_op_internal()? I wonder if you return here, then for those retry == true case will not retry anymore in this case. |
@@ -1900,12 +1900,12 @@ parse_filename_dfs(const char *path, char **_obj_name, char **_cont_name)
D_STRNDUP(*_cont_name, cont_name,
strlen(cont_name) + 1);
if (*_cont_name == NULL)
- D_GOTO(out, rc = ENOMEM);
+ D_GOTO(out, rc = -DER_NOMEM);
}
D_STRNDUP(*_obj_name, fname, strlen(fname) + 1);
if (*_obj_name == NULL) {
D_FREE(*_cont_name);
- D_GOTO(out, rc = ENOMEM);
+ D_GOTO(out, rc = -DER_NOMEM);
}
out:
D_FREE(f1);
| [No CFG could be retrieved] | region Private functions write the contents of a file object. | Maybe this should also return -1 for num_bytes_written. Otherwise the caller doesn't know that this call failed |
@@ -49,8 +49,11 @@ var programTests = []programTest{
{
Name: "aws-fargate",
Description: "AWS Fargate",
+
+ // TODO[pulumi/pulumi#8440]
SkipCompile: codegen.NewStringSet("go"),
- Skip: codegen.NewStringSet("go", "dotnet"),
+
+ Skip: codegen.NewStringSet("dotnet"),
},
{
Name: "aws-s3-logging",
| [NewHost,HasPrefix,WriteFile,Add,Has,BindProgram,ReadFile,Skip,DecomposeToken,Join,Equal,NewParser,NoError,Fatalf,HasErrors,PluginHost,MkdirAll,ParseFile,NewStringSet,NewReader,GenProgram,Check,Getenv,Run,IsExist] | Package - level functions for testing the n - ary code. Returns a description of the last known node - type that is not available on the system. | So this is back to where master was, but now with a note linking that we have an issue. Go code does not compile here on master. |
@@ -387,7 +387,7 @@ class CategoryManager implements CategoryManagerInterface
throw new CategoryIdNotFoundException($id);
}
- /** @var CategoryTranslation $translation */
+ /** @var CategoryTranslationInterface $translation */
foreach ($entity->getTranslations() as $translation) {
foreach ($translation->getKeywords() as $keyword) {
$this->keywordManager->delete($keyword, $entity);
| [CategoryManager->[delete->[delete],save->[findById],findChildren->[findChildren],getApiObjects->[getApiObject]]] | Deletes a category with the given id. | This actually belongs in the block of the `foreach`. |
@@ -836,6 +836,7 @@ Parameters VtkOutput::GetDefaultParameters()
"custom_name_prefix" : "",
"save_output_files_in_folder" : true,
"write_deformed_configuration" : false,
+ "write_properties_id" : false,
"nodal_solution_step_data_variables" : [],
"nodal_data_value_variables" : [],
"nodal_flags" : [],
| [WriteModelPartWithoutNodesToFile->[WriteModelPartToFile],PrintOutput->[PrepareGaussPointResults]] | Returns default parameters for VTK_Output. | false by default, but I can activate it by default if necessary |
@@ -108,6 +108,9 @@ export class AmpAudio extends AMP.BaseElement {
this.audio_ = audio;
listen(this.audio_, 'playing', () => this.audioPlaying_());
+
+ listen(this.audio_, 'playing', () => this.analyticsEvent_('audio-play'));
+ listen(this.audio_, 'pause', () => this.analyticsEvent_('audio-pause'));
}
/** @override */
| [No CFG could be retrieved] | Builds the internal audio element. Displays the name of the specified tag. | Given we are triggering event in the `play_()` and `pause_()` call, we may not want to add extra event listener here. Otherwise, it will end up the analytics events get triggered twice. |
@@ -295,9 +295,10 @@ public class ZeppelinServer extends ResourceConfig {
final Server server = new Server(threadPool);
ServerConnector connector;
+ HttpConfiguration httpConfig = new HttpConfiguration();
+ httpConfig.addCustomizer(new ForwardedRequestCustomizer());
if (conf.useSsl()) {
LOG.debug("Enabling SSL for Zeppelin Server on port " + conf.getServerSslPort());
- HttpConfiguration httpConfig = new HttpConfiguration();
httpConfig.setSecureScheme("https");
httpConfig.setSecurePort(conf.getServerSslPort());
httpConfig.setOutputBufferSize(32768);
| [ZeppelinServer->[setupNotebookServer->[getService,setInitParameter,getWebsocketMaxTextMessageSize,ServletContextHandler,addServlet,ServletHolder],getSslContextFactory->[getTrustStorePassword,SslContextFactory,getKeyManagerPassword,getKeyStorePassword,getKeyStoreType,setKeyStorePath,setKeyStorePassword,setNeedClientAuth,getKeyStorePath,setTrustStoreType,setTrustStorePassword,getTrustStoreType,getTrustStorePath,setKeyStoreType,useClientAuth,setKeyManagerPassword,setTrustStorePath],setupClusterManagerServer->[getMessage,error,init,start,isClusterMode,getService,getInstance,addClusterEventListeners,loadInterpreterLauncher,createClazzInstance,getRecoveryStorageClass],setupWebAppContext->[getServerContextPath,setResourceBase,getRelativeDir,setInitParameter,toString,addServlet,info,getAbsolutePath,allOf,ServletHolder,addHandler,WebAppContext,setContextPath,addFilter,File,setParentLoaderPriority,setTempDirectory,isDirectory,DefaultServlet,FilterHolder,getBoolean,getString,mkdir,getPath,setWar],setupRestApiContextHandler->[EnvironmentLoaderListener,getName,setInitParameter,setForcedPath,ServletContainer,SessionHandler,toString,addServlet,setName,setSessionHandler,isBlank,addEventListener,ServletHolder,getShiroPath],main->[contextInitialized->[setAttribute],configure->[to,credentialsPersist,Credentials,isZeppelinNotebookCronEnable,getCredentialsPath,getCredentialsEncryptKey,in,isBlank,getShiroPath],create,ServletContextListener,addBean,start,Thread,getenv,setHandler,MBeanContainer,warn,addEventListener,info,ContextHandlerCollection,join,setupWebAppContext,getJettyName,addShutdownHook,setupClusterManagerServer,setProperty,ConnectorServer,JMXServiceURL,setupNotebookServer,error,sleep,stop,getService,setupRestApiContextHandler,format,enableImmediateScope,read,getPlatformMBeanServer,close,setJettyVersion,bind,isRecoveryEnabled,forEach,exit,setupJettyServer,AbstractBinder],configureRequestHeaderSize->[getConnectionFactory,getJettyRequestHeaderSize,toString,setRequestHeaderSize],setupJettyServer->[setPort,getServerPort,setResponseHeaderSize,setIdleTimeout,setHost,getSslContextFactory,getInt,HttpConnectionFactory,addConnector,HttpConfiguration,SslConnectionFactory,ServerConnector,setSoLingerTime,getServerSslPort,QueuedThreadPool,debug,useSsl,SecureRequestCustomizer,setSendServerVersion,addCustomizer,Server,getServerAddress,setOutputBufferSize,configureRequestHeaderSize,setSecurePort,setSecureScheme,asString],create,getInt,getLogger,packages]] | Setup Jetty Server with configuration. | Is it needed when it doesn't use proxy ? |
@@ -65,7 +65,7 @@ _SERVICE_PARAMS = {
"file": {"primary": "FileEndpoint", "secondary": "FileSecondaryEndpoint"},
"dfs": {"primary": "BlobEndpoint", "secondary": "BlobEndpoint"},
}
-
+T = Optional[Union[BearerTokenCredentialPolicy, SharedKeyCredentialPolicy]]
class StorageAccountHostsMixin(object): # pylint: disable=too-many-instance-attributes
def __init__(
| [StorageAccountHostsMixin->[close->[close],__exit__->[__exit__],__enter__->[__enter__]],TransportWrapper->[send->[send]]] | Initialize a new key - lease object. Returns a list of all the keys in the order they were specified. | can we rename T to another name |
@@ -313,6 +313,10 @@ class ShippingZone(ChannelContextTypeWithMetadata, CountableDjangoObjectType):
root: ChannelContext[models.ShippingZone], info, **_kwargs
):
def wrap_shipping_method_with_channel_context(shipping_methods):
+ # TODO: ShippingMethodType will have no price attribute
+ for shipping in shipping_methods:
+ shipping.price = None
+
shipping_methods = [
ChannelContext(node=shipping, channel_slug=root.channel_slug)
for shipping in shipping_methods
| [ShippingZone->[resolve_price_range->[resolve_price_range]]] | Resolves the shipping methods for a given node. | This shouldn't be a TODO anymore |
@@ -68,4 +68,7 @@ class Umpire(CMakePackage):
if '+numa' in spec:
options.append('-DENABLE_NUMA=On')
+ if '+openmp' in spec:
+ options.append('-DENABLE_OPENMP=On')
+
return options
| [Umpire->[cmake_args->[append,extend],variant,conflicts,depends_on,version]] | Return a list of CMake command line options for the object. | Can you explicitly disable this in an else clause? Same for other variants. |
@@ -27,10 +27,6 @@ describes.realWin('amp-timeago', {
beforeEach(() => {
win = env.win;
element = win.document.createElement('amp-timeago');
- const date = new Date();
- date.setDate(date.getDate() - 2);
- element.setAttribute('datetime', date.toISOString());
- element.textContent = date.toString();
element.setAttribute('layout', 'fixed');
element.setAttribute('width', '160px');
element.setAttribute('height', '20px');
| [No CFG could be retrieved] | The real AMP window implementation. | "should display original date when older than cutoff" |
@@ -83,7 +83,11 @@ func showBalanceForAccount(store *store.Store, account accounts.Account, balance
func getBalance(store *store.Store, account accounts.Account, balanceType requestType) (balanceable, error) {
switch balanceType {
case ethRequest:
- return store.TxManager.GetEthBalance(account.Address)
+ bal, err := store.EthClient.BalanceAt(context.TODO(), account.Address, nil)
+ if err != nil {
+ return nil, err
+ }
+ return (*assets.Eth)(bal), nil
case linkRequest:
return store.TxManager.GetLINKBalance(account.Address)
}
| [FriendlyAggregatorInitMethod->[String],FriendlyPayment->[String],FriendlyAggregatorFulfillMethod->[String],MarshalJSON->[String],FriendlyParams->[String],FriendlyTasks->[String],FriendlyAggregator->[String],GetID->[String],String->[String],String] | showBalanceForAccount returns the current Ethereum balance for the given account. GetID returns the ID of this structure when deserializing from jsonapi documents. | Another context.TODO. pls grep codebase for these |
@@ -32,12 +32,6 @@ public interface ApexPipelineOptions extends PipelineOptions, java.io.Serializab
String getApplicationName();
- @Description("set parallelism for Apex runner")
- void setParallelism(int parallelism);
-
- @Default.Integer(1)
- int getParallelism();
-
@Description("execute the pipeline with embedded cluster")
void setEmbeddedExecution(boolean embedded);
| [No CFG could be retrieved] | application name. | I think you do want to keep this, don't you? It is unfortunate that we have this global options namespace, but that is all about the ability to make it command-line friendly. I think perhaps you should match the Flink value exactly, or (better) factor this into some common `Options` class. |
@@ -159,7 +159,9 @@ public class TimelineService {
app.disableDynamicGzip();
}
- RequestHandler requestHandler = new RequestHandler(app, conf, fsViewsManager, useAsync);
+ RequestHandler requestHandler = new RequestHandler(
+ app, conf, context, fs, fsViewsManager, useAsync, markerBatchNumThreads,
+ markerBatchIntervalMs, markerDeleteParallelism);
app.get("/", ctx -> ctx.result("Hello World"));
requestHandler.register();
int realServerPort = startServiceOnPort(serverPort);
| [TimelineService->[startService->[startServiceOnPort],run->[startService],close->[close],main->[buildFileSystemViewManager,run,TimelineService,Config]]] | Starts the server on the port specified by the port parameter. | lol. hello world on `/` . funny. `Hello Hudi` at-least as an easter egg? |
@@ -30,7 +30,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class NoAuthenticationService implements AuthenticationService {
- private static Logger logger = LoggerFactory.getLogger(NoAuthenticationService.class);
+ private static final Logger logger = LoggerFactory.getLogger(NoAuthenticationService.class);
private final String ANONYMOUS = "anonymous";
@Inject
| [NoAuthenticationService->[getMatchedRoles->[newArrayList],getRealmsList->[emptyList],getMatchedUsers->[newArrayList],getAssociatedRoles->[newHashSet],info,getLogger]] | Creates a no authentication service which is responsible for handling a single user - defined token. This method is overridden to provide a list of users that match the given search text. | Rename it to be `LOGGER`, this is our naming convention for static final variables. |
@@ -62,7 +62,11 @@ class ManagedIdentityCredential(object):
:rtype: :class:`azure.core.credentials.AccessToken`
:raises ~azure.identity.CredentialUnavailableError: managed identity isn't available in the hosting environment
"""
- return AccessToken()
+ if not self._credential:
+ raise CredentialUnavailableError(
+ message="managed identity isn't available in the hosting environment"
+ )
+ return self._credential.get_token(*scopes, **kwargs)
class _ManagedIdentityBase(object):
| [ManagedIdentityCredential->[get_token->[AccessToken],__new__->[ImdsCredential,MsiCredential,get]],ImdsCredential->[get_token->[get_cached_token,CredentialUnavailableError,request_token,len,endswith,ValueError],__init__->[super]],MsiCredential->[get_token->[get_cached_token,_request_app_service_token,CredentialUnavailableError,get,_request_legacy_token,endswith,len,ValueError],_request_app_service_token->[request_token],__init__->[super,get],_request_legacy_token->[request_token]],_ManagedIdentityBase->[_create_config->[UserAgentPolicy,Configuration,pop,update,copy,HeadersPolicy,retry_policy,NetworkTraceLoggingPolicy],__init__->[DistributedTracingPolicy,HttpLoggingPolicy,client_cls,_create_config,ContentDecodePolicy],range,list]] | Request an access token for the given scopes. | We can be a little more specific with this message. How about: "No managed identity endpoint found"? |
@@ -51,7 +51,7 @@
<% end %>
<% end %>
- <% if policy(:video).new? %>
+ <% if policy(:video).new? && SiteConfig.enable_video_upload %>
<a class="crayons-btn crayons-btn--secondary w-100 mt-4" href="<%= new_video_path %>" data-no-instant> Upload a video
</a>
<% end %>
| [No CFG could be retrieved] | Nav bar for the . | what if we move this check in the policy or wrap them both in a helper? |
@@ -386,6 +386,9 @@ class GitLabDriver extends VcsDriver
}
}
+ /**
+ * @return true
+ */
protected function attemptCloneFallback()
{
if ($this->isPrivate === false) {
| [GitLabDriver->[getRootIdentifier->[getRootIdentifier],setupGitDriver->[initialize],getContents->[attemptCloneFallback],getComposerInformation->[getComposerInformation],getUrl->[getUrl],getTags->[getTags],getSource->[getRepositoryUrl,getSource],getChangeDate->[getChangeDate],fetchProject->[getApiUrl],getFileContent->[getFileContent],getReferences->[getApiUrl],getBranches->[getBranches]]] | Fetches the default branch from the api and checks if it is private or public. | It's either returning true or throws. I'm not sure if it's better to make the return type `bool` or replace `if (attemptCloneFallback()) { then(); }` with `attemptCloneFallback(); then();` |
@@ -846,6 +846,7 @@ const forbiddenTerms = {
'test/unit/test-mode.js',
'test/unit/test-motion.js',
'test/unit/test-mustache.js',
+ 'test/unit/test-mutator.js',
'test/unit/test-object.js',
'test/unit/test-observable.js',
'test/unit/test-pass.js',
| [No CFG could be retrieved] | JS - related tests Tests the unit of the application. | The idea behind this check is to remove all tests that use a top-level `describe` block. Would it be possible to convert this test to use `describes` instead? |
@@ -100,6 +100,12 @@ public abstract class LazyBuildMixIn<JobT extends Job<JobT,RunT> & Queue.Task &
@SuppressWarnings("unchecked")
public void onLoad(ItemGroup<? extends Item> parent, String name) throws IOException {
RunMap<RunT> _builds = createBuildRunMap();
+ int max = _builds.maxNumberOnDisk();
+ int next = asJob().getNextBuildNumber();
+ if (next <= max) {
+ LOGGER.log(Level.WARNING, "JENKINS-27530: improper nextBuildNumber {0} detected in {1} with highest build number {2}; adjusting", new Object[] {next, asJob(), max});
+ asJob().updateNextBuildNumber(max + 1);
+ }
RunMap<RunT> currentBuilds = this.builds;
if (parent != null) {
// are we overwriting what currently exist?
| [LazyBuildMixIn->[RunMixIn->[getPreviousBuild->[none,createReference,getRunMixIn,asRun],createReference->[asRun],dropLinks->[getRunMixIn],getNextBuild->[none,createReference,getRunMixIn,asRun]],ItemListenerImpl->[onLocationChanged->[getLazyBuildMixIn]],_getRuns->[asJob],createHistoryWidget->[asJob],loadBuild->[asJob],createBuildRunMap->[asJob],removeRun->[asJob],newBuild->[asJob]]] | onLoad method called when the ItemGroup is loaded. | Not used as part of this fix, but might help recover from other corruptions. |
@@ -696,6 +696,18 @@ func (repo *Repository) getReviewers(e Engine, doerID, posterID int64) (users []
} else {
users, err = repo.getReviewersPublic(x, doerID, posterID)
}
+
+ if repo.Owner.IsOrganization() {
+ teams, err = GetTeamsWithAccessToRepo(repo.OwnerID, repo.ID, AccessModeRead)
+ if err != nil {
+ return nil, nil, err
+ }
+
+ for _, team := range teams {
+ team.ID = -team.ID
+ }
+ }
+
return
}
| [ComposeDocumentMetas->[ComposeMetas],updateSize->[RepoPath],UpdateSize->[updateSize],Link->[FullName],getTemplateRepo->[IsGenerated],DescriptionHTML->[Error,ComposeMetas,HTMLURL],mustOwner->[getOwner,Error],APIURL->[FullName],GetReviewers->[getReviewers],UploadAvatar->[CustomAvatarPath],generateRandomAvatar->[CustomAvatarPath],getReviewers->[getReviewersPublic,getOwner,getReviewersPrivate],CloneLink->[cloneLink],GetAssignees->[getAssignees],RelLink->[FullName],GetOwner->[getOwner],AllowsPulls->[CanEnablePulls,UnitEnabled],IsBeingCreated->[IsBeingMigrated],relAvatarLink->[CustomAvatarPath,Error,generateRandomAvatar],UnitEnabled->[getUnits],CommitLink->[HTMLURL],GitConfigPath->[RepoPath],getUsersWithAccessMode->[getOwner],avatarLink->[relAvatarLink],getAssignees->[getOwner],innerAPIFormat->[innerAPIFormat,HTMLURL,FullName,APIFormat],ComposeCompareURL->[FullName],DeleteAvatar->[CustomAvatarPath],CanUserDelete->[GetOwner,IsOwnedBy],getUnit->[getUnits],ComposeMetas->[MustOwner,GetUnit],HTMLURL->[FullName],FullName,RepoPath,deleteWiki,updateSize,GetOwner,Error,getOwner] | getReviewers returns a list of users who have a review on the given doerID. | I think func in models should return id's as they are ... if needed convert it where you need it |
@@ -286,6 +286,7 @@ class Product(CountableDjangoObjectType):
Money,
description=dedent("""The product's base price (without any discounts
applied)."""))
+ tax_rate = TaxRateType(description='A type of tax rate.')
attributes = graphene.List(
graphene.NonNull(SelectedAttribute), required=True,
description='List of attributes assigned to this product.')
| [ProductVariant->[resolve_attributes->[resolve_attribute_list]],Category->[resolve_background_image->[resolve_background_image]],Product->[resolve_availability->[ProductAvailability],resolve_attributes->[resolve_attribute_list],resolve_thumbnail->[Image],resolve_margin->[Margin]],Collection->[resolve_background_image->[resolve_background_image]],AttributeValue->[resolve_type->[resolve_attribute_value_type],AttributeValueType]] | Represents an image for a given product. A list of nodes. | The `a type of...` is sounding weird to me. What do you think of: `The tax rate type.` ? |
@@ -0,0 +1,11 @@
+require 'spec_helper'
+
+describe AssignmentFile do
+ it { is_expected.to belong_to(:assignment) }
+ it { is_expected.to validate_presence_of(:filename ) }
+ it { is_expected.to validate_uniqueness_of(:filename) \
+ .scoped_to(:assignment_id) }
+ it { is_expected.to allow_value('est.java').for(:filename) }
+ it { is_expected.not_to allow_value('est?java').for(:filename) }
+ it { is_expected.not_to allow_value('&*%word^!').for(:filename) }
+end
| [No CFG could be retrieved] | No Summary Found. | Expression at 7, 35 should be on its own line. |
@@ -221,7 +221,7 @@ export class Performance {
* @private
*/
setFlushParams_(params) {
- this.viewer_.setFlushParams(params);
+ this.viewer_.sendMessageCancelUnsent('setFlushParams', params, false);
}
/**
| [No CFG could be retrieved] | This function is called by the UI thread when a variable name is found in the page. This method is called by the timer thread when a tick is made. | Can we make the `false` optional? |
@@ -3,9 +3,10 @@ class TwoFactorLoginOptionsPresenter < TwoFactorAuthCode::GenericDeliveryPresent
attr_reader :user
- def initialize(user:, view:, service_provider:, aal3_required:, piv_cac_required:)
+ def initialize(user:, view:, context:, service_provider:, aal3_required:, piv_cac_required:)
@user = user
@view = view
+ @context = context
@service_provider = service_provider
@aal3_required = aal3_required
@piv_cac_required = piv_cac_required
| [TwoFactorLoginOptionsPresenter->[account_reset_token->[request_token],account_reset_link->[account_reset_request_path,t,link_to,locale],account_reset_token_valid?->[granted_token_valid?],account_reset_or_cancel_link->[account_reset_token_valid?],options->[two_factor_configurations,new,piv_cac_configurations,flat_map,selection_presenters,personal_key_configuration,aal3_configurations,enabled?],heading->[t],info->[t],title->[t],account_reset_cancel_link->[t,link_to,account_reset_cancel_url],attr_reader,include]] | Initialize a new object with the values from the hash. | `context` is a very generic name.... can we call this `user_session_context`? |
@@ -354,9 +354,13 @@ outer:
{
private final int keySize;
- public GroupByEngineKeySerde(final int dimCount)
+ public GroupByEngineKeySerde(final QueryDimensionInfo dims[])
{
- this.keySize = dimCount * Ints.BYTES;
+ int keySize = 0;
+ for (int i = 0; i < dims.length; i++) {
+ keySize += dims[i].queryHelper.getGroupingKeySize();
+ }
+ this.keySize = keySize;
}
@Override
| [GroupByQueryEngineV2->[GroupByEngineIterator->[close->[close],next->[close->[close],close,next],hasNext->[hasNext]],process->[close->[close]]]] | Returns the number of keys in the map. | It could be a for-each loop. |
@@ -135,7 +135,12 @@ def get_platform():
if result == "linux_x86_64" and _is_running_32bit():
# 32 bit Python program (running on a 64 bit Linux): pip should only
# install and run 32 bit compiled extensions in that case.
- result = "linux_i686"
+ machine = platform.machine()
+
+ if machine == "x86_64":
+ result = "linux_x32"
+ else:
+ result = "linux_i686" # and machine == "i686"
return result
| [get_impl_tag->[get_impl_ver,get_abbr_impl],get_abi_tag->[get_impl_ver,get_flag,get_abbr_impl,get_config_var],get_impl_ver->[get_abbr_impl,get_config_var],get_platform->[get_platform,_is_running_32bit],get_darwin_arches->[_supports_arch->[_supports_arch],_supports_arch],get_supported->[get_abi_tag,get_platform,get_darwin_arches,is_manylinux1_compatible,get_impl_version_info,get_abbr_impl],get_flag->[get_config_var],is_manylinux1_compatible->[get_platform],get_config_var->[get_config_var],get_impl_version_info->[get_abbr_impl],get_impl_tag] | Get the platform name of the current system. | Maybe add a conditional with warning here, if `machine != "i686"`? |
@@ -316,6 +316,12 @@ class ChatServiceManager(ABC):
message to put on queue
"""
agent_id = message['sender']['id']
+ if not self.world_runner.initialized:
+ self.observe_message(
+ agent_id, 'Please wait while the worlds are initializing...'
+ )
+ return
+
if agent_id not in self.messenger_agent_states:
self._on_first_message(message)
return
| [ChatServiceManager->[check_timeout_in_pool->[remove_agent_from_pool,get_overworld_agent,typing_on,set_active_agent],remove_agent_from_pool->[_log_debug],_get_agent->[has_task,get_agent_for_task],shutdown->[shutdown,_expire_all_conversations],_on_first_message->[AgentState],add_agent_to_pool->[_log_debug],_handle_message_read->[send_read,get_active_agent],_on_new_message->[get_overworld_agent,get_active_agent,set_active_agent,_on_first_message,typing_on,get_id],start_task->[_done_callback->[get_agent_state,get_overworld_agent,set_active_agent],check_timeout_in_pool,assign_agent_to_task,set_active_agent,remove_agent_from_pool,get_agent_state,_get_unique_pool,get_id,_create_agent]],AgentState->[get_agent_for_task->[has_task]]] | Put an incoming message onto the correct agent s message queue. | could we abstract this to a function `self.world_runner.is_initialized()`? so that we avoid accessing this prop directly |
@@ -151,10 +151,12 @@ class TestManageDB(MigrationTest):
# Also, make sure the factory was initialized
factory.initialize.assert_called_once_with()
+ @patch('logging.config.fileConfig')
+ @patch('pulp.server.db.manage.logging.getLogger')
+ @patch('pulp.server.db.manage._auto_manage_db')
@patch('sys.argv', ["pulp-manage-db"])
@patch('pulp.server.db.connection.initialize')
- @patch('pulp.server.db.manage._auto_manage_db')
- def test_set_connection_timeout(self, mock_auto_manage_db, mock_initialize):
+ def test_set_connection_timeout(self, mock_initialize, *unused_mocks):
manage.main()
mock_initialize.assert_called_once_with(max_timeout=1)
| [iter_entry_points->[FakeEntryPoint],TestManageDB->[clean->[clean],mock_open]] | This test makes sure the admin user and role are in place. | The changes to this test stops the test suite from printing 'Purging database collections...' during a test run. I figured while I was in the area I would fix that. |
@@ -228,7 +228,7 @@ public class FlattenTest implements Serializable {
public void testFlattenNoListsNoCoder() {
// not ValidatesRunner because it should fail at pipeline construction time anyhow.
thrown.expect(IllegalStateException.class);
- thrown.expectMessage("cannot provide a Coder for empty");
+ thrown.expectMessage("Unable to return a default Coder");
PCollectionList.<ClassWithoutCoder>empty(p)
.apply(Flatten.<ClassWithoutCoder>pCollections());
| [FlattenTest->[testFlattenPCollectionsEmptyThenParDo->[apply],testFlattenIterablesEmpty->[apply],testIncompatibleWindowFnPropagationFailure->[apply],testFlattenInputMultipleCopies->[apply],testFlattenIterablesCollections->[apply],testCompatibleWindowFnPropagation->[apply],makePCollectionList->[apply],testFlattenNoListsNoCoder->[apply],testEqualWindowFnPropagation->[apply],testFlattenMultipleCoders->[apply],testFlattenIterablesLists->[apply],testFlattenIterablesSets->[apply],testFlattenIterables->[apply],testEmptyFlattenAsSideInput->[apply]]] | Test if all pCollections in the pipeline have a non - empty coder. | [Side note] we should be able to chose an arbitrary coder here as we won't actually be encoding any elements... I suppose we'd have to handle the case of downstream operations creating something from nothing (is that allowed?) |
@@ -57,7 +57,12 @@ func NewLanguageRuntime(host Host, ctx *Context, runtime string,
var args []string
for k, v := range options {
- args = append(args, fmt.Sprintf("-%s=%t", k, v))
+ fmtstr := "-%s=%t"
+ // the prebuilt option specifies a string with an executable name
+ if k == "prebuilt" {
+ fmtstr = "-%s=%s"
+ }
+ args = append(args, fmt.Sprintf(fmtstr, k, v))
}
args = append(args, host.ServerAddr())
| [Run->[Run],Close->[Close],GetRequiredPlugins->[GetRequiredPlugins],GetPluginInfo->[GetPluginInfo]] | NewLanguageRuntime creates a new instance of a language host plugin. PluginInfo returns information about the required plugins. | I'd prefer not to special case this. Can we instead typeswitch on `v` and handle the `bool` and `string` cases for now? I can imagine we may want to support arrays as well, but happy to leave that for the future. Also - do we need to quote this? `%q`? |
@@ -432,7 +432,14 @@ public final class OzoneManagerRatisServer {
final int logPurgeGap = conf.getInt(
OMConfigKeys.OZONE_OM_RATIS_LOG_PURGE_GAP,
OMConfigKeys.OZONE_OM_RATIS_LOG_PURGE_GAP_DEFAULT);
- RaftServerConfigKeys.Log.setPurgeGap(properties, logPurgeGap);
+
+ if (forUpgrade) {
+ LOG.info("Setting purge gap to 1.");
+ RaftServerConfigKeys.Log.setPurgeGap(properties, 1);
+ } else {
+ LOG.info("Setting purge gap to 1000.");
+ RaftServerConfigKeys.Log.setPurgeGap(properties, logPurgeGap);
+ }
// For grpc set the maximum message size
// TODO: calculate the optimal max message size
| [OzoneManagerRatisServer->[stop->[stop],newOMRatisServer->[OzoneManagerRatisServer],getLastAppliedTermIndex->[getLastAppliedTermIndex],start->[start],createWriteRaftClientRequest->[nextCallId],isLeader->[checkCachedPeerRoleIsLeader],getGroupInfo->[getGroupInfo,nextCallId]]] | Creates a new Raft properties object based on the configuration parameters. Sets the maximum message size for the log messages. region Configures Sets timeout and delay for Raft and RPC. region RaftServerConfigKeys Implementation. | Nit: purge gap should not hard-coded as 1000 in this log, can you use variable logPurgeGap instead of? |
@@ -148,7 +148,7 @@ class PageAdmin extends Admin
$this->routeBuilderFactory->createFormRouteBuilder('sulu_page.page_edit_form.seo', '/seo')
->setResourceKey('pages_seo')
->setFormKey('page_seo')
- ->setTabTitle('sulu_page.page_form_seo')
+ ->setTabTitle('sulu_page.seo')
->setTabCondition('nodeType == 1 && shadowOn == false')
->addToolbarActions($formToolbarActionsWithoutType)
->addRouterAttributesToFormStore($routerAttributesToFormStore)
| [PageAdmin->[getNavigation->[addChild,setPosition,getNavigationItemRoot,setMainRoute,getWebspaceCollection,getKey,hasPermission,setIcon],getRoutes->[setOption,addRerenderAttribute,getRoute,getWebspaces],getSecurityContexts->[getWebspaceCollection,getKey]]] | Returns routes for the given node type. This method is used to build routes for detail pages. getRoute - > getRoute. | Translation is missing |
@@ -397,10 +397,12 @@ func (env *TransactionEnv) WithWriteContext(ctx context.Context, cb func(*Transa
Client: pachClient,
ClientContext: pachClient.Ctx(),
Stm: stm,
- pfsPropagater: env.pfsServer.NewPropagater(stm),
txnEnv: env,
}
- txnCtx.commitFinisher = env.pfsServer.NewPipelineFinisher(txnCtx)
+ if env.pfsServer != nil {
+ txnCtx.pfsPropagater = env.pfsServer.NewPropagater(stm)
+ txnCtx.commitFinisher = env.pfsServer.NewPipelineFinisher(txnCtx)
+ }
err := cb(txnCtx)
if err != nil {
| [WithReadContext->[finish],WithWriteContext->[finish],PropagateCommit->[PropagateCommit],FinishPipelineCommits->[FinishPipelineCommits]] | WithWriteContext is a wrapper around the pfs. TransactionEnv. WithWriteContext method. | The auth service creates it's own transaction contexts to run `InTransaction` methods, so we need to support a transaction context with no PFS server. |
@@ -2569,7 +2569,7 @@ gboolean dt_thumbtable_ensure_imgid_visibility(dt_thumbtable_t *table, const int
static gboolean _filemanager_check_rowid_visibility(dt_thumbtable_t *table, const int rowid)
{
if(rowid < 1) return FALSE;
- if(!table->list || g_list_length(table->list) == 0) return FALSE;
+ if(!table || !table->list) return FALSE;
// get first and last fully visible thumbnails
dt_thumbnail_t *first = (dt_thumbnail_t *)g_list_first(table->list)->data;
const int pos = MIN(g_list_length(table->list) - 1, table->thumbs_per_row * (table->rows - 1) - 1);
| [No CFG could be retrieved] | private private methods check if a rowid is visible in the table. | this should be only !table->list |
@@ -118,6 +118,14 @@ namespace Dynamo.Models
CurrentWorkspace.RecordCreatedModel(noteModel);
}
+ void CreateAnnotationImpl(CreateAnnotationCommand command)
+ {
+ AnnotationModel annotationModel = currentWorkspace.AddAnnotation(command.AnnotationText, command.AnnotationId);
+
+ //TODO: Record the creation
+ CurrentWorkspace.RecordCreatedModel(annotationModel);
+ }
+
void SelectModelImpl(SelectModelCommand command)
{
// Empty ModelGuid means clear selection.
| [DynamoModel->[UndoRedoImpl->[Redo,CmdOperation,Undo],DeleteModelImpl->[DeleteModelInternal,Empty,Selection,AddRange,Add,GetModelInternal,ModelGuid],ExecuteCommand->[CommandCompleted,CommandStarting,Execute],CreateNoteImpl->[NoteText,X,NodeId,AddNote,Y,DefaultPosition,RecordCreatedModel],ForceRunCancelImpl->[ForceRun],BeginConnection->[Connectors,Input,Contains,Count,OutPorts,Start,Delete,RecordAndDeleteModels,InPorts,GetModelInternal],EndConnection->[Connectors,Index,Deletion,Input,Count,OutPorts,RecordModelsForUndo,Delete,PortType,UndoRecorder,Make,Owner,InPorts,Creation,Add,GetModelInternal],UpdateModelValueImpl->[ModelGuids,Value,Name,UpdateModelValue],CreateCustomNodeImpl->[AddWorkspace,NodeId,Category,Name,Description,CreateCustomNode],SwitchTabImpl->[TabIndex],SelectModelImpl->[HasFlag,Contains,Empty,Remove,Shift,IsSelected,ClearSelection,Add,GetModelInternal,ModelGuid],MakeConnectionImpl->[Begin,NodeId,BeginConnection,EndConnection,ConnectionMode,End,Cancel,Type,PortIndex],SendModelEventImpl->[SendModelEvent,EventName,ModelGuid],OpenFileImpl->[OpenFileFromPath,XmlFilePath],ConvertNodesToCodeImpl->[NodeId,ConvertNodesToCodeInternal,VerboseLogging,HasUnsavedChanges],CreateNodeImpl->[CreateCustomNodeInstance,TryParse,X,NodeXml,NodeId,Name,Node,CreateNodeFromTypeName,AddNodeToCurrentWorkspace,RecordCreatedModel,GUID,Y,DefaultPosition,GetFunctionDescriptor,IsVarArg,File,LogError,CreateNodeFromXml],RunCancelImpl->[Run]]] | Create note implementation. | Why is this TODO here? In general, a TODO should be encoded in a YT task. This one just seems erroneous. |
@@ -249,7 +249,9 @@ public class SearchHistoryActionTest {
SearchHistoryResponse result = call();
assertThat(result.getMeasuresCount()).isEqualTo(1);
- assertThat(result.getMeasures(0).getHistoryCount()).isEqualTo(0);
+ assertThat(result.getMeasures(0).getHistoryCount()).isEqualTo(1);
+ assertThat(result.getMeasures(0).getHistory(0).hasDate()).isTrue();
+ assertThat(result.getMeasures(0).getHistory(0).hasValue()).isFalse();
}
@Test
| [SearchHistoryActionTest->[empty_response->[singletonList,call,setMetrics,getKey,isEqualTo,hasSize,insertPrivateProject,containsExactly,addProjectPermission],insertNewViolationMetric->[insert,setUserManaged,commit],fail_if_not_enough_permissions->[call,expect,addProjectPermission],return_best_values_for_files->[call,setMetrics,asList,newFileDto,insert,isEqualTo,getKey,insertComponent,containsExactly,commit,setComponent,setBestValue],fail_if_unknown_component->[call,setComponent,expect],insertNclocMetric->[insert,setUserManaged,commit],setUp->[setMetrics,newArrayList,getDefaultOrganization,insertComplexityMetric,getKey,insertNclocMetric,insertProjectAndSnapshot,insertNewViolationMetric,newPrivateProjectDto,addProjectPermission],definition->[isNotEmpty,getDef,isEqualTo,isFalse],fail_when_component_is_removed->[expect,expectMessage,getDefaultOrganization,insertComponent,newPrivateProjectDto,setEnabled,addProjectPermission,execute],do_not_return_unprocessed_analyses->[call,insert,isEqualTo,commit,setStatus],return_measures->[call,formatDateTime,setCreatedAt,newFileDto,insert,getKey,isEqualTo,insertComponent,tuple,setValue,getCreatedAt,containsExactly,commit,setVariation,getMeasures],pagination_applies_to_analyses->[call,toList,get,insertPrivateProject,collect,containsExactly,commit,addProjectPermission,setPageSize],insertComplexityMetric->[insert,setUserManaged,commit],newMetricDtoWithoutOptimization->[setUserManaged],inclusive_from_and_to_dates->[call,toList,get,insertPrivateProject,collect,setTo,containsExactly,commit,addProjectPermission],call->[getPageSize,build,getComponent,executeProtobuf,getPage,setNullable,getTo,newRequest,join,getFrom,setParam,valueOf,getMetrics],fail_if_unknown_metric->[call,setMetrics,newArrayList,expect,expectMessage,getKey],json_example->[getInput,isSimilarTo,insert,getTime,setValue,insertPrivateProject,forEach,commit,setVariation,addProjectPermission,responseExampleAsString],do_not_return_developer_measures->[singletonList,call,setMetrics,setDeveloperId,insert,getKey,isEqualTo,commit],return_metrics->[call,insert,getKey,setValue,containsExactly,commit],SearchHistoryAction,create,getDbClient,standalone,WsActionTester,from,none,getSession]] | This method will insert a new Measurement in the database and check that it does not return developer. | I think this fix would require a dedicated test in order to perfectly understand what happen when there's no measure on a analysis |
@@ -348,7 +348,7 @@ function getAmpConfig() {
xhr.send(null);
return promise
.then(text => {
- const match = text.match(/self\.AMP_CONFIG=([^;]+)/);
+ const match = text.match(/self\.AMP_CONFIG=(\{.+?\})/);
if (!match) {
throw new Error("Can't find AMP_CONFIG in: " + text);
}
| [No CFG could be retrieved] | Gets the AMP_CONFIG from the user s cookie and updates the global variable AMP. | What exactly is this trying to do that it's regex-matching JS? Not that it should be fixed in this PR, but curious |
@@ -1342,6 +1342,8 @@ class Command(object):
parser.add_argument('reference', help='Reference to link. e.g.: mylib/1.X@user/channel')
parser.add_argument("--remove", action='store_true', default=False,
help='Remove linked reference (target not required)')
+ parser.add_argument("-l", "--layout",
+ help='Define an alternative layout filename')
args = parser.parse_args(*args)
self._warn_python2()
| [Command->[export->[export],info->[info],install->[install],source->[source],remove->[remove,info],new->[new],imports->[imports],link->[link],upload->[upload],copy->[copy],download->[download],run->[_commands,_warn_python2,_show_help],export_pkg->[export_pkg],test->[test],inspect->[inspect],package->[package],_show_help->[check_all_commands_listed],create->[create],build->[build]],main->[Command,run]] | Links a conan reference with a local folder path. | IMO, this should be a path to a file, not just a name. Maybe we can agree that relative paths are resolved to the _layouts_ folder inside the cache (here you have the _layout name_), but this should be converted to an absolute path as soon as possible and this path stored associated with the reference. And by default, this argument should take the _default layout_ name/path. The logic in the installer will be straightforward then. |
@@ -6,9 +6,11 @@ class GlobalActivitiesController < ApplicationController
teams = current_user.teams if teams.blank?
@teams = teams
@activity_types = Activity.activity_types_list
- @users = UserTeam.my_employees(current_user)
+ @user_list = User.where(id: UserTeam.where(team: current_user.teams).select(:user_id))
+ .distinct
+ .pluck(:full_name, :id)
@grouped_activities, more_activities =
- ActivitiesService.load_activities(teams, activity_filters)
+ ActivitiesService.load_activities(current_user, teams, activity_filters)
respond_to do |format|
format.json do
render json: {
| [GlobalActivitiesController->[search_subjects->[teams,render,respond_to,zero?,pluck,json,each,where,present?,map],subject_search_params->[permit],index->[teams,my_employees,render,respond_to,load_activities,html,json,activity_types_list,blank?,first,last],activity_filters->[permit]]] | This action shows the list of all the items in the system that match the given filter. | Metrics/LineLength: Line is too long. [90/80] |
@@ -301,6 +301,10 @@ public final class RedisLockRegistry implements ExpirableLockRegistry, Disposabl
return;
}
try {
+ if (!isAcquiredInThisProcess()) {
+ throw new IllegalStateException("Lock was released in the store due to expiration.");
+ }
+
if (Thread.currentThread().isInterrupted()) {
RedisLockRegistry.this.executor.execute(this::removeLockKey);
}
| [RedisLockRegistry->[RedisLock->[lock->[lock],unlock->[unlock],equals->[equals],hashCode->[hashCode],lockInterruptibly->[rethrowAsLockException,lockInterruptibly],tryLock->[tryLock,rethrowAsLockException]]]] | This method unlocks the lock. | Perhaps we should be more explicit? `...due to expiration. The integrity of data protected by this lock may have been compromised.` ? |
@@ -20,11 +20,16 @@ const crypto = require('crypto');
const debounce = require('debounce');
const del = require('del');
const esbuild = require('esbuild');
+/** @type {Object} */
const experimentDefines = require('../global-configs/experiments-const.json');
const fs = require('fs-extra');
const MagicString = require('magic-string');
const open = require('open');
const path = require('path');
+/**
+ * TypeScript doesn't like default exports.
+ * @type {*}
+ */
const remapping = require('@ampproject/remapping');
const wrappers = require('../compile/compile-wrappers');
const {
| [No CFG could be retrieved] | Creates an instance of the class. Tasks that should print the help text for the modules that are not in the minified modules. | Why is this annotation and the one below it needed? |
@@ -342,7 +342,6 @@ namespace System
int smallLength = small._length;
// The output will be at least as long as the largest input
- result = new BigInteger(0);
result._length = largeLength;
// Add each block and add carry the overflow to the next block
| [Number->[BigInteger->[DivRem->[DivRem],HeuristicDivide->[Compare],SetUInt64->[SetUInt32],MultiplyPow10->[IsZero,Pow10,Multiply],Pow10->[Multiply],Multiply->[Multiply],Multiply10->[IsZero],CountSignificantBits->[CountSignificantBits]]]] | Add two big integers. | Doesn't `result` still need to be zero initialized or is this bypassed because `_blocks` is a fixed sized buffer? |
@@ -117,7 +117,7 @@ namespace DynamoPythonTests
Assert.IsTrue(matches.ContainsKey("a"));
Assert.AreEqual("5.0", matches["a"]);
}
-
+
[Test]
[Category("UnitTests")]
public void CanMatchBasicArrayVarSingleLine()
| [CodeCompletionTests->[CanMatchImportSystemAndLoadLibraryAndWithComment->[UpdateImportedTypes,AreEqual,Count,IsTrue,ToList,SequenceEqual],CanFindAllTypeImports->[ContainsKey,FindAllTypeImportStatements,AreEqual,IsTrue],CanFindTypeSpecificAutodeskImportsSingleTypeSingleLine->[ContainsKey,IsTrue,AreEqual,FindTypeSpecificImportStatements],CanFindTypeSpecificImportsSingleTypeSingleLine->[ContainsKey,IsTrue,AreEqual,FindTypeSpecificImportStatements],CanMatchBasicDictVarSingleLine->[dictRegex,AreEqual,Count,IsTrue,ContainsKey,FindVariableStatementWithRegex],CanMatchComplexDictVarMultiLine->[dictRegex,AreEqual,Count,IsTrue,ContainsKey,FindVariableStatementWithRegex],CanMatchComplexDictVarSingleLine->[dictRegex,AreEqual,Count,IsTrue,ContainsKey,FindVariableStatementWithRegex],CanImportSystemLibraryAndGetCompletionData->[GetCompletionData,Any,Count,AreEqual,IsTrue,Select,ToList,SequenceEqual,Text],CanFindSystemCollectionsAssignmentAndType->[VariableTypes,UpdateImportedTypes,AreEqual,IsTrue,ContainsKey,UpdateVariableTypes],CanImportLibrary->[UpdateImportedTypes,AreEqual,Count,IsTrue,ContainsKey],CanMatchAllVariableTypes->[FindAllVariables,AreEqual,Count,Item3],CanMatchAllVariablesSingleLine->[FindAllVariables,AreEqual,Count,Item3],CanGetCompletionDataForArrayListVariable->[GetCompletionData,Length,AreNotEqual],CanMatchBasicImportStatementMultiLine->[AreEqual,Count,IsTrue,ContainsKey,FindBasicImportStatements],CanMatchBasicImportStatement->[AreEqual,Count,IsTrue,ContainsKey,FindBasicImportStatements],CanFindTypeSpecificImportsMultipleTypesSingleLine->[ContainsKey,IsTrue,AreEqual,FindTypeSpecificImportStatements],CanMatchBasicNumVarSingleLine->[doubleRegex,AreEqual,Count,IsTrue,ContainsKey,FindVariableStatementWithRegex],RunAfterAllTests->[ResolveAssembly,AssemblyResolve],CanIdentifyVariableTypeAndGetCompletionData->[GetCompletionData,Length,AreNotEqual],CanMatchBasicArrayVarSingleLine->[AreEqual,Count,IsTrue,ContainsKey,arrayRegex,FindVariableStatementWithRegex],DoesntMatchBadVariable->[FindVariableStatementWithRegex,dictRegex,AreEqual,Count],CanMatchImportSystemLibraryWithComment->[AreEqual,Count,IsTrue,ContainsKey,FindBasicImportStatements],CanImportSystemCollectionsLibraryAndGetCompletionData->[GetCompletionData,Any,Count,AreEqual,IsTrue,Select,Length,Text],VerifyIronPythonLoadedAssemblies->[Contains,FullName,GetAssemblies,StartsWith,Fail,Add],CanFindDifferentTypesOfImportsAndLoad->[ContainsVariable,UpdateImportedTypes,AreEqual,Count,IsTrue],CanMatchIntSingleLine->[intRegex,AreEqual,Count,IsTrue,ContainsKey,FindVariableStatementWithRegex],DuplicateCallsToImportShouldBeFine->[UpdateImportedTypes,AreEqual,Count,IsTrue,ToList,SequenceEqual],SetupPythonTests->[AssemblyResolve,Combine,Location,logger,GetDirectoryName,ResolveAssembly]]] | This method checks if BasicNumVarSingleLine can be found in BasicArrayVarSingleLine. | Can we revert this file if there are no changes to it. |
@@ -0,0 +1,18 @@
+class ReauthnRequiredController < ApplicationController
+ before_action :confirm_recently_authenticated
+
+ def recently_authenticated?
+ return false unless user_session.present?
+ authn_at = user_session[:authn_at]
+ return false unless authn_at.present?
+ authn_at > Time.zone.now - Figaro.env.reauthn_window.to_i
+ end
+
+ def confirm_recently_authenticated
+ @reauthn = reauthn?
+ return unless user_signed_in?
+ return if recently_authenticated?
+ store_location_for(:user, request.url)
+ redirect_to user_password_confirm_url
+ end
+end
| [No CFG could be retrieved] | No Summary Found. | throw this into a private method so `recently_authenticated?` is a tad shorter / easier to read? |
@@ -0,0 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+version_info = (0, 1, 0)
+__version__ = ".".join(map(str, version_info))
| [No CFG could be retrieved] | No Summary Found. | should the version match beam version? We do not have other sub-components with their own versions. |
@@ -29,7 +29,7 @@ class AsyncInfoController < ApplicationController
set_surrogate_key_header "shell-version-endpoint"
# shell_version will change on every deploy.
# *Technically* could be only on changes to assets and shell, but this is more fool-proof.
- shell_version = ApplicationConfig["RELEASE_FOOTPRINT"] + SiteConfig.admin_action_taken_at.to_s
+ shell_version = ForemInstance.deployed_at + SiteConfig.admin_action_taken_at.to_s
render json: { version: shell_version }.to_json
end
| [AsyncInfoController->[user_cache_key->[last_sign_in_at,id,last_reacted_at,updated_at,blocking_others_count,reactions_count,last_followed_at,pro?,following_tags_count,articles_count],base_data->[user_signed_in?,decorate,render,respond_to,discard,json],broadcast_data->[presence,to_json],shell_version->[to_s,set_surrogate_key_header,to_json,render],user_data->[to_json],before_action]] | Renders a single lease that can be used to execute a shell. | Using the newly created ForemInstance.deployed_at method here as will set ApplicationConfig["RELEASE_FOOTPRINT"] if it is present. |
@@ -201,6 +201,13 @@ if (empty($reshook))
// Array of possible substitutions (See also file mailing-send.php that should manage same substitutions)
$substitutionarray['__ID__'] = $obj->source_id;
+ if ($obj->source_type == "thirdparty") {
+ $thirdpartystatic = new Societe($db);
+ $thirdpartystatic->fetch($obj->source_id);
+
+ $substitutionarray['__THIRDPARTY_CUSTOMER_CODE__'] = $thirdpartystatic->code_client;
+ $substitutionarray['__THIRDPARTY_CUSTOMER_CODE_WITHOUT_PREFIX__'] = substr($thirdpartystatic->code_client, 1);
+ }
$substitutionarray['__EMAIL__'] = $obj->email;
$substitutionarray['__LASTNAME__'] = $obj->lastname;
$substitutionarray['__FIRSTNAME__'] = $obj->firstname;
| [fetch,create,formconfirm,sendfile,fetch_object,reset_targets_status,countNbOfTargets,selectColor,rollback,get_form,createFromClone,editfieldval,valid,begin,initHooks,idate,load,getValidAddress,Create,error,transnoentities,executeHooks,update,escape,close,showOptionals,delete,textwithpicto,query,fetch_name_optionals_label,transnoentitiesnoconv,editfieldkey,trans,num_rows,setStatut,commit] | This function is used to generate a list of possible substitutions for a given object. Subscribes to the email. | The new can be set outside of the loop. |
@@ -19,8 +19,10 @@ def default_currency(request):
# request is a required parameter
# pylint: disable=W0613
-def categories(request):
- return {'categories': Category.tree.root_nodes()}
+def navigation(request):
+ menus = Menu.objects.prefetch_related(
+ 'items', 'items__collection', 'items__category', 'items__page').all()
+ return {settings.NAVIGATION_CONTEXT_NAME: list(menus)}
def search_enabled(request):
| [default_currency->[get_setting_as_dict],get_setting_as_dict->[getattr],categories->[root_nodes]] | Category tree view. | if you prefetch `foo__bar` then `foo` will be automatically prefetched |
@@ -1417,11 +1417,13 @@ export class AmpLightboxGallery extends AMP.BaseElement {
}
const closeGalleryAndShowTargetSlide = event => {
- this.closeGallery_();
- this.currentElemId_ = thumbnailObj.element.lightboxItemId;
- dev().assert(this.carousel_).getImpl()
- .then(carousel => carousel.showSlideWhenReady(this.currentElemId_));
- this.updateDescriptionBox_();
+ this.closeGallery_().then(() => {
+ this.currentElemId_ = thumbnailObj.element.lightboxItemId;
+ dev().assert(this.carousel_).getImpl()
+ .then(carousel => carousel.showSlideWhenReady(this.currentElemId_));
+ this.updateDescriptionBox_();
+ });
+
event.stopPropagation();
};
element.addEventListener('click', closeGalleryAndShowTargetSlide);
| [No CFG could be retrieved] | Adds a lightbox manager to the window. Installs a new manager for the given window. | nit: Using class methods for listener callbacks with more than a couple lines of logic can help keep things organized |
@@ -127,6 +127,8 @@ class ICA(ContainsMixin):
np.random.RandomState to initialize the FastICA estimation.
As the estimation is non-deterministic it can be useful to
fix the seed to have reproducible results.
+ method : {'fastica', 'infomax'}
+ The ICA method to use.
algorithm : {'parallel', 'deflation'}
Apply parallel or deflational algorithm for FastICA.
fun : string or function, optional. Default: 'logcosh'
| [run_ica->[decompose_raw,ICA,_detect_artifacts],ICA->[_sources_as_evoked->[_transform_evoked],decompose_epochs->[_fit_epochs],_transform_raw->[_pre_whiten,_transform],plot_sources_raw->[plot_sources],get_sources_epochs->[_transform_epochs],find_bads_ecg->[get_sources,score_sources],_fit_raw->[_reset],pick_sources_epochs->[apply],_fit->[fit],_sources_as_epochs->[_transform_epochs],_apply_epochs->[_pre_whiten],sources_as_epochs->[get_sources],sources_as_raw->[get_sources],pick_sources_raw->[apply],find_sources_epochs->[score_sources],find_bads_eog->[score_sources],_apply_raw->[_pre_whiten],find_sources_raw->[score_sources],_sources_as_raw->[_transform_raw],_transform_evoked->[_pre_whiten,_transform],_apply_evoked->[_pre_whiten],score_sources->[_transform_epochs,_transform_raw,_transform_evoked],plot_topomap->[plot_components],_fit_epochs->[_reset],get_sources_raw->[_transform_raw],_transform_epochs->[_pre_whiten,_transform],decompose_raw->[fit]],_detect_artifacts->[score_sources],read_ica->[_deserialize,ICA],_write_ica->[_serialize],_make_xy_sfunc] | The number of components used for ICA decomposition. Attributes for the current fit. | we either introduce a third method for the extended version or we need to have an option to switch on/off the extended version in ica.fit (the default is set to infomax extended and I cannot switch to the standard infomax version) |
@@ -153,6 +153,7 @@ async function dist() {
console.log('\n');
}
+ await generateFileListing();
await stopNailgunServer(distNailgunPort);
await formatExtractedMessages();
| [No CFG could be retrieved] | The main entry point for the command line interface. Build amp - login - done. js file. | Move the call to `generateFileListing()` to line 167 so that the files (optionally) generated by lines 162-164 are also included in the listing. |
@@ -163,6 +163,9 @@ class DistributedAdam(DistributedOptimizerImplBase):
opt_info["optimizer"] = "DownpourSGD"
opt_info["fleet_desc"] = ps_param
opt_info["worker_skipped_ops"] = worker_skipped_ops
+ opt_info["use_cvm"] = False
+ if strategy.get("use_cvm") is not None:
+ opt_info["use_cvm"] = strategy["use_cvm"]
for loss in losses:
loss.block.program._fleet_opt = opt_info
| [DistributedAdam->[__init__->[super],_minimize->[add_data_norm_table,add_dense_table,DownpourServer,PSParameter,get_desc,extend,find_distributed_lookup_table_inputs,i,program_configs,range,find_distributed_lookup_table_outputs,append,add_sparse_table,DownpourWorker,len,sorted,isinstance,id,find_distributed_lookup_table,append_backward,str,CopyFrom]]] | Minimizes the n - node node by generating a distributed optimizer and a distributed optimizer. Adds the tables to the network. Add a dense table to the model and train the user - specified training parameters. | `opt_info["use_cvm"] = strategy.get("use_cvm", False)` ? |
@@ -81,8 +81,7 @@ public class SaltKeyUtils {
});
}
else {
- LOG.info(String.format("No key found for minionID [%s]", minionId));
- return false;
+ throw new IllegalArgumentException("No key found for minionID [" + minionId + "]");
}
}
}
| [SaltKeyUtils->[deleteSaltKey->[anyMatch,PermissionException,deleteKey,getKeys,format,hasRole,info,orElseGet],getLogger]] | Delete salt key for a minion. | Please check, if this change has consequences at other places where this function is used. I can see SaltServerActionService using it and I think at this place it was wanted to ignore a possible error. |
@@ -73,18 +73,10 @@ const CLOSURE_TYPE_CHECK_TARGETS = {
srcGlobs: ['src/amp-story-player/**/*.js'],
warningLevel: 'QUIET',
},
- 'src-core': CORE_SRCS_GLOBS,
- 'src-experiments': ['src/experiments/**/*.js', ...CORE_SRCS_GLOBS],
'src-inabox': {
srcGlobs: ['src/inabox/**/*.js'],
warningLevel: 'QUIET',
},
- 'src-polyfills': [
- 'src/polyfills/**/*.js',
- // Exclude fetch its dependencies are cleaned up/extracted to core.
- '!src/polyfills/fetch.js',
- ...CORE_SRCS_GLOBS,
- ],
'src-preact': {
srcGlobs: ['src/preact/**/*.js', ...CORE_SRCS_GLOBS],
warningLevel: 'QUIET',
| [No CFG could be retrieved] | A closure compile function that checks the type of a target by using the type - check rules The list of files that should be skipped. | Once this merges I'd argue we should remove all the closure targets |
@@ -434,6 +434,9 @@ export function applyStaticLayout(element) {
if (height) {
setStyle(element, 'height', height);
}
+ } else if (layout == Layout.FLUID) {
+ element.classList.add('i-amphtml-layout-awaiting-size');
+ setStyle(element, 'width', width ? width : '100%');
}
return layout;
}
| [No CFG could be retrieved] | Applies the layout to the supplied element. | This will work well if there's no margin. Is this valid assumption for you here? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.