Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing panda dependencies + new logger #34

Closed
wants to merge 56 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
b2a438d
Adding Pypi and documentation link
vincentlel Apr 26, 2022
0b6a64d
Add steps to install geosyspy with conda
simon-geosys May 2, 2022
302d1fd
Update README.md
vincentlel Jun 2, 2022
9b2dfcf
Update README.md
vincentlel Mar 22, 2023
a687560
Update README.md
vincentlel Mar 22, 2023
5d9b4d4
Update README.md
vincentlel Mar 22, 2023
90c33bd
Add sendMrtsProcessor Method
Apr 24, 2023
02c0a6b
Add get_mr_time_series in geosys.py
May 16, 2023
e2fcd41
Merge pull request #26 from GEOSYS/feature_mrts
simon-geosys May 16, 2023
9aa94ae
[BYOA-27] get_satellite_image_time_series modification improvment
jpn-geo6 May 23, 2023
af1c4b8
Merge pull request #27 from GEOSYS/feature/BYOA-27
simon-geosys May 23, 2023
d34206e
Add default parameters to get_mr_time_series
May 25, 2023
b2d9889
Merge pull request #28 from GEOSYS/default_params
simon-geosys May 25, 2023
91f5683
Update get_mr_time_series arguments
May 30, 2023
aff1700
"Merge/rebase changes from develop"
May 30, 2023
4f5909f
"Merge/rebase changes from develop"
May 30, 2023
224cd9b
Add test-publish-package yml
May 23, 2023
7bb02d5
update test-publish-package.yml
May 23, 2023
f53bcae
Fix missing module documentation(mkdocstrings)
May 30, 2023
2fcebe6
>> Release V0.1.4
May 30, 2023
c516541
Minor fixes
simon-geosys May 31, 2023
cb09ac2
Merge pull request #25 from GEOSYS/abj_refacto
simon-geosys May 31, 2023
621df0d
add functions utils for MRTS
May 23, 2023
79174e8
update utils.py & notebook
May 25, 2023
70917ee
fix plot with index reflectances
May 26, 2023
4456d7f
Release 0.1.6
simon-geosys May 31, 2023
9fff078
Merge pull request #29 from GEOSYS/add_plot_mrts
simon-geosys May 31, 2023
93b6bf9
Move utils.py to notebook_utils.py and fix PROD env variable not work…
Jun 2, 2023
cf9cf4a
update examples.ipynb
Jun 5, 2023
a59609d
Merge pull request #30 from GEOSYS/fix_prod
encls Jun 5, 2023
7415e05
AgriQuest - service
jpn-geo6 Jun 5, 2023
3cb3b5e
Adding Agriquest Weather & NDVI methods in GeosysPy
jpn-geo6 Jun 5, 2023
302cec6
update notebook with AQ examples
jpn-geo6 Jun 6, 2023
f3f4387
Refactoring & tests
jpn-geo6 Jun 7, 2023
dbb253e
adding doc for services, missing req for dev, refacto
jpn-geo6 Jun 8, 2023
3f8c442
Update methods signature
jpn-geo6 Jun 8, 2023
ec3fdd5
Release 0.1.8
jpn-geo6 Jun 9, 2023
c929a10
Merge pull request #31 from GEOSYS/feature/agriquest_service
simon-geosys Jun 9, 2023
7bd0981
refacto (multiple services) + processor analytics + unit tests
jpn-geo6 Jun 21, 2023
8762f12
TestPyPi Release 0.1.9.0
jpn-geo6 Jun 22, 2023
98f367c
TestPypi Release 0.1.9.1
jpn-geo6 Jun 22, 2023
86099bb
TestPypi Release 0.1.9.2
jpn-geo6 Jun 22, 2023
6c2d9a5
increasing number retry for processors
jpn-geo6 Jun 22, 2023
046a9af
Geosyspy - Refacto
jpn-geo6 Jun 27, 2023
ac9eff5
TestPypi Release 0.1.9.3
jpn-geo6 Jun 27, 2023
b39fbb3
Update Install Documentation
jpn-geo6 Jun 29, 2023
57eccab
Release 0.2.0
jpn-geo6 Jun 29, 2023
3383b4c
Update examples.ipynb
jpn-geo6 Jun 29, 2023
8a4ad25
Removing services doc section
jpn-geo6 Sep 7, 2023
779adaa
Update automated-tests.yml
jpn-geo6 Dec 20, 2023
9fc99ab
feature(*): add geosyspy logger + fix pandas version
jpn-geo6 Dec 20, 2023
0c85265
Update automated-tests.yml
jpn-geo6 Dec 20, 2023
3cf8a2e
test(*) ignore zarc ssl issue on github
jpn-geo6 Dec 21, 2023
71a9a86
feature(*): add authorization with token (optionnal) + get permissions
jpn-geo6 Jan 15, 2024
de31d90
feat(mdm): use current year instead of 2022 for sfd creation
jpn-geo6 Jan 29, 2024
be46033
Update README.md with organization name
vincentlel Feb 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/automated-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ jobs:
API_CLIENT_SECRET: ${{ secrets.API_CLIENT_SECRET }}
API_USERNAME: ${{ secrets.API_USERNAME }}
API_PASSWORD: ${{ secrets.API_PASSWORD }}
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
python-version: ["3.8"]
python-version: ["3.11"]

steps:
- uses: actions/checkout@v2
Expand All @@ -35,9 +35,9 @@ jobs:
sudo apt-add-repository ppa:ubuntugis/ubuntugis-unstable
sudo apt-get update
sudo apt-get install gdal-bin libgdal-dev
pip install gdal
pip install gdal==3.6.2
python -m pip install --upgrade pip
python -m pip install flake8 pytest
python -m pip install flake8 pytest pip-system-certs
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
if [ -f requirements-dev.txt ]; then pip install -r requirements-dev.txt; fi
- name: Lint with flake8
Expand All @@ -48,4 +48,4 @@ jobs:
flake8 . --count --ignore=E501 --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
make test
make test
10 changes: 5 additions & 5 deletions .github/workflows/publish-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,28 @@ on:
tags:
- v**


jobs:
deploy:

runs-on: ubuntu-latest
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.8'
python-version: '3.10'
- name: Install dependencies
run: |
sudo apt-add-repository ppa:ubuntugis/ubuntugis-unstable
sudo apt-get update
sudo apt-get install gdal-bin libgdal-dev
pip install gdal
pip install gdal==3.6.2
python -m pip install --upgrade pip
pip install wheel
pip install -r requirements.txt
pip install -r requirements-dev.txt
pip install -r requirements-dev.txt
pip install mkdocstrings-python
- name: Build package
run: make build
- name: Publish package
Expand Down
39 changes: 39 additions & 0 deletions .github/workflows/test-publish-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Publish package and docs test

on:
push:
tags:
- test-v**

jobs:
deploy:

runs-on: ubuntu-22.04


steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.10'
- name: Install dependencies
run: |
sudo apt-add-repository ppa:ubuntugis/ubuntugis-unstable
sudo apt-get update
sudo apt-get install gdal-bin libgdal-dev
pip install gdal==3.6.2
python -m pip install --upgrade pip
pip install wheel
pip install -r requirements.txt
pip install -r requirements-dev.txt
pip install mkdocstrings-python
- name: Build package
run: make build
- name: Publish package distributions to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
user: __token__
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
- run: mkdocs gh-deploy --force
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.9
FROM python:3.10

WORKDIR /app

Expand Down
73 changes: 55 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<!-- PROJECT LOGO -->
<br />
<p align="center">
<a href="https://github.com/GEOSYS">
<a href="https://github.com/earthdaily">
<img src="https://earthdailyagro.com/wp-content/uploads/2022/01/Logo.svg" alt="Logo" width="400" height="200">
</a>

Expand All @@ -21,11 +21,11 @@
<a href="https://earthdailyagro.com/"><strong>Who we are</strong></a>
<br />
<br />
<a href="https://github.com/GEOSYS/GeosysPy">Project description</a>
<a href="https://github.com/earthdaily/GeosysPy">Project description</a>
·
<a href="https://github.com/GEOSYS/GeosysPy/issues">Report Bug</a>
<a href="https://github.com/earthdaily/GeosysPy/issues">Report Bug</a>
·
<a href="https://github.com/GEOSYS/GeosysPy/issues">Request Feature</a>
<a href="https://github.com/earthdaily/GeosysPy/issues">Request Feature</a>
</p>
</p>

Expand All @@ -36,7 +36,7 @@
[![Twitter][twitter-shield]][twitter-url]
[![Youtube][youtube-shield]][youtube-url]
[![languages][language-python-shiedl]][issues-url]
[![CITest][CITest-shield]][CITest-url]
<!-- [![CITest][CITest-shield]][CITest-url]-->
[![Issues][issues-shield]][issues-url]
[![MIT License][license-shield]][license-url]

Expand Down Expand Up @@ -81,7 +81,9 @@ EarthDaily Agro is the agricultural analysis division of EartDaily Analytics. Le
</a>
</p>

Throught our <geosys/> platform, we make geospatial analytics easily accessible for you to be browsed or analyzed, within our cloud or within your own environment. We provide developers and data scientists both flexibility and extensibility with analytic ready data and digital agriculture ready development blocks. We empower your team to enrich your systems with information at the field, regional or continent level via our API or Apps.
<p align="left">
Throught our &ltgeosys/&gt platform, we make geospatial analytics easily accessible for you to be browsed or analyzed, within our cloud or within your own environment. We provide developers and data scientists both flexibility and extensibility with analytic ready data and digital agriculture ready development blocks. We empower your team to enrich your systems with information at the field, regional or continent level via our API or Apps.
</p>

We have a team of experts around the world that understand local crops and ag industry, as well as advanced analytics to support your business.

Expand All @@ -100,19 +102,28 @@ The `geosyspy` python package aims to provide an easy and ready to use library a
* Analytic publication:
* Save and retrieve custom data in Analytics Fabrik

See [Examples](examples.ipynb) notebook for more information
See [documentation](https://earthdaily.github.io/GeosysPy/) and [Examples](examples.ipynb) notebook for more information

## Getting started

### Prerequisites

Make sure you have valid credentials. If you need to get trial access, please register [here](https://earthdailyagro.com/geosys-api/#get-started).

This package has been tested on Python 3.9.7.
This package has been tested on Python 3.10.11.


### Installing

#### Conda

If you are using Conda, there are the steps to follow to create a virtual environment:

```
conda create --name demo
conda activate demo
```

#### For Linux / Mac OS
```
pip install geosyspy
Expand Down Expand Up @@ -147,7 +158,23 @@ API_USERNAME=
API_PASSWORD=
```

3. Run the Jupyter notebook

3. Install Jupyter notebook [Examples](examples.ipynb) dependencies

```
conda install --file requirements-notebook.txt
```
or
```
pip install -r requirements-notebook.txt
```

4. Set up the Jupyter Notebook kernel
```
python -m ipykernel install --user --name demo
```

5. Run the Jupyter notebook


### Run the package inside a Docker container
Expand All @@ -167,8 +194,8 @@ or, without .env file :
Then :

```python
>>> from geosyspy.geosys import Geosys
>>> from geosyspy.constants import Collection, Region, Env
>>> from geosyspy import Geosys
>>> from geosyspy.utils.constants import *
>>> import os
>>> client = Geosys(os.getenv('API_CLIENT_ID'), os.getenv('API_CLIENT_SECRET'), os.getenv('API_USERNAME'), os.getenv('API_PASSWORD'), Env.PREPROD, Region.NA)

Expand All @@ -181,8 +208,8 @@ Then :
Initialize client:

```python
from geosyspy.geosys import Geosys
from geosyspy.constants import Collection, Region, Env
from geosyspy import Geosys
from geosyspy.utils.constants import *

client = Geosys("API_CLIENT_ID", "API_CLIENT_SECRET", "API_USERNAME", "API_PASSWORD", Env.PREPROD, Region.NA)

Expand All @@ -196,9 +223,19 @@ polygon = "POLYGON((...))"
today = dt.date.today()
year_ago = dt.date.today() + relativedelta(months=-12)

dataframe = client.get_time_series(polygon, year_ago, today, collection=Collection.MODIS, indicators=["NDVI"])
dataframe = client.get_time_series(polygon, year_ago, today, collection=SatelliteImageryCollection.MODIS, indicators=["NDVI"])
```

Use Geosyspy logger


````python
import logging

geosys_logger = logging.getLogger('geosyspy')
geosys_logger.setLevel(logging.DEBUG)
````

See the Jupyter notebook [Examples](examples.ipynb) for a working example.

<p align="right">(<a href="#top">back to top</a>)</p>
Expand All @@ -207,7 +244,7 @@ See the Jupyter notebook [Examples](examples.ipynb) for a working example.
## Resources
The following links will provide access to more information:
- [EarthDaily agro developer portal ](https://developer.geosys.com/)
-
- [Pypi package](https://pypi.org/project/geosyspy/)

<p align="right">(<a href="#top">back to top</a>)</p>

Expand Down Expand Up @@ -246,7 +283,7 @@ For any additonal information, please [email us](mailto:sales@earthdailyagro.com
[forks-url]: https://github.com/github_username/repo/network/members
[stars-shield]: https://img.shields.io/github/stars/qgis-plugin/repo.svg?style=plastic&logo=appveyor
[stars-url]: https://github.com/github_username/repo/stargazers
[issues-shield]: https://img.shields.io/github/issues/GEOSYS/qgis-plugin/repo.svg?style=social
[issues-shield]: https://img.shields.io/github/issues/GEOSYS/GeosysPy/repo.svg?style=social
[issues-url]: https://github.com/github_username/repo/issues
[license-shield]: https://img.shields.io/github/license/GEOSYS/qgis-plugin
[license-url]: https://www.gnu.org/licenses/gpl-3.0.en.html
Expand All @@ -260,5 +297,5 @@ For any additonal information, please [email us](mailto:sales@earthdailyagro.com
[language-python-url]: https://pypi.org/
[GitStars-shield]: https://img.shields.io/github/stars/GEOSYS?style=social
[GitStars-url]: https://img.shields.io/github/stars/GEOSYS?style=social
[CITest-shield]: https://img.shields.io/github/workflow/status/GEOSYS/qgis-plugin/Continous%20Integration
[CITest-url]: https://img.shields.io/github/workflow/status/GEOSYS/qgis-plugin/Continous%20Integration
[CITest-shield]: https://img.shields.io/github/workflow/status/GEOSYS/GeosysPy/Continous%20Integration
[CITest-url]: https://img.shields.io/github/workflow/status/GEOSYS/GeosysPy/Continous%20Integration
2 changes: 1 addition & 1 deletion VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.2
0.2.1
2 changes: 1 addition & 1 deletion docs/constants-reference.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Geosys

::: geosyspy.constants
::: geosyspy.utils.constants
6 changes: 6 additions & 0 deletions docs/utils.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Utils

::: geosyspy.utils.constants
::: geosyspy.utils.helper
::: geosyspy.utils.http_client
::: geosyspy.utils.oauth2_client
Loading
Loading