slightlynybbled / tk_tools

Python tkinter tools, Python3.7+
MIT License
101 stars 25 forks source link

Gauge2 #35

Closed naejgz closed 6 years ago

naejgz commented 6 years ago

Hello I've done this for my students please see: https://github.com/naejgz/tk-tools but I don't know how to ask for a pull request

Gauge2 : modifications from Gauge


3 numeric values added : min, center, max, and meter a bit flatter to accept center value small correction of the rate for green yellow red zones now 80% gives 2 red among 10 divisions now yellow and red zone size can change yellow and red zone also for too small values readout still active with RED BG if values OFF limits suppressed (commented) : create second half part suppressed integer conversion on extend to not accumulate decimal loss errors idem on value math correction now min_value can be different from 0 or negative

slightlynybbled commented 6 years ago

Very cool!

I'm looking at your repository and I think I know why it is the way it is. When you created the project, you probably did a 'git clone' of my repository, made your changes, then uploaded them into github. What you should have done to make this easier is to create a "fork" of the tk-tools repository (top right within github) and then cloned from your own repository and made commits from there. If you do forks in that manner, pull requests via github are basically one-button events.

This post is a bit long, but shouldn't be more than a few minutes of mostly command line.

When not forked within github

There are probably a few ways to do this, and I'm not sure if this will work perfectly, but it is close. What this procedure should do is create a fork of the original repository, download both of the repositories to your machine, do a merge on your local machine, then upload the changes back to the fork and do a normal pull request.

  1. Delete the repository on your local machine (it is on github, so no big deal)
  2. On github, rename your 'naejgz/tk-tools' repository to something else like naejgz/tk-tools2 to prevent naming conflicts
  3. Use the Fork button on the slightlynybbled/tk-tools to make a fork of my repository.
  4. Clone both repositories to your local machine. This will take two git clone http://... commands.
  5. Navigate into the tk-tools and git pull <branchname> ../tk-tools2/.git (you may want to use absolute paths)
  6. Still within tk-tools, git push origin <branchname>
  7. Now use the 'Create pull request` button

When forked within github

Within github, there is a button just above your files list which says "New Pull Request". If you click that button, you will be presented with something that looks a bit like this issue, which is really a space to discuss the change. It should show you if the current test suite passed and has some other information in different tabs for review purposes.

One of the boxes allows you to 'title' your change request and has another text box to describe the change. Simply describe the intent and hit the "Create pull request" button.

We will likely enter into a brief discussion and I will merge the pull request when any breaking changes have been addressed (or accepted).

Thank you so much!

slightlynybbled commented 6 years ago

After a bit of testing and some small modifications to hide some of the edges, I have accepted the PR and modified the Gauge2 to simply be the Gauge. Thank you for your contributions!

Your contribution was included in v0.9.7 now hosted on pypi.