View topic - rapid 'poweruser' interface



All times are UTC + 1 hour


Post new topic Reply to topic  [ 23 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: 28 Mar 2010, 23:41 
Spring Developer

Joined: 01 Jun 2005, 10:36
Location: The Netherlands
May as well announce rapid: A set of two small tools (commandline and gui) to operate on your local rapid repository.

The commandline tool is mostly meant for power users as simply installing a package can also be done the GUI way. The GUI currently only allows installing single packages.

Anyway, the rapid commandline tool allows you to pin/unpin tags, install/uninstall packages, collect garbage, and rapidly create a .sdd from a .sdp package with a single command. (the latter is useful for engine development ;-))

It can be installed using:
Code:
easy_install rapid-spring


Then view the possible commands by running:
Code:
rapid


Or, for the GUI:
Code:
rapid-gui


Thanks go to koshi for figuring how to package python stuff and for creating rapid-gui.

If you have any suggestions, find any bugs, have some patches (code is on github), etc., just post here or speak to me in Lobby.


Top
 Offline Profile  
 
PostPosted: 29 Mar 2010, 15:50 
Moderator

Joined: 19 May 2009, 20:10
Nice tool.

Edit: this is solved (setup problem).
There is a bug in install/uninstall:

Code:
$ rapid list-installed-packages | grep XTA
  XTA 9.6                                  (xta:version:9.6, xta:latest)
$ rapid install "XTA 9.5"
Already installed: XTA 9.6
$ rapid uninstall "XTA 9.5"
Not pinned: xta:version:9.6
Unpinning: xta:latest
Uninstalling: XTA 9.6
$ rapid list-installed-packages | grep XTA

$ rapid list-tags | grep 7613
  ca:stable                                (Complete Annihilation stable-7613)
  ca-1faction:stable                       (Complete Annihilation 1 faction stable-7613)
  ca:stable                                (Complete Annihilation stable-7613)
  ca-1faction:stable                       (Complete Annihilation 1 faction stable-7613)
  ca:revision:7613                         (Complete Annihilation stable-7613)
  ca-1faction:revision:7613                (Complete Annihilation 1 faction stable-7613)
$ rapid install "Complete Annihilation stable-7613"
100 or more matching names found, please narrow your search.
$ rapid install "ca:revision:7613"
No names matching ca:revision:7613 found.

It only matches against the part until first space? And only full names?

Pinning a specific version works, e.g.
Code:
rapid pin ca:revision:7613


Using latest from git, atm 8d7b06e3703f075c83610137945f26d12a67ee53


Last edited by SirMaverick on 29 Mar 2010, 19:45, edited 1 time in total.

Top
 Offline Profile  
 
PostPosted: 29 Mar 2010, 15:56 
Moderator

Joined: 19 May 2009, 20:10
Other problem: I used SD before and had over time more than 1000 packages installed. I ran "rapid collect-pool". It ran for 10-15 minutes (runtime is lesser issue) and used up to 1.3GB ram.


Top
 Offline Profile  
 
PostPosted: 29 Mar 2010, 18:04 
Redacted
User avatar

Joined: 11 Jul 2007, 16:47
okay, it appears to be writing pool to files... so what's the memory hog?


Top
 Offline Profile  
 
PostPosted: 29 Mar 2010, 19:46 
Spring Developer

Joined: 01 Jun 2005, 10:36
Location: The Netherlands
Thanks for the feedback.

SirMavericks install/uninstall issue has been narrowed down to his own wrapper shell script ($@ instead of "$@").

The memory hog when using collect-pool when lots of packages are installed may be because it loads for each package the list of files in memory and keeps this list cached in memory. If each such list is 300kb (rough estimate based on 50-200kb gzipped raw data) then 1000 packages would be 300M already. Apparently the python representation is quite somewhat less compact :-)

EDIT: memory issue should be resolved (reduced usage by 95%)
(yay Flyweight pattern)


Top
 Offline Profile  
 
PostPosted: 16 Aug 2010, 04:30 

Joined: 16 Aug 2010, 04:28
When trying to use rapid I get the following error on Gentoo Linux with rapid-spring installed from easy_install

admorgan@alexandria ~ $ rapid-gui
Traceback (most recent call last):
File "/usr/bin/rapid-gui", line 5, in <module>
pkg_resources.run_script('rapid-spring==0.3.0', 'rapid-gui')
File "/usr/lib64/python2.6/site-packages/pkg_resources.py", line 468, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/usr/lib64/python2.6/site-packages/pkg_resources.py", line 1201, in run_script
execfile(script_filename, namespace, namespace)
File "/usr/lib64/python2.6/site-packages/rapid_spring-0.3.0-py2.6.egg/EGG-INFO/scripts/rapid-gui", line 15, in <module>
window = RapidGUI()
File "/usr/lib64/python2.6/site-packages/rapid_spring-0.3.0-py2.6.egg/rapid/gui.py", line 124, in __init__
self.mainWidget = MainRapidWidget(self)
File "/usr/lib64/python2.6/site-packages/rapid_spring-0.3.0-py2.6.egg/rapid/gui.py", line 109, in __init__
self.availableWidget = AvailableRapidListWidget(self)
File "/usr/lib64/python2.6/site-packages/rapid_spring-0.3.0-py2.6.egg/rapid/gui.py", line 95, in __init__
self.sourceModel.reload()
File "/usr/lib64/python2.6/site-packages/rapid_spring-0.3.0-py2.6.egg/rapid/models.py", line 29, in reload
self.reloadData( lambda p: not p.installed )
File "/usr/lib64/python2.6/site-packages/rapid_spring-0.3.0-py2.6.egg/rapid/models.py", line 18, in reloadData
for p in filter( dataFunction, main.rapid.packages ):
AttributeError: 'module' object has no attribute 'packages'


Top
 Offline Profile  
 
PostPosted: 17 Aug 2010, 19:15 
User avatar

Joined: 05 Jan 2010, 13:30
Location: Dresden, Germany
admorgan wrote:
When trying to use rapid I get the following error on Gentoo Linux with rapid-spring installed from easy_install

admorgan@alexandria ~ $ rapid-gui
Traceback (most recent call last):
File "/usr/bin/rapid-gui", line 5, in <module>
pkg_resources.run_script('rapid-spring==0.3.0', 'rapid-gui')
File "/usr/lib64/python2.6/site-packages/pkg_resources.py", line 468, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/usr/lib64/python2.6/site-packages/pkg_resources.py", line 1201, in run_script
execfile(script_filename, namespace, namespace)
File "/usr/lib64/python2.6/site-packages/rapid_spring-0.3.0-py2.6.egg/EGG-INFO/scripts/rapid-gui", line 15, in <module>
window = RapidGUI()
File "/usr/lib64/python2.6/site-packages/rapid_spring-0.3.0-py2.6.egg/rapid/gui.py", line 124, in __init__
self.mainWidget = MainRapidWidget(self)
File "/usr/lib64/python2.6/site-packages/rapid_spring-0.3.0-py2.6.egg/rapid/gui.py", line 109, in __init__
self.availableWidget = AvailableRapidListWidget(self)
File "/usr/lib64/python2.6/site-packages/rapid_spring-0.3.0-py2.6.egg/rapid/gui.py", line 95, in __init__
self.sourceModel.reload()
File "/usr/lib64/python2.6/site-packages/rapid_spring-0.3.0-py2.6.egg/rapid/models.py", line 29, in reload
self.reloadData( lambda p: not p.installed )
File "/usr/lib64/python2.6/site-packages/rapid_spring-0.3.0-py2.6.egg/rapid/models.py", line 18, in reloadData
for p in filter( dataFunction, main.rapid.packages ):
AttributeError: 'module' object has no attribute 'packages'


same error on Debian Squeeze (easy_install and built from source). Filed as http://github.com/tvo/rapid/issues#issue/3


Top
 Offline Profile  
 
PostPosted: 18 Aug 2010, 08:50 
Lobby Developer
User avatar

Joined: 14 Aug 2007, 15:15
fixed it: http://github.com/tvo/rapid/issues/#iss ... ent/359859


Top
 Offline Profile  
 
PostPosted: 22 Aug 2010, 09:04 
User avatar

Joined: 16 Aug 2004, 03:36
Location: The Steward's Realm
argh why easy_install!?? neds moar pip... easy_install -> deviltool


Top
 Offline Profile  
 
PostPosted: 25 Aug 2010, 02:04 
Redacted
User avatar

Joined: 08 Jan 2007, 06:13
Location: Don't be silly. If there's no machine heaven, where do all the toasters go?
Shouldn't it install the bitarray dependency by itself?





When it asks me if I meant:
1. ba:latest
2. specialba:latest

Can the correct number to enter to get ba:latest not be 0?


Top
 Offline Profile  
 
PostPosted: 25 Aug 2010, 04:04 

Joined: 16 Aug 2010, 04:28
I re-installed with pip instead of easy_install and now it works


Top
 Offline Profile  
 
PostPosted: 03 Sep 2010, 20:16 
Spring Developer

Joined: 01 Jun 2005, 10:36
Location: The Netherlands
Dragon45 wrote:
argh why easy_install!?? neds moar pip... easy_install -> deviltool

Is pip some kind of official replacement for easy_install? Any references? I don't seem to find much docs yet that use pip, apart from the pip docs themselves. (which obviously argue pro pip)

lurker wrote:
When it asks me if I meant:
1. ba:latest
2. specialba:latest

Can the correct number to enter to get ba:latest not be 0?

Noted.



To all: if there are issues with rapid the preferred form of reporting them is on the issue tracker at github.


Top
 Offline Profile  
 
PostPosted: 03 Sep 2010, 20:21 

Joined: 16 Aug 2010, 04:28
According to http://pypi.python.org/pypi/pip and the python irc channel pip is the upcoming replacement to easy_install. The nice thing about pip is that it already works with everything that is easy_install compatible and in this case even made it work (although I can't explain that one).

Tobi wrote:
Dragon45 wrote:
argh why easy_install!?? neds moar pip... easy_install -> deviltool

Is pip some kind of official replacement for easy_install? Any references? I don't seem to find much docs yet that use pip, apart from the pip docs themselves. (which obviously argue pro pip)

lurker wrote:
When it asks me if I meant:
1. ba:latest
2. specialba:latest

Can the correct number to enter to get ba:latest not be 0?

Noted.



To all: if there are issues with rapid the preferred form of reporting them is on the issue tracker at github.


Top
 Offline Profile  
 
PostPosted: 03 Sep 2010, 20:44 
Spring Developer

Joined: 01 Jun 2005, 10:36
Location: The Netherlands
Ok, thanks. Guess it doesn't hurt to switch the docs to pip anyway.


Top
 Offline Profile  
 
PostPosted: 04 Sep 2010, 01:21 
Spring Developer

Joined: 01 Jun 2005, 10:36
Location: The Netherlands
Instead of doing that I fixed most open bugs / implemented the feature requests and made a new release.

Here's the git shortlog:
Quote:
hide main function a bit better, and explain it
don't choke on multiple packages with same name, but different hex or dependencies
fix off-by-one error when user was asked to choose from a list
added -y/--yes option to skip confirmations
pin, unpin, install and uninstall now support arbitrary amount of arguments
sort packages and tags in list-[installed-]packages and list-[pinned-]tags
refactor: promote select to TUI
add -r/--regex option to use regex instead of substring matches
sync readme and usage, added options to readme


Top
 Offline Profile  
 
PostPosted: 04 Sep 2010, 08:35 
Spring Developer
User avatar

Joined: 22 Sep 2007, 08:51
woo hoo! :D
nice nice!
looks like rapid is the most mature project in the spring community now. leaves little to be desired.


Top
 Offline Profile  
 
PostPosted: 05 Sep 2010, 17:43 
Spring Developer

Joined: 01 Jun 2005, 10:36
Location: The Netherlands
I tried both pip and easy_install and noticed that neither installs dependencies of rapid. The dependency is defined like this in setup.py, in the call to distutils.core.setup:
Code:
    requires=['bitarray'],


If anyone has any clue what causes this I would appreciate it if you could put it here :-)

EDIT: solved in 0.4.1, programs that read setup.py are pretty inconsistent with each other...


Top
 Offline Profile  
 
PostPosted: 05 Nov 2010, 13:20 

Joined: 28 May 2009, 15:24
rapid pin ct:test
Traceback (most recent call last):
File "/usr/local/bin/rapid", line 5, in <module>
pkg_resources.run_script('rapid-spring==0.2.0', 'rapid')
File "/usr/lib/python2.6/dist-packages/pkg_resources.py", line 467, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/usr/lib/python2.6/dist-packages/pkg_resources.py", line 1200, in run_script
execfile(script_filename, namespace, namespace)
File "/usr/local/lib/python2.6/dist-packages/rapid_spring-0.2.0-py2.6.egg/EGG-INFO/scripts/rapid", line 6, in <module>
from rapid.main import *
File "/usr/local/lib/python2.6/dist-packages/rapid_spring-0.2.0-py2.6.egg/rapid/main.py", line 41, in <module>
rapid = rapid.Rapid()
File "/usr/local/lib/python2.6/dist-packages/rapid_spring-0.2.0-py2.6.egg/rapid/rapid.py", line 297, in __init__
mkdir(spring_dir)
File "/usr/local/lib/python2.6/dist-packages/rapid_spring-0.2.0-py2.6.egg/rapid/rapid.py", line 42, in mkdir
os.mkdir(path)
OSError: [Errno 17] File exists: '/home/jeykey/.spring'


If Spring directory is a dead link, rapid crashes... I know this is a minor bug, but I wanted to share it anyway ;)

regards, jeykey


Top
 Offline Profile  
 
PostPosted: 08 Nov 2010, 20:02 
Spring Developer

Joined: 01 Jun 2005, 10:36
Location: The Netherlands
Thanks, I'll track it here: http://github.com/tvo/rapid/issues/issue/18


Top
 Offline Profile  
 
PostPosted: 25 Jan 2012, 04:02 

Joined: 17 Sep 2008, 03:36
Location: your imagination
A new Zero-K player has trouble getting rapid to work:

http://pastebin.com/CX84eBn2


Top
 Offline Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 23 posts ]  Go to page 1, 2  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group

Site layout created by Roflcopter et al.