Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: update pre-commit hooks - Removed unused hooks: isort, flake8 - Added new hook: ruff - Updated black and interrogate hooks configuration - Commented out darglint due to timeout issues on pre-commit CI This update aims to improve code quality checks and ensure consistency across the codebase. * feat: Add ruff tool configuration to pyproject.toml This commit introduces a new feature to the codebase by adding the configuration for the ruff tool in the pyproject.toml file. The configuration includes enabling pycodestyle and Pyflakes codes, allowing fixes for all enabled rules, excluding commonly ignored directories, setting the line length to 88, allowing unused variables when underscore-prefixed, and assuming Python 3.8. It also sets the default complexity level to 10 for the mccabe tool under ruff. * chore(pyproject.toml): Update target Python version to 3.10 This commit updates the target Python version in the pyproject.toml file from 3.8 to 3.10. * chore(environment-dev): update Python and rdkit versions - Python version updated from 3.9 to 3.10 - rdkit version constraint removed * chore: Comment out darglint and add --fix arg to ruff In this commit, the darglint pre-commit hook has been commented out. Additionally, the --fix argument has been added to the ruff pre-commit hook. * infra: satisfy the shiny new ruff linter * chore: disable darglint in pre-commit config Due to performance issues, darglint has been commented out in the pre-commit configuration. It may be replaced by ruff in the future. See astral-sh/ruff#458 for more details. * feat: update pre-commit hooks and add pydoclint - Updated the version of pre-commit-hooks from v4.4.0 to v4.5.0. - Added pydoclint as an interim replacement for darglint with configuration in pyproject.toml. * refactor(janitor/utils): use isinstance for type checking Changed the type checking in the skipna function from using type() to isinstance() for better Pythonic practice. * refactor: update docstrings and remove redundant comments In this commit, we have updated the docstring for the `_get_data_df` method in the `DataDescription` class to provide more detailed information about its functionality. We have also removed the redundant comments from the `__init__` method of the `col` class in `utils.py` as they were not providing any additional value. * chore: remove darglint checks workflow This commit removes the darglint checks workflow from the GitHub actions. The workflow was initially added to run darglint checks manually due to the pre-commit CI timing out. Now that the issue has been resolved, the workflow is no longer needed. * feat(janitor): add 'col' utility to functions This commit introduces the 'col' utility from the utils module into the janitor package. This utility can now be accessed directly from the janitor package. * refactor(janitor): update import statements and function usage - Updated import statement in __init__.py to include DropLabel from functions.utils - Modified usage of expand_grid function in expand_grid.py to be directly called instead of through the janitor module * test: remove redundant dataframe method registration tests This commit removes the test_df_registration.py file, which contained redundant tests for dataframe method registration. These tests were not necessary as the registration of these methods is guaranteed by the pandas-flavor library. * feat(utils): add dynamic_import function and import janitor.chemistry in test - Added a new function `dynamic_import` in `janitor/utils.py` that allows for dynamic importing of all modules in a directory. - Imported `janitor.chemistry` in `tests/chemistry/test_maccs_keys_fingerprint.py` to ensure it's available during testing. - Also added `importlib` and `pathlib.Path` to `janitor/utils.py` to support the new function. * feat(janitor/functions): add dynamic import functionality - Imported dynamic_import from janitor.utils - Called dynamic_import function with __name__ as argument * refactor: update dynamic_import argument and limit test examples - In `janitor/functions/__init__.py`, the argument passed to `dynamic_import` has been updated from `__name__` to `Path(__name__)` to leverage the pathlib library for more robust path handling. - In `tests/functions/test_conditional_join.py`, the number of examples for several tests has been limited to improve test performance and reduce runtime. * refactor(janitor/functions): remove unused imports and dynamic import function This commit removes the unused imports 'Path' from 'pathlib' and 'dynamic_import' from 'janitor.utils'. It also removes the call to 'dynamic_import' function which is no longer needed. * refactor(tests): import janitor module in test files - Modified the import statements in test_expand_grid.py and test_factorize_columns.py to include the janitor module. - This change ensures that the janitor module is explicitly imported in the test files. * test: import janitor in test_fill_direction.py This commit adds an import statement for the janitor module in the test_fill_direction.py file. This is necessary for the proper functioning of the tests in this file. * refactor(janitor): reorganize function imports and remove unused imports This commit reorganizes the function imports in the janitor package to improve code readability and maintainability. It also removes an unused import from the main __init__.py file. * test: limit max examples in pytest settings to 10 This commit reduces the maximum number of examples generated by pytest for each test case from unlimited to 10. This change is intended to speed up test execution time without significantly reducing test coverage. * test: limit max examples in pytest settings to 10 In an effort to optimize testing time, the maximum number of examples for each test in the pytest settings has been reduced to 10. This change affects multiple test functions in the 'test_conditional_join.py' file. * test: limit max examples in pytest settings to 10 for multiple test functions * test: limit max examples in pytest to improve test performance * feat(devguide): expand section on writing code This commit expands the "Write the Code" section in the developer guide. It provides more detailed instructions on best practices for writing code, including committing early and often, staying updated with the dev branch, and writing tests. It also updates the "Check your code" section to include information about pre-commit hooks. * chore(github-actions): update checkout action and remove test matrix This commit updates the version of the checkout action used in the GitHub Actions workflow from v3 to v4. It also removes the matrix strategy for running tests, which previously included "turtle" and "not turtle" subsets. Now, all tests will be run without any subset specification. * test: Add execution test for conditional_join function This commit introduces a new test for the conditional_join function in the test_conditional_join.py file. The test uses an example directly from the conditional_join docstring to verify the function's correct operation.
- Loading branch information