Skip to content

Remove demisto/content from ecosystem checks - #12129

Merged
charliermarsh merged 2 commits into
mainfrom
charlie/eco
Jul 1, 2024
Merged

Remove demisto/content from ecosystem checks#12129
charliermarsh merged 2 commits into
mainfrom
charlie/eco

Conversation

@charliermarsh

Copy link
Copy Markdown
Member

Summary

Unfortunately demisto/content uses an explicit select for E999, so it will always fail in preview. And they're on a fairly old version. I'd like to keep checking it, but seems easiest for now to just disable it.

In response, I've added a few new repos.

@github-actions

github-actions Bot commented Jul 1, 2024

Copy link
Copy Markdown
Contributor

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

ℹ️ ecosystem check encountered linter errors. (no lint changes; 1 project error)

demisto/content (error)

ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --preview

warning: The top-level linter settings are deprecated in favour of their counterparts in the `lint` section. Please update the following options in `pyproject.toml`:
  - 'ignore' -> 'lint.ignore'
  - 'select' -> 'lint.select'
  - 'unfixable' -> 'lint.unfixable'
  - 'per-file-ignores' -> 'lint.per-file-ignores'
warning: `PGH001` has been remapped to `S307`.
warning: `PGH002` has been remapped to `G010`.
warning: `PLR1701` has been remapped to `SIM101`.
ruff failed
  Cause: Selection of deprecated rule `E999` is not allowed when preview is enabled.

Formatter (stable)

ℹ️ ecosystem check encountered format errors. (no format changes; 1 project error)

openai/openai-cookbook (error)

warning: Detected debug build without --no-cache.
error: Failed to parse examples/gpt_actions_library/.gpt_action_getting_started.ipynb:11:1:1: Expected an expression
error: Failed to parse examples/gpt_actions_library/gpt_action_bigquery.ipynb:13:1:1: Expected an expression

Formatter (preview)

ℹ️ ecosystem check encountered format errors. (no format changes; 2 project errors)

demisto/content (error)

ruff format --preview --exclude Packs/ThreatQ/Integrations/ThreatQ/ThreatQ.py

warning: The top-level linter settings are deprecated in favour of their counterparts in the `lint` section. Please update the following options in `pyproject.toml`:
  - 'ignore' -> 'lint.ignore'
  - 'select' -> 'lint.select'
  - 'unfixable' -> 'lint.unfixable'
  - 'per-file-ignores' -> 'lint.per-file-ignores'
warning: `PGH001` has been remapped to `S307`.
warning: `PGH002` has been remapped to `G010`.
warning: `PLR1701` has been remapped to `SIM101`.
ruff failed
  Cause: Selection of deprecated rule `E999` is not allowed when preview is enabled.

openai/openai-cookbook (error)

ruff format --preview

warning: Detected debug build without --no-cache.
error: Failed to parse examples/gpt_actions_library/.gpt_action_getting_started.ipynb:11:1:1: Expected an expression
error: Failed to parse examples/gpt_actions_library/gpt_action_bigquery.ipynb:13:1:1: Expected an expression

Comment thread scripts/check_ecosystem.py Outdated
@dhruvmanila

dhruvmanila commented Jul 1, 2024

Copy link
Copy Markdown
Member

Huh, weird that it's not reflecting in the ecosystem comment on this PR.

Edit: I'm rerunning the job.

Co-authored-by: Dhruv Manilawala <dhruvmanila@gmail.com>
@charliermarsh
charliermarsh enabled auto-merge (squash) July 1, 2024 12:16
@charliermarsh
charliermarsh merged commit eaf33d8 into main Jul 1, 2024
@charliermarsh
charliermarsh deleted the charlie/eco branch July 1, 2024 12:20
@codspeed-hq

codspeed-hq Bot commented Jul 1, 2024

Copy link
Copy Markdown

CodSpeed Performance Report

Merging #12129 will improve performances by 7.57%

Comparing charlie/eco (3153e49) with charlie/eco (0053c5a)

Summary

⚡ 6 improvements
✅ 24 untouched benchmarks

Benchmarks breakdown

Benchmark charlie/eco charlie/eco Change
lexer[large/dataset.py] 1.1 ms 1.1 ms +6.06%
lexer[numpy/ctypeslib.py] 227.2 µs 216.3 µs +5.06%
lexer[pydantic/types.py] 506.1 µs 481.6 µs +5.11%
lexer[unicode/pypinyin.py] 77.4 µs 74.2 µs +4.34%
linter/default-rules[pydantic/types.py] 1.9 ms 1.8 ms +7.57%
parser[numpy/ctypeslib.py] 953.7 µs 915 µs +4.23%

dhruvmanila added a commit that referenced this pull request Jul 3, 2024
## Summary

Follow-up to #12129 to remove the
`demisto/content` from ecosystem checks. The previous PR removed it from
the deprecated script which I didn't notice until recently.

## Test Plan

Ecosystem comment
KotlinIsland pushed a commit to KotlinIsland/basedpython that referenced this pull request May 1, 2026
## Summary

Follow-up to astral-sh/ruff#12129 to remove the
`demisto/content` from ecosystem checks. The previous PR removed it from
the deprecated script which I didn't notice until recently.

## Test Plan

Ecosystem comment
ntBre pushed a commit that referenced this pull request Jul 29, 2026
## Summary

Reintroducing `demisto/content` back to `ruff-ecosystem`, it's a huge
repo with 4.5K py file and 2.5M loc, so may have catch some cases for
ecosystem report. It was previously commented out in
#12129 due to the use of removed
`E999`

Issue with the use of removed rules upstream is resolved, though
apparently `E999` was dropped from selection a while ago and new issue
with the use of removed `UP038` occurred, but it's resolved now too -
demisto/content#45227

Syntax error in still present in
https://github.com/demisto/content/blob/master/Packs/ThreatQ/Integrations/ThreatQ/ThreatQ.py,
so keeping `exclude`. Though apparently it doesn't break
`ruff-ecosystem` anymore, but keeping it safe for now. I've submitted a
fix upstream demisto/content#45275, so `exclude`
can be removed later too.


## Test Plan

Tested running `ruff-ecosystem` locally, no issues found.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants