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

Ensure initials appear in collaborative mode #443

Merged
merged 9 commits into from
Nov 14, 2023

Conversation

aychang95
Copy link
Contributor

Relevant issues and PRs:
#302
#316

This tiny PR addresses the issue where self.current_user still provides a None var for initials in collaborative mode.

If initials are already generated from the names, then we shouldn't overwrite them with None.

Copy link

welcome bot commented Nov 8, 2023

Thanks for submitting your first pull request! You are awesome! 🤗

If you haven't done so already, check out Jupyter's Code of Conduct. Also, please make sure you followed the pull request template, as this will help us review your contribution more quickly.
welcome
You can meet the other Jovyans by joining our Discourse forum. There is also a intro thread there where you can stop by and say Hi! 👋

Welcome to the Jupyter community! 🎉

@aychang95
Copy link
Contributor Author

@JasonWeill

Bug label and review is appreciated. Would love to use the official extension instead of my forked repo after the next release

@dlqqq dlqqq added the bug Something isn't working label Nov 8, 2023
@aychang95 aychang95 requested a review from dlqqq November 8, 2023 23:13
packages/jupyter-ai/jupyter_ai/handlers.py Outdated Show resolved Hide resolved
@dlqqq
Copy link
Collaborator

dlqqq commented Nov 12, 2023

BTW, to keep your branch's commit history clean while staying based on the latest main, I have a set of Git conventions that I'd like to recommend:

  • origin should be the remote for the official repository, i.e. https://github.com/jupyterlab/jupyter-ai.
  • self (or your GitHub username) should be the remote for your fork, i.e. https://github.com/americandatascience/jupyter-ai/tree/main
  • The main branch should always track origin/main.
  • Any branches should be made against your fork by pushing them to the self remote.

Here are the commands to emulate my setup.

# rename the official remote to `origin`, if necessary
# git remote rename <old-remote> origin

# add fork remote
git remote add self git@github.com:americandatascience/jupyter-ai.git

# set your dev branch to fix-initials
git checkout main
git checkout -b fix-initials

# reset main to track origin
git checkout main
git reset --hard origin/master
git branch -u origin

# push your dev branch to your fork
git checkout fix-initials
git push -u self

You should be able to change the branch of this PR to americandatascience:fix-initials.

Then, to sync with main without merge commits:

# get latest main
git checkout main
git pull

# rebase branch onto main
git checkout fix-initials
git rebase main
git push

to sync your PR's branch with main.

@aychang95 aychang95 requested a review from dlqqq November 14, 2023 08:16
@dlqqq dlqqq merged commit 51a1e5a into jupyterlab:main Nov 14, 2023
6 checks passed
Copy link

welcome bot commented Nov 14, 2023

Congrats on your first merged pull request in this project! 🎉
congrats
Thank you for contributing, we are very proud of you! ❤️

@dlqqq
Copy link
Collaborator

dlqqq commented Nov 14, 2023

@meeseeksdev please backport to 1.x

@dlqqq
Copy link
Collaborator

dlqqq commented Nov 14, 2023

@aychang95 Awesome work! 🎉

dlqqq pushed a commit that referenced this pull request Nov 14, 2023
Co-authored-by: Andrew Chang <aychang995@gmail.com>
dbelgrod pushed a commit to dbelgrod/jupyter-ai that referenced this pull request Jun 10, 2024
* Ensure initials appear in collaborative mode

* Set default initials and use instead of null current_user attr

* Black format to avoid pre-commit failure

* Getattr does not return default because initials attr still exists even though it's None

* optimize and set to one initial var
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants