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

Release/v0.0.1 #8

Merged
merged 140 commits into from
Feb 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
140 commits
Select commit Hold shift + click to select a range
bd120fe
feat: add the BSD 3 clause licence
Dec 12, 2022
ce323f8
feat: add a barebones README
Dec 22, 2022
3879df6
feat: add a pyproject toml for the project
Dec 22, 2022
b62043f
feat: add empty CHANGELOG file
Dec 22, 2022
bd9d602
feat: initialise the datacosmos module
Dec 22, 2022
8b1590d
feat: initialise the tests module
Dec 22, 2022
a354ec2
feat: run lint on all branches
Dec 22, 2022
77df0fa
feat: a test workflow
Dec 22, 2022
11d43e7
fix: consolidate the two jobs into a single flow
Dec 22, 2022
0bae2d2
feat: calculate the version and tag the commit, on main
Dec 22, 2022
748aec8
feat: a passing test to check CI
Dec 22, 2022
3cfbc24
feat: add bandit linting to CI
Dec 22, 2022
6b6eddf
feat: include an isort check step
Dec 22, 2022
47e6867
feat: set up pydocstyle linting
Dec 22, 2022
769c6bc
feat: add cognitive complexity linting
Dec 22, 2022
9f09357
feat: add a "best practice" Python .gitignore
Dec 22, 2022
1893a24
feat: autogenerate a PR to add a changelog
Dec 22, 2022
ff78adf
fix: move the dependencies to optional, test
Jan 20, 2023
89e650d
feat: test on multiple Python versions
Jan 20, 2023
24a26c7
feat: test also on Python 3.8 and 3.9
Mar 6, 2023
bf2aaa9
fix: more generic 3.10 python version for actions
Mar 6, 2023
8955200
fix: downgrade the required Python version to 3.8 in the pyproject.toml
Mar 6, 2023
c025ce3
Merge pull request #1 from opencosmos/snas/project-setup
snasphysicist Mar 15, 2023
66e0332
Add first version of the client auth for sdk
TiagoOpenCosmos Jan 22, 2025
21d0ee3
Run ruff format and ruff check fix
TiagoOpenCosmos Jan 22, 2025
1efe6ed
Make some changes regarding code formatting
TiagoOpenCosmos Jan 22, 2025
0f1479f
Add some unit tests to datacosmos client
TiagoOpenCosmos Jan 23, 2025
df656da
Add more unit tests
TiagoOpenCosmos Jan 24, 2025
d13ce9b
Start fixing some of the issues reported by the pipeline
TiagoOpenCosmos Jan 24, 2025
319536e
Apply black
TiagoOpenCosmos Jan 24, 2025
e1bee71
Revert changes in pyproject.toml
TiagoOpenCosmos Jan 24, 2025
1e40bd6
Apply pydocstyle
TiagoOpenCosmos Jan 24, 2025
0f7da25
Apply changes to workflow file
TiagoOpenCosmos Jan 27, 2025
03fe4d5
Attempt to fix line too long error
TiagoOpenCosmos Jan 27, 2025
311b789
another attempt to fix line too long error
TiagoOpenCosmos Jan 27, 2025
eb2d7c6
rollback changes
TiagoOpenCosmos Jan 27, 2025
424f914
Make bandit ignore B105
TiagoOpenCosmos Jan 27, 2025
dcaed8f
Another attempt to make bandit ignore B105
TiagoOpenCosmos Jan 27, 2025
d9c207b
Make bandit skip more unrelevant check
TiagoOpenCosmos Jan 27, 2025
dcfce90
Fix syntax main.yaml
TiagoOpenCosmos Jan 27, 2025
57d3c7a
Attempt to fix line too long for client.py
TiagoOpenCosmos Jan 27, 2025
2dc23a5
Attempt to exclude files from flake8
TiagoOpenCosmos Jan 27, 2025
0051dc3
Fix syntax in pyproject.toml
TiagoOpenCosmos Jan 27, 2025
2c0ac0a
Another attempt to exclude dirs from flake8
TiagoOpenCosmos Jan 27, 2025
b3326a0
Another attempt to exclude dirs from flake8
TiagoOpenCosmos Jan 27, 2025
5da1516
Another attempt to exclude dirs from flake8
TiagoOpenCosmos Jan 27, 2025
c20be93
Make flake8 not deal with line too long errors
TiagoOpenCosmos Jan 27, 2025
ee823b6
Attempt to make flake8 run from main.yaml taking in consideration pyp…
TiagoOpenCosmos Jan 27, 2025
bb372d9
Another attempt to make flake8 ignore E501
TiagoOpenCosmos Jan 27, 2025
34d9c14
Attempt to make flake8 job ignore E501
TiagoOpenCosmos Jan 27, 2025
3bf0038
Attempt to make flake8 job ignore E501
TiagoOpenCosmos Jan 27, 2025
e1bbed8
Attempt to make flake8 job ignore E501
TiagoOpenCosmos Jan 27, 2025
cbde259
Add requests package to dependencies
TiagoOpenCosmos Jan 27, 2025
101e186
Add oauthlib to the dependencies
TiagoOpenCosmos Jan 27, 2025
a7e17b5
Add requests-oauthlib to dependencies
TiagoOpenCosmos Jan 27, 2025
c625a54
Refactor of authentication client
TiagoOpenCosmos Jan 31, 2025
1464484
Add new line in end of files
TiagoOpenCosmos Jan 31, 2025
0170cd3
Add pydantic and pydantic-settings to dependencies
TiagoOpenCosmos Jan 31, 2025
2c1256e
Fix pipeline
TiagoOpenCosmos Jan 31, 2025
fcb80da
Remove hardcoded credentials from config.py
TiagoOpenCosmos Feb 4, 2025
16558a2
Allow sdk user to say what log levels he/she wants to see when using …
TiagoOpenCosmos Feb 4, 2025
6b355f5
remove useless comment from m2m_authentication_config model
TiagoOpenCosmos Feb 4, 2025
7a3c8b5
Fix CI linting problems
TiagoOpenCosmos Feb 4, 2025
7aafba3
Apply black
TiagoOpenCosmos Feb 4, 2025
2808200
Address comments in MR
TiagoOpenCosmos Feb 5, 2025
cc80330
Apply isort
TiagoOpenCosmos Feb 5, 2025
84ea9da
Apply changes in the pipeline
TiagoOpenCosmos Feb 5, 2025
982197d
Add changes in pyproject.toml to make isort behave similarly to black
TiagoOpenCosmos Feb 5, 2025
d26e181
Allow default values for type, token_url and audience
TiagoOpenCosmos Feb 5, 2025
84e077f
decrease cognitive load
TiagoOpenCosmos Feb 5, 2025
5e2135c
Attempt to decrease cognitive complexity even more
TiagoOpenCosmos Feb 5, 2025
9e3d7d1
use prod values as default values; remove logging config
TiagoOpenCosmos Feb 6, 2025
05bd6b4
Add first version of stac catalog query functionalities to datacosmos…
TiagoOpenCosmos Jan 29, 2025
7c939fa
Some refactoring to be able to read config variables easily
TiagoOpenCosmos Jan 29, 2025
316f773
Refactor fetch_collection_items method to just receive collection_id …
TiagoOpenCosmos Jan 30, 2025
3e44baa
Add unit tests to stac client
TiagoOpenCosmos Jan 30, 2025
1e4fa8e
Make paginate_items private
TiagoOpenCosmos Jan 30, 2025
054e431
Fix pipeline issues
TiagoOpenCosmos Jan 30, 2025
bb3f9b5
Fix more pipeline issues
TiagoOpenCosmos Jan 30, 2025
a51e977
Try to add python-common in a different way
TiagoOpenCosmos Jan 30, 2025
37a73bb
Try to add python-common in a different way
TiagoOpenCosmos Jan 30, 2025
ee99721
Install dependencies with poetry and use secret for private repo usage
TiagoOpenCosmos Jan 30, 2025
f85bbe0
More changes to pyproject.toml
TiagoOpenCosmos Jan 31, 2025
0e8e2a8
Apply black
TiagoOpenCosmos Jan 31, 2025
c0c7635
Do rebase
TiagoOpenCosmos Jan 31, 2025
a995f11
Add new line at end of files
TiagoOpenCosmos Jan 31, 2025
43010d6
remove requirements.txt
TiagoOpenCosmos Jan 31, 2025
c8feca4
fix stac client unit tests
TiagoOpenCosmos Feb 4, 2025
49d5780
fix linting issues
TiagoOpenCosmos Feb 4, 2025
3ecee6a
Initial commit
pepjo Feb 6, 2025
d957727
Implement query functionalities for stac catalog
pepjo Feb 6, 2025
f04d32d
Some refactoring to be able to read config variables easily
TiagoOpenCosmos Jan 29, 2025
f5c81fc
Add new methods for stac item management
TiagoOpenCosmos Feb 4, 2025
95861d7
Adapt unit tests to method check_api_response added to stac_client
TiagoOpenCosmos Feb 5, 2025
c444cdf
Create itemupdate model; create unittest for new methods in stac item
TiagoOpenCosmos Feb 5, 2025
52b9c84
Apply isort and black
TiagoOpenCosmos Feb 5, 2025
b48c769
Delete unnecessary requirements.txt file
TiagoOpenCosmos Feb 5, 2025
d30bed1
fix pydocstyle issues
TiagoOpenCosmos Feb 5, 2025
a4b1978
Delete unused import
TiagoOpenCosmos Feb 5, 2025
8e6e821
Add shapely as dependency
TiagoOpenCosmos Feb 5, 2025
731599f
Change python-common version to the latest one
TiagoOpenCosmos Feb 5, 2025
bdc9730
Check if python-common 1.4.0 works
TiagoOpenCosmos Feb 5, 2025
038dff9
Fix issues in create_item, update_item and delete_item methods; Adapt…
TiagoOpenCosmos Feb 8, 2025
fdc1523
Refactor item_update.py to reduce cognitive complexity
TiagoOpenCosmos Feb 8, 2025
a25023e
Replace poetry by uv
TiagoOpenCosmos Feb 9, 2025
0014f83
Add authentication token to the pipeline
TiagoOpenCosmos Feb 9, 2025
77eecb2
Add authentication token to the pipeline through index-url
TiagoOpenCosmos Feb 9, 2025
c9ca0ec
Attempt to fix the way linters run
TiagoOpenCosmos Feb 9, 2025
c424d87
Activave virtual env before running any of the linters
TiagoOpenCosmos Feb 9, 2025
1c5bba2
Installing uv before anything else
TiagoOpenCosmos Feb 9, 2025
4006e9d
Adding back gitlab token authentication
TiagoOpenCosmos Feb 9, 2025
f86bde3
Attempt to fix pipeline
TiagoOpenCosmos Feb 9, 2025
0ffc6cb
Attempt to fix libgeos-dev issue
TiagoOpenCosmos Feb 9, 2025
68f6b6a
Attempt to fix flake8 issue
TiagoOpenCosmos Feb 9, 2025
941b6de
Update setuptools
TiagoOpenCosmos Feb 9, 2025
f3f7dfa
Downgrade importlib-metadata version
TiagoOpenCosmos Feb 9, 2025
e320657
Another attempt
TiagoOpenCosmos Feb 9, 2025
2b4edab
Another attempt to solve cognitive issue
TiagoOpenCosmos Feb 9, 2025
d36b9ac
Install importlib-metadata version 4.13.0
TiagoOpenCosmos Feb 9, 2025
a8927d3
Try to explicitly install importlib-metadata version 4.13.0 in main.yaml
TiagoOpenCosmos Feb 9, 2025
89e8a60
force instalation of version 4.13.0
TiagoOpenCosmos Feb 9, 2025
fbd42e0
Remove source activate from instalation
TiagoOpenCosmos Feb 9, 2025
1574c4c
Replace flake8 with ruff; make git ignore uv.lock
TiagoOpenCosmos Feb 10, 2025
71c7f3a
Exclude .venv dir from bandit
TiagoOpenCosmos Feb 10, 2025
4fa2706
Update dependencies in pyproject.toml to only consider those dependen…
TiagoOpenCosmos Feb 10, 2025
1614451
Add uv.lock
TiagoOpenCosmos Feb 10, 2025
0fd9f68
Update README.md file
TiagoOpenCosmos Feb 10, 2025
d996090
Refactor README.md file
TiagoOpenCosmos Feb 10, 2025
eb36654
Remove last configuration part
TiagoOpenCosmos Feb 10, 2025
a3d8781
Make datacosmos sdk not rely on private external packages; update rea…
TiagoOpenCosmos Feb 14, 2025
d55cfdb
put installation of geos back
TiagoOpenCosmos Feb 14, 2025
569ece2
Rename client with datacosmos_client; Move current stac api functiona…
TiagoOpenCosmos Feb 11, 2025
5b0e4f6
Add client for interacting with collections from the STAC API
TiagoOpenCosmos Feb 12, 2025
9fb35f2
Add unit tests for the CollectionClient
TiagoOpenCosmos Feb 12, 2025
508d8e2
rebase
TiagoOpenCosmos Feb 14, 2025
be4c9c3
Update readme file with the new methods
TiagoOpenCosmos Feb 14, 2025
9669f05
Remove shapely from dependencies
TiagoOpenCosmos Feb 14, 2025
4e76dfd
update uv.lock
TiagoOpenCosmos Feb 14, 2025
73fa55e
Merge pull request #6 from opencosmos/implement-stac-item-management
TiagoOpenCosmos Feb 17, 2025
4f58d87
Merge pull request #7 from opencosmos/implement-collection-management
TiagoOpenCosmos Feb 18, 2025
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
2 changes: 2 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[flake8]
ignore = E501
140 changes: 140 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
name: main

on:
push:
branches:
- "**"
pull_request:
branches:
- "**"

jobs:
lint:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install uv
run: pip install uv
- name: Set up uv environment
run: uv venv
- name: Install dependencies
run: uv pip install -r pyproject.toml .[dev]
- name: Activate virtual environment & run linters
run: |
source .venv/bin/activate
isort . --check-only
black . --check

bandit:
name: bandit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install uv
run: pip install uv
- name: Set up uv environment
run: uv venv
- name: Install dependencies
run: uv pip install -r pyproject.toml .[dev]
- name: Activate virtual environment & run bandit
run: |
source .venv/bin/activate
bandit -r -c pyproject.toml . --skip B105,B106,B101

cognitive:
name: cognitive
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install uv
run: pip install uv
- name: Set up uv environment
run: uv venv
- name: Install dependencies
run: uv pip install -r pyproject.toml .[dev]
- name: Activate virtual environment & run ruff
run: |
source .venv/bin/activate
ruff check . --select C901

pydocstyle:
name: pydocstyle
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install uv
run: pip install uv
- name: Set up uv environment
run: uv venv
- name: Install dependencies
run: uv pip install -r pyproject.toml .[dev]
- name: Activate virtual environment & run pydocstyle
run: |
source .venv/bin/activate
pydocstyle .

test:
name: test
runs-on: ubuntu-latest
needs: [bandit, cognitive, lint, pydocstyle]
steps:
- uses: actions/checkout@v3
- name: Install uv
run: pip install uv
- name: Set up uv environment
run: uv venv
- name: Install dependencies
run: uv pip install -r pyproject.toml .[dev]
- name: Activate virtual environment & run tests
run: |
source .venv/bin/activate
pytest

release:
name: tag, changelog, release, publish
runs-on: ubuntu-latest
needs: test
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v3
- name: Install uv
run: pip install uv
- name: Set up uv environment
run: uv venv
- name: Install dependencies
run: uv pip install -r pyproject.toml
- name: Version
uses: paulhatch/semantic-version@v5.0.0
id: version
with:
major_pattern: "(feat!)"
minor_pattern: "(feat)"
- name: Create changelog text
id: changelog
uses: loopwerk/tag-changelog@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
exclude_types: other,doc,chore
- name: Create release
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.version.outputs.version_tag }}
release_name: Release ${{ steps.version.outputs.version_tag }}
body: ${{ steps.changelog.outputs.changes }}
- name: Create changelog pull request
uses: peter-evans/create-pull-request@v2
with:
commit-message: "Release ${{ steps.version.outputs.version_tag }} [skip ci]"
labels: release, bot
title: "Release ${{ steps.version.outputs.version_tag }}"
body: |
# Release ${{ steps.version.outputs.version_tag }}

Merge this PR to update your version and changelog!

## Included Pull Requests

${{ steps.changelog.outputs.changes }}
141 changes: 141 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/#use-with-ide
.pdm.toml

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

# Ignore config.yaml
config/config.yaml

# Ignore .vscode
.vscode/

1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# CHANGELOG
12 changes: 12 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Copyright (c) 2022, OPEN COSMOS LTD
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Loading