diff --git a/INSTALL.rst b/INSTALL.rst index cb4b9ff..5de8ceb 100644 --- a/INSTALL.rst +++ b/INSTALL.rst @@ -1,6 +1,6 @@ .. This file is part of Brazil Data Cube BDC-Collectors. - Copyright (C) 2022 INPE. + Copyright (C) 2023 INPE. 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 @@ -66,9 +66,9 @@ Install in development mode:: If you want to create a new *Python Virtual Environment*, please, follow this instruction: - *1.* Create a new virtual environment linked to Python 3.8:: + *1.* Create a new virtual environment linked to Python 3.11:: - python3.8 -m venv venv + python3.11 -m venv venv **2.** Activate the new environment:: @@ -90,12 +90,7 @@ Build the Documentation You can generate the documentation based on Sphinx with the following command:: - python setup.py build_sphinx - - -The above command will generate the documentation in HTML and it will place it under:: - - doc/sphinx/_build/html/ + sphinx-build docs/sphinx docs/sphinx/_build/html The above command will generate the documentation in HTML and it will place it under:: diff --git a/USAGE.rst b/USAGE.rst index 5266651..cd7089d 100644 --- a/USAGE.rst +++ b/USAGE.rst @@ -1,6 +1,6 @@ .. This file is part of Brazil Data Cube BDC-Collectors. - Copyright (C) 2022 INPE. + Copyright (C) 2023 INPE. 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 @@ -47,6 +47,7 @@ The command ``search`` has the following parameters:: -t --time TEXT [required] Time interval. (start/end). Format should be (YYYY-mm-dd) -u --username TEXT Optional username used to search in provider. --password TEXT Optional password used to search in provider. + --config PATH Path to the configuration file to extend options for provider creation --platform TEXT Platform sensor (if required) --help Show this message and exit. diff --git a/bdc_collectors/cli.py b/bdc_collectors/cli.py index ab1b3e2..e18078f 100644 --- a/bdc_collectors/cli.py +++ b/bdc_collectors/cli.py @@ -1,6 +1,6 @@ # # This file is part of Brazil Data Cube BDC-Collectors. -# Copyright (C) 2022 INPE. +# Copyright (C) 2023 INPE. # # 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 @@ -30,7 +30,7 @@ @click.group(cls=FlaskGroup, create_app=create_app) def cli(): """Command line for BDC-Collectors.""" - click.secho("""BDC-Collectors Copyright (C) 2022 INPE + click.secho("""BDC-Collectors Copyright (C) 2023 INPE This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details.""", bold=True) diff --git a/bdc_collectors/exceptions.py b/bdc_collectors/exceptions.py index 1e1c936..0d09178 100644 --- a/bdc_collectors/exceptions.py +++ b/bdc_collectors/exceptions.py @@ -36,7 +36,7 @@ def __str__(self): class DataOfflineError(DownloadError): """Indicate that the scene_id is not available (Offline). - Frequently used by Sentinel ``SciHub`` Provider. + Frequently used by Sentinel ``SciHub`` or ``Dataspace`` Provider. """ scene_id: str diff --git a/bdc_collectors/ext.py b/bdc_collectors/ext.py index 7c15278..a115f13 100644 --- a/bdc_collectors/ext.py +++ b/bdc_collectors/ext.py @@ -22,7 +22,7 @@ from threading import Lock from typing import Dict, List, Type -import pkg_resources +import importlib.metadata from flask import Flask from .base import BaseProvider @@ -86,10 +86,10 @@ class CollectorExtension: Note: Make sure to initialize the ``CollectorExtension`` before. - We also the command line `bdc-collectors` which provides a way to + We also the command line `bdc-collector` which provides a way to consume those providers in terminal:: - bdc-collectors --help + bdc-collector --help """ state: CollectorState @@ -119,7 +119,7 @@ def init_app(self, app: Flask, **kwargs): def init_providers(self, entry_point: str = 'bdc_collectors.providers', **kwargs): """Load the supported providers from setup.py entry_point.""" if entry_point: - for base_entry in pkg_resources.iter_entry_points(entry_point): + for base_entry in importlib.metadata.entry_points(group=entry_point): provider = base_entry.load() if hasattr(provider, 'init_provider') and callable(provider.init_provider): diff --git a/setup.py b/setup.py index ad77cd2..b34383c 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,6 @@ # # This file is part of Brazil Data Cube BDC-Collectors. -# Copyright (C) 2022 INPE. +# Copyright (C) 2023 INPE. # # 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 @@ -118,9 +118,12 @@ 'Environment :: Web Environment', 'Intended Audience :: Education', 'Intended Audience :: Science/Research', - 'License :: OSI Approved :: MIT License', + 'License :: OSI Approved :: GNU General Public License v3 (GPLv3)', 'Operating System :: OS Independent', 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', + 'Programming Language :: Python :: 3.10', + 'Programming Language :: Python :: 3.11', 'Topic :: Software Development :: Libraries :: Python Modules', 'Topic :: Scientific/Engineering :: GIS', ],