Skip to content

Comments

PR: Adapt code to make it work for remote development#32

Merged
ccordoba12 merged 10 commits intospyder-ide:mainfrom
ccordoba12:refactor-for-remote-development
Jun 2, 2025
Merged

PR: Adapt code to make it work for remote development#32
ccordoba12 merged 10 commits intospyder-ide:mainfrom
ccordoba12:refactor-for-remote-development

Conversation

@ccordoba12
Copy link
Member

@ccordoba12 ccordoba12 commented May 17, 2025

  • Make backends return a BackendActionResult dict and Manager a ManagerActionResult dict for their actions. This will make possible to serialize those results to json and send them to the frontend in case backend and frontend live in different machines.
  • Simplify methods to list environments in Manager and backends.
  • Try to auto-detect conda-like executable if the backend doesn't receive it.
  • Bump minimal supported Python version to 3.9 to use modern typing features.
  • Move API related to backends to its own submodule in the backends one.
  • Improve typing in several places.

@ccordoba12 ccordoba12 added this to the v0.2.0 milestone May 17, 2025
@ccordoba12 ccordoba12 self-assigned this May 17, 2025
@ccordoba12 ccordoba12 marked this pull request as draft May 17, 2025 17:56
@ccordoba12 ccordoba12 changed the title PR: Refactor code to make it work for remote development PR: Refactor code to make it work later for remote development May 17, 2025
@codecov-commenter
Copy link

codecov-commenter commented May 17, 2025

Codecov Report

Attention: Patch coverage is 74.44444% with 69 lines in your changes missing coverage. Please review.

Project coverage is 80.73%. Comparing base (b5df9bc) to head (3d41281).

Files with missing lines Patch % Lines
envs_manager/backends/conda_like_interface.py 49.15% 28 Missing and 2 partials ⚠️
envs_manager/backends/venv_interface.py 54.05% 17 Missing ⚠️
envs_manager/backends/api.py 75.00% 14 Missing and 1 partial ⚠️
envs_manager/manager.py 93.15% 5 Missing ⚠️
envs_manager/api.py 0.00% 1 Missing ⚠️
envs_manager/cli.py 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #32      +/-   ##
==========================================
- Coverage   83.13%   80.73%   -2.40%     
==========================================
  Files           7        8       +1     
  Lines         664      758      +94     
  Branches       83       87       +4     
==========================================
+ Hits          552      612      +60     
- Misses         72      107      +35     
+ Partials       40       39       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ccordoba12 ccordoba12 force-pushed the refactor-for-remote-development branch from 061d70a to 301ef43 Compare May 19, 2025 00:31
@ccordoba12 ccordoba12 changed the title PR: Refactor code to make it work later for remote development PR: Adapt code to make it work for remote development May 19, 2025
@ccordoba12 ccordoba12 force-pushed the refactor-for-remote-development branch from 301ef43 to 9553c7d Compare May 19, 2025 05:06
@ccordoba12 ccordoba12 marked this pull request as ready for review May 22, 2025 16:41
@ccordoba12 ccordoba12 force-pushed the refactor-for-remote-development branch 3 times, most recently from 124b28a to 5755e8e Compare May 25, 2025 17:51
- That will make possible to serialize those results to json and send
them to frontend in case backend and frontend live in different
machines.
- Also, return the stdout/stderr of the subprocesses we use instead of
the object itself. This is also necessary for remote development.
- Fix catching the right exception in many places (we were assuming that
all exceptions have a stderr attr when only CalledProcessError does).
- Don't return the exit code on errors because it doesn't give
additional info to users.
This will improve code completions and make it easier to add other
backends in the future.
That could lead to errors so it's better to avoid it.
@ccordoba12 ccordoba12 force-pushed the refactor-for-remote-development branch 5 times, most recently from ce63de0 to 0d8f87b Compare May 30, 2025 01:59
@ccordoba12 ccordoba12 force-pushed the refactor-for-remote-development branch from 0d8f87b to 5eb8f61 Compare May 30, 2025 02:43
@ccordoba12 ccordoba12 merged commit 6065082 into spyder-ide:main Jun 2, 2025
13 checks passed
@ccordoba12 ccordoba12 deleted the refactor-for-remote-development branch June 2, 2025 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants