Skip to content

Commit 40eff3c

Browse files
pshenoy-ucsnehals-ucsanthosh-uc
authored
Release changes and commit sync (#22) (#23)
* Update test_usage_api.py * Sync dev with main (#11) * Update test_usage_api.py (#9) * Updated test_get_billing_usage_by_billing_cycle to fetch billing cycle date from test_get_billing_cycles (#10) * Removed log function from test base * Updated test_get_billing_usage_by_billing_cycle to fetch billing cycle from test_get_billing_cycles --------- * Update test_party_analytics_api.py * New SDK changes (#17) * Update test_usage_api.py (#9) * Updated test_get_billing_usage_by_billing_cycle to fetch billing cycle date from test_get_billing_cycles (#10) * Removed log function from test base * Updated test_get_billing_usage_by_billing_cycle to fetch billing cycle from test_get_billing_cycles * Merging changes to testing test workflows (#12) * Update test_usage_api.py * Sync dev with main (#11) * Update test_usage_api.py (#9) * Updated test_get_billing_usage_by_billing_cycle to fetch billing cycle date from test_get_billing_cycles (#10) * Removed log function from test base * Updated test_get_billing_usage_by_billing_cycle to fetch billing cycle from test_get_billing_cycles --------- * Update test_party_analytics_api.py --------- * New SDK changes (#13) * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge (#14) * Change to run test * Change to run test (#15) * Adding statement to echo secrets * Update run_sdk_test.yml * Update run_sdk_test.yml * Updated test workflow * Adding statement to echo secrets in GitHub action workflow (#16) * Change to run test * Adding statement to echo secrets * Update run_sdk_test.yml * Update run_sdk_test.yml * Updated test workflow * Initial merge --------- * Release 1.1.0 (#20) * Update test_usage_api.py (#9) * Updated test_get_billing_usage_by_billing_cycle to fetch billing cycle date from test_get_billing_cycles (#10) * Removed log function from test base * Updated test_get_billing_usage_by_billing_cycle to fetch billing cycle from test_get_billing_cycles * Merging changes to testing test workflows (#12) * Update test_usage_api.py * Sync dev with main (#11) * Update test_usage_api.py (#9) * Updated test_get_billing_usage_by_billing_cycle to fetch billing cycle date from test_get_billing_cycles (#10) * Removed log function from test base * Updated test_get_billing_usage_by_billing_cycle to fetch billing cycle from test_get_billing_cycles --------- * Update test_party_analytics_api.py --------- * New SDK changes (#13) * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge (#14) * Change to run test * Change to run test (#15) * Adding statement to echo secrets * Update run_sdk_test.yml * Update run_sdk_test.yml * Updated test workflow * Adding statement to echo secrets in GitHub action workflow (#16) * Change to run test * Adding statement to echo secrets * Update run_sdk_test.yml * Update run_sdk_test.yml * Updated test workflow * Dev to master (#18) * Update test_usage_api.py * Sync dev with main (#11) * Update test_usage_api.py (#9) * Updated test_get_billing_usage_by_billing_cycle to fetch billing cycle date from test_get_billing_cycles (#10) * Removed log function from test base * Updated test_get_billing_usage_by_billing_cycle to fetch billing cycle from test_get_billing_cycles --------- * Update test_party_analytics_api.py * New SDK changes (#17) * Update test_usage_api.py (#9) * Updated test_get_billing_usage_by_billing_cycle to fetch billing cycle date from test_get_billing_cycles (#10) * Removed log function from test base * Updated test_get_billing_usage_by_billing_cycle to fetch billing cycle from test_get_billing_cycles * Merging changes to testing test workflows (#12) * Update test_usage_api.py * Sync dev with main (#11) * Update test_usage_api.py (#9) * Updated test_get_billing_usage_by_billing_cycle to fetch billing cycle date from test_get_billing_cycles (#10) * Removed log function from test base * Updated test_get_billing_usage_by_billing_cycle to fetch billing cycle from test_get_billing_cycles --------- * Update test_party_analytics_api.py --------- * New SDK changes (#13) * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge (#14) * Change to run test * Change to run test (#15) * Adding statement to echo secrets * Update run_sdk_test.yml * Update run_sdk_test.yml * Updated test workflow * Adding statement to echo secrets in GitHub action workflow (#16) * Change to run test * Adding statement to echo secrets * Update run_sdk_test.yml * Update run_sdk_test.yml * Updated test workflow * Initial merge --------- --------- * Initial merge * Initial merge --------- * Resolve merge conflicts * Resolve merge conflicts (#21) * Update test_usage_api.py (#9) * Updated test_get_billing_usage_by_billing_cycle to fetch billing cycle date from test_get_billing_cycles (#10) * Removed log function from test base * Updated test_get_billing_usage_by_billing_cycle to fetch billing cycle from test_get_billing_cycles * Merging changes to testing test workflows (#12) * Update test_usage_api.py * Sync dev with main (#11) * Update test_usage_api.py (#9) * Updated test_get_billing_usage_by_billing_cycle to fetch billing cycle date from test_get_billing_cycles (#10) * Removed log function from test base * Updated test_get_billing_usage_by_billing_cycle to fetch billing cycle from test_get_billing_cycles --------- * Update test_party_analytics_api.py --------- * New SDK changes (#13) * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge (#14) * Change to run test (#15) * Adding statement to echo secrets in GitHub action workflow (#16) * Change to run test * Adding statement to echo secrets * Update run_sdk_test.yml * Update run_sdk_test.yml * Updated test workflow * Dev to master (#18) * Update test_usage_api.py * Sync dev with main (#11) * Update test_usage_api.py (#9) * Updated test_get_billing_usage_by_billing_cycle to fetch billing cycle date from test_get_billing_cycles (#10) * Removed log function from test base * Updated test_get_billing_usage_by_billing_cycle to fetch billing cycle from test_get_billing_cycles --------- * Update test_party_analytics_api.py * New SDK changes (#17) * Update test_usage_api.py (#9) * Updated test_get_billing_usage_by_billing_cycle to fetch billing cycle date from test_get_billing_cycles (#10) * Removed log function from test base * Updated test_get_billing_usage_by_billing_cycle to fetch billing cycle from test_get_billing_cycles * Merging changes to testing test workflows (#12) * Update test_usage_api.py * Sync dev with main (#11) * Update test_usage_api.py (#9) * Updated test_get_billing_usage_by_billing_cycle to fetch billing cycle date from test_get_billing_cycles (#10) * Removed log function from test base * Updated test_get_billing_usage_by_billing_cycle to fetch billing cycle from test_get_billing_cycles --------- * Update test_party_analytics_api.py --------- * New SDK changes (#13) * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge * Initial merge (#14) * Change to run test * Change to run test (#15) * Adding statement to echo secrets * Update run_sdk_test.yml * Update run_sdk_test.yml * Updated test workflow * Adding statement to echo secrets in GitHub action workflow (#16) * Change to run test * Adding statement to echo secrets * Update run_sdk_test.yml * Update run_sdk_test.yml * Updated test workflow * Initial merge --------- --------- * Resolve merge conflicts --------- --------- Co-authored-by: Snehal Sakhardande <46550209+snehals-uc@users.noreply.github.com> Co-authored-by: santhosh-uc <santhoshk@unicourt.com>
1 parent faff99d commit 40eff3c

File tree

334 files changed

+102214
-112273
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

334 files changed

+102214
-112273
lines changed

CHANGELOG.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
SDK Release Note
2+
-----------------
3+
* SDK upgrade from current version 1.0.1 to new version 1.1.0
4+
* Supports OAS 3.1 standards
5+
* JSON schema validation of request and response objects
6+
* SDK objects are python objects so can be pickled and unpickled
7+
* Supports python version >= 3.7

README.md

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# UniCourt Python SDK
1+
# UniCourt Python SDK
22
The UniCourt SDK provides simplified access to the UniCourt API for applications written in the Python programming language.
33

44

@@ -10,7 +10,7 @@ See the UniCourt data model here (requires UniCourt account): [UniCourt Data Mod
1010

1111
### Requirements
1212

13-
- Python >=3.6
13+
- Python >=3.7
1414

1515
## Installation
1616
You can use the source code if you want to modify the package and use it as per your need. If you just want to use the package, just run:
@@ -21,7 +21,6 @@ pip install --upgrade unicourt
2121
Install from source :
2222

2323
```sh
24-
export SDK_VERSION=<new sdk version>
2524
python setup.py install
2625
```
2726

@@ -79,6 +78,30 @@ for attorney in attorney_obj.norm_attorney_search_result_array:
7978

8079
# Invalidate the generated access token
8180
Authentication.invalidate_token()
81+
```
8282

83-
84-
```
83+
## Python Error Exceptions
84+
SDK will throw Python error exceptions in the below mentioned scenario's.
85+
- When the request agruments or data passed to the SDK functions are incorrect.
86+
87+
Example :
88+
```
89+
Callback.get_callbacks() got an unexpected keyword argument 'vardate'
90+
```
91+
- When the sever sends any error response.
92+
93+
Example :
94+
```
95+
Reason: Internal Server Error
96+
HTTP response headers: HTTPHeaderDict({'Date': 'Tue, 13 Aug 2024 09:31:41 GMT', 'Content-Type': 'application/json', 'Content-Length': '145', 'Connection': 'keep-alive', 'Apigw-Requestid': 'ccMvJhfYoAMEWzA='})
97+
HTTP response body: {"object": "Exception", "code": "UN500", "message": "INTERNAL_SERVER_ERROR", "details": "Has encountered a situation which needs to be handled."}
98+
```
99+
- When the response has any new values which are not supported by the SDK. This can occur only when using the older version of SDK.
100+
101+
Example :
102+
```
103+
1 validation error for ServiceStatusDownDetails
104+
reason
105+
Value error, must be one of enum values ('issueAtTheCourtSource', 'notIntegrated', 'brokenIntegration') [type=value_error, input_value='underMaintenance', input_type=str]
106+
For further information visit https://errors.pydantic.dev/2.8/v/value_error
107+
```

pyproject.toml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
[tool.poetry]
2+
name = "unicourt"
3+
version = "1.1.0"
4+
description = "UniCourt Enterprise APIs"
5+
authors = ["OpenAPI Generator Community <team@openapitools.org>"]
6+
license = "NoLicense"
7+
readme = "README.md"
8+
repository = "https://github.com/GIT_USER_ID/GIT_REPO_ID"
9+
keywords = ["OpenAPI", "OpenAPI-Generator", "UniCourt Enterprise APIs"]
10+
include = ["unicourt/py.typed"]
11+
12+
[tool.poetry.dependencies]
13+
python = "^3.7"
14+
15+
urllib3 = ">= 1.25.3"
16+
python-dateutil = ">=2.8.2"
17+
pydantic = ">=2"
18+
typing-extensions = ">=4.7.1"
19+
20+
[tool.poetry.dev-dependencies]
21+
pytest = ">=7.2.1"
22+
tox = ">=3.9.0"
23+
flake8 = ">=4.0.0"
24+
types-python-dateutil = ">=2.8.19.14"
25+
mypy = "1.4.1"
26+
27+
28+
[build-system]
29+
requires = ["setuptools"]
30+
build-backend = "setuptools.build_meta"
31+
32+
[tool.pylint.'MESSAGES CONTROL']
33+
extension-pkg-whitelist = "pydantic"
34+
35+
[tool.mypy]
36+
files = [
37+
"unicourt",
38+
#"test", # auto-generated tests
39+
"tests", # hand-written tests
40+
]
41+
# TODO: enable "strict" once all these individual checks are passing
42+
# strict = true
43+
44+
# List from: https://mypy.readthedocs.io/en/stable/existing_code.html#introduce-stricter-options
45+
warn_unused_configs = true
46+
warn_redundant_casts = true
47+
warn_unused_ignores = true
48+
49+
## Getting these passing should be easy
50+
strict_equality = true
51+
strict_concatenate = true
52+
53+
## Strongly recommend enabling this one as soon as you can
54+
check_untyped_defs = true
55+
56+
## These shouldn't be too much additional work, but may be tricky to
57+
## get passing if you use a lot of untyped libraries
58+
disallow_subclassing_any = true
59+
disallow_untyped_decorators = true
60+
disallow_any_generics = true
61+
62+
### These next few are various gradations of forcing use of type annotations
63+
#disallow_untyped_calls = true
64+
#disallow_incomplete_defs = true
65+
#disallow_untyped_defs = true
66+
#
67+
### This one isn't too hard to get passing, but return on investment is lower
68+
#no_implicit_reexport = true
69+
#
70+
### This one can be tricky to get passing if you use a lot of untyped libraries
71+
#warn_return_any = true

requirements.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
python_dateutil >= 2.5.3
22
setuptools >= 21.0.0
3-
urllib3 >= 1.25.3
3+
urllib3 >= 1.25.3, < 2.1.0
4+
pydantic >= 2
5+
typing-extensions >= 4.7.1

setup.py

Lines changed: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,38 @@
1+
# coding: utf-8
2+
13
import os
2-
from setuptools import setup, find_packages
4+
from setuptools import setup, find_packages # noqa: H301
5+
36
here = os.path.abspath(os.path.dirname(__file__))
47
os.chdir(here)
58

6-
NAME = "unicourt"
7-
VERSION = os.getenv("SDK_VERSION")
9+
def _read(filename):
10+
with open(os.path.join(os.path.dirname(__file__), filename)) as f:
11+
return f.read()
12+
13+
def _generate_description():
14+
description = []
15+
description.append("The UniCourt Python Package provides simplified access to the UniCourt API for applications written in the Python programming language. Documentation of UniCourt's APIs can be found at docs.unicourt.com. API keys can be obtained by filling out the form here https://unicourt.com/contact-us/?c=sales&enterprise=1 \n")
16+
changelog_file = os.getenv("CHANGELOG_FILE")
17+
if changelog_file:
18+
description.append(_read("CHANGELOG.rst"))
19+
return "\n".join(description)
20+
821
# To install the library, run the following
922
#
1023
# python setup.py install
1124
#
1225
# prerequisite: setuptools
1326
# http://pypi.python.org/pypi/setuptools
14-
15-
REQUIRES = ["python_dateutil >= 2.5.3", "urllib3 >= 1.25.3"]
27+
NAME = "unicourt"
28+
VERSION = "1.1.0"
29+
PYTHON_REQUIRES = ">=3.7"
30+
REQUIRES = [
31+
"urllib3 >= 1.25.3, < 2.1.0",
32+
"python-dateutil",
33+
"pydantic >= 2",
34+
"typing-extensions >= 4.7.1",
35+
]
1636

1737
setup(
1838
name=NAME,
@@ -24,14 +44,14 @@
2444
url="https://unicourt.com/",
2545
project_urls={
2646
"Source": "https://github.com/UniCourt/enterprise-api-py-sdk/tree/main",
27-
"Documentation": "https://docs.unicourt.com/",
47+
"Documentation": "https://docs.unicourt.com/knowledge-base/python-sdk",
2848
},
2949
keywords=["UniCourt", "UniCourt Python Package",
3050
"UniCourt Enterprise APIs"],
31-
python_requires=">=3.6",
51+
python_requires=PYTHON_REQUIRES,
3252
install_requires=REQUIRES,
3353
packages=find_packages(exclude=["test", "tests"]),
3454
include_package_data=True,
35-
long_description="""The UniCourt Python Package provides simplified access to the UniCourt API for applications written in the Python programming language. Documentation of UniCourt's APIs can be found at docs.unicourt.com. API keys can be obtained by filling out the form here https://unicourt.com/contact-us/?c=sales&enterprise=1
36-
"""
55+
long_description=_generate_description(),
56+
package_data={"unicourt": ["py.typed"]},
3757
)

test/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33

44
## Getting started
5-
To run the SDK tests you need python >= 3.6 and Git installed.
5+
To run the SDK tests you need python >= 3.7 and Git installed.
66

77
## Test Parameters
88
- Run all tests

test/base.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,14 @@ def __init__(self) -> None:
1919

2020
def run(self):
2121
args = self.parser.parse_args()
22-
# getting the list of test file and re-order authentication test file at end to run.
22+
23+
# Getting the list of test file.
2324
module_list = [re.sub("\.py", "", module) for module in os.listdir() if module.startswith("test") and module.endswith("py")]
25+
26+
# Re-order authentication test file at end to run.
2427
index = module_list.index('test_authentication_api')
2528
module_list[index], module_list[-1] = module_list[-1], module_list[index]
29+
2630
for module_name in module_list:
2731
module = __import__(module_name)
2832
class_name = [class_name for class_name in dir(module) if class_name.startswith('Test')][0]

test/test_attorney_analytics_api.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33

44
class TestAttorneyAnalytics:
5-
65
def test_get_norm_attorney_by_id():
76
return AttorneyAnalytics.get_norm_attorney_by_id(
87
norm_attorney_id="NATYs4P6kDBkhKL8CF")

test/test_authentication_api.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44

55
class TestAuthentication:
6-
76
def test_list_all_token_ids():
87
return Authentication.list_all_token_ids()
98

test/test_case_analytics_api.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ def test_get_case_count_analytics_by_norm_law_firm():
8282
)
8383

8484
def test_get_case_count_analytics_by_norm_party():
85-
8685
return CaseAnalytics.get_case_count_analytics_by_norm_party(
8786
page_number=1,
8887
q='caseTypeId:"CTYPATMYyaJekdgj2c" AND caseFiledDate:[2017-01-01T00:00:00+00:00TO2021-11-30T00:00:00+00:00]'

0 commit comments

Comments
 (0)