Skip to content

Commit

Permalink
Update param filenames (#100)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexAxthelm authored Nov 14, 2024
1 parent c07fd4c commit 1391786
Show file tree
Hide file tree
Showing 16 changed files with 18 additions and 24 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: workflow.pacta
Title: Run PACTA
Version: 0.0.0.9012
Version: 0.0.0.9013
Authors@R:
c(person(given = "CJ",
family = "Yetman",
Expand Down
3 changes: 0 additions & 3 deletions inst/extdata/parameters/GENERAL_2022Q4.json

This file was deleted.

3 changes: 0 additions & 3 deletions inst/extdata/parameters/GENERAL_2023Q4.json

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"inherit": "default",
"inherit": "analysis_default",
"analysis": {
"startYear": 2022,
"holdingsDate": "2022-12-31",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"inherit": "default",
"inherit": "analysis_default",
"analysis": {
"startYear": 2023,
"holdingsDate": "2023-12-31",
Expand Down
3 changes: 3 additions & 0 deletions inst/extdata/parameters/analysis_GENERAL_2022Q4.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"inherit": "analysis_2022Q4"
}
3 changes: 3 additions & 0 deletions inst/extdata/parameters/analysis_GENERAL_2023Q4.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"inherit": "analysis_2023Q4"
}
File renamed without changes.
2 changes: 1 addition & 1 deletion inst/extdata/schema/portfolio.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!DOCTYPE html><html lang=en> <head><link rel=stylesheet type=text/css href=css/overpass300,400,600,800.css><script src=js/jquery-3.4.1.min.js></script><link href=css/bootstrap-4.3.1.min.css rel=stylesheet><script src=js/bootstrap-4.3.1.min.js></script><link rel=stylesheet type=text/css href=css/schema_doc.css><!-- <script src="js/facf9fa52c.js"></script> --><script src=js/schema_doc.min.js></script><meta charset=utf-8><title>portfolio</title></head> <body onload=anchorOnLoad(); id=root><div class=text-right> <button class="btn btn-primary" type=button data-toggle=collapse data-target=.collapse:not(.show) aria-expanded=false>Expand all</button> <button class="btn btn-primary" type=button data-toggle=collapse data-target=.collapse.show aria-expanded=false>Collapse all</button> </div> <div class=breadcrumbs></div> <h1>portfolio</h1><span class="badge badge-dark value-type">Type: object</span><br> <span class=description><p>Definition for PACTA portfolio object</p> </span> <span class="badge badge-info no-additional">No Additional Properties</span> <div class=accordion id=accordionfiles> <div class=card> <div class=card-header id=headingfiles> <h2 class=mb-0> <button class="btn btn-link property-name-button" type=button data-toggle=collapse data-target=#files aria-expanded aria-controls=files onclick="setAnchor('#files')"><span class=property-name>files</span> <span class="badge badge-warning required-property">Required</span></button> </h2> </div> <div id=files class="collapse property-definition-div" aria-labelledby=headingfiles data-parent=#accordionfiles> <div class="card-body pl-5"> <div class=breadcrumbs>root <svg width=1em height=1em viewbox="0 0 16 16" class="bi bi-arrow-right-short" fill=currentColor xmlns=http://www.w3.org/2000/svg> <path fill-rule=evenodd d="M4 8a.5.5 0 0 1 .5-.5h5.793L8.146 5.354a.5.5 0 1 1 .708-.708l3 3a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708-.708L10.293 8.5H4.5A.5.5 0 0 1 4 8z"/> </svg> <a href=#files onclick="anchorLink('files')">files</a></div><span class="badge badge-dark value-type">Type: string</span><br> <span class=description><p>List of portfolio files to be analyzed.</p> </span> </div> </div> </div> </div> <div class=accordion id=accordionholdingsDate> <div class=card> <div class=card-header id=headingholdingsDate> <h2 class=mb-0> <button class="btn btn-link property-name-button" type=button data-toggle=collapse data-target=#holdingsDate aria-expanded aria-controls=holdingsDate onclick="setAnchor('#holdingsDate')"><span class=property-name>holdingsDate</span> <span class="badge badge-warning required-property">Required</span></button> </h2> </div> <div id=holdingsDate class="collapse property-definition-div" aria-labelledby=headingholdingsDate data-parent=#accordionholdingsDate> <div class="card-body pl-5"> <div class=breadcrumbs>root <svg width=1em height=1em viewbox="0 0 16 16" class="bi bi-arrow-right-short" fill=currentColor xmlns=http://www.w3.org/2000/svg> <path fill-rule=evenodd d="M4 8a.5.5 0 0 1 .5-.5h5.793L8.146 5.354a.5.5 0 1 1 .708-.708l3 3a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708-.708L10.293 8.5H4.5A.5.5 0 0 1 4 8z"/> </svg> <a href=#holdingsDate onclick="anchorLink('holdingsDate')">holdingsDate</a></div><span class="badge badge-dark value-type">Type: enum (of string)</span><span class="badge badge-info value-type">Format: date</span><br> <span class=description><p>Date of the holdings data.</p> </span><div class=enum-value id=holdingsDate_enum> <h4>Must be one of:</h4> <ul class=list-group><li class="list-group-item enum-item">"2022-12-31"</li><li class="list-group-item enum-item">"2023-12-31"</li></ul> </div> </div> </div> </div> </div> <div class=accordion id=accordionname> <div class=card> <div class=card-header id=headingname> <h2 class=mb-0> <button class="btn btn-link property-name-button" type=button data-toggle=collapse data-target=#name aria-expanded aria-controls=name onclick="setAnchor('#name')"><span class=property-name>name</span></button> </h2> </div> <div id=name class="collapse property-definition-div" aria-labelledby=headingname data-parent=#accordionname> <div class="card-body pl-5"> <div class=breadcrumbs>root <svg width=1em height=1em viewbox="0 0 16 16" class="bi bi-arrow-right-short" fill=currentColor xmlns=http://www.w3.org/2000/svg> <path fill-rule=evenodd d="M4 8a.5.5 0 0 1 .5-.5h5.793L8.146 5.354a.5.5 0 1 1 .708-.708l3 3a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708-.708L10.293 8.5H4.5A.5.5 0 0 1 4 8z"/> </svg> <a href=#name onclick="anchorLink('name')">name</a></div><span class="badge badge-dark value-type">Type: string</span><br> <span class=description><p>Name of the portfolio.</p> </span> </div> </div> </div> </div> <footer> <p class=generated-by-footer>Generated using <a href=https://github.com/coveooss/json-schema-for-humans>json-schema-for-humans</a></p> </footer></body> </html>
<!DOCTYPE html><html lang=en> <head><link rel=stylesheet type=text/css href=css/overpass300,400,600,800.css><script src=js/jquery-3.4.1.min.js></script><link href=css/bootstrap-4.3.1.min.css rel=stylesheet><script src=js/bootstrap-4.3.1.min.js></script><link rel=stylesheet type=text/css href=css/schema_doc.css><!-- <script src="js/facf9fa52c.js"></script> --><script src=js/schema_doc.min.js></script><meta charset=utf-8><title>portfolio</title></head> <body onload=anchorOnLoad(); id=root><div class=text-right> <button class="btn btn-primary" type=button data-toggle=collapse data-target=.collapse:not(.show) aria-expanded=false>Expand all</button> <button class="btn btn-primary" type=button data-toggle=collapse data-target=.collapse.show aria-expanded=false>Collapse all</button> </div> <div class=breadcrumbs></div> <h1>portfolio</h1><span class="badge badge-dark value-type">Type: object</span><br> <span class=description><p>Definition for PACTA portfolio object</p> </span> <span class="badge badge-info no-additional">No Additional Properties</span> <div class=accordion id=accordionfiles> <div class=card> <div class=card-header id=headingfiles> <h2 class=mb-0> <button class="btn btn-link property-name-button" type=button data-toggle=collapse data-target=#files aria-expanded aria-controls=files onclick="setAnchor('#files')"><span class=property-name>files</span> <span class="badge badge-warning required-property">Required</span></button> </h2> </div> <div id=files class="collapse property-definition-div" aria-labelledby=headingfiles data-parent=#accordionfiles> <div class="card-body pl-5"> <div class=breadcrumbs>root <svg width=1em height=1em viewbox="0 0 16 16" class="bi bi-arrow-right-short" fill=currentColor xmlns=http://www.w3.org/2000/svg> <path fill-rule=evenodd d="M4 8a.5.5 0 0 1 .5-.5h5.793L8.146 5.354a.5.5 0 1 1 .708-.708l3 3a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708-.708L10.293 8.5H4.5A.5.5 0 0 1 4 8z"/> </svg> <a href=#files onclick="anchorLink('files')">files</a></div><span class="badge badge-dark value-type">Type: array of string</span><br> <span class=description><p>List of portfolio files to be analyzed.</p> </span> <span class="badge badge-info no-additional">No Additional Items</span><h4>Each item of this array must be:</h4> <div class=card> <div class="card-body items-definition" id=files_items> <div class=breadcrumbs>root <svg width=1em height=1em viewbox="0 0 16 16" class="bi bi-arrow-right-short" fill=currentColor xmlns=http://www.w3.org/2000/svg> <path fill-rule=evenodd d="M4 8a.5.5 0 0 1 .5-.5h5.793L8.146 5.354a.5.5 0 1 1 .708-.708l3 3a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708-.708L10.293 8.5H4.5A.5.5 0 0 1 4 8z"/> </svg> <a href=#files onclick="anchorLink('files')">files</a> <svg width=1em height=1em viewbox="0 0 16 16" class="bi bi-arrow-right-short" fill=currentColor xmlns=http://www.w3.org/2000/svg> <path fill-rule=evenodd d="M4 8a.5.5 0 0 1 .5-.5h5.793L8.146 5.354a.5.5 0 1 1 .708-.708l3 3a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708-.708L10.293 8.5H4.5A.5.5 0 0 1 4 8z"/> </svg> <a href=#files_items onclick="anchorLink('files_items')">files items</a></div><span class="badge badge-dark value-type">Type: string</span><br> <span class=description><p>Path to the file.</p> </span> </div> </div> </div> </div> </div> </div> <div class=accordion id=accordionholdingsDate> <div class=card> <div class=card-header id=headingholdingsDate> <h2 class=mb-0> <button class="btn btn-link property-name-button" type=button data-toggle=collapse data-target=#holdingsDate aria-expanded aria-controls=holdingsDate onclick="setAnchor('#holdingsDate')"><span class=property-name>holdingsDate</span> <span class="badge badge-warning required-property">Required</span></button> </h2> </div> <div id=holdingsDate class="collapse property-definition-div" aria-labelledby=headingholdingsDate data-parent=#accordionholdingsDate> <div class="card-body pl-5"> <div class=breadcrumbs>root <svg width=1em height=1em viewbox="0 0 16 16" class="bi bi-arrow-right-short" fill=currentColor xmlns=http://www.w3.org/2000/svg> <path fill-rule=evenodd d="M4 8a.5.5 0 0 1 .5-.5h5.793L8.146 5.354a.5.5 0 1 1 .708-.708l3 3a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708-.708L10.293 8.5H4.5A.5.5 0 0 1 4 8z"/> </svg> <a href=#holdingsDate onclick="anchorLink('holdingsDate')">holdingsDate</a></div><span class="badge badge-dark value-type">Type: enum (of string)</span><span class="badge badge-info value-type">Format: date</span><br> <span class=description><p>Date of the holdings data.</p> </span><div class=enum-value id=holdingsDate_enum> <h4>Must be one of:</h4> <ul class=list-group><li class="list-group-item enum-item">"2022-12-31"</li><li class="list-group-item enum-item">"2023-12-31"</li></ul> </div> </div> </div> </div> </div> <div class=accordion id=accordionname> <div class=card> <div class=card-header id=headingname> <h2 class=mb-0> <button class="btn btn-link property-name-button" type=button data-toggle=collapse data-target=#name aria-expanded aria-controls=name onclick="setAnchor('#name')"><span class=property-name>name</span></button> </h2> </div> <div id=name class="collapse property-definition-div" aria-labelledby=headingname data-parent=#accordionname> <div class="card-body pl-5"> <div class=breadcrumbs>root <svg width=1em height=1em viewbox="0 0 16 16" class="bi bi-arrow-right-short" fill=currentColor xmlns=http://www.w3.org/2000/svg> <path fill-rule=evenodd d="M4 8a.5.5 0 0 1 .5-.5h5.793L8.146 5.354a.5.5 0 1 1 .708-.708l3 3a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708-.708L10.293 8.5H4.5A.5.5 0 0 1 4 8z"/> </svg> <a href=#name onclick="anchorLink('name')">name</a></div><span class="badge badge-dark value-type">Type: string</span><br> <span class=description><p>Name of the portfolio.</p> </span> </div> </div> </div> </div> <footer> <p class=generated-by-footer>Generated using <a href=https://github.com/coveooss/json-schema-for-humans>json-schema-for-humans</a></p> </footer></body> </html>
2 changes: 1 addition & 1 deletion inst/extdata/schema/portfolioParameters.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion inst/extdata/schema/rawParameters.html

Large diffs are not rendered by default.

9 changes: 1 addition & 8 deletions inst/extdata/schema/rawParameters.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,7 @@
,
"inherit": {
"type": "string",
"description": "Path to a file with inheritance information.",
"enum": [
"2022Q4",
"2023Q4",
"GENERAL_2022Q4",
"GENERAL_2023Q4",
"default"
]
"description": "Path to a file with inheritance information."
}
},
"anyOf": [
Expand Down
3 changes: 2 additions & 1 deletion inst/extdata/scripts/run_pacta.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ params <- pacta.workflow.utils::parse_raw_params(
raw_schema_file = system.file(
"extdata", "schema", "rawParameters.json",
package = "workflow.pacta"
)
),
force_array = c("portfolio", "files")
)

manifest_info <- workflow.pacta::run_pacta(params)
Expand Down
2 changes: 1 addition & 1 deletion tests/config/default_2022Q4.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
],
"holdingsDate": "2023-12-31"
},
"inherit": "2022Q4"
"inherit": "analysis_2022Q4"
}
}
2 changes: 1 addition & 1 deletion tests/config/default_2023Q4.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
],
"holdingsDate": "2023-12-31"
},
"inherit": "2023Q4"
"inherit": "analysis_2023Q4"
}
}
2 changes: 1 addition & 1 deletion tests/config/multiple_portfolio_files.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
],
"holdingsDate": "2023-12-31"
},
"inherit": "2023Q4"
"inherit": "analysis_2023Q4"
}
}

0 comments on commit 1391786

Please sign in to comment.