Skip to content

Commit

Permalink
tests: fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
iromeo committed Oct 18, 2024
1 parent 07b5068 commit 66b2399
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -455,18 +455,25 @@ class SnakemakeAPIProjectService(val project: Project): Disposable {
}
contextTypeAndSubsection2LambdaArgs.put(ctxAndName, value)
}
}

// functions
val funcIntroductionsByFqn = apiProvider.getFunctionIntroductionsByFqn(smkLangVers)
funcIntroductionsByFqn.forEach { (fqn, versAndParams) ->
val (_, params) = versAndParams
// functions
val funcIntroductionsByFqn = apiProvider.getFunctionIntroductionsByFqn(smkLangVers)
funcIntroductionsByFqn.forEach { (fqn, versAndParams) ->
val (_, params) = versAndParams

if (params.isPlaceholderInjectionAllowed) {
funFqnValidForInjection.add(fqn)
if (params.limitToSections.isNotEmpty()) {
val value = params.limitToSections.toTypedArray()
require(value.isNotEmpty()) {
"YAML format error: 'limitToSections' should not be empty for function '${fqn}'."
}
funFqnToSectionRestrictionList.put(fqn, value)
}

if (params.isPlaceholderInjectionAllowed) {
funFqnValidForInjection.add(fqn)
}
}
funFqnToSectionRestrictionList

SnakemakeAPIProjectState(
contextType2SingleArgSectionKeywords = contextType2SingleArgSectionKeywords.toImmutableMap(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ data class SmkKeywordDeprecationParams(
}

data class SmkKeywordIntroductionParams(
//val name: String,
val lambdaArgs: List<String>,
val keywordArgsAllowed: Boolean,
val multipleArgsAllowed: Boolean,
Expand All @@ -27,6 +28,7 @@ data class SmkKeywordIntroductionParams(
) {
companion object {
fun createFrom(rec: SmkAPIAnnParsingIntroductionRecord) = SmkKeywordIntroductionParams(
//name = rec.name,
lambdaArgs = rec.lambda_args,
limitToSections = rec.limit_to_sections,
keywordArgsAllowed = rec.keyword_args_allowed,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ Feature: Completion for snakemake keyword-like things
| rule_like | rule_like_removed | lang_version | expected_item | expected_item_type | missing_item | deprecated_key | removed_key | introduced_key |
| rule | rule | 1.0.0 | input | deprecated 1.0.0, removed 2.0.0 | output | input | output | log |
| rule | checkpoint | 1.0.0 | output | | xxx | input | output | log |
| rule | module | 1.0.0 | output | | xxx | input | output | log |
| rule | module | 1.0.0 | input | deprecated 1.0.0, removed 2.0.0 | output | input | output | log |
| checkpoint | checkpoint | 1.0.0 | input | deprecated 1.0.0, removed 2.0.0 | output | input | output | log |
| rule | rule | 2.0.0 | log | >=2.0.0 | input | input | output | log |
| rule | rule | 1.0.0 | threads | >=0.0.1, deprecated 2.0.0 | xxx | input | output | log |
Expand Down

0 comments on commit 66b2399

Please sign in to comment.