Skip to content
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

Add support of project in disks #2960

Merged
merged 5 commits into from
Apr 25, 2023
Merged

Add support of project in disks #2960

merged 5 commits into from
Apr 25, 2023

Conversation

YevheniiSemendiak
Copy link
Contributor

closes #2951

@codecov
Copy link

codecov bot commented Apr 23, 2023

Codecov Report

Patch coverage: 77.41% and no project coverage change.

Comparison is base (9db3432) 73.63% compared to head (866ebfe) 73.63%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2960   +/-   ##
=======================================
  Coverage   73.63%   73.63%           
=======================================
  Files          70       70           
  Lines       12500    12518   +18     
  Branches     2303     2306    +3     
=======================================
+ Hits         9204     9218   +14     
- Misses       2975     2977    +2     
- Partials      321      323    +2     
Impacted Files Coverage Δ
neuro-cli/src/neuro_cli/blob_storage.py 37.56% <ø> (ø)
neuro-cli/src/neuro_cli/image.py 40.00% <ø> (ø)
neuro-cli/src/neuro_cli/job.py 43.21% <ø> (ø)
neuro-cli/src/neuro_cli/secrets.py 61.53% <ø> (ø)
neuro-cli/src/neuro_cli/utils.py 80.44% <0.00%> (ø)
neuro-sdk/src/neuro_sdk/_jobs.py 80.82% <ø> (ø)
neuro-sdk/src/neuro_sdk/_config.py 91.10% <66.66%> (-0.29%) ⬇️
neuro-sdk/src/neuro_sdk/_disks.py 88.29% <70.00%> (-1.36%) ⬇️
neuro-cli/src/neuro_cli/disks.py 53.24% <83.33%> (+1.89%) ⬆️
neuro-cli/src/neuro_cli/formatters/disks.py 97.36% <100.00%> (+0.07%) ⬆️
... and 2 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

if isinstance(disk, URL):
disk_str = disk.parts[-1]
else:
disk_str = disk
Copy link
Contributor

Choose a reason for hiding this comment

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

could you please explain why we dropped resolve_disk here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good question, originally the intent was to simplify this logic. When I started to explain possible cases, I find out that my reasoning was wrong and we still need this method for cases when we have disk URLs in full form or with the owner.
Reverted in c381a1e.

@@ -27,7 +30,11 @@ def formatter(uri: URL) -> str:
owner, _, rest = path.partition("/")
else:
owner = owner_or_org
if owner == username:
# TODO (Y.S.): remove this check and use project_name parameter
Copy link
Contributor

Choose a reason for hiding this comment

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

should we assume right away that there is no owner in URIs?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we could, originally was planning to avoid those merge-conflicts which will be caused by this change. made changes in 866ebfe

Copy link
Contributor

@dalazx dalazx left a comment

Choose a reason for hiding this comment

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

lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support projects in platform disks
2 participants