Skip to content
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

feat: tests on PR & push to main #21

Merged
merged 7 commits into from
Dec 9, 2024
Merged

feat: tests on PR & push to main #21

merged 7 commits into from
Dec 9, 2024

Conversation

ArzelaAscoIi
Copy link
Member

@ArzelaAscoIi ArzelaAscoIi commented Dec 9, 2024

in case you are trying to push a component that fails linting:
image

@@ -44,7 +44,7 @@ detached = true
[tool.hatch.envs.dc.scripts]
build = "mkdir -p dist && zip -r dist/custom_component.zip ./* -x 'dist/*' '**/__pycache__/*'"
push = "curl --request POST --url https://api.cloud.deepset.ai/api/v2/custom_components --header 'accept: application/json' --header \"Authorization: Bearer $API_KEY\" --form 'file=@dist/custom_component.zip;type=application/zip'"
build-and-push = "mkdir -p dist && zip -r dist/custom_component.zip ./* -x 'dist/*' '**/__pycache__/*' && curl --request POST --url https://api.cloud.deepset.ai/api/v2/custom_components --header 'accept: application/json' --header \"Authorization: Bearer $API_KEY\" --form 'file=@dist/custom_component.zip;type=application/zip'"
build-and-push = "hatch run code-quality:all && mkdir -p dist && zip -r dist/custom_component.zip ./* -x 'dist/*' '**/__pycache__/*' && curl --request POST --url https://api.cloud.deepset.ai/api/v2/custom_components --header 'accept: application/json' --header \"Authorization: Bearer $API_KEY\" --form 'file=@dist/custom_component.zip;type=application/zip'"
Copy link
Member Author

Choose a reason for hiding this comment

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

thats a bit drastic, but it should help us fixing bugs in dC

pyproject.toml Outdated
@@ -63,6 +63,13 @@ dependencies = [
packages = ["src/dc_custom_component"]

[tool.hatch.envs.code-quality.scripts]
format = "black src tests --check"
format-fix = "black src tests"
lint = "ruff ."
Copy link
Contributor

@faymarie faymarie Dec 9, 2024

Choose a reason for hiding this comment

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

I believe it was changed to ruff check .

Suggested change
lint = "ruff ."
lint = "ruff check ."

Copy link
Member Author

Choose a reason for hiding this comment

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

thats the lint-ci command below 🙈

Copy link
Contributor

Choose a reason for hiding this comment

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

Don't we usually do ruff check --output-format=github for the lint-ci command?

Copy link
Member Author

Choose a reason for hiding this comment

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

oh damn. you are right. it should also be ruff check . (--fix). What i used is deprecated

@ArzelaAscoIi ArzelaAscoIi requested a review from faymarie December 9, 2024 14:21
@ArzelaAscoIi ArzelaAscoIi merged commit 9248711 into main Dec 9, 2024
2 checks passed
@ArzelaAscoIi ArzelaAscoIi deleted the feat/ChecksCI branch December 9, 2024 15:15
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