From c7b9fb665dc4dd25fc1ef166d2e37590c221d582 Mon Sep 17 00:00:00 2001 From: Zhiyuan Chen Date: Mon, 20 May 2024 20:50:53 +0800 Subject: [PATCH] update license header Signed-off-by: Zhiyuan Chen --- .codespell-whitelist.txt | 2 +- LICENSE | 2 +- LICENSE.header | 17 +++++++++++++++++ LICENSES/LICENSE.AGPL | 2 +- LICENSES/LICENSE.BSD | 2 +- LICENSES/LICENSE.MIT | 2 +- chanfig/__init__.py | 4 +++- chanfig/config.py | 4 +++- chanfig/configclasses.py | 4 +++- chanfig/default_dict.py | 4 +++- chanfig/flat_dict.py | 4 +++- chanfig/functional.py | 4 +++- chanfig/nested_dict.py | 4 +++- chanfig/parser.py | 4 +++- chanfig/registry.py | 4 +++- chanfig/utils.py | 4 +++- chanfig/variable.py | 4 +++- demo/config.py | 17 +++++++++++++++++ docs/mkdocs.yml | 2 +- licensing.sh | 9 +++++++++ setup.py | 17 +++++++++++++++++ tests/test_config.py | 4 +++- tests/test_configclass.py | 4 +++- tests/test_flat_dict.py | 2 +- tests/test_misc.py | 4 +++- tests/test_nested_dict.py | 4 +++- tests/test_variable.py | 4 +++- 27 files changed, 115 insertions(+), 23 deletions(-) create mode 100644 LICENSE.header create mode 100644 licensing.sh diff --git a/.codespell-whitelist.txt b/.codespell-whitelist.txt index 1449575d..20ae12ed 100644 --- a/.codespell-whitelist.txt +++ b/.codespell-whitelist.txt @@ -1 +1 @@ -datas \ No newline at end of file +datas diff --git a/LICENSE b/LICENSE index a9d7ad65..6ff53aa3 100755 --- a/LICENSE +++ b/LICENSE @@ -1 +1 @@ -Unlicense OR AGPL-3.0-or-later OR GPL-2.0-or-later OR BSD-4-Clause OR MIT OR Apache-2.0 \ No newline at end of file +Unlicense OR AGPL-3.0-or-later OR GPL-2.0-or-later OR BSD-4-Clause OR MIT OR Apache-2.0 diff --git a/LICENSE.header b/LICENSE.header new file mode 100644 index 00000000..2cccfb9e --- /dev/null +++ b/LICENSE.header @@ -0,0 +1,17 @@ +# CHANfiG, Easier Configuration. +# Copyright (c) 2022-Present, CHANfiG Contributors + +# This program is free software: you can redistribute it and/or modify +# it under the terms of the following licenses: +# - The Unlicense +# - GNU Affero General Public License v3.0 or later +# - GNU General Public License v2.0 or later +# - BSD 4-Clause "Original" or "Old" License +# - MIT License +# - Apache License 2.0 + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the LICENSE file for more details. + diff --git a/LICENSES/LICENSE.AGPL b/LICENSES/LICENSE.AGPL index bae94e18..be3f7b28 100644 --- a/LICENSES/LICENSE.AGPL +++ b/LICENSES/LICENSE.AGPL @@ -658,4 +658,4 @@ specific requirements. You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU AGPL, see -. \ No newline at end of file +. diff --git a/LICENSES/LICENSE.BSD b/LICENSES/LICENSE.BSD index 54bec9a1..5e72332d 100644 --- a/LICENSES/LICENSE.BSD +++ b/LICENSES/LICENSE.BSD @@ -1,6 +1,6 @@ BSD 4-Clause License -Copyright (c) 2022-2023, CHANfiG Contributors +Copyright (c) 2022-Present, CHANfiG Contributors All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/LICENSES/LICENSE.MIT b/LICENSES/LICENSE.MIT index 5d2e3546..3210162c 100755 --- a/LICENSES/LICENSE.MIT +++ b/LICENSES/LICENSE.MIT @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2022-2023, CHANfiG Contributors +Copyright (c) 2022-Present, CHANfiG 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/chanfig/__init__.py b/chanfig/__init__.py index 2625fd2c..130f594d 100755 --- a/chanfig/__init__.py +++ b/chanfig/__init__.py @@ -1,5 +1,6 @@ # CHANfiG, Easier Configuration. -# Copyright (c) 2022-2023, CHANfiG Contributors +# Copyright (c) 2022-Present, CHANfiG Contributors + # This program is free software: you can redistribute it and/or modify # it under the terms of the following licenses: # - The Unlicense @@ -8,6 +9,7 @@ # - BSD 4-Clause "Original" or "Old" License # - MIT License # - Apache License 2.0 + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/chanfig/config.py b/chanfig/config.py index 444b518a..ff089a34 100755 --- a/chanfig/config.py +++ b/chanfig/config.py @@ -1,5 +1,6 @@ # CHANfiG, Easier Configuration. -# Copyright (c) 2022-2023, CHANfiG Contributors +# Copyright (c) 2022-Present, CHANfiG Contributors + # This program is free software: you can redistribute it and/or modify # it under the terms of the following licenses: # - The Unlicense @@ -8,6 +9,7 @@ # - BSD 4-Clause "Original" or "Old" License # - MIT License # - Apache License 2.0 + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/chanfig/configclasses.py b/chanfig/configclasses.py index 78ea1381..f2395f30 100644 --- a/chanfig/configclasses.py +++ b/chanfig/configclasses.py @@ -1,5 +1,6 @@ # CHANfiG, Easier Configuration. -# Copyright (c) 2022-2023, CHANfiG Contributors +# Copyright (c) 2022-Present, CHANfiG Contributors + # This program is free software: you can redistribute it and/or modify # it under the terms of the following licenses: # - The Unlicense @@ -8,6 +9,7 @@ # - BSD 4-Clause "Original" or "Old" License # - MIT License # - Apache License 2.0 + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/chanfig/default_dict.py b/chanfig/default_dict.py index a8e63114..02ac7efb 100644 --- a/chanfig/default_dict.py +++ b/chanfig/default_dict.py @@ -1,5 +1,6 @@ # CHANfiG, Easier Configuration. -# Copyright (c) 2022-2023, CHANfiG Contributors +# Copyright (c) 2022-Present, CHANfiG Contributors + # This program is free software: you can redistribute it and/or modify # it under the terms of the following licenses: # - The Unlicense @@ -8,6 +9,7 @@ # - BSD 4-Clause "Original" or "Old" License # - MIT License # - Apache License 2.0 + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/chanfig/flat_dict.py b/chanfig/flat_dict.py index 83bff40f..7835e068 100644 --- a/chanfig/flat_dict.py +++ b/chanfig/flat_dict.py @@ -1,5 +1,6 @@ # CHANfiG, Easier Configuration. -# Copyright (c) 2022-2023, CHANfiG Contributors +# Copyright (c) 2022-Present, CHANfiG Contributors + # This program is free software: you can redistribute it and/or modify # it under the terms of the following licenses: # - The Unlicense @@ -8,6 +9,7 @@ # - BSD 4-Clause "Original" or "Old" License # - MIT License # - Apache License 2.0 + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/chanfig/functional.py b/chanfig/functional.py index b3e8626d..ab98cd45 100644 --- a/chanfig/functional.py +++ b/chanfig/functional.py @@ -1,5 +1,6 @@ # CHANfiG, Easier Configuration. -# Copyright (c) 2022-2023, CHANfiG Contributors +# Copyright (c) 2022-Present, CHANfiG Contributors + # This program is free software: you can redistribute it and/or modify # it under the terms of the following licenses: # - The Unlicense @@ -8,6 +9,7 @@ # - BSD 4-Clause "Original" or "Old" License # - MIT License # - Apache License 2.0 + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/chanfig/nested_dict.py b/chanfig/nested_dict.py index 54eeaea8..e141a84a 100644 --- a/chanfig/nested_dict.py +++ b/chanfig/nested_dict.py @@ -1,5 +1,6 @@ # CHANfiG, Easier Configuration. -# Copyright (c) 2022-2023, CHANfiG Contributors +# Copyright (c) 2022-Present, CHANfiG Contributors + # This program is free software: you can redistribute it and/or modify # it under the terms of the following licenses: # - The Unlicense @@ -8,6 +9,7 @@ # - BSD 4-Clause "Original" or "Old" License # - MIT License # - Apache License 2.0 + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/chanfig/parser.py b/chanfig/parser.py index 26e7a6a7..241ae9e8 100644 --- a/chanfig/parser.py +++ b/chanfig/parser.py @@ -1,5 +1,6 @@ # CHANfiG, Easier Configuration. -# Copyright (c) 2022-2023, CHANfiG Contributors +# Copyright (c) 2022-Present, CHANfiG Contributors + # This program is free software: you can redistribute it and/or modify # it under the terms of the following licenses: # - The Unlicense @@ -8,6 +9,7 @@ # - BSD 4-Clause "Original" or "Old" License # - MIT License # - Apache License 2.0 + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/chanfig/registry.py b/chanfig/registry.py index 8856cfdd..0040f1e7 100644 --- a/chanfig/registry.py +++ b/chanfig/registry.py @@ -1,5 +1,6 @@ # CHANfiG, Easier Configuration. -# Copyright (c) 2022-2023, CHANfiG Contributors +# Copyright (c) 2022-Present, CHANfiG Contributors + # This program is free software: you can redistribute it and/or modify # it under the terms of the following licenses: # - The Unlicense @@ -8,6 +9,7 @@ # - BSD 4-Clause "Original" or "Old" License # - MIT License # - Apache License 2.0 + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/chanfig/utils.py b/chanfig/utils.py index 59def7f4..6f1f86ba 100644 --- a/chanfig/utils.py +++ b/chanfig/utils.py @@ -1,5 +1,6 @@ # CHANfiG, Easier Configuration. -# Copyright (c) 2022-2023, CHANfiG Contributors +# Copyright (c) 2022-Present, CHANfiG Contributors + # This program is free software: you can redistribute it and/or modify # it under the terms of the following licenses: # - The Unlicense @@ -8,6 +9,7 @@ # - BSD 4-Clause "Original" or "Old" License # - MIT License # - Apache License 2.0 + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/chanfig/variable.py b/chanfig/variable.py index f3e14150..9b5a038d 100644 --- a/chanfig/variable.py +++ b/chanfig/variable.py @@ -1,5 +1,6 @@ # CHANfiG, Easier Configuration. -# Copyright (c) 2022-2023, CHANfiG Contributors +# Copyright (c) 2022-Present, CHANfiG Contributors + # This program is free software: you can redistribute it and/or modify # it under the terms of the following licenses: # - The Unlicense @@ -8,6 +9,7 @@ # - BSD 4-Clause "Original" or "Old" License # - MIT License # - Apache License 2.0 + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/demo/config.py b/demo/config.py index 2f5a0587..d84be2c3 100644 --- a/demo/config.py +++ b/demo/config.py @@ -1,3 +1,20 @@ +# CHANfiG, Easier Configuration. +# Copyright (c) 2022-Present, CHANfiG Contributors + +# This program is free software: you can redistribute it and/or modify +# it under the terms of the following licenses: +# - The Unlicense +# - GNU Affero General Public License v3.0 or later +# - GNU General Public License v2.0 or later +# - BSD 4-Clause "Original" or "Old" License +# - MIT License +# - Apache License 2.0 + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the LICENSE file for more details. + import os from chanfig import Config, Variable, configclass diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index 177f9489..007910bd 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -2,7 +2,7 @@ site_name: CHANfiG site_url: https://chanfig.danling.org site_author: CHANfiG Contributors site_description: Easier Configuration -copyright: All rights reserved © 2022-2023, CHANfiG Contributors +copyright: All rights reserved © 2022-Present, CHANfiG Contributors repo_name: CHANfiG repo_url: https://github.com/ZhiyuanChen/CHANfiG diff --git a/licensing.sh b/licensing.sh new file mode 100644 index 00000000..eb8ccca6 --- /dev/null +++ b/licensing.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +for i in $(find . -name '*.py'); +do + if ! grep -q Copyright $i + then + cat LICENSE.header $i >$i.new && mv $i.new $i + fi +done diff --git a/setup.py b/setup.py index 60684932..234de121 100755 --- a/setup.py +++ b/setup.py @@ -1,3 +1,20 @@ +# CHANfiG, Easier Configuration. +# Copyright (c) 2022-Present, CHANfiG Contributors + +# This program is free software: you can redistribute it and/or modify +# it under the terms of the following licenses: +# - The Unlicense +# - GNU Affero General Public License v3.0 or later +# - GNU General Public License v2.0 or later +# - BSD 4-Clause "Original" or "Old" License +# - MIT License +# - Apache License 2.0 + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the LICENSE file for more details. + from setuptools import setup setup() diff --git a/tests/test_config.py b/tests/test_config.py index a30bef41..d288b35d 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -1,5 +1,6 @@ # CHANfiG, Easier Configuration. -# Copyright (c) 2022-2023, CHANfiG Contributors +# Copyright (c) 2022-Present, CHANfiG Contributors + # This program is free software: you can redistribute it and/or modify # it under the terms of the following licenses: # - The Unlicense @@ -8,6 +9,7 @@ # - BSD 4-Clause "Original" or "Old" License # - MIT License # - Apache License 2.0 + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/tests/test_configclass.py b/tests/test_configclass.py index 9310c1a9..08329416 100644 --- a/tests/test_configclass.py +++ b/tests/test_configclass.py @@ -1,5 +1,6 @@ # CHANfiG, Easier Configuration. -# Copyright (c) 2022-2023, CHANfiG Contributors +# Copyright (c) 2022-Present, CHANfiG Contributors + # This program is free software: you can redistribute it and/or modify # it under the terms of the following licenses: # - The Unlicense @@ -8,6 +9,7 @@ # - BSD 4-Clause "Original" or "Old" License # - MIT License # - Apache License 2.0 + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/tests/test_flat_dict.py b/tests/test_flat_dict.py index 39396a6b..e0e9c84a 100644 --- a/tests/test_flat_dict.py +++ b/tests/test_flat_dict.py @@ -1,5 +1,5 @@ # CHANfiG, Easier Configuration. -# Copyright (c) 2022-2023, CHANfiG Contributors +# Copyright (c) 2022-Present, CHANfiG Contributors # This program is free software: you can redistribute it and/or modify # it under the terms of the following licenses: # - The Unlicense diff --git a/tests/test_misc.py b/tests/test_misc.py index 77f300c3..9b83f009 100644 --- a/tests/test_misc.py +++ b/tests/test_misc.py @@ -1,5 +1,6 @@ # CHANfiG, Easier Configuration. -# Copyright (c) 2022-2023, CHANfiG Contributors +# Copyright (c) 2022-Present, CHANfiG Contributors + # This program is free software: you can redistribute it and/or modify # it under the terms of the following licenses: # - The Unlicense @@ -8,6 +9,7 @@ # - BSD 4-Clause "Original" or "Old" License # - MIT License # - Apache License 2.0 + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/tests/test_nested_dict.py b/tests/test_nested_dict.py index 6d86f9e5..8a19fc9e 100644 --- a/tests/test_nested_dict.py +++ b/tests/test_nested_dict.py @@ -1,5 +1,6 @@ # CHANfiG, Easier Configuration. -# Copyright (c) 2022-2023, CHANfiG Contributors +# Copyright (c) 2022-Present, CHANfiG Contributors + # This program is free software: you can redistribute it and/or modify # it under the terms of the following licenses: # - The Unlicense @@ -8,6 +9,7 @@ # - BSD 4-Clause "Original" or "Old" License # - MIT License # - Apache License 2.0 + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. diff --git a/tests/test_variable.py b/tests/test_variable.py index 8fc19c09..e0eaaf05 100644 --- a/tests/test_variable.py +++ b/tests/test_variable.py @@ -1,5 +1,6 @@ # CHANfiG, Easier Configuration. -# Copyright (c) 2022-2023, CHANfiG Contributors +# Copyright (c) 2022-Present, CHANfiG Contributors + # This program is free software: you can redistribute it and/or modify # it under the terms of the following licenses: # - The Unlicense @@ -8,6 +9,7 @@ # - BSD 4-Clause "Original" or "Old" License # - MIT License # - Apache License 2.0 + # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.