Tags: peak-solution/odsbox
Tags
v1.0.11 Improved documentation and handling This pull request introduces several improvements to documentation, usability, and code structure for the ODSBox project. The most significant updates include enhanced documentation for contributors and users, improved code examples and docstrings for better developer experience, lazy loading for key modules to optimize performance, and updates to dependencies for compatibility with newer Python versions. **Documentation and Contributor Experience:** - Added a comprehensive `CONTRIBUTING.md` with guidelines for contributing, coding standards, testing, and reporting issues. - Improved the `README.md` with badges, clearer feature descriptions, updated quick start and installation instructions, enhanced communication and JAQuel sections, and a new contributing section. [[1]](diffhunk://#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5L3-R37) [[2]](diffhunk://#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5L28-R80) **Developer Usability and Examples:** - Expanded docstrings and added practical usage examples to `BulkReader` methods and the `bulk` property in `ConI` to help users understand how to use bulk data access features. [[1]](diffhunk://#diff-ccf52b7e1a36d6d833d7bc23ccde0e02cef1a9a9b22da323a8218cd584113783R46-R55) [[2]](diffhunk://#diff-ccf52b7e1a36d6d833d7bc23ccde0e02cef1a9a9b22da323a8218cd584113783R166-R177) [[3]](diffhunk://#diff-ccf52b7e1a36d6d833d7bc23ccde0e02cef1a9a9b22da323a8218cd584113783R188-R189) [[4]](diffhunk://#diff-ccf52b7e1a36d6d833d7bc23ccde0e02cef1a9a9b22da323a8218cd584113783R287-R296) [[5]](diffhunk://#diff-ccf52b7e1a36d6d833d7bc23ccde0e02cef1a9a9b22da323a8218cd584113783R305-R306) [[6]](diffhunk://#diff-ccf52b7e1a36d6d833d7bc23ccde0e02cef1a9a9b22da323a8218cd584113783R341-R359) [[7]](diffhunk://#diff-ccf52b7e1a36d6d833d7bc23ccde0e02cef1a9a9b22da323a8218cd584113783L345-R395) [[8]](diffhunk://#diff-840a8b2b01d75cf56bff6517bb7d0999a8a4d3774259dae32fdb05457b22b422R755-R764) **Code Structure and Performance:** - Introduced lazy loading in `src/odsbox/__init__.py` for the `ConI` class, optimizing import performance and updating the version to 1.0.11. - Added a new `src/odsbox/proto/__init__.py` that provides lazy-loaded access to protobuf definitions, improving performance and handling optional dependencies gracefully - Allows: ```python from odsbox import ConI from odsbox.proto import ods, ods_security ``` **Dependency and Compatibility Updates:** - Updated `pyproject.toml` to add support for Python 3.13 and bump versions for several development dependencies (e.g., `black`, `pytest`, `pytest-cov`, `pytest-mock`). [[1]](diffhunk://#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711R28) [[2]](diffhunk://#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711L43-R44) [[3]](diffhunk://#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711L53-R57) These changes collectively enhance the onboarding experience for new contributors, improve the clarity and usability of the API for developers, and ensure better performance and compatibility with modern Python environments.
feat: v1.0.10 use is_null in to_pandas This pull request introduces a new feature to support handling of null values in ODS DataMatrices by adding an `is_null_to_nan` parameter to the relevant data processing functions. When enabled, this parameter uses the `is_null` flags from the source data to set corresponding entries in the resulting pandas DataFrame to `pd.NA`, improving type preservation and integration with pandas' nullable types. The implementation includes comprehensive tests to ensure correct behavior across various data types and edge cases. Additionally, a minor dependency update and version bump are included. **New feature: Null value handling in DataFrames** - Added `is_null_to_nan` parameter to `to_pandas` and `query_data` functions to convert ODS `is_null` flags into `pd.NA` in the resulting DataFrame, with logic to handle length mismatches and various data types. [[1]](diffhunk://#diff-840a8b2b01d75cf56bff6517bb7d0999a8a4d3774259dae32fdb05457b22b422R199) [[2]](diffhunk://#diff-840a8b2b01d75cf56bff6517bb7d0999a8a4d3774259dae32fdb05457b22b422R212-R213) [[3]](diffhunk://#diff-840a8b2b01d75cf56bff6517bb7d0999a8a4d3774259dae32fdb05457b22b422R227) [[4]](diffhunk://#diff-a2fc602c2d3615d322c35f87565cccab61056b5ef477928866aa196bfecea13bR210) [[5]](diffhunk://#diff-a2fc602c2d3615d322c35f87565cccab61056b5ef477928866aa196bfecea13bR226-R227) [[6]](diffhunk://#diff-a2fc602c2d3615d322c35f87565cccab61056b5ef477928866aa196bfecea13bR239) [[7]](diffhunk://#diff-a2fc602c2d3615d322c35f87565cccab61056b5ef477928866aa196bfecea13bL246-R279) **Testing improvements** - Added a new test suite `test_is_null_to_nan.py` to verify the correct behavior of the `is_null_to_nan` feature, covering default behavior, various data types, edge cases (length mismatches, empty arrays), and memory efficiency. **Versioning and maintenance** - Bumped the package version to `1.0.10` to reflect the new feature. - Updated the GitHub Actions workflow to use `amannn/action-semantic-pull-request@v6.1.1` for PR title validation.
Merge pull request #150 from peak-solution/dev This pull request introduces support for nested statements in Jaquel queries using a new `$nested` operator. The main changes add the ability to use a nested Jaquel query as a condition, update the documentation, and provide comprehensive tests to ensure correct behavior and error handling for this new feature. ### Jaquel `$nested` operator support * Added support for the `$nested` operator in Jaquel queries, allowing conditions to use the result of a nested Jaquel query as a subquery condition. This includes core logic in `src/odsbox/jaquel.py` to parse, validate, and construct nested statements, with error handling to prevent usage with `$null` and `$notnull` operators. [[1]](diffhunk://#diff-4755dc930d4ceb9f6aca5365d6f03649fc7ce3e94e983ceb8731eaaf4bc7dbcfR491-R529) [[2]](diffhunk://#diff-4755dc930d4ceb9f6aca5365d6f03649fc7ce3e94e983ceb8731eaaf4bc7dbcfR725-R747) * Updated aggregate suggestion logic to recognize `$nested` as a valid aggregate. * Updated Jaquel documentation to describe the `$nested` operator and its usage. ### Testing and validation * Added extensive integration and unit tests for the `$nested` operator, covering basic usage, error cases, and compatibility with various operators in both real and mocked environments (`tests/test_jaquel_convert.py`, `tests/test_jaquel_mocked.py`, `tests/test_con_i.py`). [[1]](diffhunk://#diff-c2768f4684bd7d827dc0556d98cd095af24437678229ed8237217c294d8e2ac7R334-R409) [[2]](diffhunk://#diff-a395320d7a4af2ea4003e9fe60caff955671f633dfa9ab259c3c2cf739813648R1479-R1650) [[3]](diffhunk://#diff-1db0b2d380777aee6760d6c7c38eeae1c7c3594d53eef01bd6bf3852d46125c7R378-R394) * Updated aggregate suggestion tests to expect `$nested` as a suggestion for unknown aggregates. ### Maintenance * Bumped the package version to `1.0.9` in `src/odsbox/__init__.py` to reflect the new feature. * Updated the GitHub Actions workflow to use `amannn/action-semantic-pull-request@v6.1.0` for PR title validation.
feat: Added BulkReader This pull request introduces a new utility module for bulk reading, updates dependencies and actions, and improves documentation and development tooling. The most significant change is the addition of the `BulkReader` class, which provides convenient methods for loading and processing local column data in bulk. Additionally, the `ConI` class is extended to expose this new functionality. Other changes include dependency and GitHub Actions updates, as well as minor documentation and configuration improvements. **Bulk reading functionality:** * Added new `src/odsbox/bulk_reader.py` module, introducing the `BulkReader` class for efficient bulk data loading and processing, including support for sequence representations and integration with pandas. * Integrated `BulkReader` into the `ConI` class in `src/odsbox/con_i.py`, with a new `bulk` property for accessing bulk reading methods, proper initialization and cleanup, and import statements. [[1]](diffhunk://#diff-840a8b2b01d75cf56bff6517bb7d0999a8a4d3774259dae32fdb05457b22b422R34) [[2]](diffhunk://#diff-840a8b2b01d75cf56bff6517bb7d0999a8a4d3774259dae32fdb05457b22b422R118) [[3]](diffhunk://#diff-840a8b2b01d75cf56bff6517bb7d0999a8a4d3774259dae32fdb05457b22b422R190) [[4]](diffhunk://#diff-840a8b2b01d75cf56bff6517bb7d0999a8a4d3774259dae32fdb05457b22b422R745-R758) **Documentation:** * Added API documentation for the new `bulk_reader` module in `docs/odsbox.rst`. **Dependency and GitHub Actions updates:** * Updated `actions/checkout` to v5.0.0 in workflow files and bumped `amannn/action-semantic-pull-request` to v6.0.1. [[1]](diffhunk://#diff-0a572d803de1c6b3af0730a73b00625c16e27b049d512a7ff6df0e61cfd26f31L15-R15) [[2]](diffhunk://#diff-f9f67858e220cb41dc5e9fa09e00cb175d5e53e0c4966b126a97ebae5e334129L8-R8) [[3]](diffhunk://#diff-d0fbd22ec802700f5da52169430de780276f1e76d0949b12b1147d4b95c9d72eL15-R15) * Upgraded development dependencies: `pre-commit` to 4.3.0, `pylint` to 3.3.8, and `shellcheck-py` to 0.11.0.1 in `pyproject.toml`. **Miscellaneous:** * Added new terms to `.vscode/settings.json` spell-checker dictionary to reduce false positives. * Bumped package version to 1.0.8 in `src/odsbox/__init__.py`.
feat: Allow to avoid model_read in constructor of ConI (#122) * added security to documentation (#113) * allow avoid model read in constructor of ConI (#121) * fix: update pytest-mock requirement from <3.14.1 to <3.14.2 (#114) Updates the requirements on [pytest-mock](https://github.com/pytest-dev/pytest-mock) to permit the latest version. - [Release notes](https://github.com/pytest-dev/pytest-mock/releases) - [Changelog](https://github.com/pytest-dev/pytest-mock/blob/main/CHANGELOG.rst) - [Commits](pytest-dev/pytest-mock@v0.1.0...v3.14.1) --- updated-dependencies: - dependency-name: pytest-mock dependency-version: 3.14.1 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * fix: bump pytest from 8.3.5 to 8.4.0 (#115) Bumps [pytest](https://github.com/pytest-dev/pytest) from 8.3.5 to 8.4.0. - [Release notes](https://github.com/pytest-dev/pytest/releases) - [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst) - [Commits](pytest-dev/pytest@8.3.5...8.4.0) --- updated-dependencies: - dependency-name: pytest dependency-version: 8.4.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * fix: bump sphinx-notes/pages from 3.2 to 3.4 (#117) Bumps [sphinx-notes/pages](https://github.com/sphinx-notes/pages) from 3.2 to 3.4. - [Release notes](https://github.com/sphinx-notes/pages/releases) - [Commits](sphinx-notes/pages@3.2...3.4) --- updated-dependencies: - dependency-name: sphinx-notes/pages dependency-version: '3.4' dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * fix: bump pytest-cov from 6.1.1 to 6.2.1 (#118) Bumps [pytest-cov](https://github.com/pytest-dev/pytest-cov) from 6.1.1 to 6.2.1. - [Changelog](https://github.com/pytest-dev/pytest-cov/blob/master/CHANGELOG.rst) - [Commits](pytest-dev/pytest-cov@v6.1.1...v6.2.1) --- updated-dependencies: - dependency-name: pytest-cov dependency-version: 6.2.1 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Andreas K <totonga@gmail.com> * fix: bump pytest from 8.4.0 to 8.4.1 (#120) Bumps [pytest](https://github.com/pytest-dev/pytest) from 8.4.0 to 8.4.1. - [Release notes](https://github.com/pytest-dev/pytest/releases) - [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst) - [Commits](pytest-dev/pytest@8.4.0...8.4.1) --- updated-dependencies: - dependency-name: pytest dependency-version: 8.4.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * fix: bump bandit[toml] from 1.8.3 to 1.8.5 (#119) Bumps [bandit[toml]](https://github.com/PyCQA/bandit) from 1.8.3 to 1.8.5. - [Release notes](https://github.com/PyCQA/bandit/releases) - [Commits](PyCQA/bandit@1.8.3...1.8.5) --- updated-dependencies: - dependency-name: bandit[toml] dependency-version: 1.8.5 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
PreviousNext