-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Refine the constructor of Project to hide repositories #1194
Conversation
59ce513
to
70b8e12
Compare
7372569
to
a10abe5
Compare
96d39c6
to
363dfc9
Compare
Coverage Report for backend
|
896f476
to
ec80394
Compare
I'm almost happy with what I see:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for these changes!! It should really make it easier for users to grasp how to create a project.
I have two additional comments:
- the first one is about the
delete
function, it looks like a bit a function that would delete the project now. I don't really have an idea how to solve this. A mitigation could be to have a delete_project function (function that i'd like to have anyway, but it's not a great solution to be explicit about the purpose of delete) - I disagree with @glemaitre on the fact that the creation function should also open the UI. these are two different things, we should have a python func to launch UI indeed, but it would be dedicated to this and only this.
@MarieS-WiMLDS Let's move the discussion in this #1002 since it will not impact this PR. |
8cbbce8
to
16d9282
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the discussion that we had and use if_exist="raise"/"load"
, I'm find with the current PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know I'm late to the show but To me reloading an existing project is something more common than creating one. |
Never too late and it was open to debate during the review. One point that I took from @thomass-dev was that you could implicitly modify the DB, adding new version of items without taking care. And thus I thought that it would easier to go back to a less conservative way, with feedback. Now, something that I'm figuring out (during my 🏃♂️) is that if |
For sure, you error message should mention this kwargs to make you do the right choice (I did not read the updated code however). |
Another issue that I have with this PR is that as the i.e. when you run it from the command line you can not pass a path hence it crashes when run. uvicorn skore.ui.app:create_app --factory --reload --reload-dir skore/src --host 0.0.0.0 --port 22140 --timeout-graceful-shutdown 0 --log-level info
INFO: Will watch for changes in these directories: ['/Users/rouk1/dev/skore/skore/src']
INFO: Uvicorn running on http://0.0.0.0:22140 (Press CTRL+C to quit)
INFO: Started reloader process [19757] using StatReload
ERROR: Error loading ASGI app factory: create_app() missing 1 required positional argument: 'project' This how you get to debug the FastAPI app in vscode. {
// launch.json
"version": "0.2.0",
"configurations": [
{
"name": "Run webapp",
"type": "debugpy",
"request": "launch",
"module": "uvicorn",
"args": [
"skore.ui.app:create_app",
"--factory",
"--reload",
"--reload-dir",
"skore/src",
"--host",
"0.0.0.0",
"--port",
"22140",
"--timeout-graceful-shutdown",
"0",
"--log-level",
"info"
],
"console": "integratedTerminal",
"jinja": true,
"env": {
"DEBUG": "1",
}
}
]
} |
Follow-up for #1194 Related to a question from @rouk1 #1194 (comment) I think that we should improve the error message, whatever the default value is.
Thanks @rouk1 for your review, i will revert the |
…by uvicorn from CLI (#1263) Follow-up for #1194 and the comment #1194 (comment) of @rouk1.
Closes #1160
This PR intends to ease the project API by centralizing all the action in the constructor.
To note:
skore
toskore-ui
.open
function in favor of the project class constructor.clear
function to allow user to explicitly clear a project.