From f161e281b1b669f42bcc92fcdb8d054ec37fa67f Mon Sep 17 00:00:00 2001 From: Benjamin Bengfort Date: Fri, 3 Apr 2026 11:09:20 -0500 Subject: [PATCH 1/2] [FEAT] Repo Setup --- .github/pull_request_template.md | 47 ++++++++++++++ .github/workflows/tests.yaml | 105 +++++++++++++++++++++++++++++++ README.md | 15 ++++- cmd/enumify/main.go | 3 + enumify.go | 1 + go.mod | 3 + 6 files changed, 172 insertions(+), 2 deletions(-) create mode 100644 .github/pull_request_template.md create mode 100644 .github/workflows/tests.yaml create mode 100644 cmd/enumify/main.go create mode 100644 enumify.go create mode 100644 go.mod diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..593802d --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,47 @@ + + +### Scope of changes + + + +Fixes SC-XXXXX + +### Estimated PR Size: + +- [ ] Tiny +- [ ] Small +- [ ] Medium +- [ ] Large +- [ ] Huge + +### Acceptance criteria + + + +This PR will be merged without review. + +### Author checklist + +- [ ] I have manually tested the change and/or added automation in the form of unit tests or integration tests +- [ ] I have updated the dependencies list +- [ ] I have added new test fixtures as needed to support added tests +- [ ] I have added or updated the documentation +- [ ] I have run go generate to update generated code + \ No newline at end of file diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml new file mode 100644 index 0000000..f473fef --- /dev/null +++ b/.github/workflows/tests.yaml @@ -0,0 +1,105 @@ +name: CI Tests +on: + push: + branches: + - main + - 'v*' + tags: + - 'v*' + pull_request: + +jobs: + go-lint: + name: Go Lint + runs-on: ubuntu-latest + steps: + - name: Setup Go + uses: actions/setup-go@v6 + with: + go-version: 1.26.x + + - name: Install Staticcheck + run: go install honnef.co/go/tools/cmd/staticcheck@2026.1 + + - name: Checkout Code + uses: actions/checkout@v6 + + - name: Lint Go Code + run: staticcheck ./... + + go-test: + name: Go Test + runs-on: ubuntu-latest + env: + GOPATH: ${{ github.workspace }}/go + GOBIN: ${{ github.workspace }}/go/bin + GOTEST_GITHUB_ACTIONS: 1 + defaults: + run: + working-directory: ${{ env.GOPATH }}/src/go.rtnl.ai/enumify + steps: + - name: Setup Go + uses: actions/setup-go@v6 + with: + go-version: 1.26.x + + - name: Cache Speedup + uses: actions/cache@v5 + with: + path: ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go-${{ env.cache-name }}- + ${{ runner.os }}-go- + ${{ runner.os }}- + + - name: Checkout Code + uses: actions/checkout@v6 + with: + path: ${{ env.GOPATH }}/src/go.rtnl.ai/enumify + + - name: Install Dependencies + run: | + go version + + - name: Code Generation + run: go generate ./... + + - name: Run Unit Tests + run: go test -v -coverprofile=coverage.txt -covermode=atomic --race ./... + + build: + name: Go Build + runs-on: ubuntu-latest + env: + GOPATH: ${{ github.workspace }}/go + GOBIN: ${{ github.workspace }}/go/bin + defaults: + run: + working-directory: ${{ env.GOPATH }}/src/go.rtnl.ai/enumify + steps: + - name: Set up Go + uses: actions/setup-go@v6 + with: + go-version: 1.26.x + + - name: Cache Speedup + uses: actions/cache@v5 + with: + path: ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go-${{ env.cache-name }}- + ${{ runner.os }}-go- + ${{ runner.os }}- + + - name: Checkout Code + uses: actions/checkout@v6 + with: + path: ${{ env.GOPATH }}/src/go.rtnl.ai/enumify + - name: Install Dependencies + run: | + go version + + - name: Build + run: go build ./cmd/... diff --git a/README.md b/README.md index 046a1f5..ab8a37b 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,13 @@ -# enumify -Easily create and manage typed enumerations with code generation and automated enum tests. +# Enumify + +**Easily create and manage typed enumerations with code generation and automated enum tests.** + +We found ourselves generating a lot of boilerplate code for our Enums: particularly for parsing, serialization/deserialization, database storage, and tests. Really we just want to be able to describe an Enum and get all of this code for free! Enumify is the combination of a code generator for the boilerplate code as well as a package for reducing the boilerplate and ensuring that everything works as expected. + +## License + +This project is licensed under the BSD 3-Clause License. See [`LICENSE`](./LICENSE) for details. Please feel free to use Enumify in your own projects and applications. + +## About Rotational Labs + +Enumify is developed by [Rotational Labs](https://rotational.io), a team of engineers and scientists building AI infrastructure for serious work. diff --git a/cmd/enumify/main.go b/cmd/enumify/main.go new file mode 100644 index 0000000..38dd16d --- /dev/null +++ b/cmd/enumify/main.go @@ -0,0 +1,3 @@ +package main + +func main() {} diff --git a/enumify.go b/enumify.go new file mode 100644 index 0000000..9ea6f0c --- /dev/null +++ b/enumify.go @@ -0,0 +1 @@ +package enumify diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..fe122b4 --- /dev/null +++ b/go.mod @@ -0,0 +1,3 @@ +module go.rtnl.ai/enumify + +go 1.26.1 From c4aeb2be35d429bd907941b44c3c22dedef4de2b Mon Sep 17 00:00:00 2001 From: Benjamin Bengfort Date: Fri, 3 Apr 2026 11:22:29 -0500 Subject: [PATCH 2/2] appease bugbot --- .github/workflows/tests.yaml | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index f473fef..52a6d96 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -43,16 +43,6 @@ jobs: with: go-version: 1.26.x - - name: Cache Speedup - uses: actions/cache@v5 - with: - path: ~/go/pkg/mod - key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - restore-keys: | - ${{ runner.os }}-go-${{ env.cache-name }}- - ${{ runner.os }}-go- - ${{ runner.os }}- - - name: Checkout Code uses: actions/checkout@v6 with: @@ -83,16 +73,6 @@ jobs: with: go-version: 1.26.x - - name: Cache Speedup - uses: actions/cache@v5 - with: - path: ~/go/pkg/mod - key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - restore-keys: | - ${{ runner.os }}-go-${{ env.cache-name }}- - ${{ runner.os }}-go- - ${{ runner.os }}- - - name: Checkout Code uses: actions/checkout@v6 with: