Skip to content

Commit

Permalink
📚 review docs for 1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
raphaelrpl committed Oct 3, 2023
1 parent ca09dff commit 0d322fc
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 19 deletions.
13 changes: 4 additions & 9 deletions INSTALL.rst
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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::
Expand All @@ -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::
Expand Down
3 changes: 2 additions & 1 deletion USAGE.rst
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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.

Expand Down
4 changes: 2 additions & 2 deletions bdc_collectors/cli.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion bdc_collectors/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions bdc_collectors/ext.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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):
Expand Down
7 changes: 5 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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',
],
Expand Down

0 comments on commit 0d322fc

Please sign in to comment.