Skip to content

Commit

Permalink
infra changes
Browse files Browse the repository at this point in the history
  • Loading branch information
paulb777 committed Dec 12, 2023
1 parent bdcaf73 commit c82b027
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 65 deletions.
87 changes: 34 additions & 53 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,57 +1,38 @@
# Created by https://www.toptal.com/developers/gitignore/api/macos,xcode
# Edit at https://www.toptal.com/developers/gitignore?templates=macos,xcode

### macOS ###
# General
# OS X
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon


# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

### macOS Patch ###
# iCloud generated files
*.icloud

### Xcode ###
## User settings
# Xcode
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata/

## Xcode 8 and earlier
*.xcscmblueprint
*.xccheckout

### Xcode Patch ###
*.xcodeproj/*
!*.xcodeproj/project.pbxproj
!*.xcodeproj/xcshareddata/
!*.xcodeproj/project.xcworkspace/
!*.xcworkspace/contents.xcworkspacedata
/*.gcno
**/xcshareddata/WorkspaceSettings.xcsettings

# End of https://www.toptal.com/developers/gitignore/api/macos,xcode

# This file contains the PaLM API key - don't check it in
PaLM-Info.plist
profile
*.moved-aside
DerivedData
*.hmap
*.ipa
*.xcworkspace

# Swift Package Manager
Package.resolved
**/.build
**/.swiftpm
.netrc

# Bad sorts get generated if the package .xcscheme is not regenerated.
# Anything committed to xcshareddata gets propagated to clients. (#8167)
.swiftpm/xcode/xcshareddata/

# Mint package manager
Mint

# CLI Tool
Apps/GoogleAICLI/GoogleAICLI.xcodeproj/xcshareddata/xcschemes/*
GenerativeAI-Info.plist
3 changes: 1 addition & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
Expand Down Expand Up @@ -199,4 +198,4 @@
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
limitations under the License.
2 changes: 1 addition & 1 deletion docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ Guidelines](https://opensource.google/conduct/).

### Code Reviews

All submissions, including submissions by project members, require review. We
All submissions, including submissions by project members, require review. We
use [GitHub pull requests](https://docs.github.com/articles/about-pull-requests)
for this purpose.
26 changes: 17 additions & 9 deletions docs/DEVELOPING.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
# Developing

## Re-generating the API
All code in the [OpenAPI](../Sources/OpenAPI) is generated based on the API specification in [generativelanguage-v1beta3.json](../Sources/generativelanguage-v1beta3.json).
## Prerequisites

To re-generate the API based on any changes to the API, follow these steps:
* Xcode 15 or newer

* Obtain the API discovery document from https://generativelanguage.googleapis.com/$discovery/rest?version=v1beta3&key=$YOUR_API_KEY
* Convert the discovery document to OpenAPI 3.0 (Swagger) format
* https://github.com/APIs-guru/google-discovery-to-swagger
* https://github.com/LucyBot-Inc/api-spec-converter
* Use [CreateAPI](https://github.com/CreateAPI/CreateAPI) to generate helper classes for accessing the API
* Manually write the API surface ([protocol](../Sources/GoogleGenerativeAI/GenerativeLanguageProtocol.swift) / [implementation)](../Sources/GoogleGenerativeAI/GenerativeLanguage.swift) and [REST routes for the API client](../Sources/GoogleGenerativeAI/Endpoints.swift) to access the API using the generated helper classes
## Setting up your development environment

* `git clone [email protected]:google/generative-ai-swift.git`
* `open Package.swift`
* Command-u to build and run the library and unit tests
* `open Examples/GenerativeAISample/GenerativeAISample.xcodeproj` to build and run the Examples

## Checking in code

Before submitting a pull request, make sure to check your code against the
style guide by running the following command:

```bash
$ ./scripts/style.sh
```

0 comments on commit c82b027

Please sign in to comment.