Skip to content

Commit

Permalink
📝 ドキュメントと設定の改善(複数ファイル): より明確で正確なドキュメントと設定ファイルを作成し単体テストをパスするようにしました
Browse files Browse the repository at this point in the history
いくつかのドキュメントを更新し、設定ファイルの変数名をより明確で理解しやすいものに変更しました。また、不要なコメントを削除し、コードのスタイルを統一しました。これにより、プロジェクトの可読性と保守性が向上します。

📝 Documentation and configuration improvements (multiple files): Improved clarity and accuracy of documentation and configuration files for pass unit test

Updated several documentation sections and renamed configuration variables for better clarity and understanding. Removed unnecessary comments and standardized code style. This improves the readability and maintainability of the project.
  • Loading branch information
takuya-o committed Jan 5, 2025
1 parent 1ebbdc5 commit 652ab58
Show file tree
Hide file tree
Showing 17 changed files with 84,350 additions and 98,415 deletions.
2 changes: 2 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
- 新たに生成するコメントは日本語にしてください。ただし元のコメントが英語の場合は英語にしてください。
- 「型アサーションを使用してundefined でないことを保証します」のような単にコードの動きを説明するコメントは追加しないでください。
- コード変更時に元からあるコメントは、そのまま残してください。
- JavaScriptやTypeScriptで行末のセミコロンは省略してください。
- インデントは2にしてください。
- gitのコミットメッセージを作る時には以下の規則に従ってください。
- 従来のコミット規則に従ってください。
- GitMoji 規則を使用してください。
Expand Down
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,11 @@ oco --yes
Create a `.env` file and add OpenCommit config variables there like this:

```env
OCO_OPENAI_API_TYPE=<'openai', 'azure' or 'google'. The default is 'openai' >
OCO_OPENAI_API_KEY=<your OpenAI API token>
OCO_OPENAI_BASE_PATH=<may be used to set proxy path to OpenAI API. Required for Azure OpenAI. example: 'https://YourInstanceName.openai.azure.com/'>
OCO_OPENAI_MAX_TOKENS=<max response tokens from OpenAI API>
OCO_OPENAI_API_TYPE=<'openai', 'azure', 'gemini' or 'google'. The default is 'openai' > Obsolete, recommend using OCO_AI_PROVIDER
OCO_OPENAI_API_KEY=<your OpenAI API token> Obsolete, recommend using OCO_API_KEY
OCO_OPENAI_BASE_PATH=<may be used to set proxy path to OpenAI API. Required for Azure OpenAI. example: 'https://YourInstanceName.openai.azure.com/'> Obsolete, recommend using OCO_API_URL
OCO_OPENAI_MAX_TOKENS=<max response tokens from OpenAI API> Obsolete, recommend using OCO_TOKENS_MAX_OUTPUT
OCO_TOKEN_LIMIT=<max response tokens to OpenAI API> Obsolete, recommend using OCO_TOKENS_MAX_INPUT
...
OCO_DESCRIPTION=<postface a message with ~3 sentences description of the changes>
OCO_EMOJI=<boolean, add GitMoji>
Expand Down Expand Up @@ -204,14 +205,14 @@ You may switch to gpt-4o which performs better, but costs more 🤠

```sh
oco config set OCO_MODEL=gpt-4o
oco config set OCO_TOKEN_LIMIT=32768
oco config set OCO_TOKENS_MAX_OUTPUT=32768
```

or for as a cheaper option:

```sh
oco config set OCO_MODEL=gpt-3.5-turbo
oco config set OCO_TOKEN_LIMIT=16384
oco config set OCO_TOKENS_MAX_OUTPUT=16384
```

### Switch to other LLM providers with a custom URL
Expand Down
27 changes: 27 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/** @type {import('ts-jest').JestConfigWithTsJest} **/
import { createJsWithTsEsmPreset } from 'ts-jest'

const presetConfig = createJsWithTsEsmPreset({
//...options
// tsconfig:
// isolatedModules:
// compiler:
// astTransformers:
diagnostics: false,
// stringifyContentPathRegex:
})

export default {
testEnvironment: "node",
transform: {
"^.+.tsx?$": ["ts-jest",{}],
},

testTimeout: 100_000,
coverageProvider: 'v8',
moduleDirectories: ['node_modules', 'src'],
...presetConfig,
setupFilesAfterEnv: ['<rootDir>/test/jest-setup.ts'],
testRegex: ['.*\\.test\\.ts$'],
transformIgnorePatterns: ['node_modules/(?!cli-testing-library)'],
};
28 changes: 0 additions & 28 deletions jest.config.ts

This file was deleted.

3 changes: 2 additions & 1 deletion opencommit.code-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@
"extensions": {
"recommendations": [
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode"
"esbenp.prettier-vscode",
"orta.vscode-jest"
]
}
}
Loading

0 comments on commit 652ab58

Please sign in to comment.