Commit Graph

327 Commits

Author SHA1 Message Date
jab 43d6aaef92 update changelog in preparation for 0.17.3 release 2018-09-18 16:55:54 -04:00
jab d57acfbe9a add pyproject.toml to manifest, distribute wheels as well as sdists 2018-09-18 11:07:35 -04:00
jab 6117d52cc9 increase coverage for OrderedBidictBase.viewkeys() 2018-09-17 20:12:35 -04:00
jab b96699e3c6 update changelog and setup.cfg 2018-09-17 20:03:52 -04:00
jab 1f97e41326 update thanks 2018-09-17 19:35:35 -04:00
jab 1f5a66c355 improvements to pyproject.toml changes 2018-09-17 19:23:46 -04:00
Bernat Gabor 0d0c91fc75
use pyproject.toml to specify build dependencies 2018-09-14 20:56:28 +01:00
jab 2aebc46d96 Decrease hypothesis max_examples for daily Travis cron builds
...and suppress the "too_slow" health check for cron and coverage-
enabled builds since it recently started to fail intermittently.
2018-09-09 17:54:56 -04:00
jab 784aacb756 fix some recently changed links 2018-08-19 14:53:20 -04:00
jab c7c0357503 update changelog 2018-08-17 00:22:17 -04:00
jab c2e98c022b restore download count badge \O/
+ improvements to custom.css
2018-08-14 21:44:39 -04:00
jab 764310e2fe small improvements to supporting files 2018-08-13 13:57:07 -04:00
jab a7bc83f05a pin to latest pylint 2018-08-01 21:13:43 -04:00
jab d014d17075 readme tweaks 2018-07-22 19:44:38 -04:00
jab e2e55c1b50 appease pylint 2018-07-20 07:57:29 -04:00
jab 1b6b100d27 silence spurious lgtm warnings via .lgtm.yml 2018-07-20 07:57:29 -04:00
jab b46b7a6f31
Merge pull request #76 from jab/dev
silence latest spurious lgtm warnings
2018-07-16 22:41:58 -04:00
jab 60dabe9881 silence latest spurious lgtm warnings 2018-07-16 22:20:14 -04:00
jab 51cce7d264
Merge pull request #75 from jab/dev
test python 3.7 on travis
2018-07-16 22:18:16 -04:00
jab bee8069352 test python 3.7 on travis 2018-07-16 21:07:57 -04:00
jab db8080042c
Merge pull request #74 from jab/dev
update to latest pylint (2.0.0) and appease it
2018-07-16 21:05:47 -04:00
jab 20e1c18af1 update to latest pylint (2.0.0) and appease it 2018-07-16 20:26:36 -04:00
jab 28a4936cbf silence spurious lgtm warning 2018-05-10 10:37:32 -04:00
jab ea9daf7b2f Use less memory in OrderedBidict, v0.17.2
- Use less memory in the linked lists that back bidict.OrderedBidict
  by storing node data unpacked rather than in (key, value) tuple objects.
- New _Sentinel subclass of _Node improves over old _make_sentinel code.
2018-04-30 12:18:42 +08:00
jab 5269abe6f8 prepare for v0.17.1 release 2018-04-28 11:05:57 +08:00
jab 6faf1ef03f Fix updating orderedbidict.inv 2018-04-28 09:50:29 +08:00
jab e049c310bd rename some source files for more clarity 2018-04-26 17:04:02 +07:00
jab 7972aa1998 prepare for v0.17.0 release 2018-04-25 23:29:54 +07:00
jab 163667d5b4 optimize implementations of keys, values, and items
- Also refactor and improve hypothesis tests.
- Add a test that ordered bidict nodes have no reference cycles.
- Enable coverage on Travis for PyPy 2 now that there is a code path
  that is only taken on PyPy 2 (for FrozenOrderedBidict.iteritems).
- Restore running tests on Travis for all commits, not just for master.
- Docs:
  - OrderedBidict: "What if my Python version has order-preserving dicts?"
  - Equivalent but distinct Hashables: better code example demonstrating
    that this even occurs with a bidict and its own inverse.
2018-04-25 21:34:27 +07:00
jab a818b69aa0 refactor OrderedBidictBase, use weakrefs in nodes 2018-04-22 05:09:36 +07:00
jab cb1d80c97c tweak docs, setup.py, travis, and hypothesis tests
- improve basic usage and "Why can't I just use a dict?" docs
- rename _static -> assets
- use forward declarations of custom rst interpreted text roles we use that
  sphinx defines and that PyPI and GitHub couldn't handle otherwise (e.g.
  :doc:), rather than stripping them out in setup.py
- move __keywords__ and __url__ from setup.py into bidict/metadata.py
- add __version_info__ metadata attribute
- import bidict/metadata.py in setup.py rather than `exec`ing it
- add back Python 3.4 to Travis test matrix
- improve hypothesis settings for max_examples_5000 profile
  (used in nightly CI builds)
- suppress hypothesis's hung_test health check for max_examples_5000 profile
  to prevent flaky tests caused by failed health checks. Avoids errors like:

    E   hypothesis.errors.FailedHealthCheck: Your test has been running for
        at least five minutes. This is probably not what you intended, so by
        default Hypothesis turns it into an error.
    E   See https://hypothesis.readthedocs.io/en/latest/healthchecks.html for
        more information about this. If you want to disable just this health
        check, add HealthCheck.hung_test to the suppress_health_check settings
        for this test.
2018-04-19 15:52:02 +07:00
jab 1a8e11f163 strengthen too-weak assume(..) in test_eq_ne_hash, use "max_examples=5000" for nightly CI jobs, add .readthedocs.yml
The `assume(init_items != init_unequal)` was not sufficient
because it would allow cases like:

    bi_cls=bidict, other_cls=bidict, init_items=[(1, 0), (0, 1)], init_unequal=[(0, 1), (1, 0)]

causing the resulting bidicts' item sets to still be equal,
so assertions like

    assert items_match(some_bidict, other_unequal, relation=ne)

would fail.

Changing the assume to

    assume(set(init_items) != set(init_unequal))

fixes the issue.

Surprisingly, hypothesis only just found a failing example for this
for the first time (in https://travis-ci.org/jab/bidict/jobs/363962257)
despite having numerous opportunities to find it before.
Using a new max_examples=5000 hypothesis profile, only on nightly CI,
should help surface any remaining issues that hypothesis hasn't found yet,
without slowing commit-triggered tests with too much example generation.

Also improve Travis config:
- ditch ALLOW_FAIL=1, for some reason it didn't work
- comment out python 3.7-dev job while Travis is stuck on an old 3.7 alpha
- don't use "- |" command block where we want to see output after each command
- prefix more network-dependent commands with travis_retry

Finally, improve docs building setup:
- Factor out sphinx from "dev" extras_require to its own "docs" extras_require.
- Add a .readthedocs.yml to customize the readthedocs build.
  Use pip and the "docs" extras_require to get an up-to-date Sphinx version.
  Fixes some broken :ref:`addendum:...`  autosectionlabel links in learning-from-bidict.
2018-04-10 11:31:29 +07:00
jab 973621411b update pre-commit hooks, enable pylint 2018-04-07 12:22:36 +07:00
jab 70c6d3cf17 factor out $LINT_SRC in .travis.yml 2018-04-07 11:39:32 +07:00
jab 7d2b5912a8 prepare for v0.16.0 release 2018-04-06 11:32:00 +07:00
jab 543d517ad9 bidict.pairs -> _iteritems_args_kw, docs + other small improvements
- improve coverage
- use latest pip on travis
- update to tox 3
- guard Python < 3.3 warning with PYMAJOR == 3 condition
- docs improvements, esp. for viewing on GitHub:
  - fix `foo <bar>`__ link syntax (always use two underscores)
  - use `.. code: python` for code blocks to enable GitHub syntax highlighting
  - ditch `.. include::` which GitHub does not support
  - use sphinx.ext.autosectionlabel
  - only wrap linkcheck with travis_retry
  - s/sibbell/libraries.io
2018-04-06 11:28:44 +07:00
jab 0f8897e926 prepare for v0.15.0 release 2018-03-29 10:11:32 +07:00
jab c990197122 docs tweaks 2018-03-28 09:49:22 +07:00
jab c6831d888b docs tweaks and fixes 2018-03-28 09:20:12 +07:00
jab ca94ae94b4 more travis cleanups 2018-03-27 16:40:43 +07:00
jab fcea576907 try removing python 3.7-dev setuptools_scm workaround on Travis 2018-03-27 16:14:47 +07:00
jab 32084a0127 docs 2018-03-27 14:35:52 +07:00
jab 2c031f9cf0 revert back to izip, don't assume pkg_resources available, docs and code tweaks 2018-03-26 20:04:53 +08:00
jab 6912e2c8f9 docs tweaks 2018-03-04 14:16:05 +11:00
jab 410e20acc1 update changelog post-0.15.0rc1 tag 2018-03-02 12:59:15 +11:00
jab 807af7a541 prepare for v0.15.0rc1 release 2018-03-02 12:51:47 +11:00
jab 2f1514907f improve namedbidict base_type docs and some tests 2018-03-02 12:46:59 +11:00
jab 198df4fd5b comments + tests for BidirectionalMapping.inv 2018-03-02 10:11:51 +11:00
jab 64ae222dd0
Merge pull request #68 from jab/dev
.compat.izip -> zip, BidirectionalMapping.inv -> abstractproperty, docs, tests
2018-03-01 22:55:36 +11:00
jab f2cd4edc82 .compat.izip -> zip, BidirectionalMapping.inv -> abstractproperty, docs, tests 2018-03-01 22:40:53 +11:00