From: Yaroslav Halchenko Date: Tue, 27 Apr 2010 21:22:37 +0000 (-0400) Subject: Merge branch 'master' of ssh://alioth.debian.org/git/pkg-exppsy/neurodebian X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=9fdfb67d9beafe8b2c7f4fdec75a80284c6819dc;hp=095671245430e644be5fdb7ae9fb947cba78d1c6;p=neurodebian.git Merge branch 'master' of ssh://alioth.debian.org/git/pkg-exppsy/neurodebian * 'master' of ssh://alioth.debian.org/git/pkg-exppsy/neurodebian: Fix Link to Readme.Debian for FSL. Rearange package page to place NITRC stats. Query NITRC for download stats. Use new NITRC button also for NeuroDebian itself. Include rendered PNG for package pages and use them. Make proper SVG buttons for NITRC, Med, and Science. Place Debian Med icons in package pages. Revert "Catch yet another exception." We don't want to continue when UDD doesn't talk. Catch yet another exception. Add NITRC mapping for mricron and voxbo. --- diff --git a/artwork/debianmed.svg b/artwork/debianmed.svg new file mode 100644 index 0000000..a789d7b --- /dev/null +++ b/artwork/debianmed.svg @@ -0,0 +1,549 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Med + + diff --git a/artwork/debianscience.svg b/artwork/debianscience.svg new file mode 100644 index 0000000..7ea2c3a --- /dev/null +++ b/artwork/debianscience.svg @@ -0,0 +1,796 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + Science + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/artwork/go-home.svg b/artwork/go-home.svg new file mode 100644 index 0000000..bc40f22 --- /dev/null +++ b/artwork/go-home.svg @@ -0,0 +1,364 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + Go Home + + + go + seek + home + + + + + Rodney Dawes + + + + + Jakub Steiner + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/artwork/nitrc_listed.svg b/artwork/nitrc_listed.svg new file mode 100644 index 0000000..ef5d7e1 --- /dev/null +++ b/artwork/nitrc_listed.svg @@ -0,0 +1,6290 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/neurodebian.cfg b/neurodebian.cfg index ae5fa1c..74804ba 100644 --- a/neurodebian.cfg +++ b/neurodebian.cfg @@ -67,7 +67,8 @@ libnifti1-dev = 26 nifti-bin = 26 odin = 153 mitools = 153 +mricron = 152 python-mvpa = 162 python-nipype = 325 slicer = 50 - +voxbo = 73 diff --git a/neurodebian/dde.py b/neurodebian/dde.py index 8e54ad4..852a488 100755 --- a/neurodebian/dde.py +++ b/neurodebian/dde.py @@ -413,6 +413,54 @@ def dde_get(url, fail=False): except (StopIteration): print "NOINFO:", url return False + except json.ReadException, e: + print "UDD-DOWN?:", url, type(e) + return False + + +def nitrc_get(spec, fail=False): + nitrc_url = 'http://www.nitrc.org/export/site/projects.json.php' + try: + data = json.read(urllib2.urlopen(nitrc_url + '?spec=%s' % spec).read()) + print "NITRC-SUCCESS:", spec + except urllib2.HTTPError, e: + print "NITRC-NOINFO:", spec, type(e) + return False + except urllib2.URLError, e: + print "NITRC-URLERROR:", spec, type(e) + if fail: + print "Permanant failure" + return False + print "Try again after 30 seconds..." + time.sleep(30) + return nitrc_get(spec, fail=True) + return data + + +def parse_nitrc(data): + if data is False: + return None + # simplify -- there is only one project in the data + project = data['projects'][0] + nitrc_filtered = {'downloads': 0, + 'id': project['id']} + for pkg in project['packages']: + for release in pkg['releases']: + for file in release['files']: + nitrc_filtered['downloads'] += file['download_count'] + return nitrc_filtered + + +def import_nitrc(cfg, db): + for p in db.keys(): + if not cfg.has_option("nitrc ids", p): + continue + nitrc_spec = cfg.get("nitrc ids", p) + nitrc_data = nitrc_get(nitrc_spec) + nitrc_excerpt = parse_nitrc(nitrc_data) + if not nitrc_excerpt is None: + db[p]['nitrc'] = nitrc_excerpt + return db def import_dde(cfg, db): @@ -658,6 +706,8 @@ def main(): # collect package information from DDE db = import_dde(cfg, db) + # get info from NITRC + db = import_nitrc(cfg, db) # store the new DB store_db(db, opts.db) # and be done diff --git a/neurodebian/templates/pkg.rst b/neurodebian/templates/pkg.rst index 1caa5d4..0738ee2 100644 --- a/neurodebian/templates/pkg.rst +++ b/neurodebian/templates/pkg.rst @@ -14,7 +14,18 @@ External links: {%- if cfg.has_option("nitrc ids", pkg) -%} - + + {%- endif -%} + {% if db.blends %}{% for blend, name, url in db.blends.tasks -%} + {%- if blend == 'debian-med' -%} + + + {%- endif -%} + {%- if blend == 'debian-science' -%} + + + {%- endif -%} + {%- endfor -%} {%- endif -%}

@@ -36,37 +47,31 @@ Citable reference: developement in the future. {% endif -%} -{% if db.blends or db.main.debian_popcon or db.main.ubuntu_popcon or +{% if db.nitrc or db.main.debian_popcon or db.main.ubuntu_popcon or db.main.recommends or db.main.suggests -%} Package Details =============== -{% if db.blends %} -`Debian Pure Blends `_ Status ----------------------------------------------------------------------- -Associated blends: - -{% for blend, name, url in db.blends.tasks %} -* `{{ name }} ({{ blend }}) <{{ url }}>`_ -{% endfor %} -{% if db.blends.remark %} -.. note:: -{{ db.blends.remark | indent(width=2, indentfirst=true) }} -{% endif -%} -{% endif -%} -{% if db.main.debian_popcon or db.main.ubuntu_popcon %} -Popularity statistics [#]_ --------------------------- +{% if db.nitrc or db.main.debian_popcon or db.main.ubuntu_popcon %} +Package popularity +------------------ {% if db.main.debian_popcon -%} -- Debian: {{ db.main.debian_popcon.insts }} (`more info `_) +- Debian [1]_: {{ db.main.debian_popcon.insts }} (`more info `_) {% endif -%} {% if db.main.ubuntu_popcon -%} -- Ubuntu: {{ db.main.ubuntu_popcon.insts }} +- Ubuntu [1]_: {{ db.main.ubuntu_popcon.insts }} +{% endif %} +{% if db.nitrc and db.nitrc.downloads -%} +- NITRC [2]_: {{ db.nitrc.downloads }} {% endif %} -.. [#] Due to the nature of this data, the reported number can only be +.. [1] Due to the nature of this data, the reported number can only be considered a conservative estimate of the lower bound of the true number of installations. + +.. [2] This is the total number of downloads from NITRC for this software, + comprising all releases for all platforms -- typically not Debian + packages. {% endif -%} {% endif -%} @@ -149,6 +154,10 @@ Please see the corresponding `intent-to-package bug report `_ for more information about its current status. {% endif %} +{% if db.blends and db.blends.remark %} +.. note:: +{{ db.blends.remark | indent(width=2, indentfirst=true) }} +{% endif -%} {% endfor %} diff --git a/pkgs/fsl.rst b/pkgs/fsl.rst index ded6cba..5dd29c1 100644 --- a/pkgs/fsl.rst +++ b/pkgs/fsl.rst @@ -86,7 +86,7 @@ as backports for Debian and recent Ubuntu releases. Please be sure to `read the information`_ about the differences between the Debian packaging and the official FSL releases. -.. _read the information: http://git.debian.org/?p=pkg-exppsy/fsl.git;a=blob;f=debian/README.Debian;hb=debian" +.. _read the information: http://git.debian.org/?p=pkg-exppsy/fsl.git;a=blob_plain;f=debian/README.Debian;hb=HEAD Usage information diff --git a/sphinx/_static/debianmed.png b/sphinx/_static/debianmed.png new file mode 100644 index 0000000..102d043 Binary files /dev/null and b/sphinx/_static/debianmed.png differ diff --git a/sphinx/_static/debianscience.png b/sphinx/_static/debianscience.png new file mode 100644 index 0000000..07e18e4 Binary files /dev/null and b/sphinx/_static/debianscience.png differ diff --git a/sphinx/_static/go-home.png b/sphinx/_static/go-home.png index ee88983..dd64ec4 100644 Binary files a/sphinx/_static/go-home.png and b/sphinx/_static/go-home.png differ diff --git a/sphinx/_static/nitrc_listed.png b/sphinx/_static/nitrc_listed.png new file mode 100644 index 0000000..0b9ffaa Binary files /dev/null and b/sphinx/_static/nitrc_listed.png differ diff --git a/sphinx/_templates/layout.html b/sphinx/_templates/layout.html index 69a2b57..e99d552 100644 --- a/sphinx/_templates/layout.html +++ b/sphinx/_templates/layout.html @@ -20,7 +20,7 @@ {% block sidebarsearch %} {{ super() }}

NITRC-listed

+src="{{ pathto('_static/nitrc_listed.png', 1) }}" border="0" alt="NITRC-listed" />

{% endblock %}