-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from Appsilon/fix/add-quarto-python-shiny-support
Fix: Improves Support + Bugfix
- Loading branch information
Showing
7 changed files
with
155 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,28 +4,30 @@ The LogAnalyzer open-source app is a simple, plug and play application developed | |
|
||
# How it works? | ||
|
||
- The LogAnalyzer app uses the Posit Connect API to fetch logs for application run jobs, semantically colouring them so they are easier to read. | ||
- The only thing you need to set this up and use is the `CONNECT_API_KEY` set as an environment variable. The idea is that the key should come from either an admin account or someone with privileges to view all apps. Apps that are not available to a user will not have their logs available to them. | ||
- If you want to test the app locally, you will need to set the `CONNECT_SERVER` as an environment variable. When deployed, the `CONNECT_SERVER` is setup automatically for you. | ||
- The LogAnalyzer app uses the Posit Connect API to fetch logs for application run jobs, semantically colouring them so they are easier to read. | ||
- The only thing you need to set this up and use is the `CONNECT_API_KEY` set as an environment variable. The idea is that the key should come from either an admin account or someone with privileges to view all apps. Apps that are not available to a user will not have their logs available to them. | ||
- If you want to test the app locally, you will need to set the `CONNECT_SERVER` as an environment variable. When deployed, the `CONNECT_SERVER` is setup automatically for you. | ||
|
||
![](img/app_preview.gif) | ||
|
||
# Configuration | ||
|
||
- `[app/logic/api_utils.R` - `get_app_list()]` Posit Connect differentiates apps with two `app_role` values: `owner` and `viewer`. You can toggle between these using the `config.yml` file. The set value is `owner`. If you want to use both together, you can simply set the value to a blank character `""`. | ||
|
||
# Credits | ||
It was our collaboration with <img src="img/elkem_logo.png" alt="Elkem" width="50"/> which led to the creation of this app. The initial idea came from use-cases where we realised we wanted to track all the logs and be able to read them properly since Posit Connect was the de facto deployment environment. When we made this app, we realised there was potential in sharing this with the rest of the community and invite everyone to use it and add it. We appreciate and thank Elkem for their openness to share it with the world. | ||
|
||
It was our collaboration with <img src="img/elkem_logo.png" alt="Elkem" width="50"/> which led to the creation of this app. The initial idea came from use-cases where we realised we wanted to track all the logs and be able to read them properly since Posit Connect was the de facto deployment environment. When we made this app, we realised there was potential in sharing this with the rest of the community and invite everyone to use it and add it. We appreciate and thank Elkem for their openness to share it with the world. | ||
|
||
You can read more about Appsilon and Elkem's collaboration on our case study [here](https://www.appsilon.com/case-studies/refining-elkems-processes-with-advanced-data-analytics). | ||
|
||
## Appsilon | ||
|
||
<img src="https://avatars0.githubusercontent.com/u/6096772" align="right" alt="" width="6%" /> | ||
<img src="https://avatars0.githubusercontent.com/u/6096772" align="right" width="6%"/> | ||
|
||
Appsilon is a **Posit (formerly RStudio) Full Service Certified Partner**.<br/> | ||
Learn more at [appsilon.com](https://appsilon.com). | ||
Appsilon is a **Posit (formerly RStudio) Full Service Certified Partner**.<br/> Learn more at [appsilon.com](https://appsilon.com). | ||
|
||
Get in touch [[email protected]](mailto:[email protected]) | ||
Get in touch [opensource\@appsilon.com](mailto:[email protected]) | ||
|
||
Explore the [Rhinoverse](https://rhinoverse.dev) - a family of R packages built around [Rhino](https://appsilon.github.io/rhino/)! | ||
|
||
<a href = "https://appsilon.us16.list-manage.com/subscribe?u=c042d7c0dbf57c5c6f8b54598&id=870d5bfc05" target="_blank"> | ||
<img id="footer-banner" src="https://raw.githubusercontent.com/Appsilon/website-cdn/gh-pages/shiny_weekly_light.jpg" alt="Subscribe for Shiny tutorials, exclusive articles, R/Shiny community events, and more."/> | ||
</a> | ||
<a href = "https://appsilon.us16.list-manage.com/subscribe?u=c042d7c0dbf57c5c6f8b54598&id=870d5bfc05" target="_blank"> <img src="https://raw.githubusercontent.com/Appsilon/website-cdn/gh-pages/shiny_weekly_light.jpg" alt="Subscribe for Shiny tutorials, exclusive articles, R/Shiny community events, and more." id="footer-banner"/> </a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
default: | ||
rhino_log_level: !expr Sys.getenv("RHINO_LOG_LEVEL", "INFO") | ||
rhino_log_file: !expr Sys.getenv("RHINO_LOG_FILE", NA) | ||
app_role: "owner" | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
box::use( | ||
testthat[ | ||
describe, | ||
expect_equal, | ||
it | ||
], | ||
) | ||
|
||
box::use( | ||
app/logic/job_list_utils[ | ||
process_job_data | ||
], | ||
) | ||
|
||
describe("process_job_data()", { | ||
|
||
it("returns processed jobs when job_list_data is not empty", { | ||
job_list <- data.frame( | ||
id = c(1, 2), | ||
key = c("key1", "key2"), | ||
start_time = c("2021-01-01 00:00:00", "2021-01-02 00:00:00"), | ||
end_time = c("2021-01-01 12:00:00", "2021-01-02 12:00:00") | ||
) | ||
|
||
expected_result <- data.frame( | ||
job = c("1_-_key1_-_2021-01-01 00:00:00_-_2021-01-01 12:00:00", | ||
"2_-_key2_-_2021-01-02 00:00:00_-_2021-01-02 12:00:00") | ||
) | ||
|
||
result <- process_job_data(job_list) | ||
expect_equal(result, expected_result) | ||
}) | ||
|
||
it("returns an empty dataframe when job_list_data is empty", { | ||
job_list <- data.frame( | ||
id = integer(), | ||
key = character(), | ||
start_time = character(), | ||
end_time = character() | ||
) | ||
|
||
expected_result <- data.frame( | ||
job = character() | ||
) | ||
|
||
result <- process_job_data(job_list) | ||
expect_equal(result, expected_result) | ||
}) | ||
|
||
it("handles NULL input gracefully", { | ||
job_list <- NULL | ||
|
||
expected_result <- data.frame( | ||
job = character() | ||
) | ||
|
||
result <- process_job_data(job_list) | ||
expect_equal(result, expected_result) | ||
}) | ||
|
||
}) |