Commit 6d1290fa authored by Siarhei Khaletski (EPAM)'s avatar Siarhei Khaletski (EPAM) 🚩
Browse files

GONRG-3046: Requirements packages versions have been downgraded to support...

GONRG-3046: Requirements packages versions have been downgraded to support both Airflow 1.10.* and Airflow 2.0.*
parent 0b1913fd
Pipeline #58644 passed with stages
in 2 minutes and 18 seconds
......@@ -5,6 +5,8 @@
* [Introduction](#introduction)
* [Getting Started](#getting-started)
* * [Installation from source](#installation-from-source)
* * [Installation from Package Registry](#installation-from-package-registry)
* [Testing](#testing)
* * [Running E2E Tests](#running-e2e-tests)
* * [Running Ingestion libs Tests](#running-ingestion-libs-tests)
......@@ -35,7 +37,7 @@ cloud storages. In this `osdu_api.providers` folder CSP code is stored.
# Getting Started
To install this package:
## Installation from source
1. Pull the latest Python SDK's changes from https://community.opengroup.org/osdu/platform/system/sdks/common-python-sdk
......@@ -59,20 +61,26 @@ cd path/to/python-sdk
pip uninstall osdu-api
````
6. Install all needed dependencies
6. Install Python SDK
```sh
pip install -r requirements.txt
python setup.py install
```
7. Install Python SDK
Example import after installing:
`from osdu_api.storage.record_client import RecordClient`
## Installation from Package Registry
```sh
python setup.py install
pip install 'osdu-api' --extra-index-url=https://community.opengroup.org/api/v4/projects/148/packages/pypi/simple
```
Example import after installing:
`from osdu_api.storage.record_client import RecordClient`
**Note**: If the SDK is installing on environment where the packages `requests` and `tenacity` are not installed then run:
```sh
pip install 'osdu-api[all]' --extra-index-url=https://community.opengroup.org/api/v4/projects/148/packages/pypi/simple
```
## Testing
......
1.10.1
......@@ -2,7 +2,7 @@ jsonschema==3.2.0
pyyaml==5.4.1
requests==2.25.1
strict-rfc3339==0.7
tenacity==8.0.1
tenacity==6.2.0
toposort==1.6
dataclasses==0.8;python_version<"3.7"
......@@ -20,7 +20,9 @@ import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
COMMIT_BASED_VERSION = "0.0.5"
def get_version_from_file():
with open("VERSION", "r") as fh:
return fh.read().strip()
def prepare_version():
version = os.getenv("CI_COMMIT_TAG", '')
......@@ -32,7 +34,7 @@ def prepare_version():
# we assume that it is commit version
# https://packaging.python.org/guides/distributing-packages-using-setuptools/#local-version-identifiers
commit = os.environ["CI_COMMIT_SHORT_SHA"]
version = f"{COMMIT_BASED_VERSION}.dev+{commit}"
version = f"{get_version_from_file()}.dev+{commit}"
return version
......@@ -50,12 +52,12 @@ setuptools.setup(
install_requires=[
"jsonschema==3.2.0",
"pyyaml==5.4.1",
"requests==2.25.1",
"strict-rfc3339==0.7",
"tenacity==8.0.1",
"toposort==1.6",
"dataclasses==0.8;python_version<'3.7'"
],
extras_require={
"all": ["requests==2.25.1", "tenacity==6.2.0"]
},
python_requires='>=3.6',
)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment