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

Add snippet run support #134

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

billytrend-cohere
Copy link
Collaborator

@billytrend-cohere billytrend-cohere commented Sep 17, 2024

This PR introduces a new Java project for the Cohere Developer Experience, which includes a new package called snippet-ci. The project is configured to use Jest for testing and includes a new Java test file, java.test.ts, that tests Java snippets.

The project also includes several XML configuration files for the IntelliJ IDEA IDE, which are used to configure the project's compiler, Gradle settings, remote repositories, external storage, project root, and modules.

The snippet-ci package includes a new package.json file, which defines the package's name, version, description, main file, scripts, and dependencies. The package also includes a new babel.config.js file, which configures Babel presets for the package.

The package.json file in the root directory has been updated to include a new type field with the value module.

The pnpm-lock.yaml file has been updated to include new dependencies and importers, and to change the lockfileVersion from 6.0 to 9.0.

The java.test.ts file includes a new test suite for Java snippets, which uses Jest and child processes to execute and test Java files. The test suite includes a snapshot test that compares the contents of a Java file to a snapshot, and a concurrent test that executes a Java file and logs its output.

The snippets/java directory includes several new Java files that demonstrate how to use the Cohere Java SDK to interact with the Cohere API. These files include classes for creating, reading, updating, and deleting connectors, as well as classes for creating, reading, and deleting datasets.

The snippets/java directory also includes a new .java-version file, which specifies the Java version used in the project.

The snippets directory includes a new .DS_Store file, which is a macOS file used to store custom folder attributes.

The snippets/java directory also includes a new .idea directory, which contains several XML configuration files for the IntelliJ IDEA IDE. These files include compiler.xml, gradle.xml, jarRepositories.xml, misc.xml, modules.xml, modules/java.iml, and vcs.xml.

The snippets/java/app/src/main/java directory includes several new Java files that demonstrate how to use the Cohere Java SDK to interact with the Cohere API. These files include classes for creating, reading, updating, and deleting connectors, as well as classes for creating, reading, and deleting datasets.

The changes in this PR introduce a new Java project for the Cohere Developer Experience, which includes a new package called snippet-ci and several new Java files that demonstrate how to use the Cohere Java SDK to interact with the Cohere API. The project is configured to use Jest for testing and includes a new Java test file, java.test.ts, that tests Java snippets. The project also includes several XML configuration files for the IntelliJ IDEA IDE, and the package.json file in the root directory has been updated to include a new type field with the value module.

  • New files:
    • `.vscode/settings.json
    • jest.config.js
    • packages/snippet-ci/babel.config.js
    • packages/snippet-ci/package.json
    • packages/snippet-ci/src/__snapshots__/java.test.ts.snap
    • packages/snippet-ci/src/java.test.ts
    • snippets/java/.idea/compiler.xml
    • snippets/java/.idea/gradle.xml
    • snippets/java/.idea/jarRepositories.xml
    • snippets/java/.idea/misc.xml
    • snippets/java/.idea/modules.xml
    • snippets/java/.idea/modules/java.iml
    • snippets/java/.idea/vcs.xml
    • snippets/java/.java-version
    • snippets/java/app/src/main/java/ClassifyPost.java
    • snippets/java/app/src/main/java/ConnectorCreate.java
    • snippets/java/app/src/main/java/ConnectorDelete.java
    • snippets/java/app/src/main/java/ConnectorGet.java
    • <co: 19,20,21,22,23,24,25,26,27,28,29>snippets/java/app/src/main/java/ConnectorPatch.java</co: 19,20,21,22,23,24,25

Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant