diff --git a/.github/workflows/run_rat.yml b/.github/workflows/run_rat.yml new file mode 100644 index 0000000..cacd841 --- /dev/null +++ b/.github/workflows/run_rat.yml @@ -0,0 +1,31 @@ +# Copyright (c) 2020 The University of Manchester +# +# 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 +# +# https://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. + +# This workflow will install Python dependencies, run tests, lint and rat with a variety of Python versions +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions + +name: verify +on: [push] +jobs: + verify: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Run rat copyright enforcement + uses: ./actions/check-copyrights + with: + config_file: rat_asl20.xml + diff --git a/.ratexcludes b/.ratexcludes new file mode 100644 index 0000000..9907c1d --- /dev/null +++ b/.ratexcludes @@ -0,0 +1,7 @@ +**/*.log +**/*.tcl +**/*.xml +**/*.xsd +**/activate +**/apache-rat-*/** +**/rat.excludes \ No newline at end of file diff --git a/LICENSE b/LICENSE index d645695..62589ed 100644 --- a/LICENSE +++ b/LICENSE @@ -1,7 +1,7 @@ Apache License Version 2.0, January 2004 - http://www.apache.org/licenses/ + https://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION @@ -193,7 +193,7 @@ 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 + https://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, diff --git a/LICENSE.md b/LICENSE_POLICY.md similarity index 52% rename from LICENSE.md rename to LICENSE_POLICY.md index b96b0a0..55f7239 100644 --- a/LICENSE.md +++ b/LICENSE_POLICY.md @@ -1,17 +1,17 @@ # License Agreement -Up to date information for the whole [SpiNNakerManchester Projects](https://github.com/SpiNNakerManchester) can be found [here](http://spinnakermanchester.github.io/common_pages/4.0.0/LicenseAgreement.html) +Up to date information for the whole [SpiNNakerManchester Projects](https://github.com/SpiNNakerManchester) can be found [here](https://spinnakermanchester.github.io/latest/LicenseAgreement.html) -As shown there the software is currently being released under the GPL version 3 license listed [here](http://www.gnu.org/copyleft/gpl.html) +As shown there the software is currently being released under the Apache License 2.0 listed [here](https://www.apache.org/licenses/LICENSE-2.0) # Paper Authorship -See: [here](http://spinnakermanchester.github.io/common_pages/4.0.0/LicenseAgreement.html#paper-authorship) +See: [here](https://spinnakermanchester.github.io/latest/LicenseAgreement.html#paper-authorship) # Modifications -See: [here](http://spinnakermanchester.github.io/common_pages/4.0.0/LicenseAgreement.html#modifications) +See: [here](https://spinnakermanchester.github.io/latest/LicenseAgreement.html#modifications) # Contributors @@ -19,5 +19,5 @@ For up to date information on Contributors see the graphs/contributors pages on For example [https://github.com/SpiNNakerManchester/SupportScripts/graphs/contributors](https://github.com/SpiNNakerManchester/SupportScripts/graphs/contributors) -[Combined list](http://spinnakermanchester.github.io/common_pages/4.0.0/LicenseAgreement.html#contributors) +[Combined list](https://spinnakermanchester.github.io/latest/LicenseAgreement.html#contributors) diff --git a/README.md b/README.md index 9784549..40d5217 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,19 @@ + + These are our support script we use to develop the [SpiNNaker Project](http://apt.cs.manchester.ac.uk/projects/SpiNNaker/) They are intended for our internal use only and have only been tested in as far as they work for us on our machine when we are running it. diff --git a/actions/apt-get-install/action.yml b/actions/apt-get-install/action.yml index 79f0d03..c7605ef 100644 --- a/actions/apt-get-install/action.yml +++ b/actions/apt-get-install/action.yml @@ -1,17 +1,16 @@ # Copyright (c) 2020 The University of Manchester # -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. +# 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 # -# 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 -# GNU General Public License for more details. +# https://www.apache.org/licenses/LICENSE-2.0 # -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# 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. name: "Install Debian/Ubuntu packages" description: Runs apt-get to install Debian/Ubuntu packages. diff --git a/actions/check-copyrights/action.yml b/actions/check-copyrights/action.yml index 625a115..dccd026 100644 --- a/actions/check-copyrights/action.yml +++ b/actions/check-copyrights/action.yml @@ -1,17 +1,16 @@ # Copyright (c) 2020 The University of Manchester # -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. +# 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 # -# 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 -# GNU General Public License for more details. +# https://www.apache.org/licenses/LICENSE-2.0 # -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# 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. name: Check Copyrights description: Uses Apache RAT to check for files without license declarations. @@ -24,7 +23,7 @@ inputs: description: The mirror of the Apache download site to get the library from required: false default: https://www.apache.org/dyn/closer.cgi?action=download&filename= - # Another alternative: http://www.mirrorservice.org/sites/ftp.apache.org/ + # Another alternative: https://www.mirrorservice.org/sites/ftp.apache.org/ config_file: description: "Which xml config file to use. Supported options are: diff --git a/actions/check-copyrights/download.bash b/actions/check-copyrights/download.bash index 1379ec9..e5d4910 100755 --- a/actions/check-copyrights/download.bash +++ b/actions/check-copyrights/download.bash @@ -1,5 +1,22 @@ #!/bin/bash +# Copyright (c) 2020 The University of Manchester +# +# 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 +# +# https://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. + +# This workflow will install Python dependencies, run tests, lint and rat with a variety of Python versions +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions + if [ -z "$SUPPORT_DIR" -o ! -d "$SUPPORT_DIR" ]; then echo "::error::Undetermined support directory! ($SUPPORT_DIR)" exit 1 diff --git a/actions/checkout-spinn-deps/action.yml b/actions/checkout-spinn-deps/action.yml index b4d5332..4ce2bc3 100644 --- a/actions/checkout-spinn-deps/action.yml +++ b/actions/checkout-spinn-deps/action.yml @@ -1,17 +1,16 @@ # Copyright (c) 2020 The University of Manchester # -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. +# 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 # -# 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 -# GNU General Public License for more details. +# https://www.apache.org/licenses/LICENSE-2.0 # -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# 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. name: "Check out and install SpiNNaker dependencies" description: > diff --git a/actions/checkout-spinn-deps/gitclone.sh b/actions/checkout-spinn-deps/gitclone.sh index a99a0aa..90bee83 100755 --- a/actions/checkout-spinn-deps/gitclone.sh +++ b/actions/checkout-spinn-deps/gitclone.sh @@ -1,4 +1,21 @@ #!/bin/sh +# Copyright (c) 2020 The University of Manchester +# +# 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 +# +# https://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. + +# This workflow will install Python dependencies, run tests, lint and rat with a variety of Python versions +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions + # This script works when called from a github action on PUSH not for PULL_REQUEST REPO=$1 diff --git a/actions/configure-spynnaker/action.yml b/actions/configure-spynnaker/action.yml index 9626aec..d2a388d 100644 --- a/actions/configure-spynnaker/action.yml +++ b/actions/configure-spynnaker/action.yml @@ -1,17 +1,16 @@ # Copyright (c) 2020 The University of Manchester # -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. +# 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 # -# 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 -# GNU General Public License for more details. +# https://www.apache.org/licenses/LICENSE-2.0 # -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# 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. name: "Configure sPyNNaker for Execution" description: > diff --git a/actions/configure-spynnaker/mkcfg.bash b/actions/configure-spynnaker/mkcfg.bash index 36dbfd6..05508e3 100755 --- a/actions/configure-spynnaker/mkcfg.bash +++ b/actions/configure-spynnaker/mkcfg.bash @@ -2,18 +2,17 @@ # Copyright (c) 2020 The University of Manchester # -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. +# 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 # -# 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 -# GNU General Public License for more details. +# https://www.apache.org/licenses/LICENSE-2.0 # -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# 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. cfg=~/.spynnaker.cfg diff --git a/actions/install-matplotlib/action.yml b/actions/install-matplotlib/action.yml index e5682d9..29a0c8c 100644 --- a/actions/install-matplotlib/action.yml +++ b/actions/install-matplotlib/action.yml @@ -1,17 +1,16 @@ # Copyright (c) 2021 The University of Manchester # -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. +# 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 # -# 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 -# GNU General Public License for more details. +# https://www.apache.org/licenses/LICENSE-2.0 # -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# 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. # Note that this action (especially its requirements file) may need updating # as different versions of matplotlib and python are released. diff --git a/actions/install-matplotlib/requirements.txt b/actions/install-matplotlib/requirements.txt index c44df8d..5dc8bd2 100644 --- a/actions/install-matplotlib/requirements.txt +++ b/actions/install-matplotlib/requirements.txt @@ -1,17 +1,16 @@ # Copyright (c) 2021 The University of Manchester # -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. +# 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 # -# 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 -# GNU General Public License for more details. +# https://www.apache.org/licenses/LICENSE-2.0 # -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# 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. numpy > 1.13, < 1.21; python_version == '3.7' numpy; python_version >= '3.8' diff --git a/actions/install-spinn-deps/action.yml b/actions/install-spinn-deps/action.yml index a5d4586..b1ca01a 100644 --- a/actions/install-spinn-deps/action.yml +++ b/actions/install-spinn-deps/action.yml @@ -1,17 +1,19 @@ # Copyright (c) 2020 The University of Manchester # -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. +# 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 # -# 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 -# GNU General Public License for more details. +# https://www.apache.org/licenses/LICENSE-2.0 # -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# 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. + +# Note that this action (especially its requirements file) may need updating +# as different versions of matplotlib and python are released. name: "Check out and install SpiNNaker dependencies" description: > diff --git a/actions/install-spinn-deps/gitclone.sh b/actions/install-spinn-deps/gitclone.sh index a99a0aa..a4c0786 100755 --- a/actions/install-spinn-deps/gitclone.sh +++ b/actions/install-spinn-deps/gitclone.sh @@ -1,4 +1,21 @@ #!/bin/sh +# Copyright (c) 2020 The University of Manchester +# +# 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 +# +# https://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. + +# Note that this action (especially its requirements file) may need updating +# as different versions of matplotlib and python are released. + # This script works when called from a github action on PUSH not for PULL_REQUEST REPO=$1 diff --git a/actions/pylint/action.yml b/actions/pylint/action.yml index 101e9f7..9113651 100644 --- a/actions/pylint/action.yml +++ b/actions/pylint/action.yml @@ -1,17 +1,16 @@ # Copyright (c) 2020 The University of Manchester # -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. +# 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 # -# 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 -# GNU General Public License for more details. +# https://www.apache.org/licenses/LICENSE-2.0 # -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# 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. name: "Run Pylint" description: | diff --git a/actions/pylint/mkdict.bash b/actions/pylint/mkdict.bash index 380f564..0dec3e4 100644 --- a/actions/pylint/mkdict.bash +++ b/actions/pylint/mkdict.bash @@ -1,19 +1,18 @@ #!/bin/bash -# Copyright (c) 2023 The University of Manchester +# Copyright (c) 2020 The University of Manchester # -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. +# 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 # -# 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 -# GNU General Public License for more details. +# https://www.apache.org/licenses/LICENSE-2.0 # -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# 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. dict=/tmp/dict.txt diff --git a/actions/pylint/run_pylint.bash b/actions/pylint/run_pylint.bash index b8f2674..10fde93 100644 --- a/actions/pylint/run_pylint.bash +++ b/actions/pylint/run_pylint.bash @@ -2,18 +2,17 @@ # Copyright (c) 2020 The University of Manchester # -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. +# 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 # -# 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 -# GNU General Public License for more details. +# https://www.apache.org/licenses/LICENSE-2.0 # -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# 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. dict=/tmp/dict.txt diff --git a/actions/pynn-setup/action.yml b/actions/pynn-setup/action.yml index bfc5564..1af73e4 100644 --- a/actions/pynn-setup/action.yml +++ b/actions/pynn-setup/action.yml @@ -1,17 +1,16 @@ # Copyright (c) 2020 The University of Manchester # -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. +# 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 # -# 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 -# GNU General Public License for more details. +# https://www.apache.org/licenses/LICENSE-2.0 # -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# 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. name: "Install sPyNNaker into PyNN" description: > diff --git a/actions/pytest/action.yml b/actions/pytest/action.yml index 0a27e33..ba6cf92 100644 --- a/actions/pytest/action.yml +++ b/actions/pytest/action.yml @@ -1,17 +1,16 @@ # Copyright (c) 2020 The University of Manchester # -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. +# 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 # -# 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 -# GNU General Public License for more details. +# https://www.apache.org/licenses/LICENSE-2.0 # -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# 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. name: "Run py.test" description: | diff --git a/actions/pytest/run_pytest.bash b/actions/pytest/run_pytest.bash index 70c0d79..c7f1429 100755 --- a/actions/pytest/run_pytest.bash +++ b/actions/pytest/run_pytest.bash @@ -2,18 +2,17 @@ # Copyright (c) 2020 The University of Manchester # -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. +# 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 # -# 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 -# GNU General Public License for more details. +# https://www.apache.org/licenses/LICENSE-2.0 # -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# 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. for pkg in $TEST_PKG; do cmd="pytest $pkg" diff --git a/actions/python-tools/action.yml b/actions/python-tools/action.yml index 3c4e8a2..a17c265 100644 --- a/actions/python-tools/action.yml +++ b/actions/python-tools/action.yml @@ -1,17 +1,16 @@ # Copyright (c) 2020 The University of Manchester # -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. +# 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 # -# 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 -# GNU General Public License for more details. +# https://www.apache.org/licenses/LICENSE-2.0 # -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# 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. name: "Install Advanced Python Tools" description: > diff --git a/actions/python-tools/setup-spell.bash b/actions/python-tools/setup-spell.bash index c7ba0ab..5613de6 100644 --- a/actions/python-tools/setup-spell.bash +++ b/actions/python-tools/setup-spell.bash @@ -1,19 +1,18 @@ #!/bin/bash -# Copyright (c) 2023 The University of Manchester +# Copyright (c) 2020 The University of Manchester # -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. +# 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 # -# 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 -# GNU General Public License for more details. +# https://www.apache.org/licenses/LICENSE-2.0 # -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# 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. echo "::group::Doing dependency preconfiguration" sudo apt-get update diff --git a/actions/run-install/action.yml b/actions/run-install/action.yml index 2f79924..90889a8 100644 --- a/actions/run-install/action.yml +++ b/actions/run-install/action.yml @@ -1,17 +1,16 @@ # Copyright (c) 2020 The University of Manchester # -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. +# 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 # -# 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 -# GNU General Public License for more details. +# https://www.apache.org/licenses/LICENSE-2.0 # -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# 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. name: "Install Python Package from Source" description: > diff --git a/actions/run-setup/action.yml b/actions/run-setup/action.yml index ce7ac43..f384b4f 100644 --- a/actions/run-setup/action.yml +++ b/actions/run-setup/action.yml @@ -1,17 +1,16 @@ # Copyright (c) 2020 The University of Manchester # -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. +# 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 # -# 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 -# GNU General Public License for more details. +# https://www.apache.org/licenses/LICENSE-2.0 # -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# 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. name: "Install Python Package from Source" description: > diff --git a/actions/sphinx/action.yml b/actions/sphinx/action.yml index d6038dc..35aac65 100644 --- a/actions/sphinx/action.yml +++ b/actions/sphinx/action.yml @@ -1,17 +1,16 @@ # Copyright (c) 2020 The University of Manchester # -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. +# 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 # -# 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 -# GNU General Public License for more details. +# https://www.apache.org/licenses/LICENSE-2.0 # -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# 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. name: "Run Sphinx" description: > diff --git a/actions/sphinx/ver.py b/actions/sphinx/ver.py index ace778f..c1a0076 100644 --- a/actions/sphinx/ver.py +++ b/actions/sphinx/ver.py @@ -1,17 +1,16 @@ # Copyright (c) 2020 The University of Manchester # -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. +# 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 # -# 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 -# GNU General Public License for more details. +# https://www.apache.org/licenses/LICENSE-2.0 # -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# 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. import sys print("{}.{}".format( diff --git a/actions/validate-xml/action.yml b/actions/validate-xml/action.yml index 0fcb0ae..7dffe37 100644 --- a/actions/validate-xml/action.yml +++ b/actions/validate-xml/action.yml @@ -1,17 +1,16 @@ # Copyright (c) 2020 The University of Manchester # -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. +# 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 # -# 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 -# GNU General Public License for more details. +# https://www.apache.org/licenses/LICENSE-2.0 # -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# 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. name: "Validate SpiNNaker XML" description: > diff --git a/actions/validate-xml/catalog.xml b/actions/validate-xml/catalog.xml index 942b096..5135e70 100644 --- a/actions/validate-xml/catalog.xml +++ b/actions/validate-xml/catalog.xml @@ -1,7 +1,7 @@ + "https://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd"> . +# 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. name: "Run vera++" description: Runs vera++ on C code. diff --git a/automatic-spinnaker.mk b/automatic-spinnaker.mk index eb0534f..825094d 100755 --- a/automatic-spinnaker.mk +++ b/automatic-spinnaker.mk @@ -1,3 +1,17 @@ +# Copyright (c) 2018 The University of Manchester +# +# 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 +# +# https://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. + REQUIRED_REPOS = spinnaker_tools spinn_common SpiNNFrontEndCommon \ sPyNNaker sPyNNaker8NewModelTemplate #SpiNNakerGraphFrontEnd diff --git a/automatic_make.sh b/automatic_make.sh index fd76605..5646547 100755 --- a/automatic_make.sh +++ b/automatic_make.sh @@ -1,3 +1,17 @@ +# Copyright (c) 2017 The University of Manchester +# +# 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 +# +# https://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. + # This script assumes it is run from the directory holding all github projects in parallel # bash SupportScripts/automatic_make.sh diff --git a/automatic_make_debug.sh b/automatic_make_debug.sh index 3b451c1..55f070b 100755 --- a/automatic_make_debug.sh +++ b/automatic_make_debug.sh @@ -1,3 +1,17 @@ +# Copyright (c) 2019 The University of Manchester +# +# 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 +# +# https://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. + # This script assumes it is run from the directory holding all github projects in parallel # bash SupportScripts/automatic_make_debug.sh diff --git a/check_environment_variables.sh b/check_environment_variables.sh index 4099721..2a71034 100755 --- a/check_environment_variables.sh +++ b/check_environment_variables.sh @@ -1,3 +1,17 @@ +# Copyright (c) 2017 The University of Manchester +# +# 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 +# +# https://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. + echo SPINN_DIRS echo $SPINN_DIRS ls $SPINN_DIRS diff --git a/do_release_python.sh b/do_release_python.sh index 4c07269..b256230 100755 --- a/do_release_python.sh +++ b/do_release_python.sh @@ -1,3 +1,17 @@ +# Copyright (c) 2021 The University of Manchester +# +# 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 +# +# https://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. + #!/bin/bash release() { diff --git a/docstring_checker/class_info.py b/docstring_checker/class_info.py index a86a38e..92142db 100644 --- a/docstring_checker/class_info.py +++ b/docstring_checker/class_info.py @@ -1,3 +1,17 @@ +# Copyright (c) 2017 The University of Manchester +# +# 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 +# +# https://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. + all_classes_dict = dict() STATELESS_MODULES = frozenset(['', 'Enum', 'object', 'property', 'type']) diff --git a/docstring_checker/directory_doc_checker.py b/docstring_checker/directory_doc_checker.py index de6f04f..545b427 100644 --- a/docstring_checker/directory_doc_checker.py +++ b/docstring_checker/directory_doc_checker.py @@ -1,3 +1,17 @@ +# Copyright (c) 2017 The University of Manchester +# +# 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 +# +# https://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. + import os from subprocess import call from file_doc_checker import FileDocChecker diff --git a/docstring_checker/doc_exception.py b/docstring_checker/doc_exception.py index 5a83d06..b664247 100644 --- a/docstring_checker/doc_exception.py +++ b/docstring_checker/doc_exception.py @@ -1,3 +1,17 @@ +# Copyright (c) 2017 The University of Manchester +# +# 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 +# +# https://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. + class DocException(Exception): def __init__(self, path, error, line_num): diff --git a/docstring_checker/file_doc_checker.py b/docstring_checker/file_doc_checker.py index 0913076..eb44096 100644 --- a/docstring_checker/file_doc_checker.py +++ b/docstring_checker/file_doc_checker.py @@ -1,3 +1,17 @@ +# Copyright (c) 2017 The University of Manchester +# +# 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 +# +# https://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. + from enum import Enum import re import sys diff --git a/docstring_checker/file_info.py b/docstring_checker/file_info.py index 0b9f942..13d5739 100644 --- a/docstring_checker/file_info.py +++ b/docstring_checker/file_info.py @@ -1,3 +1,17 @@ +# Copyright (c) 2017 The University of Manchester +# +# 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 +# +# https://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. + class FileInfo(object): __slots__ = ("_path", "_classes", "_errors") diff --git a/find_closest_git_version.py b/find_closest_git_version.py index adfb539..1fe1479 100644 --- a/find_closest_git_version.py +++ b/find_closest_git_version.py @@ -1,3 +1,17 @@ +# Copyright (c) 2018 The University of Manchester +# +# 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 +# +# https://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. + """ Get the "closest" git version to a given version on a given repository. If the version is semantic formatted as .. e.g. 4.0.1, diff --git a/get_jnlp.py b/get_jnlp.py index 3e1208f..a6d6d27 100644 --- a/get_jnlp.py +++ b/get_jnlp.py @@ -1,3 +1,17 @@ +# Copyright (c) 2023 The University of Manchester +# +# 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 +# +# https://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. + import sys import requests import tempfile diff --git a/gitages.sh b/gitages.sh index 8125aa3..7054ef4 100755 --- a/gitages.sh +++ b/gitages.sh @@ -1,4 +1,17 @@ #!/bin/bash +# Copyright (c) 2019 The University of Manchester +# +# 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 +# +# https://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. # For every committed file in the current git repository, report the filename, # the hash, and the date of the *first* commit to that file. This isn't diff --git a/gitcheckout.sh b/gitcheckout.sh index 4f90416..d22820f 100755 --- a/gitcheckout.sh +++ b/gitcheckout.sh @@ -1,4 +1,18 @@ #!/bin/bash +# Copyright (c) 2022 The University of Manchester +# +# 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 +# +# https://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. + # This script assumes it is run from the directory holding all github projects in parellel # sh SupportScripts/gitcheckout.sh a_branch_name diff --git a/gitclone.sh b/gitclone.sh index 9c850f9..85b5ee0 100755 --- a/gitclone.sh +++ b/gitclone.sh @@ -1,4 +1,18 @@ #!/bin/sh +# Copyright (c) 2017 The University of Manchester +# +# 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 +# +# https://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. + # This script is called from Jenkins builds REPO=$1 diff --git a/gitclone_and_install.sh b/gitclone_and_install.sh index 5ef38b8..6d58b57 100755 --- a/gitclone_and_install.sh +++ b/gitclone_and_install.sh @@ -1,5 +1,19 @@ #!/bin/sh +# Copyright (c) 2020 The University of Manchester +# +# 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 +# +# https://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. + # Oulls from github either the cureent branch or master # Then installs it. # Works for a github push action but not a pull_request diff --git a/gitpull.sh b/gitpull.sh index f980098..188458e 100755 --- a/gitpull.sh +++ b/gitpull.sh @@ -1,4 +1,19 @@ #!/bin/bash + +# Copyright (c) 2022 The University of Manchester +# +# 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 +# +# https://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. + # This script assumes it is run from the directory holding all github projects in parellel # sh SupportScripts/gitpull.sh diff --git a/gitstatus.sh b/gitstatus.sh index c99e295..b7ea487 100755 --- a/gitstatus.sh +++ b/gitstatus.sh @@ -1,4 +1,19 @@ #!/bin/bash + +# Copyright (c) 2022 The University of Manchester +# +# 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 +# +# https://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. + # This script assumes it is run from the directory holding all github projects in parellel # sh SupportScripts/gitupdate.sh a_branch_name status(){ diff --git a/gitsync.sh b/gitsync.sh index 2942b96..eb00a3b 100755 --- a/gitsync.sh +++ b/gitsync.sh @@ -1,5 +1,19 @@ #!/bin/sh +# Copyright (c) 2018 The University of Manchester +# +# 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 +# +# https://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. + function git_sync { [ -d $1/.git ] && ( echo "Synchronising $1..." diff --git a/gitupdate.sh b/gitupdate.sh index 77125d7..1098582 100755 --- a/gitupdate.sh +++ b/gitupdate.sh @@ -1,4 +1,19 @@ #!/bin/bash + +# Copyright (c) 2017 The University of Manchester +# +# 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 +# +# https://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. + # This script assumes it is run from the directory holding all github projects in parellel # sh SupportScripts/gitupdate.sh a_branch_name diff --git a/install.sh b/install.sh index 9cbd604..412fb39 100755 --- a/install.sh +++ b/install.sh @@ -1,5 +1,19 @@ #!/bin/bash +# Copyright (c) 2017 The University of Manchester +# +# 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 +# +# https://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. + yes_to_all="" check_or_install() { diff --git a/mock_test.py b/mock_test.py index 2f59161..bee46f1 100644 --- a/mock_test.py +++ b/mock_test.py @@ -1,3 +1,17 @@ +# Copyright (c) 2017 The University of Manchester +# +# 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 +# +# https://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. + import spynnaker_mock as sim sim.setup() diff --git a/nmpi/append_job_log.py b/nmpi/append_job_log.py index b89e95c..5ac1c76 100644 --- a/nmpi/append_job_log.py +++ b/nmpi/append_job_log.py @@ -1,3 +1,17 @@ +# Copyright (c) 2021 The University of Manchester +# +# 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 +# +# https://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. + """ Get the logs of a job. diff --git a/nmpi/get_job_log.py b/nmpi/get_job_log.py index d249de4..7e1d062 100644 --- a/nmpi/get_job_log.py +++ b/nmpi/get_job_log.py @@ -1,3 +1,17 @@ +# Copyright (c) 2021 The University of Manchester +# +# 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 +# +# https://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. + """ Get the logs of a job. diff --git a/nmpi/list_spinnaker_jobs.py b/nmpi/list_spinnaker_jobs.py index fb2fae4..4684e6a 100644 --- a/nmpi/list_spinnaker_jobs.py +++ b/nmpi/list_spinnaker_jobs.py @@ -1,3 +1,17 @@ +# Copyright (c) 2021 The University of Manchester +# +# 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 +# +# https://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. + """ List all jobs that are SpiNNaker related in the NMPI queue. diff --git a/nmpi/set_job_error.py b/nmpi/set_job_error.py index 9fc4b76..99086b6 100644 --- a/nmpi/set_job_error.py +++ b/nmpi/set_job_error.py @@ -1,3 +1,17 @@ +# Copyright (c) 2021 The University of Manchester +# +# 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 +# +# https://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. + """ Set a job from the queue to "Error" status. diff --git a/nmpi/set_job_submitted.py b/nmpi/set_job_submitted.py index 4425b9b..e57cb16 100644 --- a/nmpi/set_job_submitted.py +++ b/nmpi/set_job_submitted.py @@ -1,3 +1,17 @@ +# Copyright (c) 2021 The University of Manchester +# +# 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 +# +# https://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. + """ Set a job from the queue to "Error" status. diff --git a/pipinstall.sh b/pipinstall.sh index f5b4a4d..9a30996 100755 --- a/pipinstall.sh +++ b/pipinstall.sh @@ -1,5 +1,19 @@ #!/bin/sh +# Copyright (c) 2017 The University of Manchester +# +# 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 +# +# https://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. + REPO=$1 Branch=$(git ls-remote $REPO | awk ' diff --git a/rat.excludes b/rat.excludes deleted file mode 100644 index 612a8dd..0000000 --- a/rat.excludes +++ /dev/null @@ -1,19 +0,0 @@ -**/doc/build/** -**/support/** -**/dist/** -**/*.egg-info/** -**/*.pyc -**/.coverage* -**/*.dict -**/*.md -**/*.rst -**/*.template -**/*.cfg -**/.ratexclude* -**/.*project -**/.travis.yml -**/modified_src/** -**/.settings/** -**/.*cache/** -**/MANIFEST.in -**/pypi_to_import diff --git a/rat.sh b/rat.sh index bc06b0c..d21a653 100755 --- a/rat.sh +++ b/rat.sh @@ -1,11 +1,26 @@ #!/bin/bash + +# Copyright (c) 2019 The University of Manchester +# +# 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 +# +# https://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. + dir0=$(dirname $BASH_SOURCE) op="$1" shift ratver=0.13 ### SELECT MIRROR! -# apachebase="http://www.mirrorservice.org/sites/ftp.apache.org/" -apachebase="http://mirror.ox.ac.uk/sites/rsync.apache.org/" +# apachebase="https://www.mirrorservice.org/sites/ftp.apache.org/" +apachebase="https://mirror.ox.ac.uk/sites/rsync.apache.org/" raturl="${apachebase}creadur/apache-rat-${ratver}/apache-rat-${ratver}-bin.tar.gz" ant=${ANT-ant} case $op in diff --git a/run-vera.sh b/run-vera.sh index bfb81ca..bb7f08a 100755 --- a/run-vera.sh +++ b/run-vera.sh @@ -1,5 +1,19 @@ #!/bin/bash +# Copyright (c) 2017 The University of Manchester +# +# 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 +# +# https://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. + # You need to add this to your .travis.yml # # addons: diff --git a/setup.sh b/setup.sh index 64e3bb0..f35715a 100755 --- a/setup.sh +++ b/setup.sh @@ -1,3 +1,17 @@ +# Copyright (c) 2017 The University of Manchester +# +# 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 +# +# https://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. + # This script assumes it is run from the directory holding all github projects in parallel # bash SupportScripts/setup.sh a_branch_name diff --git a/setup_install.sh b/setup_install.sh index 39e7ad6..dc154e5 100755 --- a/setup_install.sh +++ b/setup_install.sh @@ -1,3 +1,17 @@ +# Copyright (c) 2018 The University of Manchester +# +# 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 +# +# https://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. + # This script assumes it is run from the directory holding all github projects in parallel # bash SupportScripts/setup_install.sh a_branch_name diff --git a/setup_sudo.sh b/setup_sudo.sh index 5edc77a..8e1fce4 100755 --- a/setup_sudo.sh +++ b/setup_sudo.sh @@ -1,3 +1,17 @@ +# Copyright (c) 2017 The University of Manchester +# +# 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 +# +# https://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. + # This script assumes it is run from the directory holding all github projects in parallel # bash SupportScripts/setup_sudo.sh a_branch_name diff --git a/spynnaker_mock.py b/spynnaker_mock.py index e3eb5f9..77c64c3 100644 --- a/spynnaker_mock.py +++ b/spynnaker_mock.py @@ -1,3 +1,17 @@ +# Copyright (c) 2017 The University of Manchester +# +# 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 +# +# https://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. + population_count = 0 projection_count = 0 is_setup = False diff --git a/travis-sphinx.sh b/travis-sphinx.sh index 4f9dcec..d8d855d 100755 --- a/travis-sphinx.sh +++ b/travis-sphinx.sh @@ -1,3 +1,17 @@ +# Copyright (c) 2017 The University of Manchester +# +# 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 +# +# https://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. + #!/bin/sh cd doc/source diff --git a/travis_blocking_stdout.py b/travis_blocking_stdout.py index 8908b2f..508b81b 100644 --- a/travis_blocking_stdout.py +++ b/travis_blocking_stdout.py @@ -1,3 +1,17 @@ +# Copyright (c) 2018 The University of Manchester +# +# 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 +# +# https://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. + import fcntl from os import O_NONBLOCK as NONBLOCK from sys import stdout, stderr diff --git a/uninstall.sh b/uninstall.sh index f984798..06f0acf 100755 --- a/uninstall.sh +++ b/uninstall.sh @@ -1,3 +1,17 @@ +# Copyright (c) 2020 The University of Manchester +# +# 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 +# +# https://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. + # This script assumes it is run from the directory holding all github projects in parallel # bash SupportScripts/uninstall.sh diff --git a/validate-xml.sh b/validate-xml.sh index aab4010..3a89f5a 100755 --- a/validate-xml.sh +++ b/validate-xml.sh @@ -1,3 +1,17 @@ +# Copyright (c) 2017 The University of Manchester +# +# 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 +# +# https://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. + #!/bin/sh xmllint=xmllint diff --git a/version/bumper.py b/version/bumper.py index 0f6392c..84c8b0b 100644 --- a/version/bumper.py +++ b/version/bumper.py @@ -1,3 +1,17 @@ +# Copyright (c) 2021 The University of Manchester +# +# 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 +# +# https://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. + import os from shutil import copyfile diff --git a/version/checker.py b/version/checker.py index 2b3925b..8ca1e37 100644 --- a/version/checker.py +++ b/version/checker.py @@ -1,3 +1,17 @@ +# Copyright (c) 2017 The University of Manchester +# +# 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 +# +# https://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. + import os path = __file__ diff --git a/version/version.py b/version/version.py index d1662bf..cd3553a 100644 --- a/version/version.py +++ b/version/version.py @@ -1,17 +1,16 @@ # Copyright (c) 2021 The University of Manchester # -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. +# 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 # -# 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 -# GNU General Public License for more details. +# https://www.apache.org/licenses/LICENSE-2.0 # -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# 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. __version__ = "1!6.0.1" __version_month__ = "May" diff --git a/version_checker.py b/version_checker.py index 54e628e..5d80246 100644 --- a/version_checker.py +++ b/version_checker.py @@ -1,3 +1,17 @@ +# Copyright (c) 2017 The University of Manchester +# +# 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 +# +# https://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. + import os import shutil diff --git a/walker.pl b/walker.pl index 6ed2f29..2612750 100644 --- a/walker.pl +++ b/walker.pl @@ -1,4 +1,19 @@ #!/usr/bin/perl + +# Copyright (c) 2023 The University of Manchester +# +# 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 +# +# https://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. + use strict; use warnings; use feature qw(say); @@ -11,15 +26,16 @@ use List::Util qw(min); my @ignore_dirs = ( + '/__pyache__/',, '/.git/', '/.idea/', '/doc/build/', - '/support/', +# '/support/', '/dist/', '\.egg-info/', - '.coverage', '\.ratexclude', 'project$', + '.pyc', '.travis.yml$', '/modified_src/', '/.settings/', @@ -27,7 +43,9 @@ '/MANIFEST.in$', '/pypi_to_import$', '/target/', - '/SpiNNaker-allocserv/src/main/frontend/node_modules/typescript/' + '/SpiNNaker-allocserv/src/main/frontend/node_modules/typescript/', + '.png$', + 'README.md', ); my $path; @@ -40,6 +58,8 @@ my $repo; my $changed; my $old_line; +my $main_repository; +my $release = 0; # if zero skips any tasks related to a release sub fix_top_line{ $old_line = $line; @@ -96,6 +116,9 @@ sub handle_top_lines{ print $out $line; $line = <$in>; if (!defined $line){ + if ($path =~ /java\-header\.txt/){ + return; + } print("No copyright line found\n"); die $path; } @@ -140,7 +163,7 @@ sub munch_existing_gnu { } check_line('You should have received a copy of the GNU General Public License'); $line = <$in>; - check_line('along with this program. If not, see .(\s+)$'); + check_line('along with this program. If not, see .(\s+)$'); } sub start_copy{ @@ -165,7 +188,13 @@ sub finish_copy{ } sub handle_gnu_file { - # say "gnu: ", $path; + if (basename($path) eq "walker.pl"){ + return; + } + if ($path =~ /check\-copyrights/){ + return; + } + say "GNU ", $path; start_copy(); handle_top_lines(); munch_existing_gnu(); @@ -175,7 +204,7 @@ sub handle_gnu_file { print $out "${prefix} you may not use this file except in compliance with the License.\n"; print $out "${prefix} You may obtain a copy of the License at\n"; print $out "${prefix}\n"; - print $out "${prefix} http://www.apache.org/licenses/LICENSE-2.0\n"; + print $out "${prefix} https://www.apache.org/licenses/LICENSE-2.0\n"; print $out "${prefix}\n"; print $out "${prefix} Unless required by applicable law or agreed to in writing, software\n"; print $out "${prefix} distributed under the License is distributed on an \"AS IS\" BASIS,\n"; @@ -185,11 +214,11 @@ sub handle_gnu_file { while( <$in> ) { print $out $_; } - $changed = 1; # Perl has bool so using 1 for value + $changed = 1; # Perl has no bool so using 1 for value finish_copy(); } -sub handle_apache_file { +sub fix_copyright_year { # say "gnu: ", $path; start_copy(); @@ -202,7 +231,7 @@ sub handle_apache_file { finish_copy(); } -sub fix_copyrights{ +sub fix_http { if (-d) { return; } @@ -214,43 +243,191 @@ sub fix_copyrights{ return; } } + if ($path =~ /\.bak$/){ + return; + } + if (basename($path) eq "walker.pl"){ + return; + } - # ignore the LICENSE.md mentions copyright but has none - if ($path =~ /LICENSE/){ + start_copy(); + my $unaccepable_http = 0; + while( <$in> ) { + $line = $_; + if ($line =~ /http\:/){ + # these have all be checked to serve https + $line =~ s/http\:\/\/(cxf\.apache\.org)(.*)(.xsd)/https\:\/\/$1$2$3/i; + $line =~ s/http\:\/\/(www\.apache\.org)/https\:\/\/$1/i; + $line =~ s/http\:\/\/(maven\.apache\.org\/xsd\/)/https\:\/\/$1/i; + $line =~ s/http\:\/\/(developer\.apple\.com)/https\:\/\/$1/i; + $line =~ s/http\:\/\/(www\.blackpawn\.com)/https\:\/\/$1/i; + $line =~ s/http\:\/\/(fasaxc\.blogspot\.co\.uk)/https\:\/\/$1/i; + $line =~ s/http\:\/\/(journal\.frontiersin\.org)/https\:\/\/$1/i; + $line =~ s/http\:\/\/(cairographics\.org)/https\:\/\/$1/i; + $line =~ s/http\:\/\/(daringfireball\.net)/https\:\/\/$1/i; + $line =~ s/http\:\/\/(dx\.doi\.org)/https\:\/\/$1/i; + $line =~ s/http\:\/\/(ieeexplore\.iee\.org)/https\:\/\/$1/i; + $line =~ s/http\:\/\/(fsf\.org)/https\:\/\/$1/i; + $line =~ s/http\:\/\/(www\.gnu\.org)/https\:\/\/$1/i; + $line =~ s/http\:\/\/(groups\.google\.com)/https\:\/\/$1/i; + $line =~ s/http\:\/\/(www\.graphviz\.org)/https\:\/\/$1/i; + $line =~ s/http\:\/\/(infocenter\.arm\.com)/https\:\/\/$1/i; + $line =~ s/http\:\/\/(www\.java\.com)/https\:\/\/$1/i; + $line =~ s/http\:\/\/(www\.johndcook\.com)/https\:\/\/$1/i; + $line =~ s/http\:\/\/(jupyter\.org)/https\:\/\/$1/i; + $line =~ s/http\:\/\/(www\.jupyter\.org)/https\:\/\/$1/i; + $line =~ s/http\:\/\/(www\.cs\.man\.ac\.uk)/https\:\/\/$1/i; + $line =~ s/http\:\/\/(\w+\.cs\.manchester\.ac\.uk)/https\:\/\/$1/i; + $line =~ s/http\:\/\/(\w*\.mathjax\.org)/https\:\/\/$1/i; + $line =~ s/http\:\/\/(www\.mcternan\.me\.uk)/https\:\/\/$1/i; + $line =~ s/http\:\/\/(\w+\.microsoft\.com)/https\:\/\/$1/i; + $line =~ s/http\:\/\/(www\.mirrorservice\.org)/https\:\/\/$1/i; + $line =~ s/http\:\/\/(mirror\.ox\.ac\.uk)/https\:\/\/$1/i; + $line =~ s/http\:\/\/(neuralensemble\.org)/https\:\/\/$1/i; + $line =~ s/http\:\/\/(www\.oasis-open\.org)/https\:\/\/$1/i; + $line =~ s/http\:\/\/(www\.opengl\.org)/https\:\/\/$1/i; + $line =~ s/http\:\/\/(www\.opensourcebrain\.org)/https\:\/\/$1/i; + $line =~ s/http\:\/\/(orcid\.org)/https\:\/\/$1/i; + $line =~ s/http\:\/\/(pytest\.org)/https\:\/\/$1/i; + $line =~ s/http\:\/\/(docs\.python\.org)/https\:\/\/$1/i; + $line =~ s/http\:\/\/(qt-project\.org)/https\:\/\/$1/i; + $line =~ s/http\:\/\/([\w\-]+\.readthedocs\.\w+)/https\:\/\/$1/i; + $line =~ s/http\:\/\/(www\.riverbankcomputing\.co\.uk)/https\:\/\/$1/i; + $line =~ s/http\:\/\/(autogen\.sf\.net)/https\:\/\/$1/i; + $line =~ s/http\:\/\/(sourceforge\.net)/https\:\/\/$1/i; + $line =~ s/http\:\/\/(autogen\.sourceforge\.net)/https\:\/\/$1/i; + $line =~ s/http\:\/\/(spinnakermanchester\.github\.io)/https\:\/\/$1/i; + $line =~ s/http\:\/\/(www\.springframework\.org)(.*)(.xsd)/https\:\/\/$1$2$3/i; + $line =~ s/http\:\/\/(sphinx-doc\.org)/https\:\/\/$1/i; + $line =~ s/http\:\/\/(www\.sphinx-doc\.org)/https\:\/\/$1/i; + $line =~ s/http\:\/\/(java\.sun\.com)(.*)(.xsd)/https\:\/\/$1$2$3/i; + $line =~ s/http\:\/\/(java\.sun\.com\/docs)/https\:\/\/$1/i; + $line =~ s/http\:\/\/(java\.sun\.com\/j2se)/https\:\/\/$1/i; + $line =~ s/http\:\/\/(www\.sussex\.ac\.uk)/https\:\/\/$1/i; + $line =~ s/http\:\/\/(www\.telegraph\.co\.uk)/https\:\/\/$1/i; + $line =~ s/http\:\/\/(en\.wikipedia\.org)/https\:\/\/$1/i; + $line =~ s/http\:\/\/(xapian\.org)/https\:\/\/$1/i; + # these need fixing as broken + $line =~ s/http\:\/\/docs\.mathjax\.org\/en\/latest\/output\.html/https\:\/\/docs\.mathjax\.org/i; + + $changed = $changed || $line ne $_; + if ($line =~ /http\:/){ + # These we can not guarantee will have https + if ($line =~ /http\:\/\/127\./){ + } elsif ($line =~ /http\:\/\/localhost/){ + } elsif ($line =~ /http\:\/\/\[/){ + #http://[your ip]:8000 + } elsif ($line =~ /http\:\/\/\{/){ + # http://{jupyter_ip}:{jupyter_port}/services/ + } elsif ($line =~ /http\:\/\/compneuro\.uwaterloo.ca/){ + # does not support https + } elsif ($line =~ /http\:\/\/jhnet\.co\.uk/){ + # does not support https + } elsif ($line =~ /http\:\/\/data\.andrewdavison.info/){ + # broken link + } elsif ($line =~ m/http\:\/\/checkstyle\.sourceforge\.net\/dtds\//){ + # uri not a url + } elsif ($line =~ m/http\:\/\/(www\.springframework\.org\/schema\/)(\w+)(\s)/){ + # uri not a url + } elsif ($line =~ m/http\:\/\/(www\.w3\.org\/2001\/XMLSchema-instance\s)/){ + # uri not a url + } elsif ($line =~ m/http\:\/\/(java\.sun\.com\/xml\/)([\/\w]+)(\s)/){ + # uri not a url + } elsif ($line =~ m/http\:\/\/(cxf\.apache\.org\/)([\/\w]+)(\s)/){ + # uri not a url + } elsif ($line =~ /\){ + fix_http(); + } + if ($path =~ /LICENSE/){ + return; + } + + # fix version files + if (basename($path) eq "_version.py"){ + if ($release) { + handle_version(); + } + } + # warning can not grep the same open file twice! open(FILE, $path) or die "Can't open: $path!\n"; if (grep{/GNU General Public License/} ){ - handle_gnu_file(); + if ($main_repository){ + handle_gnu_file(); + } else { + fix_copyright_year(); + } } # warning can not grep the same open file twice! open(FILE, $path) or die "Can't open: $path!\n"; if (grep{/Apache License/} ){ - handle_apache_file(); + fix_copyright_year(); } + } -sub handle_setup { - $path = File::Spec->catfile(getcwd(), "setup.py"); - #say $path; +sub handle_dependencies { if (not -e $path) { return; } start_copy(); - $permissions = (stat $path)[2] & 00777; $new_path = "${path}.bak"; #say "setup: ", $new_path; open $in, '<', $path or die "Can't read old file: $path"; open $out, '>', $new_path or die "Can't write new file: $new_path"; while( <$in> ) { $line = $_; - $line =~ s/GNU General Public License v3 \(GPLv3\)/Apache License 2.0/i; - $line =~ s/GNU General Public License v2 \(GPLv2\)/Apache License 2.0/i; - $line =~ s/GNU GPLv3.0/Apache License 2.0/i; + if ($main_repository) { + $line =~ s/GNU General Public License v3 \(GPLv3\)/Apache License 2.0/i; + $line =~ s/GNU General Public License v2 \(GPLv2\)/Apache License 2.0/i; + $line =~ s/GNU GPLv3.0/Apache License 2.0/i; + } + $line =~ s/( == 1!\d.\d.\d)/ == ${release}/; print $out $line; $changed = $changed || $line ne $_; } @@ -259,23 +436,33 @@ sub handle_setup { sub handle_license { $path = File::Spec->catfile(getcwd(), "LICENSE"); - unlink $path; my $s_l_path = File::Spec->catfile(dirname(getcwd()), "SupportScripts", "LICENSE"); - copy($s_l_path, $path) or die "LICENSE copy failed: $!"; - return + if ($s_l_path ne $path) { + unlink $path; + copy($s_l_path, $path) or die "LICENSE copy failed: $!"; + } - $path = File::Spec->catfile(getcwd(), "LICENSE.md"); - start_copy(); - while( <$in> ) { - $line = $_; - $line =~ s/GPL version 3 license/Apache License 2.0/i; - # http://www.gnu.org/copyleft/gpl.html - $line =~ s/http(.*)www.gnu.org(.*)html/https:\/\/www.apache.org\/licenses\/LICENSE\-2\.0/i; - $line =~ s/common_pages\/4\.0\.0/latest/; - print $out $line; - $changed = $changed || $line ne $_; - } - finish_copy(); + $path = File::Spec->catfile(getcwd(), "LICENSE_POLICY.md"); + my $old_path = File::Spec->catfile(getcwd(), "LICENSE.md"); + if (-e $old_path) { + copy($old_path, $path) or die "LICENSE copy failed: $!"; + unlink $old_path; + $repo->command('add', "LICENSE_POLICY.md"); + } + + if (-e $path) { + start_copy(); + while( <$in> ) { + $line = $_; + $line =~ s/GPL version 3 license/Apache License 2.0/i; + # http://www.gnu.org/copyleft/gpl.html + $line =~ s/http(.*)www.gnu.org(.*)html/https:\/\/www.apache.org\/licenses\/LICENSE\-2\.0/i; + $line =~ s/common_pages\/4\.0\.0/latest/; + print $out $line; + $changed = $changed || $line ne $_; + } + finish_copy(); + } } sub handle_conf_py { @@ -285,42 +472,33 @@ sub handle_conf_py { } start_copy(); + # assume only a single digit sub release + my $version = substr($release, 0, -2); while( <$in> ) { $line = $_; my $old_line = $line; $line =~ s/(\d{4})\-(\d{4})/$1\-2023/i; if ($line =~ m/^version/i){ - $changed = $changed || $line !~ m/1\!7\.0/; - print $out "version = '1!7.0'\n"; + $changed = index($line, $version) == -1; + $line = "release = \'${version}\'\n"; } elsif ($line =~ m/^release/i){ - $changed = $changed || $line !~ m/1\!7\.0\.0/; - print $out "release = '1!7.0.0'\n"; - } else { - print $out $line; + $changed = index($line, $release) == -1; + $line = "release = \'${release}\'\n"; } + print $out $line; # http://www.gnu.org/copyleft/gpl.html } finish_copy(); } sub handle_version{ - if (-d) { - return; - } - $path = $File::Find::name; - - # ignore all but version files - if ($path !~ m/\_version\.py$/){ - return; - } - - start_copy(); - $line = <$in>; + start_copy(); + $line = <$in>; if (!defined $line){ print("No __version line found\n"); die $path; } - while ($line !~ /\_version/i){ + while ($line !~ /\_\_version/i){ print $out $line; $line = <$in>; if (!defined $line){ @@ -329,14 +507,28 @@ sub handle_version{ } } - print $out "__version__ = \"1!7.0.0\"\n"; - print $out "__version_month__ = \"February\"\n"; - print $out "__version_year__ = \"2023\"\n"; - print $out "__version_day__ = \"TBD\"\n"; - print $out "__version_name__ = \"Revisionist\"\n"; + if ($line !~ m/1\!7\.0\.0/i) { + $changed = 1; + + while ($line !~ /\_\_version\_name\_\_/i){ + $line = <$in>; + if (!defined $line){ + print("No __version_name__ line found\n"); + die $path; + } + } - # assuming here there are no weird lines below + print $out "__version__ = \"1!7.0.0\"\n"; + print $out "__version_month__ = \"February\"\n"; + print $out "__version_year__ = \"2023\"\n"; + print $out "__version_day__ = \"TBD\"\n"; + print $out "__version_name__ = \"Revisionist\"\n"; + + while( <$in> ) { + print $out $_; + } + } finish_copy(); } @@ -345,17 +537,37 @@ sub check_directory{ chdir $_[0]; say "checking", getcwd(); - handle_setup(); - handle_license(); - #handle_conf_py(); - $repo = Git->repository(); - find(\&fix_copyrights, getcwd()); + if ($release){ + my $info = $repo->command('branch'); + if (index($info, $release) == -1){ + $repo->command('branch', $release); + } + $repo->command('checkout', $release); + } + + if ($release) { + $path = File::Spec->catfile(getcwd(), "setup.py"); + handle_dependencies(); + $path = File::Spec->catfile(getcwd(), "requirements.txt"); + handle_dependencies(); + $path = File::Spec->catfile(getcwd(), "requirements-test.txt"); + handle_dependencies(); + } + + if ($main_repository) { + handle_license(); + #handle_conf_py(); + } + + find(\&fix_each_file, getcwd()); - #find(\&handle_version, getcwd()); chdir $start_path; } - +#$release = "1!7.0.0"; +$main_repository = 1; +check_directory(""); +die "stop"; check_directory("../spinnaker_tools"); check_directory("../spinn_common"); check_directory("../SpiNNUtils"); @@ -377,3 +589,11 @@ sub check_directory{ check_directory("../IntegrationTests"); check_directory("../JavaSpiNNaker"); check_directory("../RemoteSpiNNaker"); +$main_repository = 0; +check_directory("../SpiNNGym"); +check_directory("../SpiNNaker_PDP2"); +check_directory("../microcircuit_model"); +check_directory("../MarkovChainMonteCarlo"); +check_directory("../sPyNNaker8Jupyter"); + + diff --git a/xml-support/catalog.xml b/xml-support/catalog.xml index 942b096..5135e70 100644 --- a/xml-support/catalog.xml +++ b/xml-support/catalog.xml @@ -1,7 +1,7 @@ + "https://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">