Skip to content

Commit

Permalink
Merge pull request #112 from buerokratt/ISSUE-46-47
Browse files Browse the repository at this point in the history
Issue 46 47
  • Loading branch information
alimuhammadahmer authored Jan 12, 2023
2 parents cac2e11 + e5b0bbc commit 72657e3
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 4 deletions.
16 changes: 12 additions & 4 deletions Docker_Project/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ https://github.com/buerokratt/Data-Anonymizer/issues/60

Add [Ruuter DSL File](Ruuter/DSL/GET/regex.yml) and [Resql Query](Resql/templates/production/list_regex.sql) to list regex patterns.


### Delete added Regex pattern from database

https://github.com/buerokratt/Data-Anonymizer/issues/63
Expand All @@ -44,11 +43,20 @@ Add [Ruuter DSL File](Ruuter/DSL/GET/delete_regex.yml) and [Resql Query](Resql/t

https://github.com/buerokratt/Data-Anonymizer/issues/59

- Add [Ruuter DSL File](Ruuter/DSL/POST/regex.yml) and [Resql Query](Resql/templates/production/insert_regex.sql) to add a regex pattern.
- Add [Ruuter DSL File](Ruuter/DSL/GET/entity.yml) and [Resql Query](Resql/templates/production/list_entity.sql) to list entities.
- Add [Ruuter DSL File](Ruuter/DSL/POST/regex.yml) and [Resql Query](Resql/templates/production/insert_regex.sql) to add a regex pattern.
- Add [Ruuter DSL File](Ruuter/DSL/GET/entity.yml) and [Resql Query](Resql/templates/production/list_entity.sql) to list entities.

### Add new entity

https://github.com/buerokratt/Data-Anonymizer/issues/89

Add [Ruuter DSL File](Ruuter/DSL/POST/entity.yml) and [Resql Query](Resql/templates/production/insert_entity.sql) to add an entity.
Add [Ruuter DSL File](Ruuter/DSL/POST/entity.yml) and [Resql Query](Resql/templates/production/insert_entity.sql) to add an entity.

### Show list of sentences and Filter sentences by ID

https://github.com/buerokratt/Data-Anonymizer/issues/46
https://github.com/buerokratt/Data-Anonymizer/issues/47

- Add [Ruuter DSL File](Ruuter/DSL/GET/tasks.yml) and [Resql Query](Resql/templates/production/get_corpora.sql) to list corpora tasks based on pagination and filters.
- Add [Ruuter DSL File](Ruuter/DSL/GET/task.yml) and [Resql Query](Resql/templates/production/get_task.sql) to get a particular task detail.
- Add [Ruuter DSL File](Ruuter/DSL/GET/corpora_info.yml) and [Resql Query](Resql/templates/production/get_corpora_info.sql) to get latest corpora info.
1 change: 1 addition & 0 deletions Docker_Project/Resql/templates/production/get_corpora.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SELECT id, corpora_id, created_at, full_count, is_private, predictions, raw_text FROM list_corpora_tasks_paginated(:where_condition, :sort_condition, :page, :page_size);
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
select corpora_id, source_file_name, source_file_size, created_at, trained_at from Corpora_Info order by created_at desc limit 1;
1 change: 1 addition & 0 deletions Docker_Project/Resql/templates/production/get_task.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
select id, corpora_id, created_at, is_private, raw_text, sentences_annotations::text AS predictions from Corpora_Tasks where corpora_id = :corpora_id and id = :id ORDER BY created_at DESC limit 1;
8 changes: 8 additions & 0 deletions Docker_Project/Ruuter/DSL/GET/corpora_info.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
get_project:
call: http.post
args:
url: http://resql:8082/get_corpora_info
result: request_response

return_value:
return: ${request_response.response.body}
11 changes: 11 additions & 0 deletions Docker_Project/Ruuter/DSL/GET/task.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
get_task:
call: http.post
args:
url: http://resql:8082/get_task
body:
id: ${parseInt(incoming.params.id)}
corpora_id: ${incoming.params.project}
result: request_response

return_value:
return: ${request_response.response.body[0]}
13 changes: 13 additions & 0 deletions Docker_Project/Ruuter/DSL/GET/tasks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
list_task_by_corpora_id:
call: http.post
args:
url: http://resql:8082/get_corpora
body:
page: ${incoming.params.page}
page_size: ${incoming.params.page_size}
where_condition: ${incoming.params.where_condition}
sort_condition: ${incoming.params.sort_condition}
result: request_response

return:
return: ${request_response.response.body}

0 comments on commit 72657e3

Please sign in to comment.