Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Joshua Bronson
@jab
@prologic @lordmauve Thanks for the feedback! @lordmauve Perhaps that's true. I was convinced to try it when I realized how easily it could be built on top of the existing code, and also that one of my main bidict examples, the periodic table of elements, is also ordered! So I wonder if ordered bidicts are more common than I thought. If you have a chance to take a peek at the PR, I'd be interested to hear whether you think the implementation is simple enough that it adds low maintenance risk and might be worth including.
Joshua Bronson
@jab
Hi @/all, I just merged the orderedbidict branch into master. I'd like to release this as 0.11 in the coming week. Please let me know if you notice any issues if you get a chance to take a look before then. Thanks and happy 2016!
Daniel Pope
@lordmauve
Sweet, bidict has been accepted for use at Bank of America Merrill Lynch.
Joshua Bronson
@jab
@lordmauve Wow, very cool, thanks for making that happen! I've actually been a Bank of America customer for over 10 years.
Joshua Bronson
@jab
Hi @/all, I'd like to do a 0.11 release on Monday. Can you please take a look at master and let me know if it looks good? The two major changes are #29 (support for orderedbidict and friends) and #31 (several improvements to test setup, including dropping pypy3 from the test matrix for now)
Daniel Pope
@lordmauve
I'll try if I find time!
Joshua Bronson
@jab
Thanks @lordmauve!
Joshua Bronson
@jab
@grimborg @hvdklauw @olegpidsadnyi @DZittersteyn I noticed https://github.com/paylogic/paylogic-genres depends on bidict, so just thought I'd invite you to join our gitter. I ping this chat every once in a while to announce e.g. when there's a new release, in case you might find that useful. And if you ever have any feedback on bidict or just want to explain your use case, please feel free to share!
@capcarr I noticed https://github.com/PIA-Group/BioSPPy depends on bidict, so just thought I'd invite you to join our gitter. I ping this chat every once in a while to announce e.g. when there's a new release, in case you might find that useful. And if you ever have any feedback on bidict or just want to explain your use case, please feel free to share!
Joshua Bronson
@jab
@simon-weber I noticed https://github.com/venmo/btnamespace depends on bidict, so just thought I'd invite you to join our gitter. I ping this chat every once in a while to announce e.g. when there's a new release, in case you might find that useful. And if you ever have any feedback on bidict or just want to explain your use case, please feel free to share!
Joshua Bronson
@jab
@/all bidict 0.11.0 is out! https://pypi.python.org/pypi/bidict
real
@realcr
@jab: The new ValueExistsException saved me from a serious bug that I probably wouldn't have seen otherwise. Thanks!
Joshua Bronson
@jab
@realcr So glad to hear it! By the way, I'd love to hear what you think of the changes for 0.12.0, which I hope to release any minute now: https://bidict.readthedocs.io/en/dev/changelog.html
I think there are a bunch of other improvements that could really help protect client code from shooting itself in the foot
Also note that ValueExistsError was renamed ValueNotUniqueError, sorry for the breaking change
Renamed because bidict now raises that exception in this case, too: b.update({1: 1, 2: 1})
Joshua Bronson
@jab
and with the new default precheck=True behavior, the value 1 doesn't actually exist in the bidict at the time the duplicate value is encountered, because by default it checks all given items for duplication before inserting any of them
so if b was empty before that update call, and then the update call raises a ValueNotUnique error, you can be sure b is still empty after
Joshua Bronson
@jab
Hi @/all, I've been hard at work at the changes for 0.12 and I'm pleased to say I think they're ready! I've spoken to some of you about them here and there as I've been working on them over the last several months, but I've made a lot more improvements and refinements since then (including removing the precheck=True option I mentioned in my previous message and making bulk updates just always fail cleanly), and I'm eager to hear what you think. Would any of you have a moment to take a look at https://bidict.readthedocs.io/en/dev/changelog.html#dev-not-yet-released and let me know what you think? I'd love to make sure these look good to as many of you as possible before I cut the release!
Joshua Bronson
@jab
Hi @/all, I've just released v0.12.0 with a number of big improvements. See https://bidict.readthedocs.io/en/v0.12.0/changelog.html for a list of notable changes. Hope you like!
Joshua Bronson
@jab

Hi @/all, I've just added a feature to the development version that allows you to create new bidict types with extended functionality in one line of code:

>>> import bidict, sortedcontainers
>>> class SortedBidict(bidict.bidict):
...     "A bidict which maintains its items in sorted order."
...     _dict_class = sortedcontainers.SortedDict

Documentation currently here:
https://bidict.readthedocs.io/en/dev/other-bidict-types.html#extending-bidict

If you have any thoughts, I'd love to hear them. Thanks!

Daniel Pope
@lordmauve
@jab Very nice!
Joshua Bronson
@jab
@lordmauve Hey thanks! So you think this is useful in general? I was concerned that (1) at the very least this is a bad example (I'd think with elements you'd want the inverse "atomicNumberByName" map to still be sorted by atomic number, not name -- thinking of switching the example to "capitalByCountry", where it's more believable that you'd want the forward and inverse maps to be sorted differently, so they stay alphabetically sorted by their respective keys), and (2) the fact that this came up in this example reveals a deeper issue in the fundamental premise, e.g. users will more often want the forward and inverse to be in the same order, which would complicate things a lot more (at least if we wanted to use sortedcontainers.SortedDict, since it doesn't allow sorting a dict by values).
Joshua Bronson
@jab
Hi @/all, thinking of merging the latest changes on the dev branch to master in the next few days and then cutting a new 0.13.0 release. See jab/bidict#40 and https://bidict.readthedocs.io/en/dev/changelog.html#not-yet-released if you'd like to review before then. Feedback more than welcome, as always. Happy holidays and new year!
Joshua Bronson
@jab
Hi @/all, pleased to announce that I just released bidict 0.13.0. Please see https://bidict.readthedocs.io/en/v0.13.0/changelog.html#id2 for a list of notable changes. And if anyone knows if it's possible to edit the long_description associated with the existing https://pypi.python.org/pypi/bidict/0.13.0 version in PyPI (as opposed to uploading some new 0.13.0.post1 release), please let me know!
Joshua Bronson
@jab
Hi @/all, just pushed the 0.13.1 release to PyPI with a minor bugfix (thanks @knaperek)
Also changed the license from ISC to MPLv2.
This should not require any changes from anyone using bidict in commercial projects, or using a modified version internally, but please let me know if you have any concerns.
Jozef
@knaperek
Hi @jab, thanks for the bugfix release!
Joshua Bronson
@jab
@knaperek My pleasure, thanks so much again for catching the bug and contributing a fix, and great to see you here!
@/all, if I were to make a 1.0 release of bidict, guaranteeing backwards compatibility of the API for all 1.x versions (and discontinuing maintenance of 0.x), are there any changes you would want in the bidict API before 1.0?
Conversely, is there anything you think is unnecessary and should be cut?
Joshua Bronson
@jab
e.g. namedbidict, loosebidict, orderedbidict, ...?
Joshua Bronson
@jab
Hi @/all, I just merged some breaking changes to master.
https://bidict.readthedocs.io/en/latest/changelog.html#breaking-api-changes
jab/bidict#42
As always, feedback welcome!
Joshua Bronson
@jab
@/all, bidict 0.14.0 has been released. See http://bidict.readthedocs.io/en/v0.14.0/changelog.html for notable changes.
Joshua Bronson
@jab
Hi @/all, bidict 0.14.1 has been released with a couple small bug fixes: https://bidict.readthedocs.io/en/v0.14.1/changelog.html
Richard Sanger
@rsanger
Hi @jab, Thanks again for the fix and bumping the release.
I'm using bidict as part of my PhD, I've found it to be a really handy data-structure. There is not any public code up yet
Richard Sanger
@rsanger
As for details on my actual usage: I'm using an external Boolean SAT solver in my algorithm, and I'm using bidict to maintain a mapping of internal Variables to an external reference (a number) which the solver uses. I'm always happy to discuss my work in more detail, if you find it interesting.
Daniel Pope
@lordmauve
@jab I noticed you tagged me on something. I'm on holiday at the moment so I'll look in a couple of weeks' time
Joshua Bronson
@jab
@lordmauve ah, have a great rest of your holiday!
For once you get back: I ended up closing the original PR I mentioned you in and taking a better approach in jab/bidict#51. I used the "ipython_memory_usage" library to persuade myself that the changes did what they were supposed to, so I just merged that to master. I'd still love to know if the changes look good to you, if you get a chance to take a peek. I'd also like to add an automated test that could somehow catch a regression in the future if a reference cycle is ever accidentally introduced again, but I'm not sure what the best way to do that might be. Any suggestions would be much appreciated!
Joshua Bronson
@jab
@rsanger Thanks for stopping by and introducing yourself, it's great to meet you! Super cool to hear a little about your work and that bidict has been useful. Would definitely be interested in hearing more. And btw I see you're in New Zealand – I'm actually thinking of visiting for the first time in February or so. Can't wait!
Joshua Bronson
@jab
Hi @/all, made some significant performance improvements to bidict recently! See http://bidict.rtfd.io/changelog.html#speedups-and-memory-usage-improvements for a summary. I've released them in the development version 0.15.0.dev1. If you get a chance, please kick the tires let me know how it goes.
Joshua Bronson
@jab
Please also see #62 and #63 and :+1: if interested.
Joshua Bronson
@jab
@/all I just released bidict v0.15.0 with significant performance and other improvements. Please see https://bidict.readthedocs.io/en/v0.15.0/changelog.html for the full release notes. Upgrading is recommended to all users. When you get a chance to try it, please let me know how it goes. Thanks!
Joshua Bronson
@jab
Hi @/all, released a few new versions of bidict recently with the latest being 0.17.2. Please see https://bidict.readthedocs.io/changelog.html for release notes.
Joshua Bronson
@jab
@/all I'm looking for feedback on the proposal in #86. If you have any thoughts, please share!
Joshua Bronson
@jab
@/all just released bidict v0.18.0. Please see https://bidict.readthedocs.io/changelog.html for release notes.