Hi,
I'm playing around with devpi themes.
My goal is to create a nice theme for my company.
I'd like to add extra information to some pages, like the index page or the
main page.
I added a snippet of code which produces an "index inheritance diagram" on
each index page display.
Because the company I work for is not that small, these diagrams can get
strange.
A sample diagram: index inheritance diagram
<https://lh3.googleusercontent.com/--9yr5WSohOc/VZ0BL6xN3YI/AAAAAAAAAAs/8wZq…>.
Each box is an index, I intentionally removed all user and index names,
except for root/pypi.
It's not my indices, please don't judge me for the design :)
I'm concerned about performance here. First of all, currently I generate
those on display action, which doesn't seem the way to go.
Could devpi provide a hook so that I'm able to regenerate a diagram on an
index update event?
Additionally, I'd like to add more information to an index page and the
root pages. So the question is: Could functions in devpi_web.views expose
more data in get_index() and root()? Potentially other functions?
I know I can always get the data with python snippets in the templates, but
it all takes precious time.
For instance, in my company, some indices are regular user indices, some of
them are project indices.
I'd like to sort the list of indices on the root page: display the project
ones first, and user indices below.
The way I would see this is the custom_data property of an index.
The bottom line: I think people could easily create fancier themes if the
devpi web views functions exposed more data to the templates, even if that
data is not used in the default theme.
It would be great to get the full indexconfig json structure for each index
in both get_index() and root() functions from devpi_web.views module.
Now I'm not sure how much more data others might want to get there.
I hope these things make sense.
Any thoughts?
Hi,
I've got problems during upgrading devpi-server.
This is the output from pip list:
beautifulsoup4 (4.3.2)
Chameleon (2.22)
devpi-common (2.0.5)
devpi-findlinks (1.0.0)
devpi-ldap (1.1.0)
devpi-server (2.1.5)
devpi-web (2.2.3)
docutils (0.12)
execnet (1.3.0)
itsdangerous (0.24)
PasteDeploy (1.5.2)
pip (6.0.6)
py (1.4.27)
pyasn1 (0.1.7)
Pygments (2.0.2)
pyramid (1.5.7)
pyramid-chameleon (0.3)
python3-ldap (0.9.7)
PyYAML (3.11)
repoze.lru (0.6)
requests (2.7.0)
setuptools (15.2)
translationstring (1.3)
venusian (1.0)
waitress (0.8.9)
WebOb (1.4.1)
Whoosh (2.7.0)
zope.deprecation (4.1.2)
zope.interface (4.1.2)
I've tried to upgrade to the newest devpi-server-2.2.2. No success - just a
traceback. Than I created a fresh environment with older
devpi-server-2.2.0 version and used --export and --import options. Also no
luck.
here is a part of the traceback:
2015-08-23 11:15:57,550 INFO NOCTX wrote nodeinfo to:
/home/devpi/projects/devpi/data/.nodeinfo
Traceback (most recent call last):
File "/home/devpi/.virtualenvs/devpi-server/bin/devpi-server", line 11,
in <module>
sys.exit(main())
File
"/home/devpi/.virtualenvs/devpi-server/local/lib/python2.7/site-packages/devpi_server/main.py",
line 53, in main
return _main(pluginmanager, argv=argv)
File
"/home/devpi/.virtualenvs/devpi-server/local/lib/python2.7/site-packages/devpi_server/main.py",
line 85, in _main
with xom.keyfs.transaction(write=True):
File
"/home/devpi/.virtualenvs/devpi-server/local/lib/python2.7/site-packages/devpi_common/types.py",
line 39, in get
x = self._property_cache[f] = f(self)
File
"/home/devpi/.virtualenvs/devpi-server/local/lib/python2.7/site-packages/devpi_server/main.py",
line 229, in keyfs
keyfs = KeyFS(self.config.serverdir, readonly=self.is_replica())
File
"/home/devpi/.virtualenvs/devpi-server/local/lib/python2.7/site-packages/devpi_server/keyfs.py",
line 393, in __init__
self._fs = Filesystem(self.basedir, notify_on_commit=t.notify_on_commit)
File
"/home/devpi/.virtualenvs/devpi-server/local/lib/python2.7/site-packages/devpi_server/keyfs.py",
line 93, in __init__
changes, rel_renames = loads(data)
File
"/home/devpi/.virtualenvs/devpi-server/local/lib/python2.7/site-packages/devpi_server/keyfs.py",
line 33, in loads
return load(py.io.BytesIO(data))
File
"/home/devpi/.virtualenvs/devpi-server/local/lib/python2.7/site-packages/devpi_server/keyfs.py",
line 27, in load
return Unserializer(io, strconfig=(False, False)).load(versioned=False)
File
"/home/devpi/.virtualenvs/devpi-server/local/lib/python2.7/site-packages/execnet/gateway_base.py",
line 1161, in load
loader(self)
File
"/home/devpi/.virtualenvs/devpi-server/local/lib/python2.7/site-packages/execnet/gateway_base.py",
line 1196, in load_longlong
self.stack.append(long(l))
ValueError: invalid literal for long() with base 10:
'\x1broot/pypi/+links/virtualenvS'
Can someone help me?
Steffen
Hi!
I looked into it and asked for some details on the Whoosh mailing list.
I think I now have a way this could be done. I will do some more
experiments, especially in regard to performance. If it works out, then
one can write a plugin which influences the search result scores.
More on the ticket when I have something concrete.
https://bitbucket.org/hpk42/devpi/issues/254/customize-search-results
Regards,
Florian Schulze
On 29 Jul 2015, at 14:31, Florian Schulze wrote:
> There are a few ways this could be implemented in the future, but
> nothing that can be done right away. I'll look into it. I'd say it
> would be best to create a ticket "Customize search results".
>
> On 29 Jul 2015, at 11:28, Andrzej Ostrowski wrote:
>
>> Hi All,
>>
>> I think the search results could be improved.
>> In my company there are over 100 indices. There are tens, if not
>> hundreds
>> of different packages. There are multiple project indices.
>>
>> Usually the indices scheme is as follows:
>> [user/dev] -> [project/dev] -> [project/prod]
>>
>> The packages workflow is quite standard, I think.
>> Packages are uploaded by users to their dev indices, and then pushed
>> to an
>> integration index, and then to production.
>>
>> Now when I search for a package usually the first search results are
>> pointing to a user/dev index.
>> Is it possible to configure the search to display the results from
>> non-volatile indices first?
>> I'm thinking here of less experienced people who just want to grab a
>> bunch
>> of tools they need, and a user/dev index doesn't seem like a reliable
>> place
>> to take packages from.
>>
>> Thanks,
>> Andrzej
>>
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "devpi-dev" group.
>> To unsubscribe from this group and stop receiving emails from it,
>> send an email to devpi-dev+...(a)googlegroups.com.
>> To post to this group, send email to devp...(a)googlegroups.com.
>> Visit this group at http://groups.google.com/group/devpi-dev.
>> For more options, visit https://groups.google.com/d/optout.