BicycleParameters icon indicating copy to clipboard operation
BicycleParameters copied to clipboard

Attempt to create the slider for the Eigenvalue values on the Y axis

Open agao25 opened this issue 4 years ago • 4 comments

I read through some of the Dash tutorial and tried to set up a Y limit slider for the Eigenvalues, but I can’t resolve a syntax error on line 244 and I feel like the cause is from something earlier (I've attached a screenshot of the error message). I was wondering if you had comments about my other code additions as well since I can’t preview if they work or not.

I also now realize that I messed up with my commit messages because they're pretty much the same for two different commits. I committed again after I solved a syntax error in what is now line 188, but that's not clear.

Screen Shot 2020-12-07 at 7 23 20 PM

agao25 avatar Dec 08 '20 03:12 agao25

but I can’t resolve a syntax error on line 244

The error you show is often caused by a missing closing parentheses above line 244. Python, unfortunately, doesn't show you the line where the parentheses was missing.

I can’t preview if they work or not

The first step should be setting up your computer so that you can run the app locally. I would do that before trying to add code, otherwise you are lost.

Why can't you run the app locally?

I also now realize that I messed up with my commit messages because they're pretty much the same for two different commits.

Don't worry about these details now. It doesn't' matter. We can clean things up when we merge your PR if need be.

moorepants avatar Dec 08 '20 09:12 moorepants

You get this message here "This branch has conflicts that must be resolved".

This means you branched off an earlier commit that the most recent in master. You'll need to fix it. This is what I typically do:

Also, you are editing on your local master branch. The best pattern is to always create a new branch when you want to make a new PR. This is how I do it:

git pull upstream master # where upstream points to github.com/moorepants/BicycleParameters
# now you are up-to-date with the master branch on this repo
git checkout -b my-new-feature  # create a new branch for your PR
# make your changes to the files, e.g. cycle_app.py
git commit bicycleparameters/cycleapp.py -m "Added y slider"
git push origin my-new-feature  # this pushes to origin which is github.com/silverscholar/BicycleParameters
# now open the pull request on github (a link to do so will appear in the command line)

You'll need to use git remote add to setup the "upstream" and "origin" remotes to manage each of the repos on github.

moorepants avatar Dec 08 '20 09:12 moorepants

This is the right idea! Nice!

moorepants avatar Dec 08 '20 09:12 moorepants

Great, sounds good! I will pull from the most recent master and create a new branch with my changes. I'll also add your suggestion to eigen_plot. As for my comment about previewing the app, I can run the app locally, I just wasn't sure about my other additions because the syntax error meant that I couldn't preview them. I will also hunt for that closing parentheses in the meantime.

agao25 avatar Dec 09 '20 09:12 agao25