Skip to content

Commit

Permalink
added deployment notes
Browse files Browse the repository at this point in the history
  • Loading branch information
keithhurley committed Mar 11, 2024
1 parent c2a71a8 commit f456978
Show file tree
Hide file tree
Showing 35 changed files with 1,461 additions and 3,541 deletions.
2 changes: 1 addition & 1 deletion FinCatchAnalysis_1_Methods.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
## fca_fishSampleMetadata

- returns metadata for fish samples included in analysis
- returns fc_fishSampleMetadata object
- returns fc_fishSampleMetadata object
9 changes: 4 additions & 5 deletions FinCatchAnalysis_2_HelperFunctions.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ some_data %>%

### fca_getAnalysisFunctions

This function returns a list and description of the analysis functions available in the FinCatchAnalysis package.
This function returns a list and description of the analysis functions available in the FinCatchAnalysis package.

Example:

Expand All @@ -55,7 +55,7 @@ fca_getAnalysisFunctions()

This function creates a label for each survey to be used in outputs such as reports and plots. The arguments are a vector of surveyUid values and a reference to the analysis data object. The label returned is structured like:

>Title1 (WB=5110 | Method=21 | Year=2022 | Season=Spring)
> Title1 (WB=5110 \| Method=21 \| Year=2022 \| Season=Spring)
Example:

Expand All @@ -68,7 +68,7 @@ some_data %>%

This function creates a label for each fish sample to be used in outputs such as reports and plots. The arguments are a vector of surveyUid values and a dataframe of fish samples in the analysis taken from the data object. The label returned is structured like:

>WB=2832 | Method=45 | 2022-03-11 | Station=627
> WB=2832 \| Method=45 \| 2022-03-11 \| Station=627
Example:

Expand All @@ -79,10 +79,9 @@ some_data %>%

### fc_labeler_wqSample


This function creates a label for each fish sample to be used in outputs such as reports and plots. The arguments are a vector of surveyUid values and a dataframe of fish samples in the analysis taken from the data object. The label returned is structured like:

>WB=2832 | 2022-03-11 | Station=627
> WB=2832 \| 2022-03-11 \| Station=627
Example:

Expand Down
20 changes: 10 additions & 10 deletions FinCatchAnalysis_3_CreateAnalysis.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -36,31 +36,31 @@ Make sure to test each analysis function for:

7. Set grouping variables.

- To group analysis calculations during analysis, use the dplyr verbs
- To group analysis calculations during analysis, use the dplyr verbs

``` r
group_by(across(all_of(myGroups))
```

- add addition fields as necessary "group_by(across(all_of(myGroups), anotherFieldHere)"
- add addition fields as necessary "group_by(across(all_of(myGroups), anotherFieldHere)"

8. Write analysis code

- Always include Standard Error and Sample size (if appropriate), this allow users to calculate difference confidence intervals post hoc
- Always include Standard Error and Sample size (if appropriate), this allow users to calculate difference confidence intervals post hoc

- When including confidence intervals, include 95% and 80%
- When including confidence intervals, include 95% and 80%

- Make sure to account for missing data in any input
- Make sure to account for missing data in any input

9. Label values like survey, sample, species, waterbody, etc.

- Labelers exist for samples and surveys (make sure surveyUid's are set to -1 if not grouping by survey
- Labelers exist for samples and surveys (make sure surveyUid's are set to -1 if not grouping by survey

- Helper functions are available for coded values
- Helper functions are available for coded values

10. If analysis is calculated (as opposed to raw data summations), screen out species NOT in the processing list. This is necessisary because species NOT in the list do not carry the assumption that all specimans for that species were processed.
10. If analysis is calculated (as opposed to raw data summations), screen out species NOT in the processing list. This is necessisary because species NOT in the list do not carry the assumption that all specimans for that species were processed.

11. Attach all results to an analysis object (either base or custom). Example:
11. Attach all results to an analysis object (either base or custom). Example:

``` r
#create return object at beginning of function
Expand All @@ -87,7 +87,7 @@ Make sure to test each analysis function for:

```

12. Add the function to the list of analysis functions available in the package (found in inst folder). This list is used to populate the FinCatchRA UI and to feed the fc_getAvailableAnalysis function.
12. Add the function to the list of analysis functions available in the package (found in inst folder). This list is used to populate the FinCatchRA UI and to feed the fc_getAvailableAnalysis function.

### Create Custom Analysis R6 Object

Expand Down
77 changes: 77 additions & 0 deletions FinCatchDE_0_Deployment.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# FinCatchDE Deployment

## **Before Deployment**

Change:

1.       ConnectionString in AppSettings.json

2.       redirectUri at line 45 in previousFishSamples

3\.       redirectUri at line 164 in previousWaterSamples

4.       auth0 settings in clsAuthFunctions, fetchController.cs, and index.tsx

## **Deployment Steps**

The application needs to be self-contained (See REF-3 and REF-4); you might want to investigate publishing the application through Visual Studio's IIS publishing, but this is the way that has worked best for our development.

1.       Open the Projects in Visual Studio

2.       Ensure the application runs locally through Visual Studio

3.       Right click the solution and select Publish\...

4.       Select the Web Server (IIS) Target

5.       Select Web Deploy Package

6.       Put the package location in the same folder as the project

7.       Any name will do for the Site Name, we did Fish-Test, and click finish

8.       Select Show All Settings

9.       Change Deployment mode to Self-contained

10.    Change the target runtime to the required runtime (for us that was win-x64)

11.    Select Save

12.    Click the Publish button

13.    Wait for the Publish to be successful

14.    Open the Console/Git Bash/PowerShell

15.    Navigate to fisheries-field-sampling\\FisheriesFieldSampling\\FisheriesFieldSampling\\client-app\\ 

16.    Run npm run build

17.    Open File Explorer

18.    Navigate to fisheries-field-sampling\\FisheriesFieldSampling\\FisheriesFieldSampling\\client-app\\

19.    Copy the build folder within the project

20.    Navigate to the newly created zip file from the Publish button

21.    Extract into a folder named publish

22.    Navigate to publish\\Content\\D_C\\GitHub\\fish-test\\fisheries-field-sampling\\FisheriesFieldSampling\\FisheriesFieldSampling\\obj\\Release\\netcoreapp3.1\\win-x64\\PubTmp\\Out\\client-app folder

23.    Replace the build folder with the copied build folder

24.    Copy everything within the publish\\Content\\D_C\\GitHub\\fish-test\\fisheries-field-sampling\\FisheriesFieldSampling\\FisheriesFieldSampling\\obj\\Release\\netcoreapp3.1\\win-x64\\PubTmp\\Out\\ folder

25.    Open Remote Desktop

26.    Connect to the fincatchag.fishstaff.info computer

27.    Open the file explorer on the Remote Desktop

28.    Replace the contents of C:\\Websites\\FinCatchDE with the copied files/folders

29.    Open the IIS Manager

30.    Restart the FinCatchDE website
3 changes: 3 additions & 0 deletions _quarto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ book:
- FinCatch_SamplingRestrictions.qmd
- FinCatch_DataDesign.qmd
- FinCatch_Architecture.qmd
- part: FinCatchDE
chapters:
- FinCatchDE_0_Deployment.qmd
- part: Analysis R Package
chapters:
- FinCatchAnalysis_0.qmd
Expand Down
47 changes: 32 additions & 15 deletions docs/FInCatchAnalysis_WarningsErrors.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">


<title>FinCatch Documentation - 7&nbsp; Warnings and Errors</title>
<title>FinCatch Documentation - 8&nbsp; Warnings and Errors</title>
<style>
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
Expand Down Expand Up @@ -73,7 +73,7 @@
<button type="button" class="quarto-btn-toggle btn" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar,#quarto-sidebar-glass" aria-controls="quarto-sidebar" aria-expanded="false" aria-label="Toggle sidebar navigation" onclick="if (window.quartoToggleHeadroom) { window.quartoToggleHeadroom(); }">
<i class="bi bi-layout-text-sidebar-reverse"></i>
</button>
<nav class="quarto-page-breadcrumbs" aria-label="breadcrumb"><ol class="breadcrumb"><li class="breadcrumb-item"><a href="./FinCatchAnalysis_0.html">Analysis R Package</a></li><li class="breadcrumb-item"><a href="./FInCatchAnalysis_WarningsErrors.html"><span class="chapter-number">7</span>&nbsp; <span class="chapter-title">Warnings and Errors</span></a></li></ol></nav>
<nav class="quarto-page-breadcrumbs" aria-label="breadcrumb"><ol class="breadcrumb"><li class="breadcrumb-item"><a href="./FinCatchAnalysis_0.html">Analysis R Package</a></li><li class="breadcrumb-item"><a href="./FInCatchAnalysis_WarningsErrors.html"><span class="chapter-number">8</span>&nbsp; <span class="chapter-title">Warnings and Errors</span></a></li></ol></nav>
<a class="flex-grow-1" role="button" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar,#quarto-sidebar-glass" aria-controls="quarto-sidebar" aria-expanded="false" aria-label="Toggle sidebar navigation" onclick="if (window.quartoToggleHeadroom) { window.quartoToggleHeadroom(); }">
</a>
<button type="button" class="btn quarto-search-button" aria-label="Search" onclick="window.quartoOpenSearch();">
Expand Down Expand Up @@ -142,64 +142,81 @@
<li class="sidebar-item sidebar-item-section">
<div class="sidebar-item-container">
<a class="sidebar-item-text sidebar-link text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-2" aria-expanded="true">
<span class="menu-text">Analysis R Package</span></a>
<span class="menu-text">FinCatchDE</span></a>
<a class="sidebar-item-toggle text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-2" aria-expanded="true" aria-label="Toggle section">
<i class="bi bi-chevron-right ms-2"></i>
</a>
</div>
<ul id="quarto-sidebar-section-2" class="collapse list-unstyled sidebar-section depth1 show">
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./FinCatchDE_0_Deployment.html" class="sidebar-item-text sidebar-link">
<span class="menu-text"><span class="chapter-number">5</span>&nbsp; <span class="chapter-title">FinCatchDE Deployment</span></span></a>
</div>
</li>
</ul>
</li>
<li class="sidebar-item sidebar-item-section">
<div class="sidebar-item-container">
<a class="sidebar-item-text sidebar-link text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-3" aria-expanded="true">
<span class="menu-text">Analysis R Package</span></a>
<a class="sidebar-item-toggle text-start" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar-section-3" aria-expanded="true" aria-label="Toggle section">
<i class="bi bi-chevron-right ms-2"></i>
</a>
</div>
<ul id="quarto-sidebar-section-3" class="collapse list-unstyled sidebar-section depth1 show">
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./FinCatchAnalysis_0.html" class="sidebar-item-text sidebar-link">
<span class="menu-text"><span class="chapter-number">5</span>&nbsp; <span class="chapter-title">Overview</span></span></a>
<span class="menu-text"><span class="chapter-number">6</span>&nbsp; <span class="chapter-title">Overview</span></span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./FinCatchAnalysis_DataObject.html" class="sidebar-item-text sidebar-link">
<span class="menu-text"><span class="chapter-number">6</span>&nbsp; <span class="chapter-title">Data Object</span></span></a>
<span class="menu-text"><span class="chapter-number">7</span>&nbsp; <span class="chapter-title">Data Object</span></span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./FInCatchAnalysis_WarningsErrors.html" class="sidebar-item-text sidebar-link active">
<span class="menu-text"><span class="chapter-number">7</span>&nbsp; <span class="chapter-title">Warnings and Errors</span></span></a>
<span class="menu-text"><span class="chapter-number">8</span>&nbsp; <span class="chapter-title">Warnings and Errors</span></span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./FinCatchAnalysis_0_ExampleScript.html" class="sidebar-item-text sidebar-link">
<span class="menu-text"><span class="chapter-number">8</span>&nbsp; <span class="chapter-title">Example Script</span></span></a>
<span class="menu-text"><span class="chapter-number">9</span>&nbsp; <span class="chapter-title">Example Script</span></span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./FinCatchAnalysis_0_BaseObject.html" class="sidebar-item-text sidebar-link">
<span class="menu-text"><span class="chapter-number">9</span>&nbsp; <span class="chapter-title">Base Object</span></span></a>
<span class="menu-text"><span class="chapter-number">10</span>&nbsp; <span class="chapter-title">Base Object</span></span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./FinCatchAnalysis_1_Objects.html" class="sidebar-item-text sidebar-link">
<span class="menu-text"><span class="chapter-number">10</span>&nbsp; <span class="chapter-title">Objects</span></span></a>
<span class="menu-text"><span class="chapter-number">11</span>&nbsp; <span class="chapter-title">Objects</span></span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./FinCatchAnalysis_1_Methods.html" class="sidebar-item-text sidebar-link">
<span class="menu-text"><span class="chapter-number">11</span>&nbsp; <span class="chapter-title">Methods</span></span></a>
<span class="menu-text"><span class="chapter-number">12</span>&nbsp; <span class="chapter-title">Methods</span></span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./FinCatchAnalysis_2_HelperFunctions.html" class="sidebar-item-text sidebar-link">
<span class="menu-text"><span class="chapter-number">12</span>&nbsp; <span class="chapter-title">Helpers</span></span></a>
<span class="menu-text"><span class="chapter-number">13</span>&nbsp; <span class="chapter-title">Helpers</span></span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./FinCatchAnalysis_3_CreateAnalysis.html" class="sidebar-item-text sidebar-link">
<span class="menu-text"><span class="chapter-number">13</span>&nbsp; <span class="chapter-title">Create Analysis</span></span></a>
<span class="menu-text"><span class="chapter-number">14</span>&nbsp; <span class="chapter-title">Create Analysis</span></span></a>
</div>
</li>
</ul>
Expand All @@ -225,7 +242,7 @@

<header id="title-block-header" class="quarto-title-block default">
<div class="quarto-title">
<h1 class="title"><span class="chapter-number">7</span>&nbsp; <span class="chapter-title">Warnings and Errors</span></h1>
<h1 class="title"><span class="chapter-number">8</span>&nbsp; <span class="chapter-title">Warnings and Errors</span></h1>
</div>


Expand Down Expand Up @@ -480,12 +497,12 @@ <h1 class="title"><span class="chapter-number">7</span>&nbsp; <span class="chapt
<nav class="page-navigation">
<div class="nav-page nav-page-previous">
<a href="./FinCatchAnalysis_DataObject.html" class="pagination-link">
<i class="bi bi-arrow-left-short"></i> <span class="nav-page-text"><span class="chapter-number">6</span>&nbsp; <span class="chapter-title">Data Object</span></span>
<i class="bi bi-arrow-left-short"></i> <span class="nav-page-text"><span class="chapter-number">7</span>&nbsp; <span class="chapter-title">Data Object</span></span>
</a>
</div>
<div class="nav-page nav-page-next">
<a href="./FinCatchAnalysis_0_ExampleScript.html" class="pagination-link">
<span class="nav-page-text"><span class="chapter-number">8</span>&nbsp; <span class="chapter-title">Example Script</span></span> <i class="bi bi-arrow-right-short"></i>
<span class="nav-page-text"><span class="chapter-number">9</span>&nbsp; <span class="chapter-title">Example Script</span></span> <i class="bi bi-arrow-right-short"></i>
</a>
</div>
</nav>
Expand Down
Loading

0 comments on commit f456978

Please sign in to comment.