From 25eb9b4ae5624a3a2670ea9328918a04c591e5f9 Mon Sep 17 00:00:00 2001 From: Matt Beanland Date: Fri, 17 Oct 2025 16:35:04 +1030 Subject: [PATCH] added reuse compliance --- .formatter.exs | 4 ++++ .github/workflows/reuse.yaml | 15 +++++++++++++++ .gitignore.license | 3 +++ .tool-versions.license | 3 +++ CHANGELOG.md | 6 ++++++ LICENSE.md => LICENSES/MIT.md | 2 +- README.md | 7 +++++++ ash_outstanding_extension.livemd | 6 ++++++ config/config.exs | 4 ++++ config/dev.exs | 4 ++++ config/test.exs | 4 ++++ lib/expressions/is_outstanding.ex | 4 ++++ lib/expressions/outstanding.ex | 4 ++++ lib/extension.ex | 4 ++++ lib/not_loaded.ex | 4 ++++ lib/resource/resource.ex | 4 ++++ lib/resource/transformer.ex | 4 ++++ lib/transformer_helper.ex | 4 ++++ lib/typed_struct/transformer.ex | 4 ++++ lib/typed_struct/typed_struct.ex | 4 ++++ lib/union.ex | 4 ++++ logos/diffo.jpg.license | 3 +++ mix.exs | 4 ++++ mix.lock.license | 3 +++ test/ash_outstanding_test.exs | 4 ++++ test/expression_test.exs | 4 ++++ test/parent_child_test.exs | 4 ++++ test/support/domain.ex | 4 ++++ test/support/generator.ex | 4 ++++ test/support/service.ex | 4 ++++ test/support/specification.ex | 4 ++++ test/test_helper.exs | 4 ++++ test/union_test.exs | 4 ++++ 33 files changed, 143 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/reuse.yaml create mode 100644 .gitignore.license create mode 100644 .tool-versions.license rename LICENSE.md => LICENSES/MIT.md (88%) create mode 100644 logos/diffo.jpg.license create mode 100644 mix.lock.license diff --git a/.formatter.exs b/.formatter.exs index ffa6c4b..5c121ab 100644 --- a/.formatter.exs +++ b/.formatter.exs @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 ash_outstanding contributors +# +# SPDX-License-Identifier: MIT + spark_locals_without_parens = [ expect: 1, customize: 1 diff --git a/.github/workflows/reuse.yaml b/.github/workflows/reuse.yaml new file mode 100644 index 0000000..b0b1e5b --- /dev/null +++ b/.github/workflows/reuse.yaml @@ -0,0 +1,15 @@ +# SPDX-FileCopyrightText: 2025 ash_outstanding contributors +# +# SPDX-License-Identifier: MIT + +name: REUSE Compliance Check + +on: [push, pull_request] + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: REUSE Compliance Check + uses: fsfe/reuse-action@v6 \ No newline at end of file diff --git a/.gitignore.license b/.gitignore.license new file mode 100644 index 0000000..7c9cb15 --- /dev/null +++ b/.gitignore.license @@ -0,0 +1,3 @@ +SPDX-FileCopyrightText: 2025 ash_outstanding contributors + +SPDX-License-Identifier: MIT diff --git a/.tool-versions.license b/.tool-versions.license new file mode 100644 index 0000000..7c9cb15 --- /dev/null +++ b/.tool-versions.license @@ -0,0 +1,3 @@ +SPDX-FileCopyrightText: 2025 ash_outstanding contributors + +SPDX-License-Identifier: MIT diff --git a/CHANGELOG.md b/CHANGELOG.md index e084eaa..c4b4f6f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +<-- +SPDX-FileCopyrightText: 2025 ash_outstanding contributors + +SPDX-License-Identifier: MIT +--> + # Change Log All notable changes to this project will be documented in this file. diff --git a/LICENSE.md b/LICENSES/MIT.md similarity index 88% rename from LICENSE.md rename to LICENSES/MIT.md index 59e8c83..1b358ec 100644 --- a/LICENSE.md +++ b/LICENSES/MIT.md @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2025 Matthew Graham Beanland +Copyright (c) 2025 Matthew Graham Beanland and [contributors](https://github.com/diffo-dev/ash_outstanding/graphs/contributors) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 3aaad76..37ac265 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,15 @@ +<-- +SPDX-FileCopyrightText: 2025 ash_outstanding contributors + +SPDX-License-Identifier: MIT +--> + # AshOutstanding [![Module Version](https://img.shields.io/hexpm/v/ash_outstanding)](https://hex.pm/packages/ash_outstanding) [![Hex Docs](https://img.shields.io/badge/hex-docs-lightgreen)](https://hexdocs.pm/ash_outstanding/) [![License](https://img.shields.io/hexpm/l/ash_outstanding)](https://github.com/diffo-dev/ash_outstanding/blob/master/LICENSE.md) +[![REUSE status](https://api.reuse.software/badge/github.com/diffo-dev/ash_outstanding)](https://api.reuse.software/info/github.com/diffo-dev/ash_outstanding) Ash Extension for implementing `Outstanding` protocol on Ash.Resource and Ash.TypedStruct. diff --git a/ash_outstanding_extension.livemd b/ash_outstanding_extension.livemd index 305a2ed..e12ac89 100644 --- a/ash_outstanding_extension.livemd +++ b/ash_outstanding_extension.livemd @@ -1,3 +1,9 @@ +<-- +SPDX-FileCopyrightText: 2025 ash_outstanding contributors + +SPDX-License-Identifier: MIT +--> + # Ash Outstanding Extension ```elixir diff --git a/config/config.exs b/config/config.exs index f6ff47f..fed9612 100644 --- a/config/config.exs +++ b/config/config.exs @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 ash_outstanding contributors +# +# SPDX-License-Identifier: MIT + import Config config :ash, :validate_domain_resource_inclusion?, false diff --git a/config/dev.exs b/config/dev.exs index 93855b8..40539c9 100644 --- a/config/dev.exs +++ b/config/dev.exs @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 ash_outstanding contributors +# +# SPDX-License-Identifier: MIT + import Config config :git_ops, diff --git a/config/test.exs b/config/test.exs index 1d6d06e..eee9e0d 100644 --- a/config/test.exs +++ b/config/test.exs @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 ash_outstanding contributors +# +# SPDX-License-Identifier: MIT + import Config config :ash, :custom_expressions, [AshOutstanding.Expressions.Outstanding, AshOutstanding.Expressions.IsOutstanding] diff --git a/lib/expressions/is_outstanding.ex b/lib/expressions/is_outstanding.ex index 2efb425..daa2fb2 100644 --- a/lib/expressions/is_outstanding.ex +++ b/lib/expressions/is_outstanding.ex @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 ash_outstanding contributors +# +# SPDX-License-Identifier: MIT + defmodule AshOutstanding.Expressions.IsOutstanding do use Ash.CustomExpression, name: :is_outstanding, diff --git a/lib/expressions/outstanding.ex b/lib/expressions/outstanding.ex index 69aabf3..def5bfa 100644 --- a/lib/expressions/outstanding.ex +++ b/lib/expressions/outstanding.ex @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 ash_outstanding contributors +# +# SPDX-License-Identifier: MIT + defmodule AshOutstanding.Expressions.Outstanding do use Ash.CustomExpression, name: :outstanding, diff --git a/lib/extension.ex b/lib/extension.ex index 398f7ae..4f554d7 100644 --- a/lib/extension.ex +++ b/lib/extension.ex @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 ash_outstanding contributors +# +# SPDX-License-Identifier: MIT + defmodule AshOutstanding.Extension do @moduledoc false diff --git a/lib/not_loaded.ex b/lib/not_loaded.ex index 83a7380..7621597 100644 --- a/lib/not_loaded.ex +++ b/lib/not_loaded.ex @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 ash_outstanding contributors +# +# SPDX-License-Identifier: MIT + defmodule AshOutstanding.NotLoaded do @moduledoc """ Outstanding protocol implementation for Ash.NotLoaded diff --git a/lib/resource/resource.ex b/lib/resource/resource.ex index 77efd9e..0cb5869 100644 --- a/lib/resource/resource.ex +++ b/lib/resource/resource.ex @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 ash_outstanding contributors +# +# SPDX-License-Identifier: MIT + defmodule AshOutstanding.Resource do @moduledoc """ `Ash.Resource` extension for implementing `Outstanding` protocol. diff --git a/lib/resource/transformer.ex b/lib/resource/transformer.ex index 92a5c00..0ee1cc9 100644 --- a/lib/resource/transformer.ex +++ b/lib/resource/transformer.ex @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 ash_outstanding contributors +# +# SPDX-License-Identifier: MIT + defmodule AshOutstanding.Resource.Transformer do @moduledoc false diff --git a/lib/transformer_helper.ex b/lib/transformer_helper.ex index 72fe377..d77fffd 100644 --- a/lib/transformer_helper.ex +++ b/lib/transformer_helper.ex @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 ash_outstanding contributors +# +# SPDX-License-Identifier: MIT + defmodule AshOutstanding.TransformerHelper do @moduledoc false diff --git a/lib/typed_struct/transformer.ex b/lib/typed_struct/transformer.ex index 819a758..f34bfc7 100644 --- a/lib/typed_struct/transformer.ex +++ b/lib/typed_struct/transformer.ex @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 ash_outstanding contributors +# +# SPDX-License-Identifier: MIT + defmodule AshOutstanding.TypedStruct.Transformer do @moduledoc false diff --git a/lib/typed_struct/typed_struct.ex b/lib/typed_struct/typed_struct.ex index fcee896..97f8700 100644 --- a/lib/typed_struct/typed_struct.ex +++ b/lib/typed_struct/typed_struct.ex @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 ash_outstanding contributors +# +# SPDX-License-Identifier: MIT + defmodule AshOutstanding.TypedStruct do @moduledoc """ `Ash.TypedStruct` extension for implementing `Outstanding` protocol. diff --git a/lib/union.ex b/lib/union.ex index 809ef93..8b89146 100644 --- a/lib/union.ex +++ b/lib/union.ex @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 ash_outstanding contributors +# +# SPDX-License-Identifier: MIT + defmodule AshOutstanding.Union do @moduledoc """ Outstanding protocol implementation for Ash.Union :type_and_value. diff --git a/logos/diffo.jpg.license b/logos/diffo.jpg.license new file mode 100644 index 0000000..7c9cb15 --- /dev/null +++ b/logos/diffo.jpg.license @@ -0,0 +1,3 @@ +SPDX-FileCopyrightText: 2025 ash_outstanding contributors + +SPDX-License-Identifier: MIT diff --git a/mix.exs b/mix.exs index c2d32ac..46e8c4b 100644 --- a/mix.exs +++ b/mix.exs @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 ash_outstanding contributors +# +# SPDX-License-Identifier: MIT + defmodule AshOutstanding.MixProject do use Mix.Project diff --git a/mix.lock.license b/mix.lock.license new file mode 100644 index 0000000..7c9cb15 --- /dev/null +++ b/mix.lock.license @@ -0,0 +1,3 @@ +SPDX-FileCopyrightText: 2025 ash_outstanding contributors + +SPDX-License-Identifier: MIT diff --git a/test/ash_outstanding_test.exs b/test/ash_outstanding_test.exs index 20f5801..ee815a1 100644 --- a/test/ash_outstanding_test.exs +++ b/test/ash_outstanding_test.exs @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 ash_outstanding contributors +# +# SPDX-License-Identifier: MIT + defmodule AshOutstanding.Test.Macros do defmacro defresource(name, block) do quote do diff --git a/test/expression_test.exs b/test/expression_test.exs index 7173c40..6eaaffe 100644 --- a/test/expression_test.exs +++ b/test/expression_test.exs @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 ash_outstanding contributors +# +# SPDX-License-Identifier: MIT + defmodule ExpressionTest do @moduledoc false use ExUnit.Case diff --git a/test/parent_child_test.exs b/test/parent_child_test.exs index 913669a..e0cb76b 100644 --- a/test/parent_child_test.exs +++ b/test/parent_child_test.exs @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 ash_outstanding contributors +# +# SPDX-License-Identifier: MIT + defmodule ParentChildTest do @moduledoc false use ExUnit.Case diff --git a/test/support/domain.ex b/test/support/domain.ex index 9e91f97..a775bc8 100644 --- a/test/support/domain.ex +++ b/test/support/domain.ex @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 ash_outstanding contributors +# +# SPDX-License-Identifier: MIT + defmodule Domain do @moduledoc false use Ash.Domain, diff --git a/test/support/generator.ex b/test/support/generator.ex index 4dfed6e..90bb74c 100644 --- a/test/support/generator.ex +++ b/test/support/generator.ex @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 ash_outstanding contributors +# +# SPDX-License-Identifier: MIT + defmodule Generator do use Ash.Generator diff --git a/test/support/service.ex b/test/support/service.ex index 1e3358c..038573d 100644 --- a/test/support/service.ex +++ b/test/support/service.ex @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 ash_outstanding contributors +# +# SPDX-License-Identifier: MIT + defmodule Service do use Ash.Resource, domain: Domain, diff --git a/test/support/specification.ex b/test/support/specification.ex index 4785b96..634af1c 100644 --- a/test/support/specification.ex +++ b/test/support/specification.ex @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 ash_outstanding contributors +# +# SPDX-License-Identifier: MIT + defmodule Specification do use Ash.Resource, domain: Domain, diff --git a/test/test_helper.exs b/test/test_helper.exs index 869559e..d6080f1 100644 --- a/test/test_helper.exs +++ b/test/test_helper.exs @@ -1 +1,5 @@ +# SPDX-FileCopyrightText: 2025 ash_outstanding contributors +# +# SPDX-License-Identifier: MIT + ExUnit.start() diff --git a/test/union_test.exs b/test/union_test.exs index dd925f5..66b8f97 100644 --- a/test/union_test.exs +++ b/test/union_test.exs @@ -1,3 +1,7 @@ +# SPDX-FileCopyrightText: 2025 ash_outstanding contributors +# +# SPDX-License-Identifier: MIT + defmodule AshOutstanding.Union.Test do use ExUnit.Case