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
Python3 #8
base: master
Are you sure you want to change the base?
Python3 #8
Conversation
|
You could also take the opportunity and port |
|
@chimosky should I port to |
|
You can add it here. |
That doesn't look like testing without errors. Please fix this. I don't think it needs to be in a separate pull request. The error is common; failure to change to get_shared_activity during a port to GTK 3 during GCI 2016, possibly because of hasty review that didn't include collaboration testing. |
It seemed to me like the previous port to collabwrapper was not completed and merged hastily. I have made the required changes in another branch
Apart from that I added few new translations at https://translate.sugarlabs.org/projects/Paths/ a while ago, when I refreshed pot file and run the translation bash earlier, many translations were not fetched. What have I done wrong? |
|
Thanks for the update.
An issue is for recording a problem that you are not going to fix. It is an invitation to others to fix it. For problems you are going to fix, just say so in the pull request and we'll wait until you're ready with a fix. When you need help to fix a problem while in the middle of a pull request, the best place to ask is the pull request (for context), and the second best place is sugar-devel@ mailing list (for wider audience). It isn't clear what you plan to do; work on a fix, or give up the pull request for the time being until someone else has a fix. If you are not sure about how collaboration works, look at source code of other activities that successfully collaborate. Maze is a good but complex example; using TextChannelWrapper but not CollabWrapper. Memorize is a good example using CollabWrapper. Level is another good example that goes a step further to use CollabWrapper with a TCP/IP UDP broadcast.
You haven't finished updating the translations. I don't know what you did, so I can't critique your process. When I used my process on top of your branch here, I pushed the result as 72e9f4f ("translate.sugarlabs.org synchronisation"). My changes demonstrate what you hadn't updated. Your new translations are seen, thanks! |
I don't think fixing collaboration under the PR - port to python 3 is a good idea, since it was broken even before the port. I planned to club changes related to porting, for reference later(if required). However, I do understand that making changes ultimately needs to make the activity usable and the order of changes doesn't matter much. If you insist I could try fixing the broken collaboration under this PR. Maybe could you possibly test the changes made till the latest commit (
I did use the same script you used to update translations. Let me elaborate: |
|
Thanks. It's easy to change the title of the pull request, if that's the only doubt you have. Otherwise what is the procedural problem that would be solved by using a different pull request? Is it that you don't want to try fixing the collaboration? If so, I'm fine with that, and we can leave the pull request unfinished or merge it. We just need to know what you plan. I'll see if I can find time to test. I'm not familiar with the activity; do you have or know of a test plan? Regarding translations, I've no idea why your results were different to mine, but I agree it is important to find out why. Your commit 703a0a4 when viewed shows only removal of some po/*.po files, and addition of trans.sh file; no changes to po/ach.po. Yet my commit 72e9f4f shows changes to po/ach.po and a list of other files. My guess is that you didn't complete a |
The script requires that you pass an argument to it and the argument is the name of the project as listed on translate.sugarlabs.org and running the script without an argument would run the script but only remove empty translations without pulling in any translations. |
Initially, I didnot plan to fix the collaboration due to tight schedules. However, I have made some progress in fixing it, so I will add more commits if I get it working after testing, might take me some time; will finish it as soon as I can.
I started with playing a game and noted-
|
@chimosky That's right, it was such a stupid mistake! I seemed to have overlooked that! Thanks a lot :) |
|
Thanks! Added new issue sugarlabs/sugar-tools#3. |
|
@quozl @chimosky Update on this PR:
I just wanted to avoid it in this PR, because the work is a little messy. I am not sure if reviewing code commit wise will be of any help. Maybe it would have been easier to review directly as Many changes which have been done commit 38e8b8b onwards may be kept or undone in further commits. I found making changes and simultaneously testing them, more better to work with as a result there are multiple commits. (And also I made the mistake of merging a branch in the branch, might make reviewing code more difficult.... sorry for too many commits and the mess) Please test the changes made till 9e5e3fe so I can go ahead with
|
|
What you describe is a common hesitation, and I'm happy to explain the process further. I'll quote selectively. First, remember that a pull request comes from a branch, and anything you do to the branch will be reflected in the pull request. A branch is made up of a series of commits. The commits describe your changes, but are independent of the changes.
Second, remember that Files changed in the pull request is the equivalent of
Third, making changes and immediately testing them is the best way to work, because (a) you get to reflect on the change during the commit message, (b) you can use git to transport the change to a test system, (c) we get to see your thought process and trials (increased trust), and (d) you can easily revert a failed trial change using What you may be missing is practice in rewriting commits. This where you don't change the outcome; the files, but you do change the way that git reaches that outcome. I can't be specific about the tools you should use to rewrite commits, because I don't know what tools you are using to write them in the first place. But the tools do eventually call git commands, and these commands are what do the work. The tools that I use are emacs with magit and git. With reference to this Git Cheatsheat ... here's my workflow for writing a commit;
Most people just use For rewriting commits, I've several different workflows, and I choose one based on the nature of the historical error that I wish to make.
After the commit history is tidied up, what I do next depends on whether I've had review comments that address specific commits. For the most part, I
Without any change to Files changed. Looking at your branch at present, if it were mine, I would try to rewrite and reorder commits to follow this sequence;
Remember you can't easily lose anything if you remember the git hash somewhere. Hope that helps. |
|
Tested 9e5e3fe.
I've not tested collaboration fully. I need to win a game first. |
|
Quick check of logs; found this but not sure how to cause; |
will get this fixed
Issue #7 , will try fixing it!
I can't reproduce this. For me the tiles are rotating by clicking on them multiple times and not necessarily only in the top left corner.
Oh you just need to maximize your score by making a closed path and by using as many tiles as possible for the closed path. I actually kind of found this activity fun !
Regarding this error, I didn't get this error initially. Can you confirm if you have tried to restore a shared activity and continued to play to find this error? I'm not sure if there is any other way to reproduce this. |
|
Tested 9e5e3fe.
Tested collaboration, sharer joins but game state is yet to be shared. |
Game state is not shared unless the initiator starts a new game. |
Game state still isn't shared, also noticed that for the joiner the new game button tooltip says they can't start a game but the button still works. |
Changes in one game are reflected in the other and they have shared game boards.... Have I misunderstood by what you meant by collaboration is'nt shared?
Oh I know this problem still exists, I had tried |
No you didn't misunderstand, I've edited my comment. @quozl kindly test collaboration as game state isn't shared for me. |
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.
Hey, I am back reviewing.
Quick file diff review and testing.
Notice that the top tile is hidden under the toolbar
- Pressing the help button changes the orientation of the first tile in order ( I guess that's done on mistake)
- Add help to the help button. Otherwise, the help button might not be working after / before the port
- Change the tooltip of "Play with Robot" alternatively. i.e A student might not understand if a robot with open eyes means the Robot is playing, but a robot with closed eyes means a robot is not playing. Most of the time, a person new to the activity is most likely to hover over the button and see "Play with the robot" as the default tooltip. When the robot is enabled, the tooltip should change to "Disable Robot", etc.
- Why is the XO icon on the PathsActivity? I am curious
Tested on Arch Linux, Sugar 0.116
|
Thanks. Reviewed. In addition to comments, I've already made ...
Tested in single-user mode.
|
|
@quozl is the XO icon kept on purpose in the paths activity? |
|
@srevinsaju, it is used to show whose turn it is when collaborating. Colour and tooltip text changes. Have you got collaboration working yet on your setup? @JuiP, something is wrong with collaboration, but I'm not sure what. Grid is shared. Card hands are unique, as they ought to be. When I play cards to the grid, sometimes the turn is not ended, sometimes it is. It can get into a state where nobody can play their cards. I'm not sure what the play and stop button is for in the toolbar. At one stage, after winning a path, pressing the play bar incremented the score repeatedly. |
|
By the way, I've updated the checkboxes in previous comments here. |
PathsActivity.py
Outdated
| self._setup_presence_service() | ||
| #self._setup_presence_service() | ||
| self.connect('shared', self._shared_cb) | ||
| self.connect('joined', self._joined_cb) |
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.
You can remove this line as you connected the joined signal in collabwrapper to the same callback.
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.
Signals mean different things, even though they are both called "joined". It is best to use the signals and API at the same level of the stack.
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.
@quozl could you clarify what you meant by "It's best to use the signals and API at the same level of the stack" as they're both different signals and both get emitted differently.
My statement above was because as CollabWrapper is used for collaboration, we should just call the joined event of collabwrapper and not the one from the sugar3.activity.activity.Activity class.
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.
@quozl could you clarify what you meant by "It's best to use the signals and API at the same level of the stack" as they're both different signals and both get emitted differently.
CollabWrapper is a software layer, or stack level, above the Telepathy API exposed by the sugar3 classes. So whenever someone mixes signals and API between Telepathy API and CollabWrapper, there's an opportunity to bypass a layer, which makes code non-modular and confusing.
My statement above was because as
CollabWrapperis used for collaboration, we should just call thejoinedevent of collabwrapper and not the one from thesugar3.activity.activity.Activityclass.
Yes, that's sort of the same thing, except I gave reasons?
This reverts commit 6d9d09f.
This reverts commit 4c1cbd9.
- removed collab test activity - use open without importing from io - fix keyword spacing - reduce the length of labels to prevent horizontal toolbar expansion - change tooltip to "Disable Robot" - remove stop button accelerator - correct the incorrect GTK signal name to "key-press-event"
- Change unused local variable
- Fix method call - correct the repository in activity/activity.info



@quozl @pro-panda please review.
Tested works without errors
Port to python 3
Fix PyGIWarnings
Fix Robot mode - broken after port to Gtk+3
Port telepathy static bindings to TelepathyGLib
Update Collabwrapper with latest changes in collab test activity
Port from GObject to GLib
Collaboration seems to be broken before the port