-
Notifications
You must be signed in to change notification settings - Fork 232
WIP. Empty window titles cause errors. #183 #189
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
Conversation
Added functions for testing empty titles and a config window_title_empty.yaml.
I need some pointers on getting the window titles right. When the title is not set or empty, the title gets set to the shell (bash, in my case). |
can you rebase this against the latest codebase? |
Will do. |
Sorry for the late response, I am having issues keeping up with the project. I'm seeking maintainers @ #290. If you (or someone you know) may be interested in helping maintain libtmux or tmuxp, feel free to contact me by email or in the #290 issue. In the mean time, if you're still interested in this PR, can you rebase it via |
I'll rebase and see how it goes. I am interested in maintaining this project. |
If you're not able to rebase immediately, that's also fine, but if you do, ping me here. GitHub has an issue notifying me when force pushes happen (even when I'm watching). If you can pitch in time to help maintain, can you drop a message in #290? In addition to registering your interest and how much time you can commit, it would be encouraging for more people to come forward, too. My hope is to always have at least one person on duty and a quick turnaround time on issues/PRs. I'm wondering if we need a couple people? Other than that, ATM I'm working on some issues to streamline contributions/issues/debugging. I'm also weighing creating an organization for tmuxp/libtmux. |
Also, I didn't mention this, but after a |
Can you give this a rebase? @BlitzKraft |
@BlitzKraft Can you rebase? (giving you a ping) If I don't get a response, I may close the PR (I think?) - but you can still create a new PR if you / someone else regains interest in it |
Got it, I will rebase. |
Nice! That was quick. Welcome back @BlitzKraft |
Added functions for testing empty titles and a config window_title_empty.yaml.
Seems I might have messed up. Not sure how to fix. What do you suggest? |
Since you probably have the old ref : https://stackoverflow.com/a/10099285/1396928 You'd @BlitzKraft Would that help? |
Codecov Report
@@ Coverage Diff @@
## master #189 +/- ##
==========================================
- Coverage 77.08% 73.89% -3.19%
==========================================
Files 6 6
Lines 829 835 +6
Branches 238 241 +3
==========================================
- Hits 639 617 -22
- Misses 131 160 +29
+ Partials 59 58 -1
Continue to review full report at Codecov.
|
I think I got it. Did not reflog. I think this commit should be squashed. And I need to run the tests locally first. I keep forgetting to do that. |
@BlitzKraft Nice Are the new gh action tests helpful? They should detect if other functionality was affected / any tests added |
I think they are helpful. I haven't used them very much. I need to get a hang of that. |
Should I just ignore that? |
@BlitzKraft Does doing this and rerunning change anything?
Are you using poetry for this? e.g. |
(it's not a requirement but gives more piece of mind you have only the locked packages installed) |
I was missing some dependencies. Installing them using poetry, like you mentioned, I was able to run all the tests. There is still one failing test. |
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.
@BlitzKraft see if this helps with the test
if w.name == '': | ||
empty_window_title = True |
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.
if w.name == '': | |
empty_window_title = True | |
empty_window_title = w.name == '' |
Assures the variable is always declared
Should fix https://github.com/tmux-python/tmuxp/pull/189/checks?check_run_id=991200510#step:15:372:
wconf['panes'].append(pconf)
> if empty_window_title:
E UnboundLocalError: local variable 'empty_window_title' referenced before assignment
tmuxp/workspacebuilder.py:416: UnboundLocalError
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.
That resolves the unbound variable. I am adding that change.
@@ -209,7 +209,10 @@ def expand(sconf, cwd=None, parent=None): | |||
if 'session_name' in sconf: | |||
sconf['session_name'] = expandshell(sconf['session_name']) | |||
if 'window_name' in sconf: | |||
sconf['window_name'] = expandshell(sconf['window_name']) | |||
if not (sconf['window_name'] is None): |
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.
if not (sconf['window_name'] is None): | |
if sconf['window_name'] is not None: |
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.
This does not change the outcome of the test_window_title. As expected. The if statements - before and after the suggested changes - are equivalent. Were you expecting something different?
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.
Found something. window_name
is being set to tmux
. Hence the failing assertion. Now, need to dig where this is happening.
@BlitzKraft Have you looked at the tests yet? (It says the tests failed) |
BK Bolisetty seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
If you want to continue with this contribution, please make a new pull request based off the newest master. I am going to close this pull request for now as a significant amount of time has passed. Also I am at fault for letting the wait go too long in between. Sorry about that. Window titlesThis may behave differently depending on A future PR would need to account for that |
Added functions for testing empty titles and a config
window_title_empty.yaml.