★ wanayoo — archive 1999 https://github.com/tmux-python/tmuxp/pull/628Nouvelle recherche | Portail wanayoo
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

Adding Plugin System #628

Open
wants to merge 28 commits into
base: master
from
Open

Conversation

@joseph-flinn
Copy link
Member

@joseph-flinn joseph-flinn commented Aug 30, 2020

Adding most of the logic for the Plugin System from #530. I have done some initial manual testing and it seems to be working.

Design Decisions:

  • All plugin methods run after their tmuxp config counter parts (ie. the global before_script in the tmuxp config will run before anything in the plugin.before_script method)
  • Require list type for plugins even if only a single plugin
  • Assuming that the plugin.on_window_create method is referring to when tmuxp is creating new windows versus the user creating a new window in tmux
  • Assuming that the plugin.after_window_finished method is referring to after the window is done being setup versus when the tmux user closes the window

Currently missing:

  • updated unit tests
  • updated documentation
@joseph-flinn joseph-flinn changed the title Adding Plugin System WIP: Adding Plugin System Aug 30, 2020
@codecov
Copy link

@codecov codecov bot commented Sep 27, 2020

Codecov Report

Merging #628 into master will increase coverage by 2.10%.
The diff coverage is 92.13%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #628      +/-   ##
==========================================
+ Coverage   77.12%   79.23%   +2.10%     
==========================================
  Files           6        7       +1     
  Lines         883      963      +80     
  Branches      251      266      +15     
==========================================
+ Hits          681      763      +82     
+ Misses        137      133       -4     
- Partials       65       67       +2     
Impacted Files Coverage Δ
tmuxp/config.py 85.94% <66.66%> (-0.24%) ⬇️
tmuxp/cli.py 70.18% <87.50%> (+2.52%) ⬆️
tmuxp/plugin.py 95.34% <95.34%> (ø)
tmuxp/exc.py 95.83% <100.00%> (+0.59%) ⬆️
tmuxp/workspacebuilder.py 89.08% <100.00%> (+1.65%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a72297d...4f8f095. Read the comment docs.

@joseph-flinn joseph-flinn marked this pull request as ready for review Oct 13, 2020
@joseph-flinn joseph-flinn requested a review from tony Oct 13, 2020
@joseph-flinn joseph-flinn force-pushed the joseph-flinn:plugin-system branch 2 times, most recently from fea9868 to f7f369a Oct 13, 2020
@joseph-flinn joseph-flinn changed the title WIP: Adding Plugin System Adding Plugin System Oct 13, 2020
@joseph-flinn joseph-flinn changed the title Adding Plugin System WIP: Adding Plugin System Oct 18, 2020
@joseph-flinn joseph-flinn marked this pull request as draft Oct 18, 2020
Copy link
Member

@tony tony left a comment

@joseph-flinn Try rebasing (I fixed an issue with poetry), running poetry install and then make black isort

@tony
Copy link
Member

@tony tony commented Oct 24, 2020

Lets aim to get this in the next release (and last Python 2.7 release)

This will assure packaged versions of tmuxp on BSD/Linux and systems using python 2.7 have a plugin system.

@joseph-flinn joseph-flinn force-pushed the joseph-flinn:plugin-system branch from 9108ddd to 50dec52 Oct 24, 2020
@joseph-flinn joseph-flinn marked this pull request as ready for review Oct 24, 2020
@joseph-flinn joseph-flinn changed the title WIP: Adding Plugin System Adding Plugin System Oct 24, 2020
@joseph-flinn joseph-flinn force-pushed the joseph-flinn:plugin-system branch from 3d04d7c to 6c036bf Oct 25, 2020
@joseph-flinn
Copy link
Member Author

@joseph-flinn joseph-flinn commented Oct 25, 2020

Note: The bump in version is required for the extensive testing of the plugin system. The test plugins all depend on tmuxp version 1.6.0 (I believe this is the next release that will contain this feature?)

@tony
Copy link
Member

@tony tony commented Oct 25, 2020

Note: The bump in version is required for the extensive testing of the plugin system. The test plugins all depend on tmuxp version 1.6.0 (I believe this is the next release that will contain this feature?)

Yes, this version bump and the constraint seems appropriate.

tony and others added 4 commits Oct 31, 2020
Plugin system QA / tweaks
Example: Rename PluginInterface -> Plugin
@tony
Copy link
Member

@tony tony commented Nov 1, 2020

@joseph-flinn Can you rebase this? (I know from email you're not around today)

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

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.