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

WIP: Add extended VCS support with Git implementation #13562

Closed
wants to merge 9 commits into from

Conversation

trollodel
Copy link
Contributor

@trollodel trollodel commented Aug 18, 2020

This PR is now in https://github.com/spyder-ide/spyder-vcs. Anyone interested is welcomed to join us there!

Description of Changes

  • Wrote at least one-line docstrings (for any new functions)
  • Added unit test(s) covering the changes (if testable)
  • Included a screenshot or animation (if affecting the UI, see Licecap)

preview

Before reading

Even though this PR is WIP, I do not push into this PR unless the feature is stable enough.
So, feel free to try it.

For anyone (not necessary Spyder devs) who want to speed up the development of this PR, please read the Contributing section.

Introduction

This PR introduces a dedicated plugin, with its dedicated pane, for VCS management (inspired by Atom's Git integration)
and some APIs that allow to support other VCSs.
The pane adapts itself to the VCS in use (see below for further explanation).
The plugin uses the new Spyder 5 APIs.

Features

Here is the list of implemented VCS features (in the pane).

  • Combo box for selecting branches. By default, it is set to the current branch.
  • 2 lists for unstaged and staged changes (or just one if the VCS does not support the staging area) + 2 buttons for stage/unstage all changes.
  • A text edit for the commit message.
  • 3 buttons for remote operations: fetch, pull, push.
  • A list for commit history.

Implementation structure and design

Both the UI and the backend are designed to be (almost) VCS independent.

The backend essentially consists of implementations of .utils.api.VCSBackendBase
and a manager for choosing the best implementation (in theory) and instancing it.
The manager is also used as a proxy for the backend instance.

Each implementation does not need to implement the whole API specification,
but it can implement only some of these by decorating each overridden method with @feature().
That decorator, without arguments, creates a new enabled feature with the method name as feature name.

This structure allows the UI to create itself and define different behaviors depending on the backend
features, through introspection.

Issue(s) Resolved

Fixes #9001 (only the second and the sixth task)
Fixes #816

Probably require changes in #8415

Limitations and TODO

There are lots of limitation and missing features in this PR.
I tracked them in this issue.

Here I only report the issues that requires changes in the Spyder core (or in another core plugin)
and the issues that requires the approval or suggestion from you, Spyder devs.

Plugin isolation

It keeps its APIs (notably VCSBackendBase) and some common stuffs
in the plugin package.
In addition, it does not have integrations with other Spyder plugins
(except for sig_project_loaded that triggers the plugin).

Code style and docstring

This is not really an issue, but a question.
I target the code for Python 3.6 (specified in the Spyder's setup.py)
and I use the numpydoc format for the docstrings (but some are too short).
I do not use extra libraries (except for the git that is already required for the existing VCS support).
Are these assumptions correct?

Testing and logging

I know that this PR is not tested at all.
Since I add a dedicated plugin to Spyder, are there some guidelines or suggestion to write test?
Have I the maximum flexibility in writing them?

UI Design

I'm not focusing on the design because I prefer to wait your opinions about it.

Contributing

I opened a dedicated repository
for the development of this PR.
Further information can be found in the repository README.
I do not accept any PR in my fork.

Affirmation

By submitting this Pull Request or typing my (user)name below,
I affirm the Developer Certificate of Origin
with respect to all commits and content included in this PR,
and understand I am releasing the same under Spyder's MIT (Expat) license.

I certify the above statement is true and correct: trollodel

@pep8speaks
Copy link

pep8speaks commented Aug 18, 2020

Hello @trollodel! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 644:1: W293 blank line contains whitespace

Line 216:80: E501 line too long (81 > 79 characters)
Line 270:80: E501 line too long (80 > 79 characters)

Comment last updated at 2021-01-01 13:17:02 UTC

@ccordoba12
Copy link
Member

ccordoba12 commented Aug 18, 2020

Hey @trollodel, thanks a lot for your contribution! It looks really great!

One small comment before you proceed further: you changed the line endings of spyder/app/mainwindow.py, which makes impossible to see what lines you added/removed on that file. Please be sure to restore them before you resume development on this project.

And thanks again for your work on this. It's going to be a great addition to Spyder 5!

@trollodel trollodel force-pushed the vcs_support branch 2 times, most recently from 6da1f9d to 167af25 Compare August 25, 2020 21:52
@trollodel
Copy link
Contributor Author

Update 1

Added the stage all and the unstage all buttons.
image

I also did some changes in the backend API for increasing both the VCS implementations and the GUI flexibility.

@trollodel
Copy link
Contributor Author

trollodel commented Sep 4, 2020

Update 2

Added commit history with a button (if supported) for undo the commit.
At the moment, the time elapsed after commit creation (the third column) can't update unless a refresh is done.

update2

You can also create a new branch by typing its name into the branches combobox, but it has some bugs that make the creation always fail.

new_branch

Dev changes

I complete the API specification (the class VCSBackendBase in vcs/utils/api.py) that I want to include in this PR, except for error handling that requires dedicated work (located in vcs/utils/errors.py).
The git backend implementation is almost complete regarding the API specs. Also in this update I do a tiny refractor and code cleanup in the backend that make it no longer dependent to the Spyder git support (utils/vcs.py).

@trollodel
Copy link
Contributor Author

Update 3 (backend features freeze)

After this update, I stop developing new features on VCSBackendBase.
I think that this PR has a good start for VCS support, so I prefer to improve the support in dedicated PRs for reducing review time, tests to write and so on.

Changes context menu

With a refractor of changes widgets, I introduce a context menu for changes items.

update3-context

When the change is unstaged (as in the screenshot) you can also discard the change (with no possibilities of recovering it).

Create dialog

Now, when the project has no repository in it, the following screen shows in the VCS pane:

update3-norepo

If you press the button, the following dialog shows:

update3-dialog

Here you can choose the VCS type and an optional URL for a remote repository (like git clone).
Because the VCS plugin works only if it is in a project, the Destination field is read-only.

@ccordoba12
Copy link
Member

Thanks for your hard work on this new plugin @trollodel! It's going to be a fantastic addition to Spyder 5!

Would you like to see your work added to our source code? Or do you prefer to maintain it as a separate plugin?

@trollodel
Copy link
Contributor Author

Would you like to see your work added to our source code? Or do you prefer to maintain it as a separate plugin?

I surely want to see this PR merged. But I will continue to develop it in my repository until this PR is close to be merged.

@ccordoba12
Copy link
Member

I surely want to see this PR merged.

Ok, that's what I thought but I wanted to confirm with you.

But I will continue to develop it in my repository until this PR is close to be merged.

Great! When you reach that point, I propose to break your work at least in two parts (I don't know if more are feasible) to make the review process easier:

  • A first PR that adds the backend to handle VCS repos in Spyder.
  • A second one that builds the UI on top of that backend and embeds it in Spyder.

What do you think?

@trollodel
Copy link
Contributor Author

trollodel commented Sep 20, 2020

It's pretty easy to do. But,

  • I need to place backend stuffs somewhere for the first PR as the plugin becomes useless. (One solution is to remove all the UI stuff in the existing plugin class and subclass SpyderPluginV2 instead of SpyderDockablePlugin).
  • I think that I should keep this PR for the UI and open a new one (or 2 if we want to create a dedicated PR for Git implementation) for the backend.

@ccordoba12
Copy link
Member

One solution is to remove all the UI stuffs in the existing plugin class and subclass SpyderPluginV2 instead of SpyderDockablePlugin

Good thinking, that's a good approach.

I think that I should keep this PR for the UI and open a new one (or 2 if we want to create a dedicated PR for Git implementation) for the backend.

I agree with that too and also with having three PRs.

@ccordoba12
Copy link
Member

ccordoba12 commented Sep 21, 2020

Another option (that just occurred to me) is to move the repository you have on Gitlab to our organization here, so you can keep developing independently of our main repo for some time. And when it's stable enough, we could move it to the core of Spyder.

That's the approach taken by the JupyterLab guys and it seems to work well for them.

@trollodel
Copy link
Contributor Author

Another option (that just occurred to me) is to move the repository you have on Gitlab to our organization here, so you can keep developing independently of our main repo for some time. And when it's stable enough, we could move it to the core of Spyder.

For me, It can be done (If I can have write access to it), but I don't understand why.

@dalthviz
Copy link
Member

Hi @trollodel thanks for the work on this! While checking I detected a couple of issues/elements that maybe could be improved (testing on Windows):

  • Opening a project (that isn't a repo) triggers this error:
Traceback (most recent call last):
  File "C:\Users\Daniel\Documents\Spyder\spyder\spyder\plugins\vcs\utils\api.py", line 1197, in repodir
    selected_backend = backend(path)
  File "C:\Users\Daniel\Documents\Spyder\spyder\spyder\plugins\vcs\utils\backend.py", line 66, in __init__
    is_valid_repository=False)
spyder.plugins.vcs.utils.errors.VCSBackendFail
Traceback (most recent call last):
  File "C:\Users\Daniel\Documents\Spyder\spyder\spyder\plugins\vcs\utils\api.py", line 1197, in repodir
    selected_backend = backend(path)
  File "C:\Users\Daniel\Documents\Spyder\spyder\spyder\plugins\vcs\utils\backend.py", line 637, in __init__
    raise VCSBackendFail(self.repodir, type(self), programs=("hg", ))
spyder.plugins.vcs.utils.errors.VCSBackendFail
  • Using the option to create a repository from the current project shows a dialog with a white QLineEdit:
    image
  • Removing the project .git from outside Spyder and updating the VCS panel causes an error:
Traceback (most recent call last):
  File "C:\Users\Daniel\Documents\Spyder\spyder\spyder\plugins\vcs\widgets\vcsgui.py", line 898, in _raise_if
    raise ex
  File "C:\Users\Daniel\Documents\Spyder\spyder\spyder\plugins\vcs\widgets\common.py", line 412, in run
    result = self.func()
  File "C:\Users\Daniel\Documents\Spyder\spyder\spyder\plugins\vcs\widgets\vcsgui.py", line 359, in <lambda>
    lambda: manager.changes,
  File "C:\Users\Daniel\Documents\Spyder\spyder\spyder\plugins\vcs\utils\api.py", line 1143, in __getattr__
    return getattr(self._backend, name)
  File "C:\Users\Daniel\Documents\Spyder\spyder\spyder\plugins\vcs\utils\backend.py", line 289, in changes
    error="Failed to get git changes")
spyder.plugins.vcs.utils.errors.VCSPropertyError: Failed to get git changes
Traceback (most recent call last):
  File "C:\Users\Daniel\Documents\Spyder\spyder\spyder\plugins\vcs\widgets\common.py", line 119, in _raise
    raise ex
  File "C:\Users\Daniel\Documents\Spyder\spyder\spyder\plugins\vcs\widgets\common.py", line 412, in run
    result = self.func()
  File "C:\Users\Daniel\Documents\Spyder\spyder\spyder\plugins\vcs\widgets\common.py", line 83, in _task
    current_branch = manager.branch
  File "C:\Users\Daniel\Documents\Spyder\spyder\spyder\plugins\vcs\utils\api.py", line 1143, in __getattr__
    return getattr(self._backend, name)
  File "C:\Users\Daniel\Documents\Spyder\spyder\spyder\plugins\vcs\utils\backend.py", line 217, in branch
    raw_error=err,
spyder.plugins.vcs.utils.errors.VCSPropertyError: b'fatal: not a git repository (or any of the parent directories): .git\n'
  • When using the option to create a new branch/empty branch the dialog didn't close after branch creation or option selection (Yes, Yes - empty branch or No).
  • After a branch checkout the commit history is not updated automatically (I had to click the refresh button but maybe that is expected?). Not only the third column wasn't updated but the whole commit listing.
  • Using the undo commit causes this traceback:
Traceback (most recent call last):
  File "C:\Users\Daniel\Documents\Spyder\spyder\spyder\plugins\vcs\widgets\vcsgui.py", line 416, in refresh_commit_difference
    _handle_result(commit_difference)
  File "C:\Users\Daniel\Documents\Spyder\spyder\spyder\plugins\vcs\widgets\vcsgui.py", line 397, in _handle_result
    if difference > 0:
TypeError: '>' not supported between instances of 'str' and 'int'

  • After closing the project the VCS pane keeps showing the info of the last opened project (I guess the pane should be close after the project is closed?).

@dalthviz
Copy link
Member

Also, the idea here is for this to be a third-party plugin (so it will live in a different repo for example: https://gitlab.com/trollodel/spyder-vcs/-/tree/master/ and be an installable PyPI package), or add it as a base plugin of Spyder? What do you guys think @spyder-ide/core-developers ?

@dalthviz
Copy link
Member

Thinking for a bit, a couple of options (maybe someone else has more ideas/options):

  • Addition of the plugin to the source code of Spyder
  • External plugin (but adding it to the dependencies of Spyder)
  • External plugin (optional for the end user to install it if needed)

@trollodel
Copy link
Contributor Author

trollodel commented Sep 22, 2020

Thinking for a bit, a couple of options (maybe someone else has more ideas/options):

* Addition of the plugin to the source code of Spyder

* External plugin (but adding it to the dependencies of Spyder)

* External plugin (optional for the end user to install it if needed)

@dalthviz I already answer this question here.

@trollodel
Copy link
Contributor Author

trollodel commented Sep 22, 2020

* Opening a project (that isn't a repo) triggers this error:

This is not an exception, but a debug traceback.print_exc()

* Using the option to create a repository from the current project shows a dialog with a white QLineEdit:

Strange, I just use an UrlCombobox.

* Removing the project `.git` from outside Spyder and updating the VCS panel causes an error:

I already know that it will cause problems. Now it is in my TODO list.

* When using the option to create a new branch/empty branch the dialog didn't close after branch creation or option selection (`Yes`, `Yes - empty branch` or `No`).

Will fix.

* After a branch checkout the commit history is not updated automatically (I had to click the refresh button but maybe that is expected?). Not only the third column wasn't updated but the whole commit listing.

It is expected because it has no auto update.

* Using the undo commit causes this traceback:
Traceback (most recent call last):
  File "C:\Users\Daniel\Documents\Spyder\spyder\spyder\plugins\vcs\widgets\vcsgui.py", line 416, in refresh_commit_difference
    _handle_result(commit_difference)
  File "C:\Users\Daniel\Documents\Spyder\spyder\spyder\plugins\vcs\widgets\vcsgui.py", line 397, in _handle_result
    if difference > 0:
TypeError: '>' not supported between instances of 'str' and 'int'

Will fix.

* After closing the project the VCS pane keeps showing the info of the last opened project (I guess the pane should be close after the project is closed?).

Projects.sig_project_loaded is not emitted with None when the project is closed?
I need to dig more in that plugin.

@dalthviz
Copy link
Member

dalthviz commented Sep 23, 2020

@dalthviz I already answer this question here.

Ok 👍 although IMO maybe could be worthy to check the external plugin option but lets wait if someone else has any opinion or idea (I think that for now debugging and fixing errors can go first).

Strange, I just use an UrlCombobox.

Well I tested on Windows maybe the UrlCombobox has an issue on Windows. We will need to check that then

This is not an exception, but a debug traceback.print_exc()

It opened for me the Report error dialog so maybe doing traceback.print_exc() can trigger the report error dialog? We will need to check that then

Projects.sig_project_loaded is not emitted with None when the project is closed?

Not totally sure, I thought there was a signal triggered when a project is closed but maybe I'm wrong (we will need to check)

@trollodel
Copy link
Contributor Author

trollodel commented Sep 23, 2020

Not totally sure, I thought there was a signal triggered when a project is closed but maybe I'm wrong (we will need to check)

I already fix it. Now if a project is not open, the VCS pane is hidden and it shows again if a project is opened.

It opened for me the Report error dialog so maybe doing traceback.print_exc() can trigger the report error dialog? We will need to check that then

I remove it in the last commit to remove that annoyance.
It is something (including the URLComboBox) that we should discuss here?

@dalthviz
Copy link
Member

Thanks @trollodel for pushing the fixes, I will test again and check is something is missing or needs to be handled outside the scope of the plugin 👍

@dalthviz
Copy link
Member

Some new things appeared while testing:

  • A duplicated entry for the VCS pane appears (one with the actual panel and the other shows an empty one):
    image

  • Closing the project shows only one VCS pane but now it says No repository available in None. Clicking the create new repository ends up in a dialog without destination:
    image

  • Not totally sure why but seems like the branch list repeats multiple times the names of the branches:
    branches

  • This one is more like a question: creating a new empty branch and changing to other branch makes the empty branch to disappear from the list of branches, right? (the empty branch will only stay as a new branch if you commit something to it right?)

@trollodel
Copy link
Contributor Author

Some new things appeared while testing:

* A duplicated entry for the VCS pane appears (one with the actual panel and the other shows an empty one):
  ![image](https://user-images.githubusercontent.com/16781833/94058149-4ad39480-fda6-11ea-81ab-ca3c784b75f4.png)

Oops, I forget to remove workaround code.

* Closing the project shows only one VCS pane but now it says `No repository available in None`. Clicking the create new repository ends up in a dialog without destination:
  ![image](https://user-images.githubusercontent.com/16781833/94058444-a1d96980-fda6-11ea-912c-2e5abdbaf741.png)

Same as above.

* Not totally sure why but seems like the branch list repeats multiple times the names of the branches:
  ![branches](https://user-images.githubusercontent.com/16781833/94058885-42c82480-fda7-11ea-929e-fec2b50c7ea1.png)

I reproduce this issue by spamming the refresh button. This is caused because branches getting is done asynchronously using a QThread.

* This one is more like a question: creating a new empty branch and changing to other branch makes the empty branch to disappear from the list of branches, right? (the empty branch will only stay as a new branch if you commit something to it right?)

I never test it but I think it is a git issue, because git creates a branch only if there is at least one commit. I don't know if other VCSs have the same problem.

@dalthviz
Copy link
Member

Thanks for the fixes @trollodel . Checking again I think we could improve some more things:

  • If there is no project open but the user selects to show the VCS pane probably we should show nothing instead of the No repository available in None message and the button to create new repository (which can lead to the dialog to create a repo without Destination). Another option could be to show a message saying that to enable the VCS functionality you should have opened a project:
    image

  • Something that I just noticed is that the VCS pane doesn't have the option menu (so the pane doesn't have the option to Undock/Dock and Close). Maybe this is caused for the base class used to make the plugin class? What do you think @ccordoba12 ?:
    image
    While the other panes have the options button:
    image

  • Tried using a SSH URL as the source repository but nothing happen. Trying with the HTTPS URL let me with a warning dialog saying that the action will overwrite my files and then an error dialog (I checked with an empty project too and the same happens):
    image
    image
    This ends up with a a VCS pane where the create new repository is disabled:
    image

  • With this latest test I wonder how the VCS plugin access git credentials to do the clone or to push to a remote? Maybe in my case it fails since I have two factor authentication enable?

  • Checked again and the branches names still have duplicates. However checking a little bit more seems like if a branch checkout triggers a error dialog (i.e a failed checkout) the branch's list updates to not have duplicates:
    multib

@ccordoba12
Copy link
Member

Ok +1 although IMO maybe could be worthy to check the external plugin option but lets wait if someone else has any opinion or idea (I think that for now debugging and fixing errors can go first).

@trollodel, we discussed this idea with the rest of the team and agreed that we'd like to have this as a third-party, external plugin (at least for some time). That's because the core of Spyder (i.e. the plugins present in this repo) is already huge (~90 kloc). That way it'd also be easier to report issues (which is what @dalthviz is doing above) and add enhancements, because this repo has too much traffic. Finally, we could also count on you to maintain this plugin (since you'd be the admin of its repo).

This is something we've done for other plugins (e.g. spyder-notebook and spyder-terminal) and it's worked well so far.

What do you think?

@trollodel
Copy link
Contributor Author

trollodel commented Sep 27, 2020

a third-party, external plugin

Are you interested in making it a Spyder dependency? If not, I suggest keeping the VCSBackendBase class (It is almost a list of abstract methods) and the error definitions in the Spyder core to make it part of the API (like the plugins one). This allows core plugins to optionally interact with the VCS plugin as its API is known (that was discussed previously here).

Finally, we could also count on you to maintain this plugin

Sure I will! Just, let me know if there is anything that I should know when I maintain it, such as issue management (I see how issues are manage here, so I will try to mimic it), release management, etc.
And, can you please create it including all the common stuff such as CI configs, a README with Spyder infos (I will create a description of plugin features in there), packaging/conda files, and so on?

(which is what @dalthviz is doing above) and add enhancements

I keep this PR opened until the repo is created (can you tell me when the repo will be created?) and I continue to fix here @dalthviz reported bugs.

@ccordoba12
Copy link
Member

Are you interested in making it a Spyder dependency?

Yes, our plan is to make Spyder 5 depend on this plugin. Since all our elements (status bar, toolbars, context menus, etc) will be extensible in that version, it should be possible for you to maintain this plugin in an external repo and add any necessary element to the Spyder interface.

Sure I will! Just, let me know if there is anything that I should know when I maintain it

Ok, @dalthviz will take care of it.

I keep this PR opened until the repo is created

Sure, no problem.

@trollodel
Copy link
Contributor Author

If there is no project open but the user selects to show the VCS pane probably we should show nothing instead of the No repository available in None message and the button to create new repository (which can lead to the dialog to create a repo without Destination). Another option could be to show a message saying that to enable the VCS functionality you should have opened a project:

Now it should behave in the same way of Projects: showing nothing.

Tried using a SSH URL as the source repository but nothing happen.

I know. SSH-cloned repo support is completely broken (every interaction with remote using SSH URLs fails). See below.

(I checked with an empty project too and the same happens)

An empty project is not an empty folder, I cannot know in that point if the remote repository has a .spyproject or not, so that dialog is showed even in an empty project.

This ends up with a a VCS pane where the create new repository is disabled:

Now it should be fixed.

With this latest test I wonder how the VCS plugin access git credentials to do the clone or to push to a remote? Maybe in my case it fails since I have two factor authentication enable?

Good question. On Windows, I assume the default credentials manger (wincred or manager depending on git version) is enabled, so it should prompt an external dialog where you can insert username and password. On Unix (without a custom credentials manager), I wrote a dedicated input dialog for credentials in the plugin itself. Credentials are stored by the plugin too, using the keyring module. Since I want to get credentials from keyring after a Spyder restart, I put the git username in the repo user.name config and it is read on repo init. The problem (related to the above one) is the credentials manager that is called only when a user/psw input is required (HTTPS) and always fails using SSH unless the user configure the repo independently.

Checked again and the branches names still have duplicates. However checking a little bit more seems like if a branch checkout triggers a error dialog (i.e a failed checkout) the branch's list updates to not have duplicates:

I now use a set instead of a list to store branches. I hope it will work now.

@trollodel
Copy link
Contributor Author

Any update about the plugin repository?

@trollodel trollodel force-pushed the vcs_support branch 2 times, most recently from 965bb80 to c2caf83 Compare October 24, 2020 12:12
@trollodel
Copy link
Contributor Author

With the last commit, I fix several issues left in previous reviews.

Removing the project .git from outside Spyder and updating the VCS panel causes an error:

Now it tries to set the repository path again. If it fails, an error dialog show and the pane shows the button to create the repo.

After a branch checkout the commit history is not updated automatically (I had to click the refresh button but maybe that is expected?). Not only the third column wasn't updated but the whole commit listing.

This is finally fixed by automatic refresh. But the third column is still not updated.

Not totally sure why but seems like the branch list repeats multiple times the names of the branches

To prevent flashing and other issues, in many widgets I save the previous backend call result, so only changed objects will be added/removed to the widget. This applies to the branches list too. So duplicated names should never show again.

Something that I just noticed is that the VCS pane doesn't have the option menu

While I am doing the refractor, the option menu appears again. The issue is caused by me because I previously remove everything in the layout when repo dir changes.

Fix discard when the file is not tracked and other bugs
@trollodel
Copy link
Contributor Author

Register actions to Shortcuts and MainMenu (as a dedicated entry in menu).
Image

Unfortunately, shortcuts are not working, and I don't understand why.
With this commit, I fixed other bugs discovered while using it.

@trollodel
Copy link
Contributor Author

I'm going to close this PR because it's outdated, and it doesn't work in the current master. It received an initial but incomplete review.
If there is some interest, I may decide to migrate to master (or whatever branch we want) and recreate this PR.

I understand and agree that there are priorities in the project, but a bit more transparency (or even a simple "We are not interested on this anymore") would save me from waiting for feedbacks that won't arrive.
If you ever have 10 minute to waste free, you can give the discussions here a read.

@trollodel trollodel closed this Mar 20, 2022
@Virinas-code
Copy link
Contributor

I really liked it. Thanks for trying.

@andfoy
Copy link
Member

andfoy commented Mar 28, 2022

Hi @trollodel, I'm sorry we didn't get to review this one! As you hay have seen, Spyder is undergoing a massive refactor that changes the way about how plugins are created, interact amongst themselves, register items in the main window and how they are destroyed. Since this new model allows for new plugins to have more flexibility, external plugins can now be easily implemented without having to add them to the Spyder core.

If you are interested in discussing this, we have a monthly community call where we discuss anything Spyder-related, also, we are planning developer calls starting this or next month to review PRs and efforts like this one. If you are interested in attending this call, please leave us an email or contact to send you the invitation.

@trollodel
Copy link
Contributor Author

Hi @andfoy. Thanks to response! I'm glad to see that you are still interested in this.

As you hay have seen, Spyder is undergoing a massive refactor that changes the way about how plugins are created, interact amongst themselves, register items in the main window and how they are destroyed. Since this new model allows for new plugins to have more flexibility, external plugins can now be easily implemented without having to add them to the Spyder core.

This PR is based on the new Spyder API, and it was developed mainly as an external plugin (the only thing that changes is the plugin registration).
It has minimal integrations with the other plugins, so it's not a problem for now.


> external plugins can now be easily implemented without having to add them to the Spyder core.

This was the idea, as described in the following comments: 1, 2, 3. And my replies, with the intention to support and eventually maintain it: 1 2

If you are interested in discussing this, we have a monthly community call where we discuss anything Spyder-related, also, we are planning developer calls starting this or next month to review PRs and efforts like this one. If you are interested in attending this call, please leave us an email or contact to send you the invitation.

I'm quite busy this month, so I'm not sure if I can attend the meeting. In any case, this is my email: supertutto01@gmail.com.

@ccordoba12
Copy link
Member

ccordoba12 commented Apr 3, 2022

And my replies, with the intention to support and eventually maintain it

Sorry for dropping the ball with your work @trollodel, but last year was really hard for us in terms of stabilizing our new API and fixing serious performance issues.

If you're still interested in pursuing this, we'd be glad to invite you to your organization so you can continue your work here. Otherwise, we'll try to resume it in the next couple of years.

@trollodel
Copy link
Contributor Author

I thought a bit about this and I have to say that I'm not available to continue the work in the near future. I can help to move this PR to the Spyder organization and make it working again (update the few Spyder API usages). I'm also available to help any contributor that wants to work on this.

What do you think? I know I ask you to create a repo that is abandoned since its creation, so I understand that you may refuse the offer.

@ccordoba12
Copy link
Member

I'm ok with your idea and thanks a lot for your offer. I created this repo:

https://github.com/spyder-ide/spyder-vcs

and gave you Mantain permissions on it.

@trollodel
Copy link
Contributor Author

@ccordoba12 Thanks for the maintain offer. I already pushed the plugin sources in that repository. In the coming days, I finish the migration, and I'll make the plugin again loadable. It probably needs also some changes to make it in line with other Spyder repos, but I don't want to make pressure for it, so take your time.


For anyone following, this PR is now in https://github.com/spyder-ide/spyder-vcs. Anyone interested is welcomed to join us there!

@ccordoba12
Copy link
Member

Thanks @trollodel! Looking forward to see that plugin working again with the latest Spyder 5.

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.

Git Version Control Support - EPIC Full Version Control System support
6 participants