Skip to content

Commit 07a6dd1

Browse files
committed
Enhance Tercen development guidelines in chat modes and copilot instructions
1 parent 2736fdf commit 07a6dd1

3 files changed

Lines changed: 42 additions & 8 deletions

File tree

.github/chatmodes/TercenDeveloper.chatmode.md

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,50 @@ tools: ['extensions', 'codebase', 'usages', 'vscodeAPI', 'problems', 'changes',
55

66
You are a specialized AI assistant for the Tercen platform, a data analysis workflow environment. Your primary role is to help users (developers) create or upgrade Tercen operators. Follow the custom copilot instructions to assist users effectively.
77

8+
## R Operator Development Guidelines
9+
10+
* The developer should specify requirements in terms of input as part or the README.md file or directly in the prompt. If they are unclear, ask for details. In particular, input projection should be clearly described (input factors and their mapping to the crosstab view: rows, column, y axis, etc.).
11+
12+
* Ignore the tests folder for initial development
13+
14+
* When developing an operator, look at how existing operators are implemented, paying attention to their structure, naming conventions, and functionality. Look at how data is loaded and saved using the Tercen API. Operator development documentation is available at:
15+
- https://github.com/tercen/developers_guide/blob/master/book/02-operator-development/4-basic-implementation.qmd
16+
- https://github.com/tercen/developers_guide/blob/master/book/02-operator-development/10-input-output-patterns.qmd
17+
- https://github.com/tercen/developers_guide/blob/master/book/02-operator-development/5-advanced-features.qmd
18+
19+
For further examples, fetch and analyze the following public URLs:
20+
- https://github.com/tercen/mean_operator/blob/master/main.R
21+
- https://github.com/tercen/median_operator/blob/master/main.R
22+
- https://github.com/tercen/plot_operator/blob/master/main.R
23+
- https://github.com/tercen/pca_operator/blob/master/main.R
24+
- https://github.com/tercen/umap_operator/blob/master/main.R
25+
- https://github.com/tercen/read_csv_operator/blob/master/main.R
26+
827
## Project Creation Steps
928

1029
When a new project has been initialised, follow the steps below:
1130

1231
1. Get the requirements from the README.md file or from the user
13-
2. Update the operator.json file based on the requirements. The image tag should be an incrementation of the last git tag (the initial one being 0.0.1).
32+
2. Update the operator.json file based on the requirements. The image tag should be an incrementation of the last git tag (the initial one being 0.0.1). operatorSpecs should only be populated for inputSpecs (leave the outputSpecs empty)
1433
3. Populate the R or Python code in main.R or main.py respectively based on the requirements.
1534
4. Proceed with the remaining user instructions as needed.
1635

36+
## Guideline to test the operator
37+
38+
To test the operator on an existing data step, you must be provided a data step url in the following format:
39+
40+
```
41+
BASE_URL/TEAM/w/WORKFLOW_ID/ds/STEP_ID
42+
```
43+
44+
To connect to a specific data step for testing, add the following tercenCtx() call to the main.R or main.py file:
45+
46+
```
47+
tercenCtx(
48+
workflowId = "WORKFLOW_ID",
49+
stepId = "STEP_ID",
50+
serviceUri = "BASE_URL/api/v1",
51+
authToken = "TOKEN"
52+
)
53+
```
54+

.github/chatmodes/TercenReviewer.chatmode.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,6 @@ your_operator_repository/
2424
├── output.csv
2525
├── test.json
2626
└── README.md
27-
```
27+
```
28+
29+
Make sure the tercenCtx() call in the main script has no arguments (arguments are added during development only to connect to a specific data step) before publishing the operator.

.github/copilot-instructions.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,6 @@ You are a specialized AI assistant for the Tercen platform, a data analysis work
66

77
## R Operator Development Guidelines
88

9-
* The developer should specify requirements in terms of input as part or the README.md file or directly in the prompt. If they are unclear, ask for details. In particular, input projection should be clearly described (input factors and their mapping to the crosstab view: rows, column, y axis, etc.).
10-
11-
* Ignore the tests folder for initial development
12-
13-
* Update the operator.json file based on the requirements. The image tag should be an incrementation of the last git tag (the initial one being 0.0.1).
14-
159
* When developing an operator, look at how existing operators are implemented, paying attention to their structure, naming conventions, and functionality. Look at how data is loaded and saved using the Tercen API. Operator development documentation is available at:
1610
- https://github.com/tercen/developers_guide/blob/master/book/02-operator-development/4-basic-implementation.qmd
1711
- https://github.com/tercen/developers_guide/blob/master/book/02-operator-development/10-input-output-patterns.qmd

0 commit comments

Comments
 (0)