Skip to content

Commit

Permalink
adding templates for js/ts and java
Browse files Browse the repository at this point in the history
  • Loading branch information
prateek-pradhan committed Nov 8, 2023
1 parent 9e3cfe5 commit 86ac76d
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/workflows/pilot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,17 @@ jobs:
pip install anthropic
pip install pre-commit
# - name: Run OpenAI Magic
# run: |
# cd DocPilot
# python3 src/openai-integration.py ${{secrets.OPENAI_API_KEY}}
# rm -rf diff.txt temp.txt


- name: Run Claude Magic
run: |
cd DocPilot
python3 src/integration.py ${{secrets.ANTHROPIC_API_KEY}}
python3 src/claude-integration.py ${{secrets.ANTHROPIC_API_KEY}}
rm -rf diff.txt temp.txt
- name: Check for changes 📝
Expand Down
28 changes: 28 additions & 0 deletions resources/templates/function_templates/java_template.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/**
* Description paragraph here.
*
* @param first The 1st param description.
* @param second The 2nd param description.
* @param third The 3rd param, by default 'value'. (optional)
* @return Description of the return value.
* @throws KeyError When a key error occurs.
* @throws OtherError When another error occurs.
*
* Examples:
* - Some minimal examples of using the function should go here.
* - For example:
* <pre>
* int[] result1 = myFunction(arg1, arg2);
* System.out.println(result1); // Output: some result
* </pre>
*
* <pre>
* List<Integer> seqList = sequentialList(1, 5);
* System.out.println(seqList); // Output: [1, 2, 3, 4]
* System.out.println(seqList.size()); // Output: 4
* System.out.println(Collections.min(seqList)); // Output: 1
* </pre>
*/
public ReturnType myFunction(ParameterType1 first, ParameterType2 second, ParameterType3 third) {
// Function implementation here.
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/**
* Description paragraph here.
*
* @param {array_like} first - The 1st param description.
* @param {type} second - The 2nd param description.
* @param {object} [third='value'] - The 3rd param, by default 'value'. (optional)
*
* @returns {type} - Description of the return value.
*
* @throws {ErrorType1} - Description of the first error condition.
* @throws {ErrorType2} - Description of the second error condition.
*
* @example
* // Example 1: Describe how to use the function with sample inputs and outputs.
* const result1 = myFunction(arg1, arg2);
* console.log(result1); // Output: some result
*
* // Example 2: Provide another example.
* const result2 = myFunction(arg3, arg4);
* console.log(result2); // Output: some other result
*/
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""

Description paragraph here.

Parameters
Expand Down

0 comments on commit 86ac76d

Please sign in to comment.