Skip to content

Commit 26ddd10

Browse files
authored
Add copyright notice to each non-trivial source file (#341)
* Add copyright notice to each non-trivial source file * Update copyright to 2025
1 parent df0adb7 commit 26ddd10

File tree

90 files changed

+1369
-43
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+1369
-43
lines changed

Dockerfile

+18
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
# Copyright © 2021-2025 Geospatial Research Institute Toi Hangarau
2+
# LICENSE: https://github.com/GeospatialResearch/Digital-Twins/blob/master/LICENSE
3+
#
4+
# This program is free software: you can redistribute it and/or modify
5+
# it under the terms of the GNU Affero General Public License as
6+
# published by the Free Software Foundation, either version 3 of the
7+
# License, or (at your option) any later version.
8+
#
9+
# This program is distributed in the hope that it will be useful,
10+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
# GNU Affero General Public License for more details.
13+
#
14+
# You should have received a copy of the GNU Affero General Public License
15+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
16+
17+
# Main Dockerfile for setting up services defined in docker-compose.yml.
18+
119
FROM continuumio/miniconda3:23.10.0-1 AS build
220
# Miniconda layer for building conda environment
321
WORKDIR /app

LICENSE

-42
Original file line numberDiff line numberDiff line change
@@ -617,45 +617,3 @@ Program, unless a warranty or assumption of liability accompanies a
617617
copy of the Program in return for a fee.
618618

619619
END OF TERMS AND CONDITIONS
620-
621-
How to Apply These Terms to Your New Programs
622-
623-
If you develop a new program, and you want it to be of the greatest
624-
possible use to the public, the best way to achieve this is to make it
625-
free software which everyone can redistribute and change under these terms.
626-
627-
To do so, attach the following notices to the program. It is safest
628-
to attach them to the start of each source file to most effectively
629-
state the exclusion of warranty; and each file should have at least
630-
the "copyright" line and a pointer to where the full notice is found.
631-
632-
<one line to give the program's name and a brief idea of what it does.>
633-
Copyright (C) <year> <name of author>
634-
635-
This program is free software: you can redistribute it and/or modify
636-
it under the terms of the GNU Affero General Public License as published by
637-
the Free Software Foundation, either version 3 of the License, or
638-
(at your option) any later version.
639-
640-
This program is distributed in the hope that it will be useful,
641-
but WITHOUT ANY WARRANTY; without even the implied warranty of
642-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
643-
GNU Affero General Public License for more details.
644-
645-
You should have received a copy of the GNU Affero General Public License
646-
along with this program. If not, see <https://www.gnu.org/licenses/>.
647-
648-
Also add information on how to contact you by electronic and paper mail.
649-
650-
If your software can interact with users remotely through a computer
651-
network, you should also make sure that it provides a way for users to
652-
get its source. For example, if your program is a web application, its
653-
interface could display a "Source" link that leads users to an archive
654-
of the code. There are many ways you could offer source, and different
655-
solutions will be better for different programs; see section 13 for the
656-
specific requirements.
657-
658-
You should also get your employer (if you work as a programmer) or school,
659-
if any, to sign a "copyright disclaimer" for the program, if necessary.
660-
For more information on this, and how to apply and follow the GNU AGPL, see
661-
<https://www.gnu.org/licenses/>.

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
Copyright © 2021-2025 Geospatial Research Institute Toi Hangarau
12
# Flood Resilience Digital Twin (FReDT)
23
![image](https://github.com/GeospatialResearch/Digital-Twins/assets/41398636/b7b9da6c-3895-46f5-99dc-4094003b2946)
34

api_calls.py

+16
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
# Copyright © 2021-2025 Geospatial Research Institute Toi Hangarau
2+
# LICENSE: https://github.com/GeospatialResearch/Digital-Twins/blob/master/LICENSE
3+
#
4+
# This program is free software: you can redistribute it and/or modify
5+
# it under the terms of the GNU Affero General Public License as
6+
# published by the Free Software Foundation, either version 3 of the
7+
# License, or (at your option) any later version.
8+
#
9+
# This program is distributed in the hope that it will be useful,
10+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
# GNU Affero General Public License for more details.
13+
#
14+
# You should have received a copy of the GNU Affero General Public License
15+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
16+
117
import json
218
import time
319

autodoc/sphinx/conf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
# -- Project information -----------------------------------------------------
2121

2222
project = 'Flood Resilience Digital Twin (FReDT)'
23-
copyright = '2023, Geospatial Research Institute Toi Hangarau'
23+
copyright = '2021-2025, Geospatial Research Institute Toi Hangarau'
2424
author = 'Geospatial Research Institute Toi Hangarau'
2525

2626
# The full version, including alpha/beta/rc tags

build_docker.sh

+16
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
#!/usr/bin/env bash
22

3+
# Copyright © 2021-2025 Geospatial Research Institute Toi Hangarau
4+
# LICENSE: https://github.com/GeospatialResearch/Digital-Twins/blob/master/LICENSE
5+
#
6+
# This program is free software: you can redistribute it and/or modify
7+
# it under the terms of the GNU Affero General Public License as
8+
# published by the Free Software Foundation, either version 3 of the
9+
# License, or (at your option) any later version.
10+
#
11+
# This program is distributed in the hope that it will be useful,
12+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
# GNU Affero General Public License for more details.
15+
#
16+
# You should have received a copy of the GNU Affero General Public License
17+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
18+
319
## Sets any necessary pre-requisite folders and builds/pulls docker images.
420
## Uses the local repository as priority over published docker images.
521

docker-compose-dev.yml

+16
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
# Copyright © 2021-2025 Geospatial Research Institute Toi Hangarau
2+
# LICENSE: https://github.com/GeospatialResearch/Digital-Twins/blob/master/LICENSE
3+
#
4+
# This program is free software: you can redistribute it and/or modify
5+
# it under the terms of the GNU Affero General Public License as
6+
# published by the Free Software Foundation, either version 3 of the
7+
# License, or (at your option) any later version.
8+
#
9+
# This program is distributed in the hope that it will be useful,
10+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
# GNU Affero General Public License for more details.
13+
#
14+
# You should have received a copy of the GNU Affero General Public License
15+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
16+
117
# Definitions of services using local data_directory bind mounts for development use only.
218
# Merges with the primary `docker-compose.yml`
319
# Use with `docker compose -f docker-compose.yml docker-compose-dev.yml`

docker-compose.yml

+18
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
# Copyright © 2021-2025 Geospatial Research Institute Toi Hangarau
2+
# LICENSE: https://github.com/GeospatialResearch/Digital-Twins/blob/master/LICENSE
3+
#
4+
# This program is free software: you can redistribute it and/or modify
5+
# it under the terms of the GNU Affero General Public License as
6+
# published by the Free Software Foundation, either version 3 of the
7+
# License, or (at your option) any later version.
8+
#
9+
# This program is distributed in the hope that it will be useful,
10+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
# GNU Affero General Public License for more details.
13+
#
14+
# You should have received a copy of the GNU Affero General Public License
15+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
16+
17+
# Defines services, their images, and interactions between services.
18+
119
volumes:
220
postgres_db_vol:
321
stored_data:

environment.yml

+16
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
# Copyright © 2021-2025 Geospatial Research Institute Toi Hangarau
2+
# LICENSE: https://github.com/GeospatialResearch/Digital-Twins/blob/master/LICENSE
3+
#
4+
# This program is free software: you can redistribute it and/or modify
5+
# it under the terms of the GNU Affero General Public License as
6+
# published by the Free Software Foundation, either version 3 of the
7+
# License, or (at your option) any later version.
8+
#
9+
# This program is distributed in the hope that it will be useful,
10+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
# GNU Affero General Public License for more details.
13+
#
14+
# You should have received a copy of the GNU Affero General Public License
15+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
16+
117
# YML file for setting up the Digital-Twin Python environment
218
# Locked down most package versions to reduce docker build to,e
319

src/__init__.py

+16
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,18 @@
11
# -*- coding: utf-8 -*-
2+
# Copyright © 2021-2025 Geospatial Research Institute Toi Hangarau
3+
# LICENSE: https://github.com/GeospatialResearch/Digital-Twins/blob/master/LICENSE
4+
#
5+
# This program is free software: you can redistribute it and/or modify
6+
# it under the terms of the GNU Affero General Public License as
7+
# published by the Free Software Foundation, either version 3 of the
8+
# License, or (at your option) any later version.
9+
#
10+
# This program is distributed in the hope that it will be useful,
11+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
# GNU Affero General Public License for more details.
14+
#
15+
# You should have received a copy of the GNU Affero General Public License
16+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
17+
218
__version__ = "0.1.0"

src/app.py

+16
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
# Copyright © 2021-2025 Geospatial Research Institute Toi Hangarau
2+
# LICENSE: https://github.com/GeospatialResearch/Digital-Twins/blob/master/LICENSE
3+
#
4+
# This program is free software: you can redistribute it and/or modify
5+
# it under the terms of the GNU Affero General Public License as
6+
# published by the Free Software Foundation, either version 3 of the
7+
# License, or (at your option) any later version.
8+
#
9+
# This program is distributed in the hope that it will be useful,
10+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
# GNU Affero General Public License for more details.
13+
#
14+
# You should have received a copy of the GNU Affero General Public License
15+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
16+
117
"""
218
The main web application that serves the Digital Twin to the web through a Rest API.
319
"""

src/config.py

+16
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
# Copyright © 2021-2025 Geospatial Research Institute Toi Hangarau
2+
# LICENSE: https://github.com/GeospatialResearch/Digital-Twins/blob/master/LICENSE
3+
#
4+
# This program is free software: you can redistribute it and/or modify
5+
# it under the terms of the GNU Affero General Public License as
6+
# published by the Free Software Foundation, either version 3 of the
7+
# License, or (at your option) any later version.
8+
#
9+
# This program is distributed in the hope that it will be useful,
10+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
# GNU Affero General Public License for more details.
13+
#
14+
# You should have received a copy of the GNU Affero General Public License
15+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
16+
117
import os
218
from typing import Type, TypeVar
319

src/digitaltwin/__init__.py

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Copyright © 2021-2025 Geospatial Research Institute Toi Hangarau
2+
# LICENSE: https://github.com/GeospatialResearch/Digital-Twins/blob/master/LICENSE
3+
#
4+
# This program is free software: you can redistribute it and/or modify
5+
# it under the terms of the GNU Affero General Public License as
6+
# published by the Free Software Foundation, either version 3 of the
7+
# License, or (at your option) any later version.
8+
#
9+
# This program is distributed in the hope that it will be useful,
10+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
# GNU Affero General Public License for more details.
13+
#
14+
# You should have received a copy of the GNU Affero General Public License
15+
# along with this program. If not, see <http://www.gnu.org/licenses/>.

src/digitaltwin/data_to_db.py

+16
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,20 @@
11
# -*- coding: utf-8 -*-
2+
# Copyright © 2021-2025 Geospatial Research Institute Toi Hangarau
3+
# LICENSE: https://github.com/GeospatialResearch/Digital-Twins/blob/master/LICENSE
4+
#
5+
# This program is free software: you can redistribute it and/or modify
6+
# it under the terms of the GNU Affero General Public License as
7+
# published by the Free Software Foundation, either version 3 of the
8+
# License, or (at your option) any later version.
9+
#
10+
# This program is distributed in the hope that it will be useful,
11+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
# GNU Affero General Public License for more details.
14+
#
15+
# You should have received a copy of the GNU Affero General Public License
16+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
17+
218
"""
319
This script fetches geospatial data from various providers using the 'geoapis' library and stores it in the database.
420
It also saves user log information in the database.

src/digitaltwin/get_data_using_geoapis.py

+16
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,20 @@
11
# -*- coding: utf-8 -*-
2+
# Copyright © 2021-2025 Geospatial Research Institute Toi Hangarau
3+
# LICENSE: https://github.com/GeospatialResearch/Digital-Twins/blob/master/LICENSE
4+
#
5+
# This program is free software: you can redistribute it and/or modify
6+
# it under the terms of the GNU Affero General Public License as
7+
# published by the Free Software Foundation, either version 3 of the
8+
# License, or (at your option) any later version.
9+
#
10+
# This program is distributed in the hope that it will be useful,
11+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
# GNU Affero General Public License for more details.
14+
#
15+
# You should have received a copy of the GNU Affero General Public License
16+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
17+
218
"""
319
This script provides functions to retrieve vector data from multiple providers, including StatsNZ, LINZ,
420
LRIS, and MFE, using the 'geoapis' library. To access data from each provider, you'll need to set an

src/digitaltwin/instructions_records_to_db.py

+16
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,20 @@
11
# -*- coding: utf-8 -*-
2+
# Copyright © 2021-2025 Geospatial Research Institute Toi Hangarau
3+
# LICENSE: https://github.com/GeospatialResearch/Digital-Twins/blob/master/LICENSE
4+
#
5+
# This program is free software: you can redistribute it and/or modify
6+
# it under the terms of the GNU Affero General Public License as
7+
# published by the Free Software Foundation, either version 3 of the
8+
# License, or (at your option) any later version.
9+
#
10+
# This program is distributed in the hope that it will be useful,
11+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
# GNU Affero General Public License for more details.
14+
#
15+
# You should have received a copy of the GNU Affero General Public License
16+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
17+
218
"""
319
This script processes 'static_boundary_instructions' records, validates URLs and instruction fields, and stores them in
420
the 'geospatial_layers' table of the database.

src/digitaltwin/retrieve_static_boundaries.py

+16
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,20 @@
11
# -*- coding: utf-8 -*-
2+
# Copyright © 2021-2025 Geospatial Research Institute Toi Hangarau
3+
# LICENSE: https://github.com/GeospatialResearch/Digital-Twins/blob/master/LICENSE
4+
#
5+
# This program is free software: you can redistribute it and/or modify
6+
# it under the terms of the GNU Affero General Public License as
7+
# published by the Free Software Foundation, either version 3 of the
8+
# License, or (at your option) any later version.
9+
#
10+
# This program is distributed in the hope that it will be useful,
11+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
# GNU Affero General Public License for more details.
14+
#
15+
# You should have received a copy of the GNU Affero General Public License
16+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
17+
218
"""
319
This script automates the retrieval and storage of geospatial data from various providers using the 'geoapis' library.
420
It populates the 'geospatial_layers' table in the database and stores user log information for tracking and reference.

src/digitaltwin/setup_environment.py

+16
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,20 @@
11
# -*- coding: utf-8 -*-
2+
# Copyright © 2021-2025 Geospatial Research Institute Toi Hangarau
3+
# LICENSE: https://github.com/GeospatialResearch/Digital-Twins/blob/master/LICENSE
4+
#
5+
# This program is free software: you can redistribute it and/or modify
6+
# it under the terms of the GNU Affero General Public License as
7+
# published by the Free Software Foundation, either version 3 of the
8+
# License, or (at your option) any later version.
9+
#
10+
# This program is distributed in the hope that it will be useful,
11+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
# GNU Affero General Public License for more details.
14+
#
15+
# You should have received a copy of the GNU Affero General Public License
16+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
17+
218
"""
319
This script provides functions to set up the database connection using SQLAlchemy and environment variables,
420
as well as to create an SQLAlchemy engine for database operations.

src/digitaltwin/tables.py

+16
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,20 @@
11
# -*- coding: utf-8 -*-
2+
# Copyright © 2021-2025 Geospatial Research Institute Toi Hangarau
3+
# LICENSE: https://github.com/GeospatialResearch/Digital-Twins/blob/master/LICENSE
4+
#
5+
# This program is free software: you can redistribute it and/or modify
6+
# it under the terms of the GNU Affero General Public License as
7+
# published by the Free Software Foundation, either version 3 of the
8+
# License, or (at your option) any later version.
9+
#
10+
# This program is distributed in the hope that it will be useful,
11+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
# GNU Affero General Public License for more details.
14+
#
15+
# You should have received a copy of the GNU Affero General Public License
16+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
17+
218
"""
319
This script contains SQLAlchemy models for various database tables and utility functions for database operations.
420
"""

0 commit comments

Comments
 (0)