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

docs: standardize license headers #1061

Merged
merged 33 commits into from
Nov 3, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
4ff09b5
chore: license headers
kevgo Oct 7, 2022
28374aa
Add headers to generated files
kevgo Oct 10, 2022
17b096b
Merge branch 'master' into kg-license-headers
kevgo Oct 12, 2022
ef72835
autogen: build buf
ory-bot Oct 12, 2022
814f14f
Merge branch 'master' into kg-license-headers
kevgo Oct 12, 2022
ae46686
Makefile
kevgo Oct 12, 2022
75c307b
chore: license headers
kevgo Oct 12, 2022
d601eb7
Makefile
kevgo Oct 13, 2022
6f5dcea
Makefile
kevgo Oct 13, 2022
208aa6f
check_service_pb.js
kevgo Oct 13, 2022
0167673
syntax_service_pb.js expand_service_pb.js read_service_pb.js relation…
kevgo Oct 13, 2022
5855b7a
autogen: build buf
ory-bot Oct 12, 2022
93369be
Merge branch 'master' into kg-license-headers
kevgo Oct 26, 2022
a8fdf60
autogen: build buf
ory-bot Oct 12, 2022
72c6fb4
GHA
kevgo Oct 28, 2022
031ae4b
autogen: build buf
ory-bot Nov 2, 2022
0c1c174
chore: license checker (#1098)
kevgo Nov 2, 2022
16d6717
chore: update repository templates to https://github.com/ory/meta/com…
aeneasr Nov 2, 2022
8f2e99e
Merge branch 'master' into kg-license-headers
kevgo Nov 2, 2022
11090f6
autogen: build buf
ory-bot Oct 12, 2022
d5787ca
autogen: build buf
ory-bot Nov 2, 2022
2ef4976
chore: license checker (#1098)
kevgo Nov 2, 2022
5ed45a2
Merge branch 'master' into kg-license-headers
kevgo Nov 2, 2022
616460d
chore: remove format header (#1105)
kevgo Nov 2, 2022
ba39ab1
Merge branch 'master' into kg-license-headers
kevgo Nov 2, 2022
a085e0b
autogen: build buf
ory-bot Oct 12, 2022
411b1fe
autogen: build buf
ory-bot Nov 2, 2022
e4d843b
Merge branch 'master' into kg-license-headers
kevgo Nov 2, 2022
b042609
chore: license headers
kevgo Nov 2, 2022
f488cab
chore: license headers
kevgo Nov 2, 2022
e26c192
chore: license headers
kevgo Nov 3, 2022
691ac73
chore: license headers
kevgo Nov 3, 2022
ce42617
Merge branch 'master' into kg-license-headers
kevgo Nov 3, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.bin/
node_modules/
.idea/
coverage.txt
Expand All @@ -6,4 +7,4 @@ dist/
**/*.sqlite-journal
.vscode/
.fuzzer/
keto
keto
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ tools/brew:
go build -o .bin/clidoc ./cmd/clidoc/.

.PHONY: format
format: tools/goimports node_modules
format: .bin/ory tools/goimports node_modules
.bin/ory dev headers license --exclude=.bin --exclude=internal/httpclient --exclude=proto
goimports -w -local github.com/ory/keto *.go internal cmd contrib ketoctx ketoapi embedx
npm exec -- prettier --write .

Expand Down Expand Up @@ -160,3 +161,7 @@ post-release: tools/yq
.PHONY: generate
generate: tools/stringer
go generate ./...

kevgo marked this conversation as resolved.
Show resolved Hide resolved
.bin/ory: Makefile
curl https://raw.githubusercontent.com/ory/meta/master/install.sh | bash -s -- -b .bin ory v0.1.43
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do we update the version here? Manually? All other dependencies are tracked in Homebrew or in .bin/gobin/go.mod. Can we put it there?

Copy link
Member

@zepatrik zepatrik Oct 10, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already have the Ory CLI checked in through homebrew, this can just be skipped all together 😉
Just use ory as the command in the makefile, it is already set in the PATH correctly.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the feedback! This brings up a larger conversation (than fits into this PR), so I have opened https://github.com/ory-corp/general/issues/754 to discuss the various approaches to install dependencies, the thinking behind them, and how we might simplify the current complexity around dependency management in all repos.

@hperl yes I was planning on bumping the version manually if needed, through a PR that verifies that everything still works. That's the most simple, straightforward, and robust solution in my experience, and anybody can do it. I created https://github.com/kevgo/mrt to automatically perform such updates for all Ory repos if needed.

@zepatrik how do I install the Ory CLI using Homebrew on Linux (Debian Bullseye)? I just ran make sdk and make tools/cli (which I guess will create a tools/ory command?) and both ran for 5 minutes each and then errored with:

Warning: No available formula with the name "keto/tools/[email protected]".
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching for a previously deleted formula (in the last month)...
Error: No previously deleted formula found.
make: *** [Makefile:37: tools/go-swagger] Error 1

Given that the ORY CLI is a simple stand-alone Go binary with a custom binary name, why aren't we installing it through its cross-platform installer script? That takes only a few seconds.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given that the ORY CLI is a simple stand-alone Go binary with a custom binary name, why aren't we installing it through its cross-platform installer script? That takes only a few seconds.

This will work for Ory CLI, but not for protoc 😞
I am not sure why it failed for you, but I agree that the brew variant sucks. I will write an install script for protoc instead that pulls the binary from github. I'll try to contribute it to https://github.com/protocolbuffers/protobuf so we don't have to maintain it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds great! Here is a super simple template in case you need one: https://github.com/git-town/git-town/blob/main/website/scripts/install_mdbook.

touch .bin/ory
2 changes: 2 additions & 0 deletions cmd/check/root.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright © 2022 Ory Corp
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why don't we put the full declaration on each file as per Apache License?

   Copyright 2022 Ory Corp

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hperl Thanks for your suggestion. This question is still open. Please find the discussion around the license headers in https://github.com/ory-corp/general/issues/602. I went with the shortest possible option primarily because it is short. The headers can be changed later as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hperl FYI based on your suggestion I am now including the license name, but abbreviated in a standard format so that it is machine readable.


package check

import (
Expand Down
2 changes: 2 additions & 0 deletions cmd/check/root_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright © 2022 Ory Corp

package check

import (
Expand Down
2 changes: 2 additions & 0 deletions cmd/clidoc/main.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright © 2022 Ory Corp

package main

import (
Expand Down
2 changes: 2 additions & 0 deletions cmd/client/grpc_client.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright © 2022 Ory Corp

package client

import (
Expand Down
2 changes: 2 additions & 0 deletions cmd/client/grpc_client_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright © 2022 Ory Corp

package client

import (
Expand Down
2 changes: 2 additions & 0 deletions cmd/client/test_helpers.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright © 2022 Ory Corp

package client

import (
Expand Down
2 changes: 2 additions & 0 deletions cmd/expand/root.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright © 2022 Ory Corp

package expand

import (
Expand Down
2 changes: 2 additions & 0 deletions cmd/expand/root_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright © 2022 Ory Corp

package expand

import (
Expand Down
2 changes: 2 additions & 0 deletions cmd/helpers/helpers.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright © 2022 Ory Corp

package helpers

import (
Expand Down
2 changes: 2 additions & 0 deletions cmd/migrate/down.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright © 2022 Ory Corp

package migrate

import (
Expand Down
2 changes: 2 additions & 0 deletions cmd/migrate/migrate_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright © 2022 Ory Corp

package migrate

import (
Expand Down
2 changes: 2 additions & 0 deletions cmd/migrate/root.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright © 2022 Ory Corp

package migrate

import (
Expand Down
2 changes: 2 additions & 0 deletions cmd/migrate/status.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright © 2022 Ory Corp

package migrate

import (
Expand Down
2 changes: 2 additions & 0 deletions cmd/migrate/up.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright © 2022 Ory Corp

package migrate

import (
Expand Down
2 changes: 2 additions & 0 deletions cmd/namespace/root.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright © 2022 Ory Corp

package namespace

import (
Expand Down
2 changes: 2 additions & 0 deletions cmd/namespace/validate.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright © 2022 Ory Corp

package namespace

import (
Expand Down
2 changes: 2 additions & 0 deletions cmd/namespace/validate_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright © 2022 Ory Corp

package namespace

import (
Expand Down
2 changes: 2 additions & 0 deletions cmd/relationtuple/create.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright © 2022 Ory Corp

package relationtuple

import (
Expand Down
2 changes: 2 additions & 0 deletions cmd/relationtuple/delete.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright © 2022 Ory Corp

package relationtuple

import (
Expand Down
2 changes: 2 additions & 0 deletions cmd/relationtuple/delete_all.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright © 2022 Ory Corp

package relationtuple

import (
Expand Down
2 changes: 2 additions & 0 deletions cmd/relationtuple/delete_all_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright © 2022 Ory Corp

package relationtuple

import (
Expand Down
2 changes: 2 additions & 0 deletions cmd/relationtuple/get.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright © 2022 Ory Corp

package relationtuple

import (
Expand Down
2 changes: 2 additions & 0 deletions cmd/relationtuple/output.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright © 2022 Ory Corp

package relationtuple

import (
Expand Down
2 changes: 2 additions & 0 deletions cmd/relationtuple/output_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright © 2022 Ory Corp

package relationtuple

import (
Expand Down
2 changes: 2 additions & 0 deletions cmd/relationtuple/parse.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright © 2022 Ory Corp

package relationtuple

import (
Expand Down
2 changes: 2 additions & 0 deletions cmd/relationtuple/parse_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright © 2022 Ory Corp

package relationtuple

import (
Expand Down
2 changes: 2 additions & 0 deletions cmd/relationtuple/root.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright © 2022 Ory Corp

package relationtuple

import (
Expand Down
14 changes: 1 addition & 13 deletions cmd/root.go
Original file line number Diff line number Diff line change
@@ -1,16 +1,4 @@
// Copyright © 2018 NAME HERE <EMAIL ADDRESS>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// 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.
// Copyright © 2022 Ory Corp

package cmd

Expand Down
2 changes: 2 additions & 0 deletions cmd/serve_debug_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright © 2022 Ory Corp

package cmd

import (
Expand Down
14 changes: 1 addition & 13 deletions cmd/server/serve.go
Original file line number Diff line number Diff line change
@@ -1,16 +1,4 @@
// Copyright © 2018 NAME HERE <EMAIL ADDRESS>
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// 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.
// Copyright © 2022 Ory Corp

package server

Expand Down
2 changes: 2 additions & 0 deletions cmd/status/root.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright © 2022 Ory Corp

package status

import (
Expand Down
2 changes: 2 additions & 0 deletions cmd/status/root_test.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright © 2022 Ory Corp

package status

import (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright © 2022 Ory Corp

import grpc from "@ory/keto-grpc-client/node_modules/@grpc/grpc-js/build/src/index.js"
import { relationTuples, write, writeService } from "@ory/keto-grpc-client"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright © 2022 Ory Corp

package main

import (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright © 2022 Ory Corp

import grpc from "@ory/keto-grpc-client/node_modules/@grpc/grpc-js/build/src/index.js"
import { relationTuples, expand, expandService } from "@ory/keto-grpc-client"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright © 2022 Ory Corp

package main

import (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright © 2022 Ory Corp

import grpc from "@ory/keto-grpc-client/node_modules/@grpc/grpc-js/build/src/index.js"
import { relationTuples, write, writeService } from "@ory/keto-grpc-client"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright © 2022 Ory Corp

//go:build docscodesamples
// +build docscodesamples

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright © 2022 Ory Corp

import grpc from "@ory/keto-grpc-client/node_modules/@grpc/grpc-js/build/src/index.js"
import { relationTuples, write, writeService } from "@ory/keto-grpc-client"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright © 2022 Ory Corp

package main

import (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright © 2022 Ory Corp

import grpc from "@ory/keto-grpc-client/node_modules/@grpc/grpc-js/build/src/index.js"
import { relationTuples, read, readService } from "@ory/keto-grpc-client"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright © 2022 Ory Corp

package main

import (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright © 2022 Ory Corp

import grpc from "@ory/keto-grpc-client/node_modules/@grpc/grpc-js/build/src/index.js"
import { read, readService } from "@ory/keto-grpc-client"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright © 2022 Ory Corp

package main

import (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright © 2022 Ory Corp

import grpc from "@ory/keto-grpc-client/node_modules/@grpc/grpc-js/build/src/index.js"
import { write, writeService, read, readService } from "@ory/keto-grpc-client"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright © 2022 Ory Corp

//go:build docscodesamples
// +build docscodesamples

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright © 2022 Ory Corp

import grpc from "@ory/keto-grpc-client/node_modules/@grpc/grpc-js/build/src/index.js"
import { relationTuples, write, writeService } from "@ory/keto-grpc-client"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright © 2022 Ory Corp

package main

import (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright © 2022 Ory Corp

import grpc from "@ory/keto-grpc-client/node_modules/@grpc/grpc-js/build/src/index.js"
import { relationTuples, check, checkService } from "@ory/keto-grpc-client"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright © 2022 Ory Corp

package main

import (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright © 2022 Ory Corp

import grpc from "@ory/keto-grpc-client/node_modules/@grpc/grpc-js/build/src/index.js"
import { relationTuples, write, writeService } from "@ory/keto-grpc-client"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright © 2022 Ory Corp

package main

import (
Expand Down
2 changes: 2 additions & 0 deletions contrib/namespace-type-lib/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright © 2022 Ory Corp

/// <reference no-default-lib="true"/>

declare interface Boolean {}
Expand Down
2 changes: 2 additions & 0 deletions contrib/namespace-type-lib/test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright © 2022 Ory Corp

import { Namespace, SubjectSet, Context } from "@ory/keto-namespace-types"

// This test is not really a valid config, but rather a check of the types.
Expand Down
2 changes: 2 additions & 0 deletions contrib/rewrites-example/namespaces.keto.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright © 2022 Ory Corp

import { Namespace, SubjectSet, Context } from "@ory/keto-namespace-types"

class User implements Namespace {
Expand Down
Loading