Skip to content

Commit

Permalink
Session sharing (#280)
Browse files Browse the repository at this point in the history
* Implemented SessionSharingThread and collect_shared_session

* Added tests for session sharing, and improvements in SessionSharingThread

* Added universal session caching

* Added a chapter with advanced tutorials

* Increased the default session refresh time before expiry

* fixed an issue with session caching and added an extra test

* increased version to 3.6.0

* First version of session sharing tutorial notebook

* formatted notebook and fixed tests

* added Dask temp files to .gitignore

* added types ignore

* Removed ignore command and updated CI

* codespell fixes and added a diagram

* removed args and added an extra check in tests

* renamed SessionSharingThread.stop into SessionSharingThread.join

* added try-finally statement into examples

* multiple improvements of session sharing notebook
  • Loading branch information
AleksMat committed May 27, 2022
1 parent 8869541 commit 861fabe
Show file tree
Hide file tree
Showing 15 changed files with 830 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci_action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
architecture: x64

- name: Install packages
run: pip install -e .[DEV]
run: pip install -e .[AWS,DEV]

- name: Run mypy
run: mypy sentinelhub setup.py
Expand Down
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -106,15 +106,20 @@ ENV/
# Test output folder
/TestOutputs

# Dask
dask-worker-space

# Data generated by examples
examples/AwsData

# IDE config
.idea/
.vscode/

# Pytest
.pytest_cache

# Pipenv
Pipfile*

# Files that Sphinx generates
Expand Down
4 changes: 2 additions & 2 deletions docs/source/examples.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Examples
========
Basic examples
==============

.. toctree::
:maxdepth: 4
Expand Down
1 change: 1 addition & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ Documentation of `sentinelhub` Python package
configure
logging
examples
tutorials
reference/sentinelhub
7 changes: 7 additions & 0 deletions docs/source/tutorials.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Advanced tutorials
==================

.. toctree::
:maxdepth: 4

examples/session_sharing.ipynb
1 change: 1 addition & 0 deletions examples/data/session_sharing.drawio
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<mxfile host="app.diagrams.net" modified="2022-05-26T08:32:02.837Z" agent="5.0 (X11)" etag="XQO7OtGNrSaXBRrq08GQ" version="17.4.4" type="device"><diagram id="DOaRbYYg76pwdXUd3fTu" name="Page-1">7VrJcuIwEP0ajpPyglmOA2SZQ6pSxSHJUbEVWxXbcmQBZr5+WljyKgLMmJAwnFC31VpeP9rqlnv2NMpuGUqCe+rhsGcZXtazZz3LMk3HgR+hWeea4djOFT4jnuxUKubkN5ZKQ2oXxMNprSOnNOQkqStdGsfY5TUdYoyu6t1eaVifNUE+binmLgrb2kfi8SDXjhyj1N9h4gdqZtOQTyKkOktFGiCPrioq+7pnTxmlPG9F2RSHAjyFS253s+VpsTCGY76PweB9lN3e/FpapP/4/j6ho/Hs/occZYnChdxwzxqEMN7EI0to+qKpVC9KcY9IDFYPax5Q0UgYdXGaqn6whpemLehqI24Q4WsFMywVPArCZBUQjucJcsWTFZAKdAGPQpDMwnKJGcfZViDMAl7gJaYR5mwNXaRBXzpkrZgm5VXpX1M5Laj4diR1SFLKL0YuUYeGBP4AJ1hbnVDA+EjZG2Z7Y35SdJvwttAda8AdHAtc+5zBHZ0Y3P45g2s6J0bXOWd0i/fiqdAdaNBt4hN7P8UZAiQ3RGlK3DosjC5iD4tJDJBwRviTfCLaz0J/5UhpllW6zdZKiGErT1WhYiXE0mwjKbt8qdhrHV4a7oDt0AVz8e4jAEfMx/yDfpbevRX3ORr3KR3DIeJkWV+uzqdyhgdKYCNb2dPvN2iRb1NaVU9BzYGc+kD2uDFQjkNroA3Fim3/PeuGF9YdxLr+hXUdsG50Yd1BrLMvrOuAdeML6w5inXNhXQesUwnngTWNeQCe9cAuwhEVQMnnTFPJ2Fnd2D3d/z1+IwrU/+XHz0XMZi4yaOcilqH5rw2PlYyYuhpQJ7GyjI/Plci5K1ZeWUV8fK6FR32w9FAabGYuHfSpkdM09P7+ZqHTbJQmiwV+VujUFcv+iYU1YpSUHBqD6iv8Y1KC8IAZgc1h9oVe6sae3LzkzZ1QU1dq7JCaRyfU1845mpcirbLbt+GJrmh6Vjw5aUXkfHjSefn3q/HkpNnk+fBEV7Btpo7gGxJvPny4W7wIDmEgy+Y2hjLhKvqG470uZNIAJaIZ4Az5MIA9SSonH6ktDkPW7mTplWRYfVXRWfLk1F2rPFK9P9fd5NiHJ08glh9I5C4tPzOxr/8A</diagram></mxfile>
Binary file added examples/data/session_sharing.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 861fabe

Please sign in to comment.