Commit Graph

17 Commits

Author SHA1 Message Date
Joshua Bronson da526c4c45 Type check tests, fix inverted type hint, prepare for 0.22.1 release
* Add type hints to tests and no longer exclude them from type checking.

* Fix the return type hint of bidict.inverted() to return an Iterator
  (aliased as ItemsIter), not an Iterable.

* Rename the internal type alias for Iterable[Tuple[KT, VT]] from
  IterItems to Items, and likewise MapOrIterItems to MapOrItems.
2022-12-31 20:52:38 -05:00
Joshua Bronson 79baf860b7 Use pyproject.toml instead of setup.py, etc.
* Ditch setup.py in favor of setuptools' PEP 621 support. Ref:
  https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html

* Declare development dependencies in pyproject.toml rather than
  requirements/*.in

* Ditch pip-compile-multi which does not support sourcing deps from pyproject.toml

* Compile dependencies into dev-deps/*.txt rather than requirements/*.txt

* Don't include development-related files in the sdist or wheel.

* Drop less important bidict.metadata attributes
  (__maintainer__, __email__, __status__, __keywords__, __project_urls__)
  and make __author__ a dictionary with "name" and "email" keys
  to match the standard format in pyproject.toml.
2022-12-04 21:20:15 -05:00
Joshua Bronson b5c9f346ce (c) 2022-02-15 15:37:25 -05:00
Joshua Bronson 2ab42ade03 Minor improvements, mostly to docs.
- Switch to Furo theme.
- Fix some links reported as broken by Sphinx's `make linkcheck`.
- No longer use autodoc private members. Avoids noisy Sphinx warnings.
- No longer generate duplicate section labels in Changelog.
  Avoids noisy Sphinx warnings.
- Remove logo, codecov badge, and add num-sponsors badge.
- Rename bidict._iter.iteritems_args_kw -> ...iteritems_args
2022-02-10 11:44:57 -05:00
Joshua Bronson 1c9d7bec53 Minor code and docs changes. 2022-02-07 11:42:09 -05:00
Joshua Bronson da250abf3e pyupgrade --py37-plus
Delete utf-8 encoding cookies from all files that require Python 3+,
where utf-8 is already the default.
2022-01-01 20:36:50 -05:00
Joshua Bronson f86ba703e4 Update copyright notices for 2022. 2022-01-01 12:59:11 -05:00
Joshua Bronson bc8c9984fc Update copyright notices for 2021. 2021-01-01 12:14:24 -05:00
Joshua Bronson 11567533fe Move CI to GitHub Actions, fix version typo in metadata.py 2020-12-20 10:50:41 -05:00
jab d2b5adcce3 Happy 2020 🎉 2019-12-31 18:14:38 -05:00
jab ba1cba8523 happy 2019 2019-01-01 13:51:46 -05:00
jab d13fd9bb8a resurrect delegating mixins instead of __delegate__ + other refinements
e.g. s/__repr_delegate__/_repr_delegate

Also
- update
- update from pytest 3 to 4
- add CII best practices badge
- prepare for 0.17.5 release
2018-11-19 09:37:38 -05: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 aa704b3d6e improve hypothesis tests, use of setuptools_scm and linting 2018-02-26 10:44:21 +11:00
jab d0c6fdae3b happy 2018 2017-12-31 22:51:19 -05:00
jab 7b4d1df5fb Add pre-commit hooks + changes to appease them 2017-11-21 10:35:56 -05:00
jab 51c75d2bb0 another round of refinements
- Make OrderedBidict.__eq__ always order-insensitive.
  Add OrderedBidict.equals_order_sensitive for order-sensitive comparison.
  Drop OrderedBidict.ordered_cls and bidict.compat.Reversible.

- Add test coverage for bidict.metadata.

- Use setuptools_scm for automatic version discovery from source control.
  Drop bidict/VERSION file and associated machinery.

- Ditch testing macOS on Travis, it's just too slow.
  Testing on Linux should suffice.

- Ditch using pyenv on Travis to save time and complexity.
  Travis now has a better set of Python versions available out-of-the-box.

- Add support for "python setup.py test" and use that on Travis.
2017-11-20 22:27:27 -05:00