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: watch mode for patterns test #298

Merged
merged 26 commits into from
Jul 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
24535a7
feature: watch mode for patterns test
Ashu999 May 1, 2024
a4eae62
Merge branch 'main' of
Ashu999 May 1, 2024
3d6bd31
feat: re-run pattern test for changed/affected patterns only
Ashu999 May 20, 2024
d51ba5e
Merge branch 'main' of https://github.com/getgrit/gritql into main-wa…
Ashu999 May 20, 2024
44fcd31
refactor: ignore watch mode on external libs and sepraton of concerns…
Ashu999 May 25, 2024
d5e0459
handle case when reading patterns from single yaml file
Ashu999 Jun 3, 2024
0a2fb53
watch mode made efficient and handled patten delete case
Ashu999 Jun 6, 2024
d63cfc6
Merge branch 'main' of https://github.com/getgrit/gritql into main-wa…
Ashu999 Jun 6, 2024
d862cc8
remove clone() usage where possible
Ashu999 Jun 7, 2024
62ebf75
snapshot test update for yaml__tests__gets_module_patterns
Ashu999 Jun 7, 2024
266c58b
applied clippy fix
Ashu999 Jun 7, 2024
62ec2d3
improved code quality of watch mode functions
Ashu999 Jun 24, 2024
f8c4a32
Merge branch 'main' of https://github.com/getgrit/gritql into main-wa…
Ashu999 Jun 24, 2024
472d374
Merge branch 'main' of https://github.com/getgrit/gritql into main-wa…
Ashu999 Jun 25, 2024
d91a1f5
simplified code
Ashu999 Jun 28, 2024
ed2f881
added integration test for: patterns test --watch
Ashu999 Jun 28, 2024
a7968f7
Merge branch 'main' of https://github.com/getgrit/gritql into main-wa…
Ashu999 Jun 28, 2024
5f26579
using temp directory for watch mode test
Ashu999 Jun 30, 2024
8df9a94
Merge branch 'main' of https://github.com/getgrit/gritql into main-wa…
Ashu999 Jun 30, 2024
e73e73c
using get_fixture for temp directory setup
Ashu999 Jun 30, 2024
e28388d
watch mode logs minor fix
Ashu999 Jun 30, 2024
00d4119
added test for watch mode case when all patterns are removed
Ashu999 Jun 30, 2024
1ca1a43
avoid clone() and unwrap() where possible
Ashu999 Jul 1, 2024
7884371
Merge branch 'main' of https://github.com/getgrit/gritql into main-wa…
Ashu999 Jul 1, 2024
5895757
use get_test_process_cmd() to get base command
Ashu999 Jul 5, 2024
43dc81e
Merge branch 'main' of https://github.com/getgrit/gritql into main-wa…
Ashu999 Jul 5, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
94 changes: 94 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 6 additions & 8 deletions crates/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ flate2 = { version = "1.0.17", features = [
"rust_backend",
], default-features = false }
axoupdater = { version = "0.6.4", default-features = false, features = [
"github_releases"
"github_releases",
] }

opentelemetry-otlp = { version = "0.14.0", optional = true, features = [
Expand All @@ -73,6 +73,8 @@ opentelemetry_sdk = { version = "0.21.1", optional = true, features = [
tracing-opentelemetry = { version = "0.22.0", optional = true, default-features = false }

tracing = { version = "0.1.40", default-features = false, features = [] }
notify = "6.1.1"
notify-debouncer-mini = "0.4.1"
tracing-subscriber = { version = "0.3", default-features = false, optional = true }

fs-err = { version = "2.11.0" }
Expand Down Expand Up @@ -106,12 +108,8 @@ workflows_v2 = []
bundled_workflows = []
remote_redis = []
remote_pubsub = []
remote_workflows = [
"dep:grit_cloud_client",
]
workflow_server = [
"dep:grit_cloud_client",
]
remote_workflows = ["dep:grit_cloud_client"]
workflow_server = ["dep:grit_cloud_client"]
server = [
"workflows_v2",
"external_functions",
Expand Down Expand Up @@ -150,7 +148,7 @@ grit_beta = [
"ai_builtins",
"workflows_v2",
"remote_workflows",
"workflow_server"
"workflow_server",
# "grit_timing",
]
grit_timing = []
5 changes: 4 additions & 1 deletion crates/cli/src/commands/patterns.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ pub enum PatternCommands {
Describe(PatternsDescribeArgs),
}

#[derive(Args, Debug, Serialize)]
#[derive(Args, Debug, Serialize, Clone)]
pub struct PatternsTestArgs {
/// Regex of a specific pattern to test
#[clap(long = "filter")]
Expand All @@ -53,6 +53,9 @@ pub struct PatternsTestArgs {
/// Update expected test outputs
#[clap(long = "update")]
pub update: bool,
/// Enable watch mode on .grit dir
#[clap(long = "watch")]
pub watch: bool,
}

#[derive(Args, Debug, Serialize)]
Expand Down
Loading
Loading