- the future (concrete) Galois `Field` implementation
shall receive the name `GF2` (as per common math notation)
=> name conflict with the current `GF2` class
implementing the elements of the future Galois `Field`
=> rename the current `GF2` class into `GF2Element`
- because `GF2Element` is a bit tedius to type for the end user,
we introduce a `gf2` alias in line with the naming convention
for the built-in data types (e.g., `int` or `float`)
that are also used as elements of (other) `Field`s
=> name conflict with the current `lalib.elements.gf2` module
=> rename the module into `lalib.elements.galois`
- adjust the docstrings to refer to "the `gf2` type"
- adjust the top-level imports and tests
- make `GF2`, `one`, and `zero`, defined in the `lalib.elements.gf2`
module, available as top-level imports for the `lalib` package
via `from lalib import *`
- provide some code snippets in the package's docstring
- test the star import
- make `GF2`, `one`, and `zero`, defined in the `lalib.elements.gf2`
module, available as top-level imports in the `lalib.elements`
sub-package via `from lalib.elements import *`
- provide some code snippets in the sub-package's docstring
- test the star import
- add `GF2` class in the `lalib.elements` sub-package
implementing a typical Galois field with two elements
- the singleton objects `one` and `zero` are the concrete
instances of the `GF2` type for the end users
- besides the typical Galois arithmetic, `one` and `zero`
behave like the built-in numbers `1` and `0`
and implement the `numbers.Rational` interface
- add exhaustive docstrings with usage examples
- add (unit) test cases with 100% coverage
- use xdoctest to validate code snippets in docstrings
- make xdoctest part of the nox session "test" via
the new `test_docstrings()` test case
- add nox session "test-docstrings" for convenience;
also, `xdoctest.doctest_module()` does not discover
docstrings that are imported at the root of the package
=> each new module with docstrings must be added to
`test_docstrings()` by hand, which is likely forgotten
=> the nox session "test-docstrings" should run on CI
- `lalib.__version__` is dynamically assigned
- the format is "x.y.z[.dev0|aN|bN|rcN|.postM]"
where x, y, z, M, and N are non-negative integers
+ x, y, and z model the "major", "minor", and "patch"
parts of semantic versioning
(See: https://semver.org/#semantic-versioning-200)
+ M is a single digit and N either 1 or 2
=> This complies with (a strict subset of) PEP440
- add unit tests for the `__version__` identifier
- use pytest as the test suite and
measure test coverage with coverage.py
- add package for the test suite under tests/
- add nox session "test" to run the test suite
for all supported Python versions
- use flake8 to lint pytest for consistent style