Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 677f848

Browse files
committedJan 12, 2024
docs: init project structure
0 parents  commit 677f848

15 files changed

+983
-0
lines changed
 

‎.github/ISSUE_TEMPLATE/bug_report.md

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: bug
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**Code To Reproduce**
14+
CLI commands or Python code snippet to reproduce the bug. Please use maximum verbosity using:
15+
```sh
16+
eodag -vvv [OPTIONS] COMMAND [ARGS]...
17+
```
18+
or
19+
```py
20+
from eodag.utils.logging import setup_logging
21+
setup_logging(verbose=3)
22+
```
23+
24+
**Output**
25+
Compete output obtained with maximal verbosity.
26+
27+
**Environment:**
28+
- Python version: `python --version`
29+
- EODAG version: `eodag version`
30+
31+
**Additional context**
32+
Add any other context about the bug here.
+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: enhancement
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context about the feature request here.

‎.github/pull_request_template.md

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
### Your checklist for this pull request
2+
Please review the [guidelines for contributing](../CONTRIBUTING.md) to this repository.
3+
4+
- [ ] Make sure you are making a pull request against the **develop branch** (left side). Also you should start *your branch* off *our develop*.
5+
- [ ] Check the commit's or even all commits' message styles matches our requested structure.
6+
- [ ] Check your code additions will fail neither code linting checks nor unit test.
7+
8+
### Description
9+
Please describe your pull request.
10+
11+
### Further comments
12+
If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...
13+
14+
Thank you!

‎.github/workflows/deploy.yml

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Publish to PyPI
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
workflow_dispatch:
8+
9+
jobs:
10+
build-n-publish:
11+
name: Build and publish to PyPI
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout source
16+
uses: actions/checkout@v3
17+
- name: Get history and tags for SCM versioning to work
18+
run: |
19+
git fetch --prune --unshallow
20+
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
21+
- name: Set up Python 3.8
22+
uses: actions/setup-python@v4
23+
with:
24+
python-version: "3.8"
25+
26+
- name: Check that the current version isn't already on PyPi
27+
run: |
28+
if [ "$(./get_pypi_latest_version.sh)" != "$(python setup.py --version)" ]
29+
then
30+
echo "Current version is not on PyPI, proceed with bulding"
31+
else
32+
echo "Current version is the latest version uploaded to PyPI"
33+
exit 1
34+
fi
35+
36+
- name: Check long description is OK for PyPI with tox
37+
run: |
38+
python -m pip install --upgrade pip
39+
python -m pip install tox sphinx
40+
tox -e pypi
41+
42+
- name: Build a binary wheel and a source tarball
43+
run: |
44+
python -m pip install build
45+
python -m build --sdist --wheel
46+
- name: Publish distribution to PyPI
47+
uses: pypa/gh-action-pypi-publish@release/v1
48+
with:
49+
user: __token__
50+
password: ${{ secrets.PYPI_API_TOKEN }}

‎.github/workflows/fetch.yml

+77
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: Fetch product types
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches: [master, develop]
7+
schedule:
8+
- cron: "0 6 * * *"
9+
10+
jobs:
11+
fetch-product-types:
12+
name: Fetch providers for new product types
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout the repo
16+
uses: actions/checkout@v3
17+
- name: Get history and tags for SCM versioning to work
18+
run: |
19+
git fetch --prune --unshallow
20+
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
21+
- name: Set up Python 3.8
22+
uses: actions/setup-python@v4
23+
with:
24+
python-version: "3.8"
25+
- name: Update pip
26+
run: python -m pip install --upgrade pip
27+
- name: Get pip cache dir
28+
id: pip-cache
29+
shell: bash
30+
run: echo "DIR=$(pip cache dir)" >> $GITHUB_OUTPUT
31+
- name: Get current week number
32+
id: get-week
33+
shell: bash
34+
run: echo "WEEK=$(date +'%V')" >> $GITHUB_OUTPUT
35+
- name: Pip cache
36+
uses: actions/cache@v3
37+
with:
38+
path: ${{ steps.pip-cache.outputs.DIR }}
39+
key: ${{ runner.os }}-pip-${{ steps.get-week.outputs.WEEK }}-${{ hashFiles('setup.cfg') }}
40+
- name: Install eodag
41+
run: |
42+
python -m pip install .
43+
- name: Fetch and update external product types reference
44+
run: |
45+
export JSON_OUTPUT_FILE="eodag/resources/ext_product_types.json"
46+
export JSON_REF_FILE=$(python -c "import eodag; print(eodag.config.EXT_PRODUCT_TYPES_CONF_URI)")
47+
eodag -vvv discover --storage ${JSON_OUTPUT_FILE}
48+
# add empty line at end of file
49+
sed -i -e '$a\' ${JSON_OUTPUT_FILE}
50+
git config user.name "github-actions[bot]"
51+
git config user.email "'github-actions[bot]@users.noreply.github.com"
52+
git add "${JSON_OUTPUT_FILE}"
53+
git commit -m "fix: update external product types reference" || exit 0
54+
echo "Update external product types reference from daily fetch. See [Python API User Guide / Product types discovery](https://eodag.readthedocs.io/en/latest/notebooks/api_user_guide/2_providers_products_available.html#Product-types-discovery)" >> $GITHUB_STEP_SUMMARY
55+
echo '### Changed files' >> $GITHUB_STEP_SUMMARY
56+
echo 'May be truncated.' >> $GITHUB_STEP_SUMMARY
57+
COMMIT_SHA=$(git rev-parse HEAD)
58+
COMMIT_URL="${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/commit/${COMMIT_SHA}"
59+
echo "commit [${COMMIT_SHA}](${COMMIT_URL})" >> $GITHUB_STEP_SUMMARY
60+
echo '```diff' >> $GITHUB_STEP_SUMMARY
61+
git show --name-only --format=tformat: >> $GITHUB_STEP_SUMMARY
62+
(diff <(curl ${JSON_REF_FILE} | jq ) <(cat ${JSON_OUTPUT_FILE} | jq) || true) >> $GITHUB_STEP_SUMMARY
63+
echo '```' >> $GITHUB_STEP_SUMMARY
64+
# truncated PR body (too long causes error)
65+
full_update_summary=$(cat $GITHUB_STEP_SUMMARY)
66+
echo 'UPDATE_SUMMARY<<EOF' >> $GITHUB_ENV
67+
echo "${full_update_summary:0:65536}" >> $GITHUB_ENV
68+
echo 'EOF' >> $GITHUB_ENV
69+
- name: Create Pull Request
70+
uses: peter-evans/create-pull-request@v4
71+
with:
72+
branch: external-product-types-ref-update
73+
delete-branch: true
74+
title: 'fix: update external product types reference'
75+
body: ${{ env.UPDATE_SUMMARY }}
76+
labels: |
77+
automated pr

‎.github/workflows/test.yml

+151
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
name: Run Tests
2+
3+
on:
4+
push:
5+
branches: [master, develop]
6+
pull_request:
7+
branches: [master, develop]
8+
schedule:
9+
- cron: "0 7 * * 1"
10+
workflow_dispatch:
11+
12+
jobs:
13+
lint:
14+
name: Linting (pre-commit)
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout the repo
18+
uses: actions/checkout@v3
19+
- name: Get history and tags for SCM versioning to work
20+
run: |
21+
git fetch --prune --unshallow
22+
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
23+
- name: Set up Python 3.8
24+
uses: actions/setup-python@v4
25+
with:
26+
python-version: "3.8"
27+
- name: Run pre-commit action
28+
uses: pre-commit/action@v3.0.0
29+
30+
tests:
31+
name: Test it!
32+
runs-on: ${{ matrix.os }}
33+
strategy:
34+
matrix:
35+
python-version: [3.8, "3.12"]
36+
os: [ubuntu-latest, windows-latest]
37+
steps:
38+
- name: Checkout the repo
39+
uses: actions/checkout@v3
40+
- name: Get history and tags for SCM versioning to work
41+
run: |
42+
git fetch --prune --unshallow
43+
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
44+
- name: Set up Python ${{ matrix.python-version }} on ${{ matrix.os }}
45+
uses: actions/setup-python@v4
46+
with:
47+
python-version: ${{ matrix.python-version }}
48+
- name: Update pip
49+
run: python -m pip install --upgrade pip
50+
- name: Get pip cache dir
51+
id: pip-cache
52+
shell: bash
53+
run: echo "DIR=$(pip cache dir)" >> $GITHUB_OUTPUT
54+
- name: Get current week number
55+
id: get-week
56+
shell: bash
57+
run: echo "WEEK=$(date +'%V')" >> $GITHUB_OUTPUT
58+
- name: Pip cache
59+
uses: actions/cache@v3
60+
with:
61+
path: ${{ steps.pip-cache.outputs.DIR }}
62+
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ steps.get-week.outputs.WEEK }}-${{ hashFiles('setup.cfg') }}
63+
- name: Install tox and tox-gh-actions
64+
run: python -m pip install tox tox-gh-actions
65+
- name: Test with tox
66+
run: tox
67+
- name: Upload Unit Test Results
68+
if: always()
69+
uses: actions/upload-artifact@v3
70+
with:
71+
name: unit-test-results-python${{ matrix.python-version }}-${{ matrix.os }}
72+
path: |
73+
test-reports/junit-report.xml
74+
test-reports/coverage.xml
75+
76+
publish-test-results:
77+
name: "Publish Unit Tests Results"
78+
needs: tests
79+
runs-on: ubuntu-latest
80+
if: always()
81+
82+
steps:
83+
- name: Download Artifacts
84+
uses: actions/download-artifact@v3
85+
with:
86+
path: artifacts
87+
88+
- name: Publish Unit Test Results
89+
uses: EnricoMi/publish-unit-test-result-action@v2
90+
continue-on-error: true
91+
with:
92+
files: artifacts/*/junit-report.xml
93+
94+
- name: Publish Coverage Report for Ubuntu
95+
uses: 5monkeys/cobertura-action@master
96+
if: ${{ github.event_name == 'pull_request' }}
97+
with:
98+
path: artifacts/unit-test-results-python3.12-ubuntu-latest/coverage.xml
99+
repo_token: ${{ secrets.GITHUB_TOKEN }}
100+
pull_request_number: ${{ github.pull_request.number }}
101+
minimum_coverage: 70
102+
fail_below_threshold: false
103+
only_changed_files: true
104+
report_name: Code Coverage (Ubuntu)
105+
106+
- name: Publish Coverage Report for Windows
107+
uses: 5monkeys/cobertura-action@master
108+
if: ${{ github.event_name == 'pull_request' }}
109+
with:
110+
path: artifacts/unit-test-results-python3.12-windows-latest/coverage.xml
111+
repo_token: ${{ secrets.GITHUB_TOKEN }}
112+
pull_request_number: ${{ github.pull_request.number }}
113+
minimum_coverage: 70
114+
fail_below_threshold: false
115+
only_changed_files: true
116+
report_name: Code Coverage (Windows)
117+
118+
check-pypi:
119+
name: Long description check for PyPI
120+
runs-on: ubuntu-latest
121+
steps:
122+
- name: Checkout the repo
123+
uses: actions/checkout@v3
124+
- name: Get history and tags for SCM versioning to work
125+
run: |
126+
git fetch --prune --unshallow
127+
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
128+
- name: Set up Python 3.8
129+
uses: actions/setup-python@v4
130+
with:
131+
python-version: "3.8"
132+
- name: Update pip
133+
run: python -m pip install --upgrade pip
134+
- name: Get pip cache dir
135+
id: pip-cache
136+
shell: bash
137+
run: echo "DIR=$(pip cache dir)" >> $GITHUB_OUTPUT
138+
- name: Get current week number
139+
id: get-week
140+
shell: bash
141+
run: echo "WEEK=$(date +'%V')" >> $GITHUB_OUTPUT
142+
- name: Pip cache
143+
uses: actions/cache@v3
144+
with:
145+
path: ${{ steps.pip-cache.outputs.DIR }}
146+
key: ${{ runner.os }}-pip-${{ steps.get-week.outputs.WEEK }}-${{ hashFiles('setup.cfg') }}
147+
- name: Install tox and sphinx (to have rst2html.py utility available)
148+
run: |
149+
python -m pip install tox sphinx
150+
- name: Testing with tox
151+
run: python -m tox -e pypi

‎CODE_OF_CONDUCT.md

+133
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
2+
# Contributor Covenant Code of Conduct
3+
4+
## Our Pledge
5+
6+
We as members, contributors, and leaders pledge to make participation in our
7+
community a harassment-free experience for everyone, regardless of age, body
8+
size, visible or invisible disability, ethnicity, sex characteristics, gender
9+
identity and expression, level of experience, education, socio-economic status,
10+
nationality, personal appearance, race, caste, color, religion, or sexual
11+
identity and orientation.
12+
13+
We pledge to act and interact in ways that contribute to an open, welcoming,
14+
diverse, inclusive, and healthy community.
15+
16+
## Our Standards
17+
18+
Examples of behavior that contributes to a positive environment for our
19+
community include:
20+
21+
* Demonstrating empathy and kindness toward other people
22+
* Being respectful of differing opinions, viewpoints, and experiences
23+
* Giving and gracefully accepting constructive feedback
24+
* Accepting responsibility and apologizing to those affected by our mistakes,
25+
and learning from the experience
26+
* Focusing on what is best not just for us as individuals, but for the overall
27+
community
28+
29+
Examples of unacceptable behavior include:
30+
31+
* The use of sexualized language or imagery, and sexual attention or advances of
32+
any kind
33+
* Trolling, insulting or derogatory comments, and personal or political attacks
34+
* Public or private harassment
35+
* Publishing others' private information, such as a physical or email address,
36+
without their explicit permission
37+
* Other conduct which could reasonably be considered inappropriate in a
38+
professional setting
39+
40+
## Enforcement Responsibilities
41+
42+
Community leaders are responsible for clarifying and enforcing our standards of
43+
acceptable behavior and will take appropriate and fair corrective action in
44+
response to any behavior that they deem inappropriate, threatening, offensive,
45+
or harmful.
46+
47+
Community leaders have the right and responsibility to remove, edit, or reject
48+
comments, commits, code, wiki edits, issues, and other contributions that are
49+
not aligned to this Code of Conduct, and will communicate reasons for moderation
50+
decisions when appropriate.
51+
52+
## Scope
53+
54+
This Code of Conduct applies within all community spaces, and also applies when
55+
an individual is officially representing the community in public spaces.
56+
Examples of representing our community include using an official email address,
57+
posting via an official social media account, or acting as an appointed
58+
representative at an online or offline event.
59+
60+
## Enforcement
61+
62+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
63+
reported to the community leaders responsible for enforcement at
64+
[INSERT CONTACT METHOD].
65+
All complaints will be reviewed and investigated promptly and fairly.
66+
67+
All community leaders are obligated to respect the privacy and security of the
68+
reporter of any incident.
69+
70+
## Enforcement Guidelines
71+
72+
Community leaders will follow these Community Impact Guidelines in determining
73+
the consequences for any action they deem in violation of this Code of Conduct:
74+
75+
### 1. Correction
76+
77+
**Community Impact**: Use of inappropriate language or other behavior deemed
78+
unprofessional or unwelcome in the community.
79+
80+
**Consequence**: A private, written warning from community leaders, providing
81+
clarity around the nature of the violation and an explanation of why the
82+
behavior was inappropriate. A public apology may be requested.
83+
84+
### 2. Warning
85+
86+
**Community Impact**: A violation through a single incident or series of
87+
actions.
88+
89+
**Consequence**: A warning with consequences for continued behavior. No
90+
interaction with the people involved, including unsolicited interaction with
91+
those enforcing the Code of Conduct, for a specified period of time. This
92+
includes avoiding interactions in community spaces as well as external channels
93+
like social media. Violating these terms may lead to a temporary or permanent
94+
ban.
95+
96+
### 3. Temporary Ban
97+
98+
**Community Impact**: A serious violation of community standards, including
99+
sustained inappropriate behavior.
100+
101+
**Consequence**: A temporary ban from any sort of interaction or public
102+
communication with the community for a specified period of time. No public or
103+
private interaction with the people involved, including unsolicited interaction
104+
with those enforcing the Code of Conduct, is allowed during this period.
105+
Violating these terms may lead to a permanent ban.
106+
107+
### 4. Permanent Ban
108+
109+
**Community Impact**: Demonstrating a pattern of violation of community
110+
standards, including sustained inappropriate behavior, harassment of an
111+
individual, or aggression toward or disparagement of classes of individuals.
112+
113+
**Consequence**: A permanent ban from any sort of public interaction within the
114+
community.
115+
116+
## Attribution
117+
118+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
119+
version 2.1, available at
120+
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
121+
122+
Community Impact Guidelines were inspired by
123+
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
124+
125+
For answers to common questions about this code of conduct, see the FAQ at
126+
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
127+
[https://www.contributor-covenant.org/translations][translations].
128+
129+
[homepage]: https://www.contributor-covenant.org
130+
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
131+
[Mozilla CoC]: https://github.com/mozilla/diversity
132+
[FAQ]: https://www.contributor-covenant.org/faq
133+
[translations]: https://www.contributor-covenant.org/translations

‎CONTRIBUTING.rst

+82
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
.. _contribute:
2+
3+
Contribute
4+
==========
5+
6+
Thank you for considering contributing to eodag!
7+
8+
9+
Report issues
10+
-------------
11+
12+
Issue tracker: https://github.com/CS-SI/opentelemetry-instrumentation-eodag/issues
13+
14+
Please check that a similar issue does not already exist and
15+
include the following information in your post:
16+
17+
- Describe what you expected to happen.
18+
- If possible, include a `minimal reproducible example`_ to help us
19+
identify the issue. This also helps check that the issue is not with
20+
your own code.
21+
- Describe what actually happened. Include the full traceback if there
22+
was an exception.
23+
- List your Python and opentelemetry-instrumentation-eodag versions. If possible, check if this
24+
issue is already fixed in the latest releases or the latest code in
25+
the repository.
26+
27+
.. _minimal reproducible example: https://stackoverflow.com/help/minimal-reproducible-example
28+
29+
30+
Submit patches
31+
--------------
32+
33+
If you intend to contribute to opentelemetry-instrumentation-eodag source code:
34+
35+
.. code-block:: bash
36+
37+
git clone https://github.com/CS-SI/opentelemetry-instrumentation-eodag.git
38+
cd opentelemetry-instrumentation-eodag
39+
python -m pip install
40+
pre-commit install
41+
42+
We use ``pre-commit`` to run a suite of linters, formatters and pre-commit hooks (``black``, ``isort``, ``flake8``) to
43+
ensure the code base is homogeneously formatted and easier to read. It's important that you install it, since we run
44+
the exact same hooks in the Continuous Integration.
45+
46+
To run the default test suite (which excludes end-to-end tests):
47+
48+
.. code-block:: bash
49+
50+
tox
51+
52+
To run the default test suite in parallel:
53+
54+
.. code-block:: bash
55+
56+
tox -p
57+
58+
To only run end-to-end tests:
59+
60+
.. code-block:: bash
61+
62+
tox -- tests/test_end_to_end.py
63+
64+
To run the entire tests (units, integration and end-to-end):
65+
66+
.. code-block:: bash
67+
68+
tox -- tests eodag
69+
70+
.. note::
71+
72+
* Running the `tox` command will also build the docs. As the documentation
73+
includes some notebooks (for the tutorials), the build process will need
74+
`pandoc <https://pandoc.org>`_ to succeed. If the build process fails for
75+
you, please `install <https://pandoc.org/installing.html>`_ pandoc and try
76+
again.
77+
78+
* eodag is tested against python versions 3.8, 3.9, 3.10, 3.11 and 3.12. Ensure you have
79+
these versions installed before you run tox. You can use
80+
`pyenv <https://github.com/pyenv/pyenv>`_ to manage many different versions
81+
of python
82+

‎LICENSE

+202
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,202 @@
1+
2+
Apache License
3+
Version 2.0, January 2004
4+
http://www.apache.org/licenses/
5+
6+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7+
8+
1. Definitions.
9+
10+
"License" shall mean the terms and conditions for use, reproduction,
11+
and distribution as defined by Sections 1 through 9 of this document.
12+
13+
"Licensor" shall mean the copyright owner or entity authorized by
14+
the copyright owner that is granting the License.
15+
16+
"Legal Entity" shall mean the union of the acting entity and all
17+
other entities that control, are controlled by, or are under common
18+
control with that entity. For the purposes of this definition,
19+
"control" means (i) the power, direct or indirect, to cause the
20+
direction or management of such entity, whether by contract or
21+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
22+
outstanding shares, or (iii) beneficial ownership of such entity.
23+
24+
"You" (or "Your") shall mean an individual or Legal Entity
25+
exercising permissions granted by this License.
26+
27+
"Source" form shall mean the preferred form for making modifications,
28+
including but not limited to software source code, documentation
29+
source, and configuration files.
30+
31+
"Object" form shall mean any form resulting from mechanical
32+
transformation or translation of a Source form, including but
33+
not limited to compiled object code, generated documentation,
34+
and conversions to other media types.
35+
36+
"Work" shall mean the work of authorship, whether in Source or
37+
Object form, made available under the License, as indicated by a
38+
copyright notice that is included in or attached to the work
39+
(an example is provided in the Appendix below).
40+
41+
"Derivative Works" shall mean any work, whether in Source or Object
42+
form, that is based on (or derived from) the Work and for which the
43+
editorial revisions, annotations, elaborations, or other modifications
44+
represent, as a whole, an original work of authorship. For the purposes
45+
of this License, Derivative Works shall not include works that remain
46+
separable from, or merely link (or bind by name) to the interfaces of,
47+
the Work and Derivative Works thereof.
48+
49+
"Contribution" shall mean any work of authorship, including
50+
the original version of the Work and any modifications or additions
51+
to that Work or Derivative Works thereof, that is intentionally
52+
submitted to Licensor for inclusion in the Work by the copyright owner
53+
or by an individual or Legal Entity authorized to submit on behalf of
54+
the copyright owner. For the purposes of this definition, "submitted"
55+
means any form of electronic, verbal, or written communication sent
56+
to the Licensor or its representatives, including but not limited to
57+
communication on electronic mailing lists, source code control systems,
58+
and issue tracking systems that are managed by, or on behalf of, the
59+
Licensor for the purpose of discussing and improving the Work, but
60+
excluding communication that is conspicuously marked or otherwise
61+
designated in writing by the copyright owner as "Not a Contribution."
62+
63+
"Contributor" shall mean Licensor and any individual or Legal Entity
64+
on behalf of whom a Contribution has been received by Licensor and
65+
subsequently incorporated within the Work.
66+
67+
2. Grant of Copyright License. Subject to the terms and conditions of
68+
this License, each Contributor hereby grants to You a perpetual,
69+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70+
copyright license to reproduce, prepare Derivative Works of,
71+
publicly display, publicly perform, sublicense, and distribute the
72+
Work and such Derivative Works in Source or Object form.
73+
74+
3. Grant of Patent License. Subject to the terms and conditions of
75+
this License, each Contributor hereby grants to You a perpetual,
76+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77+
(except as stated in this section) patent license to make, have made,
78+
use, offer to sell, sell, import, and otherwise transfer the Work,
79+
where such license applies only to those patent claims licensable
80+
by such Contributor that are necessarily infringed by their
81+
Contribution(s) alone or by combination of their Contribution(s)
82+
with the Work to which such Contribution(s) was submitted. If You
83+
institute patent litigation against any entity (including a
84+
cross-claim or counterclaim in a lawsuit) alleging that the Work
85+
or a Contribution incorporated within the Work constitutes direct
86+
or contributory patent infringement, then any patent licenses
87+
granted to You under this License for that Work shall terminate
88+
as of the date such litigation is filed.
89+
90+
4. Redistribution. You may reproduce and distribute copies of the
91+
Work or Derivative Works thereof in any medium, with or without
92+
modifications, and in Source or Object form, provided that You
93+
meet the following conditions:
94+
95+
(a) You must give any other recipients of the Work or
96+
Derivative Works a copy of this License; and
97+
98+
(b) You must cause any modified files to carry prominent notices
99+
stating that You changed the files; and
100+
101+
(c) You must retain, in the Source form of any Derivative Works
102+
that You distribute, all copyright, patent, trademark, and
103+
attribution notices from the Source form of the Work,
104+
excluding those notices that do not pertain to any part of
105+
the Derivative Works; and
106+
107+
(d) If the Work includes a "NOTICE" text file as part of its
108+
distribution, then any Derivative Works that You distribute must
109+
include a readable copy of the attribution notices contained
110+
within such NOTICE file, excluding those notices that do not
111+
pertain to any part of the Derivative Works, in at least one
112+
of the following places: within a NOTICE text file distributed
113+
as part of the Derivative Works; within the Source form or
114+
documentation, if provided along with the Derivative Works; or,
115+
within a display generated by the Derivative Works, if and
116+
wherever such third-party notices normally appear. The contents
117+
of the NOTICE file are for informational purposes only and
118+
do not modify the License. You may add Your own attribution
119+
notices within Derivative Works that You distribute, alongside
120+
or as an addendum to the NOTICE text from the Work, provided
121+
that such additional attribution notices cannot be construed
122+
as modifying the License.
123+
124+
You may add Your own copyright statement to Your modifications and
125+
may provide additional or different license terms and conditions
126+
for use, reproduction, or distribution of Your modifications, or
127+
for any such Derivative Works as a whole, provided Your use,
128+
reproduction, and distribution of the Work otherwise complies with
129+
the conditions stated in this License.
130+
131+
5. Submission of Contributions. Unless You explicitly state otherwise,
132+
any Contribution intentionally submitted for inclusion in the Work
133+
by You to the Licensor shall be under the terms and conditions of
134+
this License, without any additional terms or conditions.
135+
Notwithstanding the above, nothing herein shall supersede or modify
136+
the terms of any separate license agreement you may have executed
137+
with Licensor regarding such Contributions.
138+
139+
6. Trademarks. This License does not grant permission to use the trade
140+
names, trademarks, service marks, or product names of the Licensor,
141+
except as required for reasonable and customary use in describing the
142+
origin of the Work and reproducing the content of the NOTICE file.
143+
144+
7. Disclaimer of Warranty. Unless required by applicable law or
145+
agreed to in writing, Licensor provides the Work (and each
146+
Contributor provides its Contributions) on an "AS IS" BASIS,
147+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148+
implied, including, without limitation, any warranties or conditions
149+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150+
PARTICULAR PURPOSE. You are solely responsible for determining the
151+
appropriateness of using or redistributing the Work and assume any
152+
risks associated with Your exercise of permissions under this License.
153+
154+
8. Limitation of Liability. In no event and under no legal theory,
155+
whether in tort (including negligence), contract, or otherwise,
156+
unless required by applicable law (such as deliberate and grossly
157+
negligent acts) or agreed to in writing, shall any Contributor be
158+
liable to You for damages, including any direct, indirect, special,
159+
incidental, or consequential damages of any character arising as a
160+
result of this License or out of the use or inability to use the
161+
Work (including but not limited to damages for loss of goodwill,
162+
work stoppage, computer failure or malfunction, or any and all
163+
other commercial damages or losses), even if such Contributor
164+
has been advised of the possibility of such damages.
165+
166+
9. Accepting Warranty or Additional Liability. While redistributing
167+
the Work or Derivative Works thereof, You may choose to offer,
168+
and charge a fee for, acceptance of support, warranty, indemnity,
169+
or other liability obligations and/or rights consistent with this
170+
License. However, in accepting such obligations, You may act only
171+
on Your own behalf and on Your sole responsibility, not on behalf
172+
of any other Contributor, and only if You agree to indemnify,
173+
defend, and hold each Contributor harmless for any liability
174+
incurred by, or claims asserted against, such Contributor by reason
175+
of your accepting any such warranty or additional liability.
176+
177+
END OF TERMS AND CONDITIONS
178+
179+
APPENDIX: How to apply the Apache License to your work.
180+
181+
To apply the Apache License to your work, attach the following
182+
boilerplate notice, with the fields enclosed by brackets "[]"
183+
replaced with your own identifying information. (Don't include
184+
the brackets!) The text should be enclosed in the appropriate
185+
comment syntax for the file format. We also recommend that a
186+
file or class name and description of purpose be included on the
187+
same "printed page" as the copyright notice for easier
188+
identification within third-party archives.
189+
190+
Copyright [yyyy] [name of copyright owner]
191+
192+
Licensed under the Apache License, Version 2.0 (the "License");
193+
you may not use this file except in compliance with the License.
194+
You may obtain a copy of the License at
195+
196+
http://www.apache.org/licenses/LICENSE-2.0
197+
198+
Unless required by applicable law or agreed to in writing, software
199+
distributed under the License is distributed on an "AS IS" BASIS,
200+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201+
See the License for the specific language governing permissions and
202+
limitations under the License.

‎NOTICE

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
opentelemetry-instrumentation-eodag Copyright 2024 CS GROUP - France
2+
3+
This software is distributed under the Apache Software License (ASL) v2.0, see LICENSE
4+
file or http://www.apache.org/licenses/LICENSE-2.0 for details.
5+
6+
7+
This software includes code from many other open source projects. See below for details
8+
about the license of each project.
9+
10+
11+
================================================================
12+
The Apache 2.0 License
13+
================================================================
14+
15+
The following components are provided under the Apache 2.0 License (https://opensource.org/licenses/Apache-2.0).
16+
See project link for details.
17+
18+
https://github.com/open-telemetry/opentelemetry-python
19+
https://github.com/open-telemetry/opentelemetry-python-contrib

‎README.rst

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
OpenTelemetry EODAG Instrumentation
2+
=======================================
3+
4+
This library provides automatic and manual instrumentation of EODAG.
5+
6+
auto-instrumentation using the opentelemetry-instrumentation package is also supported.
7+
8+
Installation
9+
============
10+
11+
::
12+
13+
pip install opentelemetry-instrumentation-eodag
14+
15+
Contribute
16+
==========
17+
18+
Have you spotted a typo in our documentation? Have you observed a bug while running opentelemetry-instrumentation-eodag?
19+
Do you have a suggestion for a new feature?
20+
21+
Don't hesitate and open an issue or submit a pull request, contributions are most welcome!
22+
23+
For guidance on setting up a development environment and how to make a
24+
contribution to eodag, see the `contributing guidelines`_.
25+
26+
.. _contributing guidelines: https://github.com/CS-SI/opentelemetry-instrumentation-eodag/blob/main/CONTRIBUTING.rst
27+
28+
References
29+
==========
30+
31+
* `OpenTelemetry Project <https://opentelemetry.io/>`_
32+
* `OpenTelemetry Python Examples <https://github.com/open-telemetry/opentelemetry-python/tree/main/docs/examples>`_
33+
34+
35+
License
36+
=======
37+
38+
opentelemetry-instrumentation-eodag is licensed under Apache License v2.0.
39+
See LICENSE file for details.
40+
41+
42+
Authors
43+
=======
44+
45+
opentelemetry-instrumentation-eodag has been created by `CS GROUP - France <https://www.csgroup.eu/>`_.

‎setup.cfg

+76
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
[metadata]
2+
name = opentelemetry-instrumentation-eodag
3+
description = Earth Observation Data Access Gateway
4+
long_description = file:README.rst
5+
long_description_content_type = text/x-rst
6+
author = CS GROUP - France (CSSI)
7+
author_email = eodag@csgroup.space
8+
url = https://github.com/CS-SI/opentelemetry-instrumentation-eodag
9+
license = Apache 2.0
10+
license_file = LICENSE
11+
project_urls =
12+
Bug Tracker = https://github.com/CS-SI/opentelemetry-instrumentation-eodag/issues/
13+
Source Code = https://github.com/CS-SI/opentelemetry-instrumentation-eodag
14+
15+
[options]
16+
packages = find:
17+
include_package_data = True
18+
python_requires = >=3.6
19+
install_requires =
20+
21+
[options.extras_require]
22+
dev =
23+
pytest
24+
pytest-cov
25+
pytest-html
26+
pytest-xdist
27+
pytest-socket
28+
pytest-instafail
29+
tox
30+
wheel
31+
twine
32+
flake8
33+
pre-commit
34+
35+
[options.packages.find]
36+
exclude =
37+
*.tests
38+
*.tests.*
39+
tests.*
40+
tests
41+
42+
[options.package_data]
43+
* =
44+
LICENSE
45+
NOTICE
46+
py.typed
47+
48+
[flake8]
49+
ignore = E203, W503
50+
max_line_length = 120
51+
exclude =
52+
.git,
53+
__pycache__,
54+
.tox,
55+
build,
56+
dist,
57+
docs/conf.py,
58+
tests/context.py
59+
60+
[isort]
61+
multi_line_output = 3
62+
include_trailing_comma = True
63+
force_grid_wrap = 0
64+
use_parentheses = True
65+
line_length = 88
66+
ensure_newline_before_comments = True
67+
known_first_party = tests
68+
known_third_party = concurrent.futures
69+
default_section = THIRDPARTY
70+
71+
[pydocstyle]
72+
# Check for docstring presence only
73+
select = D1
74+
add_ignore = D107,D100,D105
75+
# Don't require docstrings for tests or setup
76+
match = (?!test|setup).*\.py

‎src/opentelemetry/eodag/.gitkeep

Whitespace-only changes.

‎tests/__init__.py

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2024, CS GROUP - France, https://www.csgroup.eu/
3+
#
4+
# This file is part of opentelemetry-instrumentation-eodag project
5+
# https://www.github.com/CS-SI/opentelemetry-instrumentation-eodag
6+
#
7+
# Licensed under the Apache License, Version 2.0 (the "License");
8+
# you may not use this file except in compliance with the License.
9+
# You may obtain a copy of the License at
10+
#
11+
# http://www.apache.org/licenses/LICENSE-2.0
12+
#
13+
# Unless required by applicable law or agreed to in writing, software
14+
# distributed under the License is distributed on an "AS IS" BASIS,
15+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
# See the License for the specific language governing permissions and
17+
# limitations under the License.

‎tox.ini

+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2024, CS GROUP - France, https://www.csgroup.eu/
3+
#
4+
# This file is part of opentelemetry-instrumentation-eodag project
5+
# https://www.github.com/CS-SI/opentelemetry-instrumentation-eodag
6+
#
7+
# Licensed under the Apache License, Version 2.0 (the "License");
8+
# you may not use this file except in compliance with the License.
9+
# You may obtain a copy of the License at
10+
#
11+
# http://www.apache.org/licenses/LICENSE-2.0
12+
#
13+
# Unless required by applicable law or agreed to in writing, software
14+
# distributed under the License is distributed on an "AS IS" BASIS,
15+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
# See the License for the specific language governing permissions and
17+
# limitations under the License.
18+
[tox]
19+
envlist = py38, py39, py310, py311, py312, docs, pypi, linters
20+
skipdist = true
21+
22+
# Mapping required by tox-gh-actions, only used in CI
23+
[gh-actions]
24+
python =
25+
3.8: py38
26+
3.9: py39
27+
3.10: py310
28+
3.11: py311
29+
3.12: py312
30+
31+
[testenv]
32+
commands =
33+
python -c "import os; os.makedirs('test-reports', exist_ok=True)"
34+
pytest -v --instafail \
35+
-n auto --dist loadscope \
36+
--cov=eodag \
37+
--cov-report term-missing \
38+
--cov-report=html:test-reports/coverage \
39+
--cov-report=xml:test-reports/coverage.xml \
40+
--junitxml=test-reports/junit-report.xml \
41+
--html=test-reports/tests/report.html \
42+
--self-contained-html {posargs: --ignore=tests/test_end_to_end.py}
43+
44+
setenv =
45+
CPLUS_INCLUDE_PATH=/usr/include/gdal
46+
C_INCLUDE_PATH=/usr/include/gdal
47+
COVERAGE_FILE=.coverage.{envname}
48+
49+
[testenv:pypi]
50+
skip_install = true
51+
# To prevent from installing eodag and the dev deps set in testenv
52+
deps =
53+
build
54+
twine
55+
commands =
56+
# build package to be checked
57+
python -m build
58+
# Check that the long description is ready to be published on PyPI without errors
59+
python -m twine check dist/*
60+
61+
[testenv:linters]
62+
basepython = python3
63+
skip_install = true
64+
deps = pre-commit
65+
commands = pre-commit run --all-files

0 commit comments

Comments
 (0)
Please sign in to comment.