You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For all of the ev3dev packages I maintain, I have created an ev3dev-jessie branch and an ev3dev-stretch branch. I've basically adopted (something like) the Debian policy for stable and testing, which is only critical bug/security fixes go into stable (jessie in our case), no new features. You can do what you like, including new features and breaking changes in testing (stretch in our case).
Oh, damn... when I originally read that I thought all the changes were on the EVB/BrickPi side. Looks like we'll need to fix those.
For all of the ev3dev packages I maintain, I have created an ev3dev-jessie branch and an ev3dev-stretch branch.
I think we've gotten to the point where that convention would work well here. We'll need to figure out whether we want to maintain a "dev" branch or not. List of things that will be impacted (not necessarily complete):
CI builds (I think we have some configuration which points to branch names, or at least we did)
Documentation versions and labels
Contribution info (somewhere we added an explanation of develop vs. master)
create a child branch called ev3dev-lang-python-stretch
create a ev3dev-lang-python-stretch-develop child branch off of ev3dev-lang-python-stretch
change the default branch to ev3dev-lang-python-stretch
delete todays develop branch
option 2 drop the ev3dev-lang-python- part of the branch names
rename master to jessie
create a child branch called stretch
create a stretch-develop child branch off of stretch
change the default branch to stretch
delete todays develop branch
I like option 2 myself, the names are much shorter and easier to type and we already know that are are in the ev3dev-lang-python- repo, it feels redundant to also put that in the branch names.
Most future dev would happen in stretch-develop and then we merge into stretch the same we way merge develop -> master today. We then git cherry-pick SHA any commit that also needs to go into jessie.
I then reverted the changes I made to ev3dev/ev3.py and now want to make those changes using the templates. The README at ev3dev-lang does not have instructions on how to use the contents of the repo. The README in the autogen directory has a little...I cced to the autgen directory and ran npm install and it installed some stuff. I thought maybe I'm supposed to run the following but thats not it
dwalton@laptop ~/l/ev3dev-lang-python> node ev3dev-lang/autogen/autogen.js
module.js:328
throw err;
^
Error: Cannot find module 'liquid-node'
at Function.Module._resolveFilename (module.js:326:15)
at Function.Module._load (module.js:277:25)
at Module.require (module.js:354:17)
at require (internal/module.js:12:17)
at Object.<anonymous> (/home/dwalton/lego/ev3dev-lang-python/ev3dev-lang/autogen/autogen.js:13:25)
at Module._compile (module.js:410:26)
at Object.Module._extensions..js (module.js:417:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Function.Module.runMain (module.js:442:10)
dwalton@laptop ~/l/ev3dev-lang-python>
How do I the use contents of ev3dev-lang to build a new ev3dev/ev3.py using my new spec.json?
attempting to run from root of ev3dev-lang-python but it needs package.json
dwalton@laptop ~/l/ev3dev-lang-python> npm install
npm WARN enoent ENOENT: no such file or directory, open '/home/dwalton/lego/ev3dev-lang-python/package.json'
npm WARN ev3dev-lang-python No description
npm WARN ev3dev-lang-python No repository field.
npm WARN ev3dev-lang-python No README data
npm WARN ev3dev-lang-python No license field.
dwalton@laptop ~/l/ev3dev-lang-python>
so running from ev3dev-lang/autogen/ where there is a package.json but the postintsall barfs
dwalton@laptop ~/l/ev3dev-lang-python> cd ev3dev-lang/autogen/
dwalton@laptop ~/l/e/e/autogen> sudo npm install
[sudo] password for dwalton:
npm WARN lifecycle [email protected]~postinstall: cannot run in wd %s %s (wd=%s) [email protected] cd node_modules/liquid-node && npm install && npm run compile /home/dwalton/lego/ev3dev-lang-python/ev3dev-lang/autogen
npm WARN [email protected] requires a peer of bluebird@^2.1.3 but none was installed.
npm WARN [email protected] No repository field.
npm WARN [email protected] No license field.
dwalton@laptop ~/l/e/e/autogen>
dwalton@laptop ~/l/e/e/autogen> ls
autogen-core.js autogen.js config.js node_modules/ package.json README.rst utils.js
dwalton@laptop ~/l/e/e/autogen> cat package.json
{
"name": "ev3dev-lang-autogen",
"version": "1.0.0",
"description": "Dependencies for ev3dev-lang autogen",
"main": "autogen.js",
"dependencies": {
"liquid-node": "git://github.com/WasabiFan/liquid-node.git",
"yargs": "~3.29.0"
},
"devDependencies": {},
"scripts": {
"test": "echo \"TODO\" && exit 1",
"postinstall": "cd node_modules/liquid-node && npm install && npm run compile"
},
"homepage": "https://github.com/ev3dev/ev3dev-lang"
}
dwalton@laptop ~/l/e/e/autogen>
there is a node_modules in the root dir of ev3dev-lang-python but it is empty
dwalton@laptop ~/l/ev3dev-lang-python> ls -l node_modules/
total 0
dwalton@laptop ~/l/ev3dev-lang-python>
"The important part of the kernel version" everything on my EVB is working though, touch sensors work, motors work, etc....it feels like I don't have the Breaking change
@dwalton76 The npm issue has been resolved; a version of a package that script depended on was deprecated and npm didn't handle it well. You should be able to run npm install and go from there without issue now.
and the port names only changed for EV3 @dlech other than the LEDs what things should I see breaking? I did have to fix LEDs but motors and touch sensors still work for me on EV3.
@WasabiFan I'm not clear on how what I run from which directories. If I run npm install from the ev3dev-lang-python directory it barfs because there is no package.json
dwalton@laptop ~/l/ev3dev-lang-python> sudo npm install
[sudo] password for dwalton:
npm WARN enoent ENOENT: no such file or directory, open '/home/dwalton/lego/ev3dev-lang-python/package.json'
npm WARN ev3dev-lang-python No description
npm WARN ev3dev-lang-python No repository field.
npm WARN ev3dev-lang-python No README data
npm WARN ev3dev-lang-python No license field.
dwalton@laptop ~/l/ev3dev-lang-python>
There is a package.json in ev3dev-lang/autogen/ so I run npm install from there but it barfs because there is no node_modules/liquid-node directory.
dwalton@laptop ~/l/ev3dev-lang-python> cd ev3dev-lang/autogen/
dwalton@laptop ~/l/e/e/autogen> sudo npm install
npm WARN lifecycle [email protected]~postinstall: cannot run in wd %s %s (wd=%s) [email protected] cd node_modules/liquid-node && npm install && npm run compile /home/dwalton/lego/ev3dev-lang-python/ev3dev-lang/autogen
npm WARN [email protected] requires a peer of bluebird@^2.1.3 but none was installed.
npm WARN [email protected] No repository field.
npm WARN [email protected] No license field.
dwalton@laptop ~/l/e/e/autogen>
-rwxr-xr-x 1 robot robot 407 Sep 9 01:19 touch_sensor.py
robot@ev3alt[utils]# cat touch_sensor.py
#!/usr/bin/env python3
"""
Used to test TouchSensor basics
"""
from ev3dev.auto import TouchSensor, INPUT_1
import logging
import sys
# logging
logging.basicConfig(level=logging.INFO,
format="%(asctime)s %(levelname)5s: %(message)s")
log = logging.getLogger(__name__)
ts = TouchSensor(INPUT_1)
if ts.is_pressed:
log.info("TS is pressed")
else:
log.info("TS is NOT pressed")
robot@ev3alt[utils]#
robot@ev3alt[utils]#
For motors I am using
robot@ev3alt[utils]# cat move_motor.py
#!/usr/bin/env python3
"""
Used to adjust the position of a motor in an already assembled robot
where you can"t move the motor by hand.
"""
from ev3dev.auto import OUTPUT_A, OUTPUT_B, OUTPUT_C, OUTPUT_D, Motor
import argparse
import logging
import sys
# command line args
parser = argparse.ArgumentParser(description="Used to adjust the position of a motor in an already assembled robot")
parser.add_argument("motor", type=str, help="A, B, C or D")
parser.add_argument("degrees", type=int)
parser.add_argument("-s", "--speed", type=int, default=50)
args = parser.parse_args()
# logging
logging.basicConfig(level=logging.INFO,
format="%(asctime)s %(levelname)5s: %(message)s")
log = logging.getLogger(__name__)
if args.motor == "A":
motor = Motor(OUTPUT_A)
elif args.motor == "B":
motor = Motor(OUTPUT_B)
elif args.motor == "C":
motor = Motor(OUTPUT_C)
elif args.motor == "D":
motor = Motor(OUTPUT_D)
else:
raise Exception("%s is invalid, options are A, B, C, D")
if not motor.connected:
log.error("%s is not connected" % motor)
sys.exit(1)
if args.degrees:
log.info("Motor %s, current position %d, move to position %d, max speed %d" %
(args.motor, motor.position, args.degrees, motor.max_speed))
motor.run_to_rel_pos(speed_sp=args.speed,
position_sp=args.degrees,
stop_action='hold')
robot@ev3alt[utils]#
@dwalton76 hmm... I would expect it to "just work". Can you delete all of the node_modules directories and re-try?
On the topic of running commands, you should run npm from the autogen directory; when you run the actual autogen script, however, you want to run it from the directory with the autogen-spec.json, which is in the root of this repo.
If the above suggestion doesn't work, please open an issue at the ev3dev-lang repo and we can troubleshoot over there.
@dlech, what is debian policy re version numbers? Is it possible to have same versions of a package both in jessie and stretch? Or do we keep 1.0.* for jessie and start with 1.2 for stretch?
It looks like we could treat jessie and stretch as separate platforms in ev3dev/ev3dev-lang.
You cannot upload two packages with the same version. It will cause an error.
What I have done for other ev3dev packages is add a jessieX suffix if I needed to upload another version to jessie after branching off for stretch. So, if 1.0.0 is the last version in jessie before branching off to stretch, then if there is some criticial fix that needs to be uploaded to jessie, you can name the version 1.0.0jessie1. In stretch, you can continue with the normal version scheme of 1.0.1.
I have PRs out for the buttons and LEDs, I am not seeing any issues with port names though so I haven't changed anything there. Motors work and touch sensors work (with and without specifying a port)...not sure what else to try or what should be breaking.
Activity
dlech commentedon Sep 4, 2017
Important info for package maintainer:
in
debian/changelog,stablein the linewill upload to jessie.
To upload to stretch, use
testing.UPDATE:
Also, things will break if you upload the same version number to both distros, so don't do exactly as shown above.
dlech commentedon Sep 4, 2017
For all of the ev3dev packages I maintain, I have created an
ev3dev-jessiebranch and anev3dev-stretchbranch. I've basically adopted (something like) the Debian policy for stable and testing, which is only critical bug/security fixes go into stable (jessie in our case), no new features. You can do what you like, including new features and breaking changes in testing (stretch in our case).WasabiFan commentedon Sep 4, 2017
Oh, damn... when I originally read that I thought all the changes were on the EVB/BrickPi side. Looks like we'll need to fix those.
I think we've gotten to the point where that convention would work well here. We'll need to figure out whether we want to maintain a "dev" branch or not. List of things that will be impacted (not necessarily complete):
developvs.master)dwalton76 commentedon Sep 8, 2017
So branches and branch names...some options
option 1
mastertoev3dev-lang-python-jessieev3dev-lang-python-stretchev3dev-lang-python-stretch-developchild branch off ofev3dev-lang-python-stretchev3dev-lang-python-stretchdevelopbranchoption 2 drop the
ev3dev-lang-python-part of the branch namesmastertojessiestretchstretch-developchild branch off ofstretchstretchdevelopbranchI like option 2 myself, the names are much shorter and easier to type and we already know that are are in the
ev3dev-lang-python-repo, it feels redundant to also put that in the branch names.Most future dev would happen in
stretch-developand then we merge intostretchthe same we way mergedevelop -> mastertoday. We thengit cherry-pick SHAany commit that also needs to go into jessie.ddemidov commentedon Sep 8, 2017
We could just tag the current master with
jessie, and promise to never look back (move all development tostretch).dwalton76 commentedon Sep 9, 2017
@dlech @ddemidov need a pointer here on how to use the ev3dev-lang stuff
For the LEDs I need to make this change...I did the following manually just as a quick test. I did not use the templates
but to make this permanent I need to use templates so I make this change
I then reverted the changes I made to
ev3dev/ev3.pyand now want to make those changes using the templates. The README at ev3dev-lang does not have instructions on how to use the contents of the repo. The README in the autogen directory has a little...I cced to the autgen directory and rannpm installand it installed some stuff. I thought maybe I'm supposed to run the following but thats not itHow do I the use contents of ev3dev-lang to build a new ev3dev/ev3.py using my new spec.json?
dwalton76 commentedon Sep 9, 2017
@dlech I installed https://oss.jfrog.org/list/oss-snapshot-local/org/ev3dev/brickstrap/2017-09-02/snapshot-ev3dev-stretch-bone-generic-2017-09-01.img.xz on my EVB but it is kernel 4.9.41 instead of 4.9.42
Will the the next binary be 4.9.42? If so I'll hold off for it to work on
dlech commentedon Sep 9, 2017
The important part of the kernel version is
ev3dev-1.4.0. The4.9.xcomes from the upstream kernels for the various devices, so they don't always match. You can also find a BeagleBone specific changelog at https://github.com/ev3dev/ev3dev-kpkg/blob/ev3dev-stretch/ev3dev-bb.org/changelog.WasabiFan commentedon Sep 9, 2017
That's the right command. I'm guessing that the
npm installcommand didn't succeed. Can you post the output?dwalton76 commentedon Sep 9, 2017
attempting to run from root of ev3dev-lang-python but it needs package.json
so running from ev3dev-lang/autogen/ where there is a package.json but the postintsall barfs
there is a node_modules in the root dir of ev3dev-lang-python but it is empty
dwalton76 commentedon Sep 9, 2017
"The important part of the kernel version" everything on my EVB is working though, touch sensors work, motors work, etc....it feels like I don't have the Breaking change
WasabiFan commentedon Sep 9, 2017
@dwalton76 The npm issue has been resolved; a version of a package that script depended on was deprecated and npm didn't handle it well. You should be able to run
npm installand go from there without issue now.dlech commentedon Sep 9, 2017
That's because there were no breaking changes for EVB. It doesn't have LEDs and the port names only changed for EV3.
dwalton76 commentedon Sep 9, 2017
dwalton76 commentedon Sep 9, 2017
@WasabiFan I'm not clear on how what I run from which directories. If I run
npm installfrom the ev3dev-lang-python directory it barfs because there is no package.jsonThere is a package.json in ev3dev-lang/autogen/ so I run
npm installfrom there but it barfs because there is nonode_modules/liquid-nodedirectory.dlech commentedon Sep 9, 2017
Are you using the constants for the port names?
dwalton76 commentedon Sep 9, 2017
I've tried with and without for the touch sensor
For motors I am using
WasabiFan commentedon Sep 9, 2017
@dwalton76 hmm... I would expect it to "just work". Can you delete all of the
node_modulesdirectories and re-try?On the topic of running commands, you should run
npmfrom the autogen directory; when you run the actual autogen script, however, you want to run it from the directory with theautogen-spec.json, which is in the root of this repo.If the above suggestion doesn't work, please open an issue at the ev3dev-lang repo and we can troubleshoot over there.
dwalton76 commentedon Sep 9, 2017
Opened ev3dev/ev3dev-lang#179
ddemidov commentedon Sep 10, 2017
Another breaking change in stretch is that input device name for buttons has been changed: ev3dev/ev3dev#957
ddemidov commentedon Sep 11, 2017
@dlech, what is debian policy re version numbers? Is it possible to have same versions of a package both in jessie and stretch? Or do we keep 1.0.* for jessie and start with 1.2 for stretch?
It looks like we could treat jessie and stretch as separate platforms in ev3dev/ev3dev-lang.
dlech commentedon Sep 11, 2017
You cannot upload two packages with the same version. It will cause an error.
What I have done for other ev3dev packages is add a
jessieXsuffix if I needed to upload another version to jessie after branching off for stretch. So, if1.0.0is the last version in jessie before branching off to stretch, then if there is some criticial fix that needs to be uploaded to jessie, you can name the version1.0.0jessie1. In stretch, you can continue with the normal version scheme of1.0.1.dwalton76 commentedon Sep 16, 2017
I have PRs out for the buttons and LEDs, I am not seeing any issues with port names though so I haven't changed anything there. Motors work and touch sensors work (with and without specifying a port)...not sure what else to try or what should be breaking.