Skip to content

Commit

Permalink
chore: Updated license from GPLv3 to Apache 2.0 (#111)
Browse files Browse the repository at this point in the history
* chore: Updated licenses

* docs: Fixed references in READMEs

* chore: Added copyright & license notice

* test: Added header check test

* style: Fixed lint

* test: Fixed header test
  • Loading branch information
frgfm authored Feb 19, 2021
1 parent 06322ed commit a139a8c
Show file tree
Hide file tree
Showing 49 changed files with 672 additions and 1,351 deletions.
875 changes: 201 additions & 674 deletions LICENSE

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Pyronear API

[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](LICENSE) [![Codacy Badge](https://app.codacy.com/project/badge/Grade/3bea1a63e4aa44258cfd08831d713478)](https://www.codacy.com/gh/pyronear/pyro-api/dashboard?utm_source=github.com&utm_medium=referral&utm_content=pyronear/pyro-api&utm_campaign=Badge_Grade)![Build Status](https://github.com/pyronear/pyro-api/workflows/fastapi-project/badge.svg) [![codecov](https://codecov.io/gh/pyronear/pyro-api/branch/master/graph/badge.svg)](https://codecov.io/gh/pyronear/pyro-api) [![Docs](https://img.shields.io/badge/docs-available-blue.svg)](http://pyronear-api.herokuapp.com/redoc)
[![License: Apache 2.0](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE) [![Codacy Badge](https://app.codacy.com/project/badge/Grade/3bea1a63e4aa44258cfd08831d713478)](https://www.codacy.com/gh/pyronear/pyro-api/dashboard?utm_source=github.com&utm_medium=referral&utm_content=pyronear/pyro-api&utm_campaign=Badge_Grade)![Build Status](https://github.com/pyronear/pyro-api/workflows/fastapi-project/badge.svg) [![codecov](https://codecov.io/gh/pyronear/pyro-api/branch/master/graph/badge.svg)](https://codecov.io/gh/pyronear/pyro-api) [![Docs](https://img.shields.io/badge/docs-available-blue.svg)](http://pyronear-api.herokuapp.com/redoc)

The building blocks of our wildfire detection & monitoring API.

Expand Down Expand Up @@ -74,4 +74,4 @@ Please refer to `CONTRIBUTING` if you wish to contribute to this project.

## License

Distributed under the GPLv3 License. See `LICENSE` for more information.
Distributed under the Apache 2.0 License. See `LICENSE` for more information.
875 changes: 201 additions & 674 deletions client/LICENSE

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ api_client.update_my_location(lat=1, lon=2, pitch=3)

## License

Distributed under the GPLv3 License. See `LICENSE` for more information.
Distributed under the Apache 2.0 License. See `LICENSE` for more information.



Expand Down
5 changes: 5 additions & 0 deletions client/docs/source/conf.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Copyright (C) 2021, Pyronear contributors.

# This program is licensed under the Apache License version 2.
# See LICENSE or go to <https://www.apache.org/licenses/LICENSE-2.0.txt> for full license details.

# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
Expand Down
5 changes: 5 additions & 0 deletions client/pyroclient/client.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Copyright (C) 2021, Pyronear contributors.

# This program is licensed under the Apache License version 2.
# See LICENSE or go to <https://www.apache.org/licenses/LICENSE-2.0.txt> for full license details.

import requests
from requests.models import Response
import logging
Expand Down
5 changes: 5 additions & 0 deletions client/pyroclient/exceptions.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Copyright (C) 2021, Pyronear contributors.

# This program is licensed under the Apache License version 2.
# See LICENSE or go to <https://www.apache.org/licenses/LICENSE-2.0.txt> for full license details.

class HTTPRequestException(Exception):

def __init__(self, status_code: int, response_message: str = None) -> None:
Expand Down
5 changes: 5 additions & 0 deletions client/setup.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Copyright (C) 2021, Pyronear contributors.

# This program is licensed under the Apache License version 2.
# See LICENSE or go to <https://www.apache.org/licenses/LICENSE-2.0.txt> for full license details.

#!usr/bin/python

"Package installation setup"
Expand Down
5 changes: 5 additions & 0 deletions client/test/test_client.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Copyright (C) 2021, Pyronear contributors.

# This program is licensed under the Apache License version 2.
# See LICENSE or go to <https://www.apache.org/licenses/LICENSE-2.0.txt> for full license details.

import unittest
from requests import ConnectionError

Expand Down
5 changes: 5 additions & 0 deletions scripts/api_e2e.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Copyright (C) 2021, Pyronear contributors.

# This program is licensed under the Apache License version 2.
# See LICENSE or go to <https://www.apache.org/licenses/LICENSE-2.0.txt> for full license details.

import requests
import argparse
import time
Expand Down
5 changes: 5 additions & 0 deletions src/app/api/crud/accesses.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Copyright (C) 2021, Pyronear contributors.

# This program is licensed under the Apache License version 2.
# See LICENSE or go to <https://www.apache.org/licenses/LICENSE-2.0.txt> for full license details.

from typing import Dict, Any, Union, Type
from sqlalchemy import Table
from fastapi import HTTPException
Expand Down
5 changes: 5 additions & 0 deletions src/app/api/crud/alerts.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Copyright (C) 2021, Pyronear contributors.

# This program is licensed under the Apache License version 2.
# See LICENSE or go to <https://www.apache.org/licenses/LICENSE-2.0.txt> for full license details.

from typing import List, Dict, Mapping, Any
from sqlalchemy import Table

Expand Down
5 changes: 5 additions & 0 deletions src/app/api/crud/base.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Copyright (C) 2021, Pyronear contributors.

# This program is licensed under the Apache License version 2.
# See LICENSE or go to <https://www.apache.org/licenses/LICENSE-2.0.txt> for full license details.

from typing import Optional, Any, List, Dict, Mapping
from sqlalchemy import Table
from pydantic import BaseModel
Expand Down
5 changes: 5 additions & 0 deletions src/app/api/deps.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Copyright (C) 2021, Pyronear contributors.

# This program is licensed under the Apache License version 2.
# See LICENSE or go to <https://www.apache.org/licenses/LICENSE-2.0.txt> for full license details.

from fastapi import Depends, HTTPException, status
from fastapi.security import OAuth2PasswordBearer, SecurityScopes
from jose import JWTError, jwt
Expand Down
5 changes: 5 additions & 0 deletions src/app/api/routes/accesses.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Copyright (C) 2021, Pyronear contributors.

# This program is licensed under the Apache License version 2.
# See LICENSE or go to <https://www.apache.org/licenses/LICENSE-2.0.txt> for full license details.

from typing import List
from fastapi import APIRouter, Path
from app.api import crud
Expand Down
5 changes: 5 additions & 0 deletions src/app/api/routes/alerts.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Copyright (C) 2021, Pyronear contributors.

# This program is licensed under the Apache License version 2.
# See LICENSE or go to <https://www.apache.org/licenses/LICENSE-2.0.txt> for full license details.

from typing import List
from fastapi import APIRouter, Path, Security, HTTPException
from app.api import crud
Expand Down
5 changes: 5 additions & 0 deletions src/app/api/routes/devices.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Copyright (C) 2021, Pyronear contributors.

# This program is licensed under the Apache License version 2.
# See LICENSE or go to <https://www.apache.org/licenses/LICENSE-2.0.txt> for full license details.

from typing import List
from datetime import datetime
from fastapi import APIRouter, Path, Security, HTTPException
Expand Down
5 changes: 5 additions & 0 deletions src/app/api/routes/events.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Copyright (C) 2021, Pyronear contributors.

# This program is licensed under the Apache License version 2.
# See LICENSE or go to <https://www.apache.org/licenses/LICENSE-2.0.txt> for full license details.

from typing import List
from fastapi import APIRouter, Path, Security
from app.api import crud
Expand Down
5 changes: 5 additions & 0 deletions src/app/api/routes/installations.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Copyright (C) 2021, Pyronear contributors.

# This program is licensed under the Apache License version 2.
# See LICENSE or go to <https://www.apache.org/licenses/LICENSE-2.0.txt> for full license details.

from typing import List
from fastapi import APIRouter, Path, Security
from sqlalchemy import and_, or_
Expand Down
5 changes: 5 additions & 0 deletions src/app/api/routes/login.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Copyright (C) 2021, Pyronear contributors.

# This program is licensed under the Apache License version 2.
# See LICENSE or go to <https://www.apache.org/licenses/LICENSE-2.0.txt> for full license details.

from datetime import timedelta
from fastapi import APIRouter, Depends, HTTPException
from fastapi.security import OAuth2PasswordRequestForm
Expand Down
5 changes: 5 additions & 0 deletions src/app/api/routes/media.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Copyright (C) 2021, Pyronear contributors.

# This program is licensed under the Apache License version 2.
# See LICENSE or go to <https://www.apache.org/licenses/LICENSE-2.0.txt> for full license details.

from fastapi import APIRouter, Path, Security, File, UploadFile, HTTPException, BackgroundTasks
from typing import List, Optional
from datetime import datetime
Expand Down
5 changes: 5 additions & 0 deletions src/app/api/routes/sites.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Copyright (C) 2021, Pyronear contributors.

# This program is licensed under the Apache License version 2.
# See LICENSE or go to <https://www.apache.org/licenses/LICENSE-2.0.txt> for full license details.

from typing import List
from fastapi import APIRouter, Path, Security
from app.api import crud
Expand Down
5 changes: 5 additions & 0 deletions src/app/api/routes/users.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Copyright (C) 2021, Pyronear contributors.

# This program is licensed under the Apache License version 2.
# See LICENSE or go to <https://www.apache.org/licenses/LICENSE-2.0.txt> for full license details.

from typing import List

from fastapi import APIRouter, Path, Security
Expand Down
5 changes: 5 additions & 0 deletions src/app/api/schemas.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Copyright (C) 2021, Pyronear contributors.

# This program is licensed under the Apache License version 2.
# See LICENSE or go to <https://www.apache.org/licenses/LICENSE-2.0.txt> for full license details.

from typing import List, Optional
from datetime import datetime
from pydantic import BaseModel, Field, validator
Expand Down
5 changes: 5 additions & 0 deletions src/app/api/security.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Copyright (C) 2021, Pyronear contributors.

# This program is licensed under the Apache License version 2.
# See LICENSE or go to <https://www.apache.org/licenses/LICENSE-2.0.txt> for full license details.

from datetime import datetime, timedelta
from typing import Optional, Dict, Any

Expand Down
5 changes: 5 additions & 0 deletions src/app/config.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Copyright (C) 2021, Pyronear contributors.

# This program is licensed under the Apache License version 2.
# See LICENSE or go to <https://www.apache.org/licenses/LICENSE-2.0.txt> for full license details.

import os
import secrets
from typing import Optional
Expand Down
5 changes: 5 additions & 0 deletions src/app/db/init_db.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Copyright (C) 2021, Pyronear contributors.

# This program is licensed under the Apache License version 2.
# See LICENSE or go to <https://www.apache.org/licenses/LICENSE-2.0.txt> for full license details.

from app import config as cfg
from app.api import crud
from app.db import accesses, users
Expand Down
5 changes: 5 additions & 0 deletions src/app/db/session.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Copyright (C) 2021, Pyronear contributors.

# This program is licensed under the Apache License version 2.
# See LICENSE or go to <https://www.apache.org/licenses/LICENSE-2.0.txt> for full license details.

from sqlalchemy import create_engine
from databases import Database

Expand Down
5 changes: 5 additions & 0 deletions src/app/db/tables.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Copyright (C) 2021, Pyronear contributors.

# This program is licensed under the Apache License version 2.
# See LICENSE or go to <https://www.apache.org/licenses/LICENSE-2.0.txt> for full license details.

import enum
from sqlalchemy import (Column, DateTime, Integer, Float, String, Table, Enum, Boolean,
ForeignKey, MetaData)
Expand Down
5 changes: 5 additions & 0 deletions src/app/main.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Copyright (C) 2021, Pyronear contributors.

# This program is licensed under the Apache License version 2.
# See LICENSE or go to <https://www.apache.org/licenses/LICENSE-2.0.txt> for full license details.

import time
import sentry_sdk
from fastapi import FastAPI, Request
Expand Down
5 changes: 5 additions & 0 deletions src/app/services/bucket/qarnot.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Copyright (C) 2021, Pyronear contributors.

# This program is licensed under the Apache License version 2.
# See LICENSE or go to <https://www.apache.org/licenses/LICENSE-2.0.txt> for full license details.

import os
import logging
from typing import List, Optional
Expand Down
5 changes: 5 additions & 0 deletions src/app/services/services.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Copyright (C) 2021, Pyronear contributors.

# This program is licensed under the Apache License version 2.
# See LICENSE or go to <https://www.apache.org/licenses/LICENSE-2.0.txt> for full license details.

from app.services.bucket import QarnotBucket


Expand Down
5 changes: 5 additions & 0 deletions src/app/services/utils.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Copyright (C) 2021, Pyronear contributors.

# This program is licensed under the Apache License version 2.
# See LICENSE or go to <https://www.apache.org/licenses/LICENSE-2.0.txt> for full license details.

from typing import Optional

import app.config as cfg
Expand Down
5 changes: 5 additions & 0 deletions src/tests/conf_test_db.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Copyright (C) 2021, Pyronear contributors.

# This program is licensed under the Apache License version 2.
# See LICENSE or go to <https://www.apache.org/licenses/LICENSE-2.0.txt> for full license details.

import contextlib
from typing import List, Dict, Any, Mapping
from sqlalchemy import create_engine, Table
Expand Down
5 changes: 5 additions & 0 deletions src/tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Copyright (C) 2021, Pyronear contributors.

# This program is licensed under the Apache License version 2.
# See LICENSE or go to <https://www.apache.org/licenses/LICENSE-2.0.txt> for full license details.

import pytest
from starlette.testclient import TestClient
from datetime import datetime
Expand Down
5 changes: 5 additions & 0 deletions src/tests/routes/test_accesses.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Copyright (C) 2021, Pyronear contributors.

# This program is licensed under the Apache License version 2.
# See LICENSE or go to <https://www.apache.org/licenses/LICENSE-2.0.txt> for full license details.

import pytest

from app import db
Expand Down
5 changes: 5 additions & 0 deletions src/tests/routes/test_alerts.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Copyright (C) 2021, Pyronear contributors.

# This program is licensed under the Apache License version 2.
# See LICENSE or go to <https://www.apache.org/licenses/LICENSE-2.0.txt> for full license details.

import json
import pytest
from copy import deepcopy
Expand Down
5 changes: 5 additions & 0 deletions src/tests/routes/test_devices.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Copyright (C) 2021, Pyronear contributors.

# This program is licensed under the Apache License version 2.
# See LICENSE or go to <https://www.apache.org/licenses/LICENSE-2.0.txt> for full license details.

import json
import pytest
from datetime import datetime
Expand Down
5 changes: 5 additions & 0 deletions src/tests/routes/test_events.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Copyright (C) 2021, Pyronear contributors.

# This program is licensed under the Apache License version 2.
# See LICENSE or go to <https://www.apache.org/licenses/LICENSE-2.0.txt> for full license details.

import json
import pytest
from datetime import datetime
Expand Down
5 changes: 5 additions & 0 deletions src/tests/routes/test_installations.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Copyright (C) 2021, Pyronear contributors.

# This program is licensed under the Apache License version 2.
# See LICENSE or go to <https://www.apache.org/licenses/LICENSE-2.0.txt> for full license details.

import json
import pytest
from datetime import datetime
Expand Down
5 changes: 5 additions & 0 deletions src/tests/routes/test_login.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Copyright (C) 2021, Pyronear contributors.

# This program is licensed under the Apache License version 2.
# See LICENSE or go to <https://www.apache.org/licenses/LICENSE-2.0.txt> for full license details.

import pytest

from app import db
Expand Down
5 changes: 5 additions & 0 deletions src/tests/routes/test_media.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Copyright (C) 2021, Pyronear contributors.

# This program is licensed under the Apache License version 2.
# See LICENSE or go to <https://www.apache.org/licenses/LICENSE-2.0.txt> for full license details.

import json
import requests
import pytest
Expand Down
5 changes: 5 additions & 0 deletions src/tests/routes/test_sites.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Copyright (C) 2021, Pyronear contributors.

# This program is licensed under the Apache License version 2.
# See LICENSE or go to <https://www.apache.org/licenses/LICENSE-2.0.txt> for full license details.

import json
import pytest
from datetime import datetime
Expand Down
5 changes: 5 additions & 0 deletions src/tests/routes/test_users.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Copyright (C) 2021, Pyronear contributors.

# This program is licensed under the Apache License version 2.
# See LICENSE or go to <https://www.apache.org/licenses/LICENSE-2.0.txt> for full license details.

import json
import pytest
from datetime import datetime
Expand Down
5 changes: 5 additions & 0 deletions src/tests/test_deps.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Copyright (C) 2021, Pyronear contributors.

# This program is licensed under the Apache License version 2.
# See LICENSE or go to <https://www.apache.org/licenses/LICENSE-2.0.txt> for full license details.

import pytest
from app import db
from app.api import crud, deps, security
Expand Down
Loading

0 comments on commit a139a8c

Please sign in to comment.