Skip to content

py38: issues fixing#45

Merged
pateash merged 7 commits into
mainfrom
py38-support
Jun 27, 2024
Merged

py38: issues fixing#45
pateash merged 7 commits into
mainfrom
py38-support

Conversation

@pateash

@pateash pateash commented Jun 27, 2024

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • Documentation

    • Updated contributing guidelines to specify the use of Python 3.8.
    • Removed tomli from docs/requirements.txt.
  • Chores

    • Adjusted Python version in workflows from 3.11 to 3.8.
    • Updated Makefile command order for syncing documentation dependencies.
    • Made minor formatting and indentation adjustments in documentation scripts.

@github-actions github-actions Bot added documentation Improvements or additions to documentation github-actions Changes in CICD project-config labels Jun 27, 2024
@coderabbitai

coderabbitai Bot commented Jun 27, 2024

Copy link
Copy Markdown
Contributor

Warning

Rate limit exceeded

@pateash has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 48 minutes and 28 seconds before requesting another review.

How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

Commits

Files that changed from the base of the PR and between 3674ce8 and 291547e.

Walkthrough

The updates mainly involve standardizing the Python version across various configuration files, transitioning it from 3.11 to 3.8. Besides, some dependency management modifications were accomplished, such as adjusting dependencies and scripts in the pyproject.toml, Makefile, and removing the tomli package from docs requirements. Minor formatting and indentation improvements were also made alongside reordering commands in the build process.

Changes

File Summary
.github/workflows/build.yml Changed Python version from 3.11 to 3.8.
.github/workflows/publish.yml Changed Python version from 3.11 to 3.8.
.github/workflows/release.yml Changed Python version from 3.11 to 3.8 and added new step for creating a prerelease.
CONTRIBUTING.md Added Python development section specifying Python 3.8 and minor formatting change.
Makefile Rearranged sync target commands and updated hatch-docs-deps-sync command to hatch run docs:docs-deps.
docs/hatch-env-docs-requirements-sync.py Minor indentation adjustment.
docs/requirements.txt Removed the tomli package.
pyproject.toml Removed tool.hatch.env section, modified several details such as changing type to “virtual”, updating dependencies, and added a docs-deps script.

In the lands of code where changes sweep,
Python versions take a leap,
From three-eleven to three-eight we dive,
Making workflows come alive.
Dependencies dance in lines so neat,
And syncing scripts find their beat.
With every tweak and every file,
We craft our code in a grand new style. 🐇💻


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?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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 as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions

github-actions Bot commented Jun 27, 2024

Copy link
Copy Markdown

Qodana for Python

It seems all right 👌

No new problems were found according to the checks applied

💡 Qodana analysis was run in the pull request mode: only the changed files were checked
☁️ View the detailed Qodana report

Contact Qodana team

Contact us at qodana-support@jetbrains.com

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Outside diff range and nitpick comments (2)
CONTRIBUTING.md (2)

Line range hint 23-23: Grammar correction in pre-commit section.

The sentence "we use pre-commits to make sure we only pushes if lint and other checks are passed" should be corrected for proper verb agreement.

- we use pre-commits to make sure we only pushes if lint and other checks are passed.
+ we use pre-commits to make sure we only push if lint and other checks are passed.
Tools
LanguageTool

[style] ~12-~12: The phrase ‘feel free to’ is used quite frequently. Consider using a less frequent alternative to set your writing apart from others and make it sound more professional.
Context: ...ckr](https://github.com/pateash/hckr/) Please feel free to provide any suggestion for new utility ...

(FEEL_FREE_TO_STYLE_ME)

Markdownlint

16-16: Expected: dash; Actual: asterisk
Unordered list style

(MD004, ul-style)


19-19: Expected: dash; Actual: asterisk
Unordered list style

(MD004, ul-style)


15-15: Expected: 0 or 2; Actual: 1
Trailing spaces

(MD009, no-trailing-spaces)


15-15: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines

(MD022, blanks-around-headings)


18-18: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines

(MD022, blanks-around-headings)


16-16: null
Lists should be surrounded by blank lines

(MD032, blanks-around-lists)


19-19: null
Lists should be surrounded by blank lines

(MD032, blanks-around-lists)


Line range hint 31-31: Correct grammatical number for 'version'.

The phrase "all the dev version" should be corrected to "all the dev versions."

- we can easily clean up all the dev version using this command.
+ we can easily clean up all the dev versions using this command.
Tools
LanguageTool

[style] ~12-~12: The phrase ‘feel free to’ is used quite frequently. Consider using a less frequent alternative to set your writing apart from others and make it sound more professional.
Context: ...ckr](https://github.com/pateash/hckr/) Please feel free to provide any suggestion for new utility ...

(FEEL_FREE_TO_STYLE_ME)

Markdownlint

16-16: Expected: dash; Actual: asterisk
Unordered list style

(MD004, ul-style)


19-19: Expected: dash; Actual: asterisk
Unordered list style

(MD004, ul-style)


15-15: Expected: 0 or 2; Actual: 1
Trailing spaces

(MD009, no-trailing-spaces)


15-15: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines

(MD022, blanks-around-headings)


18-18: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines

(MD022, blanks-around-headings)


16-16: null
Lists should be surrounded by blank lines

(MD032, blanks-around-lists)


19-19: null
Lists should be surrounded by blank lines

(MD032, blanks-around-lists)

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 6263f5f and 1870ebf.

Files selected for processing (8)
  • .github/workflows/build.yml (1 hunks)
  • .github/workflows/publish.yml (1 hunks)
  • .github/workflows/release.yml (2 hunks)
  • CONTRIBUTING.md (2 hunks)
  • Makefile (1 hunks)
  • docs/hatch-env-docs-requirements-sync.py (2 hunks)
  • docs/requirements.txt (1 hunks)
  • pyproject.toml (3 hunks)
Files skipped from review due to trivial changes (4)
  • .github/workflows/build.yml
  • .github/workflows/publish.yml
  • docs/hatch-env-docs-requirements-sync.py
  • docs/requirements.txt
Additional context used
LanguageTool
CONTRIBUTING.md

[style] ~12-~12: The phrase ‘feel free to’ is used quite frequently. Consider using a less frequent alternative to set your writing apart from others and make it sound more professional.
Context: ...ckr](https://github.com/pateash/hckr/) Please feel free to provide any suggestion for new utility ...

(FEEL_FREE_TO_STYLE_ME)


[grammar] ~23-~23: The pronoun ‘we’ must be used with a non-third-person form of a verb.
Context: ...we use pre-commits to make sure we only pushes if lint and other checks are passed. * ...

(NON3PRS_VERB)


[uncategorized] ~31-~31: The grammatical number of this noun doesn’t look right. Consider replacing it.
Context: ...up * we can easily clean up all the dev version using this command. ```shell make pypi...

(AI_EN_LECTOR_REPLACEMENT_NOUN_NUMBER)

Markdownlint
CONTRIBUTING.md

16-16: Expected: dash; Actual: asterisk
Unordered list style

(MD004, ul-style)


19-19: Expected: dash; Actual: asterisk
Unordered list style

(MD004, ul-style)


23-23: Expected: dash; Actual: asterisk
Unordered list style

(MD004, ul-style)


24-24: Expected: dash; Actual: asterisk
Unordered list style

(MD004, ul-style)


31-31: Expected: dash; Actual: asterisk
Unordered list style

(MD004, ul-style)


15-15: Expected: 0 or 2; Actual: 1
Trailing spaces

(MD009, no-trailing-spaces)


25-25: Expected: 0 or 2; Actual: 1
Trailing spaces

(MD009, no-trailing-spaces)


36-36: Expected: 1; Actual: 2
Multiple consecutive blank lines

(MD012, no-multiple-blanks)


15-15: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines

(MD022, blanks-around-headings)


18-18: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines

(MD022, blanks-around-headings)


22-22: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines

(MD022, blanks-around-headings)


30-30: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines

(MD022, blanks-around-headings)


25-25: null
Fenced code blocks should be surrounded by blank lines

(MD031, blanks-around-fences)


32-32: null
Fenced code blocks should be surrounded by blank lines

(MD031, blanks-around-fences)


16-16: null
Lists should be surrounded by blank lines

(MD032, blanks-around-lists)


19-19: null
Lists should be surrounded by blank lines

(MD032, blanks-around-lists)


23-23: null
Lists should be surrounded by blank lines

(MD032, blanks-around-lists)


24-24: null
Lists should be surrounded by blank lines

(MD032, blanks-around-lists)


31-31: null
Lists should be surrounded by blank lines

(MD032, blanks-around-lists)


31-31: null
Lists should be surrounded by blank lines

(MD032, blanks-around-lists)


7-7: null
Link fragments should be valid

(MD051, link-fragments)

Additional comments not posted (7)
CONTRIBUTING.md (1)

15-17: Specify Python version for development clearly.

The addition of Python 3.8 as the required version for development is clear and aligns with the PR objectives. However, ensure that all development environments and CI pipelines are updated accordingly to avoid inconsistencies.

Tools
Markdownlint

16-16: Expected: dash; Actual: asterisk
Unordered list style

(MD004, ul-style)


15-15: Expected: 0 or 2; Actual: 1
Trailing spaces

(MD009, no-trailing-spaces)


15-15: Expected: 1; Actual: 0; Below
Headings should be surrounded by blank lines

(MD022, blanks-around-headings)


16-16: null
Lists should be surrounded by blank lines

(MD032, blanks-around-lists)

Makefile (2)

14-14: Updated documentation dependencies sync command.

The command change to hatch run docs:docs-deps modernizes the approach to managing dependencies. Ensure that the hatch configuration is properly set up to handle this new command.


23-23: Review the modified order of commands in the sync target.

The order of commands has been changed in the sync target. Verify that this new order does not disrupt the expected behavior of dependency management.

.github/workflows/release.yml (1)

39-69: Addition of a new step for creating a prerelease.

A new step has been added for creating a prerelease specifically for dev tags. Ensure that the conditions and configurations for this step are correctly set to only trigger on appropriate tags.

pyproject.toml (3)

42-42: Addition of tomli to dependencies.

The tomli package has been added to the dependencies. Ensure that this addition is necessary and does not conflict with other dependencies.


56-60: Changes in environment configuration.

The environment type has been changed to virtual and specifies Python 3.8. This change should help standardize the development environment. Confirm that all necessary dependencies are included in this environment.


132-132: New script added for syncing documentation dependencies.

A new script docs-deps has been added for syncing documentation dependencies. Verify that this script is correctly implemented and functional.

Comment thread CONTRIBUTING.md
Please feel free to provide any suggestion for new utility in [Issues](https://github.com/pateash/hckr/issues)

## Python
* Use python3.8 in development

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider changing the list marker style for consistency.

Markdownlint flagged the use of asterisks for list items. Consider using dashes for list items to maintain consistency throughout the document.

- * Use python3.8 in development
+ - Use python3.8 in development
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
* Use python3.8 in development
- Use python3.8 in development
Tools
Markdownlint

16-16: Expected: dash; Actual: asterisk
Unordered list style

(MD004, ul-style)


16-16: null
Lists should be surrounded by blank lines

(MD032, blanks-around-lists)

uses: actions/setup-python@v4
with:
python-version: '3.11'
python-version: '3.8'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tip

Codebase Verification

Incompatibility with Python 3.8 detected.

The dependencies sphinx-autobuild and sphinx require Python >= 3.9, which means they are not compatible with Python 3.8. Therefore, updating the GitHub Actions workflow to use Python 3.8 will lead to compatibility issues.

  • sphinx-autobuild requires Python >= 3.9
  • sphinx requires Python >= 3.9

Please update the Python version in the GitHub Actions workflow to a compatible version (e.g., Python 3.9 or higher).

Analysis chain

Updated Python version in GitHub Actions workflows.

The Python version has been updated to 3.8. Verify that all dependencies and scripts are compatible with this version to avoid runtime issues.

Also applies to: 48-48

Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify Python 3.8 compatibility with all dependencies.

# Test: Check for any Python version-specific deprecations or compatibility issues in the codebase.
grep -r "python_version" . --include=*.py

Length of output: 43



Script:

#!/bin/bash
# Description: Verify Python 3.8 compatibility with all dependencies.

# Step 1: Find all requirements files.
requirements_files=$(find . -name "requirements*.txt")

# Step 2: List all dependencies from the requirements files.
echo "Dependencies found in requirements files:"
for file in $requirements_files; do
    echo "File: $file"
    cat "$file"
done

# Step 3: Check if any dependencies have known compatibility issues with Python 3.8.
# Note: This is a basic check and may need manual verification for complete assurance.
echo "Checking compatibility of dependencies with Python 3.8..."
for file in $requirements_files; do
    while IFS= read -r line; do
        package=$(echo $line | awk '{print $1}')
        pip show "$package" | grep "Requires-Python"
    done < "$file"
done

Length of output: 2053



Script:

#!/bin/bash
# Description: Verify Python 3.8 compatibility with all dependencies using PyPI metadata.

# Step 1: Find all requirements files.
requirements_files=$(find . -name "requirements*.txt")

# Step 2: List all dependencies from the requirements files.
echo "Dependencies found in requirements files:"
for file in $requirements_files; do
    echo "File: $file"
    cat "$file"
done

# Step 3: Check if any dependencies have known compatibility issues with Python 3.8 using PyPI metadata.
echo "Checking compatibility of dependencies with Python 3.8 from PyPI..."
for file in $requirements_files; do
    while IFS= read -r line; do
        package=$(echo $line | awk '{print $1}')
        echo "Checking $package..."
        curl -s "https://pypi.org/pypi/$package/json" | jq '.info.requires_python'
    done < "$file"
done

Length of output: 2273

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 1870ebf and 274befb.

Files selected for processing (1)
  • pyproject.toml (2 hunks)
Additional comments not posted (2)
pyproject.toml (2)

52-54: Updated virtual environment settings.

The environment type has been changed to virtual and the Python version specified as python3.8. This aligns with the PR's objective to fix issues related to Python 3.8. Ensure that all other configurations and scripts in the project are compatible with this environment setup.


126-126: Addition of a new script for documentation dependencies.

The script docs-deps has been added to sync documentation dependencies. It's important to ensure that this script is correctly referenced elsewhere in the project, particularly in documentation build processes, to maintain consistency.

Verification successful

Ensure the docs-deps script is referenced correctly in the documentation build process.

The docs-deps script is referenced in the Makefile, which indicates it is integrated into the build process. Here are the relevant lines:

  • Makefile:
    • hatch-docs-deps-sync:
    • hatch run docs:docs-deps
    • sync : sync-default sync-dev sync-docs hatch-docs-deps-sync

This confirms that the script is being utilized as intended.

Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the usage of the `docs-deps` script in documentation build processes.

# Test: Search for the script usage in documentation-related files. Expect: References to `docs-deps` script.
rg --type py 'docs-deps'

Length of output: 24



Script:

#!/bin/bash
# Description: Verify the usage of the `docs-deps` script in documentation build processes.

# Test: Search for the script usage in various file types. Expect: References to `docs-deps` script.
# Searching in shell scripts, Makefiles, CI/CD configuration files, and documentation files.
rg 'docs-deps' --type sh --type make --type yaml --type yml --type md --type rst

Length of output: 108



Script:

#!/bin/bash
# Description: Verify the usage of the `docs-deps` script in documentation build processes.

# Test: Search for the script usage in various file types. Expect: References to `docs-deps` script.
# Searching in shell scripts, Makefiles, CI/CD configuration files, and documentation files.
rg 'docs-deps' --type sh --type make --type yaml --type md --type rst

Length of output: 204

Comment thread pyproject.toml
"pyarrow", # For saving data in Parquet format.
"fastavro", # For handling Avro file format.
"requests",
"tomli"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tip

Codebase Verification

Re-evaluate the necessity of tomli in core dependencies.

The tomli package is used in a script (docs/hatch-env-docs-requirements-sync.py) that is part of the documentation build process. It is not essential for the core functionality of the project. Consider moving tomli to a specific section for documentation dependencies to keep the core dependencies clean.

  • docs/hatch-env-docs-requirements-sync.py: Uses tomli for syncing documentation dependencies.
Analysis chain

Verify the re-addition of tomli in dependencies.

The tomli package has been added back to the dependencies. According to the summary, it was removed from one section and added to another. Ensure that this re-addition is intentional and necessary for the project's functionality with Python 3.8.


Verify the purpose of docs/hatch-env-docs-requirements-sync.py to confirm tomli necessity.

The tomli package is used in docs/hatch-env-docs-requirements-sync.py. To determine if tomli is crucial for the project's functionality with Python 3.8 or if it is used for documentation purposes, we need to understand the role of this script.

Scripts executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the necessity of `tomli` in dependencies.

# Test: Search for `tomli` usage in the project. Expect: References to `tomli` usage.
rg --type py 'tomli'

Length of output: 161



Script:

#!/bin/bash
# Description: Verify the purpose of `docs/hatch-env-docs-requirements-sync.py`.

# Output the first 20 lines of the file to understand its purpose.
head -n 20 docs/hatch-env-docs-requirements-sync.py

Length of output: 952

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 1870ebf and 3674ce8.

Files selected for processing (1)
  • pyproject.toml (2 hunks)
Files not reviewed due to errors (1)
  • pyproject.toml (no review received)

@pateash pateash merged commit 3da3856 into main Jun 27, 2024
@pateash pateash deleted the py38-support branch June 27, 2024 09:21
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation github-actions Changes in CICD project-config

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant