Skip to content
This repository has been archived by the owner on Aug 15, 2023. It is now read-only.

Fix sharing resources #18

Merged
merged 9 commits into from
Oct 2, 2020
Merged

Fix sharing resources #18

merged 9 commits into from
Oct 2, 2020

Conversation

jon-ber
Copy link
Contributor

@jon-ber jon-ber commented Oct 1, 2020

This PR contains a fix for the sharing of dashboards and shiny dashboards.

The endpoint used for sharing was changed to /api/{resource_id}/sharing.

In addition a fix for the describe_dashboard_items() function was included where a non-existing function was referenced and some doc-strings were updated for accuracy.

@jon-ber jon-ber requested a review from bosyk October 1, 2020 09:14
Copy link
Contributor

@bosyk bosyk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We didn't capture this in any of our tests. Can we create a simple test for the functions? A simple request with the right status code might be enough - though this possibly means that we have to create a dashboard page in lana and describe it as a test fixture in the tests' README.md.

@jon-ber jon-ber requested a review from bosyk October 1, 2020 13:46
Copy link
Contributor

@bosyk bosyk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor comments, otherwise looks fine. And we should test out black for code formatting.

pylana/dashboards.py Outdated Show resolved Hide resolved
pylana/dashboards.py Outdated Show resolved Hide resolved
tests/README.md Outdated Show resolved Hide resolved
tests/test_dashboards.py Outdated Show resolved Hide resolved
tests/test_dashboards.py Outdated Show resolved Hide resolved
tests/test_shiny_dashboards.py Outdated Show resolved Hide resolved
@jon-ber jon-ber requested a review from bosyk October 1, 2020 14:55
Copy link
Contributor

@bosyk bosyk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test tests/test_shiny_dashboards.py::TestDashboardAPI::test_shiny_dashboard_management fails. It seems like another tests creates more and dashboards, so that this test finds more than one and raises. Maybe there is some cleaning up after the tests missing?

@jon-ber jon-ber requested a review from bosyk October 2, 2020 09:21
Copy link
Contributor

@bosyk bosyk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor changes and a question about the test readme.

tests/test_shiny_dashboards.py Outdated Show resolved Hide resolved
tests/test_dashboards.py Outdated Show resolved Hide resolved
tests/README.md Show resolved Hide resolved
@jon-ber jon-ber requested a review from bosyk October 2, 2020 10:54
Copy link
Contributor

@bosyk bosyk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to merge

@jon-ber jon-ber merged commit e69b400 into development Oct 2, 2020
@bosyk bosyk deleted the fix-sharing-resources branch October 8, 2020 10:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants