-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consolidate setup.cfg and pyproject.toml; drop tox; revamp sphinx docs #88
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #88 +/- ##
===========================================
- Coverage 99.00% 98.29% -0.72%
===========================================
Files 6 7 +1
Lines 302 293 -9
===========================================
- Hits 299 288 -11
- Misses 3 5 +2 ☔ View full report in Codecov by Sentry. |
900ea54
to
011dd50
Compare
@coderabbitai full review |
Actions performedFull review triggered. |
WalkthroughThe changes encompass updates to documentation files, contributor recognition, GitHub Actions workflows, and project configuration. Key modifications include the enhancement of contributor roles, updates to Python versioning and dependency management, restructuring of documentation for clarity, and a transition to modern packaging standards using Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Docs
participant Contributors
participant CI/CD
participant Project
User->>Docs: Access documentation
Docs->>Contributors: Fetch contributor info
Contributors->>Docs: Return updated contributor roles
Docs->>User: Display enhanced contributor section
User->>Project: Submit contribution
Project->>CI/CD: Trigger workflow
CI/CD->>Project: Run tests and build
Project->>User: Acknowledge contribution
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Outside diff range, codebase verification and nitpick comments (5)
docs/CONTRIBUTING.md (1)
1-2
: Incorrect{include}
directive path indocs/CONTRIBUTING.md
.The
{include}
directive indocs/CONTRIBUTING.md
references a non-existent file at../CONTRIBUTING.md
. The correct path should be adjusted to include theCONTRIBUTING.md
file from the root directory. This will ensure the content is correctly incorporated into the documentation.
- Update the path in the
{include}
directive to point to the correct location ofCONTRIBUTING.md
.Analysis chain
Approve the use of
{include}
directive.The
{include}
directive is correctly used to incorporate content from../CONTRIBUTING.md
, ensuring that updates to the contributing guidelines are reflected across all documentation that includes this file.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Verify the existence of the included file at the specified path. # Test: Check if the file exists. Expect: File exists at the specified path. if [ -f "../CONTRIBUTING.md" ]; then echo "File exists." else echo "File does not exist." fiLength of output: 82
Script:
#!/bin/bash # Search for the CONTRIBUTING.md file in the repository to check if it exists under a different path. fd CONTRIBUTING.mdLength of output: 57
docs/DEVELOPER_NOTES.md (1)
1-2
: Correct the{include}
directive path.The
{include}
directive is currently pointing to a non-existent path (../DEVELOPER_NOTES.md
). Please update the path to one of the existing files:DEVELOPER_NOTES.md
ordocs/DEVELOPER_NOTES.md
to ensure the inclusion works correctly.
- Update the path in the
{include}
directive to match an existing file location.Analysis chain
Approve the use of
{include}
directive.The
{include}
directive is correctly used to incorporate content from../DEVELOPER_NOTES.md
, ensuring that updates to the developer notes are reflected across all documentation that includes this file.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Verify the existence of the included file at the specified path. # Test: Check if the file exists. Expect: File exists at the specified path. if [ -f "../DEVELOPER_NOTES.md" ]; then echo "File exists." else echo "File does not exist." fiLength of output: 85
Script:
#!/bin/bash # Search for the DEVELOPER_NOTES.md file in the repository to find its actual location. fd --type f --name DEVELOPER_NOTES.mdLength of output: 290
Script:
#!/bin/bash # Correct the command to search for the DEVELOPER_NOTES.md file in the repository. fd --type f 'DEVELOPER_NOTES.md'Length of output: 75
DEVELOPER_NOTES.md (1)
48-48
: Consider varying sentence structure for clarity.The repeated use of "We" at the beginning of sentences in the pre-commit hooks section could be varied to improve readability. Consider rephrasing to integrate the sentences more smoothly.
Tools
LanguageTool
[style] ~48-~48: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...sh pip install -e ".[dev]"
### Install pre-commit hooks ```sh pre-commit inst...(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
.github/workflows/unit_tests.yml (1)
36-36
: Issue Found: Incorrect[test]
section inpyproject.toml
.The
[test]
section is not correctly defined in thepyproject.toml
file. Instead, there is a section namedundate[test]
, which seems to be a typo or misconfiguration. This needs to be corrected to ensure that thepip install -e ".[test]"
command installs the necessary test dependencies during the CI process.
- Verify and correct the
[test]
section inpyproject.toml
.Analysis chain
Approved: Update to package installation command.
The change to install the package with test dependencies (
pip install -e ".[test]"
) is appropriate for focusing the CI environment on testing. Verify that all necessary test dependencies are correctly defined under the[test]
setup.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the `[test]` setup in `pyproject.toml`. # Test: Search for the `[test]` setup in `pyproject.toml`. Expect: Correct definition of test dependencies. rg --type toml -A 5 $'\[test\]' pyproject.tomlLength of output: 203
.all-contributorsrc (1)
80-80
: Missing Contributor Badge in README.mdThe contributor badge is not present in the
README.md
file. Ensure that the badge is added to theREADME.md
to display contributor statistics effectively on GitHub.
- Verify if the badge markdown is present elsewhere in the repository.
- Consider adding the badge to the
README.md
if it's missing.Analysis chain
Approved: Addition of
badgeTemplate
field.The new
badgeTemplate
field enhances the visibility of contributor statistics. Verify that the badge displays correctly on GitHub to ensure it serves its intended purpose effectively.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the display of the contributor badge on GitHub. # Test: Check the README.md for the correct display of the badge. Expect: Badge displayed correctly. cat README.md | grep '![All Contributors]'Length of output: 141
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (5)
_static/undate_logo.png
is excluded by!**/*.png
docs/_static/dhtech-logo.png
is excluded by!**/*.png
docs/_static/dhtech-logo.svg
is excluded by!**/*.svg
docs/_static/logo.png
is excluded by!**/*.png
docs/_static/undate_logo.png
is excluded by!**/*.png
Files selected for processing (18)
- .all-contributorsrc (4 hunks)
- .github/workflows/check.yml (2 hunks)
- .github/workflows/unit_tests.yml (1 hunks)
- CONTRIBUTING.md (2 hunks)
- CONTRIBUTORS.md (1 hunks)
- DEVELOPER_NOTES.md (4 hunks)
- README.md (4 hunks)
- docs/CONTRIBUTING.md (1 hunks)
- docs/CONTRIBUTORS.md (1 hunks)
- docs/DEVELOPER_NOTES.md (1 hunks)
- docs/LICENSE.md (1 hunks)
- docs/_static/custom.css (1 hunks)
- docs/_templates/sidebar_dhtech.html (1 hunks)
- docs/conf.py (3 hunks)
- docs/index.rst (1 hunks)
- docs/readme.md (1 hunks)
- docs/undate.rst (1 hunks)
- pyproject.toml (1 hunks)
Additional context used
actionlint
.github/workflows/unit_tests.yml
37-37: property "python-cache" is not defined in object type {}
(expression)
LanguageTool
DEVELOPER_NOTES.md
[style] ~48-~48: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...sh pip install -e ".[dev]"
### Install pre-commit hooks ```sh pre-commit inst...(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
Additional comments not posted (28)
docs/CONTRIBUTORS.md (1)
1-2
: Approve the use of{include}
directive.The
{include}
directive is correctly used to incorporate content from../CONTRIBUTORS.md
, ensuring that updates to the contributors list are reflected across all documentation that includes this file.docs/LICENSE.md (1)
1-4
: Good use of Sphinx{include}
directive.The inclusion of the
LICENSE.md
file using the Sphinx{include}
directive is a good practice. It ensures that the license information remains consistent across different parts of the documentation by maintaining a single source of truth.docs/readme.md (1)
1-4
: Effective use of Sphinx{include}
directive with additional options.Including the
README.md
using the Sphinx{include}
directive along with options for relative paths is an effective way to ensure that the README content integrates seamlessly into the Sphinx documentation. The use of:relative-docs:
and:relative-images:
options helps in resolving paths correctly, which is crucial for maintaining link integrity in the documentation.docs/_static/custom.css (1)
2-6
: CSS Enhancements for Sphinx Sidebar.The CSS rules applied to
div.sphinxsidebar .powered_by a
enhance the visual consistency of the sidebar by removing text decorations and borders, and centering the text. These changes are likely to improve the user interface of the documentation.Consider verifying the visual consistency of these CSS changes across different browsers to ensure a uniform user experience.
docs/undate.rst (1)
Line range hint
1-8
: Documentation Enhancements ApprovedThe shift to "API documentation" and the structured use of
.. autoclass::
directives for theUndate
andUndateInterval
classes enhance the clarity and usability of the documentation. This approach ensures that all class members are documented, including those without explicit docstrings, which is crucial for maintaining an up-to-date and comprehensive API documentation.docs/_templates/sidebar_dhtech.html (1)
1-8
: Custom Sidebar Integration ApprovedThe new custom sidebar for the Sphinx documentation, featuring the DH-Tech logo and a link to the community page, enhances the visual appeal and usability of the documentation. This addition not only improves the aesthetics but also promotes greater community engagement by providing easy access to the DH-Tech community resources.
docs/index.rst (1)
1-16
: Documentation Structure Enhancements ApprovedThe changes to the
index.rst
file, including the shift to lowercase in the title and the restructuring of the table of contents, are well-executed. The simplification of the navigation hierarchy by reducing themaxdepth
to 2 and the reorganization to emphasize contributions and developer-related information significantly enhance the usability and focus of the documentation. These changes are likely to improve user experience and facilitate easier navigation and understanding of the library's development and contribution processes..github/workflows/check.yml (2)
16-21
: Approve Python setup and cache configuration.The upgrade to Python 3.12 and the update to the cache dependency path are aligned with modern Python practices. However, ensure compatibility with all project dependencies.
Verification successful
Python 3.12 Compatibility Confirmed
The
pyproject.toml
file confirms compatibility with Python 3.12, as it is explicitly listed among the supported versions. The upgrade should not introduce any compatibility issues with the project's dependencies.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify Python 3.12 compatibility with project dependencies. # Test: Check for Python 3.12 compatibility issues in the project's dependency list. cat pyproject.toml | grep -i "python"Length of output: 640
32-32
: Approve the change to the documentation build command.Switching from
tox -e docs
tosphinx-build docs docs/_build
simplifies the process and aligns with the PR's objectives to streamline tools. Ensure the output of the new command meets all documentation standards.Verification successful
The change to use
sphinx-build
is valid.The
docs
directory contains the necessary Sphinx configuration and structure, supporting the change fromtox -e docs
tosphinx-build docs docs/_build
. Ensure that Sphinx is installed in the environment where the workflow runs.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the Sphinx documentation build output. # Test: Build the documentation and check for errors or warnings. sphinx-build docs docs/_build -WLength of output: 114
Script:
#!/bin/bash # Check for the presence of Sphinx configuration file in the docs directory. fd conf.py docs # List the contents of the docs directory to verify the structure. ls -R docsLength of output: 299
CONTRIBUTING.md (2)
1-1
: Title Simplification ApprovedThe simplification of the title to "Contributing to undate" enhances clarity and focus, making it immediately clear what the document is about.
23-23
: Link Update ApprovedUpdating the link to the examples folder to include a full URL improves navigation and clarity, ensuring contributors can easily locate the appropriate folder.
pyproject.toml (1)
2-92
: Comprehensive Configuration Update ApprovedThe transition to using hatchling as the build system and the addition of new fields and sections in
pyproject.toml
modernize the project's configuration. These changes enhance the project's compatibility with contemporary Python packaging standards and improve metadata clarity.Please ensure that these changes integrate smoothly with existing workflows and that all dependencies are correctly managed.
Run the following script to verify the integration with existing workflows:
docs/conf.py (1)
Line range hint
20-89
: Documentation Configuration Update ApprovedThe updates to project metadata, Sphinx configuration, and theme settings in
docs/conf.py
enhance the documentation's functionality and user experience. The transition to the alabaster theme and the inclusion of the myst_parser extension are particularly noteworthy.Please verify that all new configurations function as expected and that the documentation builds correctly with these settings.
Run the following script to verify the functionality of new configurations:
DEVELOPER_NOTES.md (4)
23-23
: Clarification on git flow initialization approved.The addition of explicit instructions for initializing git flow enhances the clarity and usability of the setup instructions.
58-64
: Streamlining unit test instructions approved.The simplification of the unit testing instructions to focus on
pytest
enhances clarity and aligns with modern Python practices.
66-66
: Enhanced Python type checking instructions approved.The detailed instructions for using
mypy
to enforce typing on pull requests improve the development workflow and ensure code quality.
77-89
: Updated documentation building instructions approved.The transition to using
sphinx
for building documentation is well-documented, providing clear and updated commands for generating HTML documentation.CONTRIBUTORS.md (5)
1-1
: Title change to 'All Contributors' approved.The new title emphasizes inclusivity and aligns with the All Contributors initiative, enhancing the document's presentation.
6-6
: Updated badge link for contributors approved.The dynamic link to the GitHub repository's contributors page enhances the accuracy and functionality of the badge, promoting transparency and community engagement.
17-20
: Expansion of contributor categories approved.The addition of categories like "Ideas, Planning, & Feedback" provides a clearer and more comprehensive picture of each contributor's involvement, enhancing the document's functionality.
9-9
: New section header 'Contributors' approved.The addition of a clear section header improves document structure and navigation, making it easier for readers to find contributor information.
9-9
: Inclusion of related blog posts approved.The related blog posts section adds value by providing context and further reading opportunities, enhancing community engagement and document functionality.
README.md (3)
1-1
: Title change to 'undate overview' approved.The new title better reflects the purpose of the document and provides a clearer introduction to the library.
3-3
: Addition of undate logo approved.The inclusion of the logo enhances the visual appeal and branding of the library, making the README more engaging and informative.
22-22
: Updated badge link for contributors approved.The direct link to the
CONTRIBUTORS.md
file improves navigation and accessibility, making it easier for users to find detailed contribution information..github/workflows/unit_tests.yml (2)
33-33
: Approved: Update to cache dependency path.The update to use
**/pyproject.toml
for the cache dependency path aligns with modern Python packaging practices and the PR's objective to consolidate configuration files.
41-46
: Approved: Transition topytest
for running tests.The switch from
tox
topytest
simplifies the testing process and is a positive change. Ensure thatpytest
is correctly set up in the project and that all tests are appropriately configured to run withpytest
.Verification successful
Verified:
pytest
is correctly set up and used in the project.The transition from
tox
topytest
for running tests is successful. The test files make extensive use ofpytest
features, confirming that the setup is correct and the tests are appropriately configured to run withpytest
.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the `pytest` setup in the project. # Test: Search for `pytest` configurations in the project. Expect: Correct setup and test configurations. rg --type py -A 5 $'pytest' tests/Length of output: 7069
.all-contributorsrc (1)
17-18
: Approved: Enhancements to contributor roles.The addition of new roles such as "ideas" and "review" for contributors broadens the recognition of diverse contributions, fostering greater community engagement and acknowledgment.
Also applies to: 42-44, 56-57
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice QOL updates and doc improvements. Always nice when a project has a logo too!
if: steps.python-cache.outputs.cache-hit != 'true' | ||
|
||
# for all versions but the one we use for code coverage, run normally | ||
- name: Run unit tests normally | ||
run: tox | ||
run: pytest | ||
if: ${{ matrix.python != env.COV_PYTHON_VERSION }} | ||
|
||
# run code coverage in one version only |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice to swap this out and remove tox
!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome
] | ||
all = [ | ||
"undate[dev]", | ||
"undate[test]", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CodeRabbit seems to be wrong about this - I like binding the two groups together into all
ref #80
setup.cfg
topyproject.toml
and removesetup.cfg
andsetup.py
Summary by CodeRabbit
New Features
Bug Fixes
Documentation
CONTRIBUTING.md
,README.md
, and other documentation files, enhancing usability for contributors.pyproject.toml
to reflect modern practices and improve discoverability.Style