Skip to content

Add a dashboard launcher#943

Merged
bouthilx merged 17 commits intoEpistimio:developfrom
notoraptor:dashboard-launcher
Jun 17, 2022
Merged

Add a dashboard launcher#943
bouthilx merged 17 commits intoEpistimio:developfrom
notoraptor:dashboard-launcher

Conversation

@notoraptor
Copy link
Copy Markdown
Collaborator

Description

Hi @bouthilx ! This is a PR to add a dashboard launcher.

Changes

  • Add a compiled code of dashboard into dashboard/build
  • Add a script orion frontend to run dashboard build.
  • Add a Github Actions to test dashboard build through orion frontend script, using selenium framework.

Checklist

Tests

  • I added corresponding tests for bug fixes and new features. If possible, the tests fail without the changes
  • All new and existing tests are passing ($ tox -e py38; replace 38 by your Python version if necessary)

Documentation

  • I have updated the relevant documentation related to my changes

Quality

  • I have read the CONTRIBUTING doc
  • My commits messages follow this format
  • My code follows the style guidelines ($ tox -e lint)

@notoraptor notoraptor force-pushed the dashboard-launcher branch 3 times, most recently from b1ce959 to 396fd37 Compare June 8, 2022 21:22
@notoraptor
Copy link
Copy Markdown
Collaborator Author

Hi @bouthilx PR updated. Dashboard build test CI is moved to build.yml and makes a yarn build before testing. Testing script is also now splitted into unit tests and runs with pytest in CI.

In last commit, I try to include dashboard/build folder into Python package. I tested it on my computed. It is indeed included in tar.gz generated file using python setup.py sdist, but it is not included in orion package when package file is installed. At most, it created a dashboard folder in sys.prefix path (because of data_files added in setup.py, see commit), but it is outside the orion installed package folder.

It seems the best way to correctly include dashboard/build is to move it inside the src/orion folder. What do you think?

@bouthilx
Copy link
Copy Markdown
Member

Thanks for the follow up! Do you think using sys.prefix could allow pointing to the dashboard folder?

@notoraptor notoraptor force-pushed the dashboard-launcher branch 2 times, most recently from 205d133 to 16e8b48 Compare June 14, 2022 13:20
"build",
)
)
assert os.path.isdir(dashboard_build_path)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This should be if-raise. What message could we provide the user to explain this error? That the folder is not present?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Ok, now it raises a runtime error with message "Cannot find dashboard static files to run frontend".

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Maybe adding where it looked for it in the error message could be helpful for the user to understand what is the source of the issue.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Ok!

@notoraptor
Copy link
Copy Markdown
Collaborator Author

@bouthilx all tests passed !

@notoraptor
Copy link
Copy Markdown
Collaborator Author

Tests succeed !

Check only if dashboard build files are removed on uninstall (root folder seems not deleted in any case when running CI)
@notoraptor notoraptor force-pushed the dashboard-launcher branch from 2f1a9b2 to 6cfc500 Compare June 17, 2022 13:42
@notoraptor
Copy link
Copy Markdown
Collaborator Author

Rebased!

@bouthilx bouthilx merged commit c1ae71b into Epistimio:develop Jun 17, 2022
@notoraptor notoraptor deleted the dashboard-launcher branch June 21, 2022 14:55
@notoraptor notoraptor mentioned this pull request Aug 2, 2022
@bouthilx bouthilx added feature Introduces a new feature dashboard labels Aug 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dashboard feature Introduces a new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants