cecil 0.0.14__tar.gz → 0.0.16__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of cecil might be problematic. Click here for more details.
- cecil-0.0.16/.editorconfig +16 -0
- cecil-0.0.16/.gitignore +11 -0
- cecil-0.0.16/Makefile +26 -0
- {cecil-0.0.14 → cecil-0.0.16}/PKG-INFO +12 -12
- {cecil-0.0.14 → cecil-0.0.16}/README.md +10 -10
- {cecil-0.0.14 → cecil-0.0.16}/pyproject.toml +2 -2
- cecil-0.0.16/src/cecil/__init__.py +3 -0
- {cecil-0.0.14 → cecil-0.0.16}/src/cecil/client.py +46 -31
- cecil-0.0.16/src/cecil/errors.py +62 -0
- {cecil-0.0.14 → cecil-0.0.16}/src/cecil/models.py +5 -28
- cecil-0.0.16/src/cecil/version.py +1 -0
- {cecil-0.0.14 → cecil-0.0.16}/tests/test_client.py +1 -13
- cecil-0.0.14/.gitignore +0 -6
- cecil-0.0.14/Makefile +0 -33
- cecil-0.0.14/__about__.py +0 -1
- cecil-0.0.14/src/cecil/__init__.py +0 -1
- {cecil-0.0.14 → cecil-0.0.16}/CONTRIBUTING.md +0 -0
- {cecil-0.0.14 → cecil-0.0.16}/LICENSE.txt +0 -0
- {cecil-0.0.14 → cecil-0.0.16}/tests/__init__.py +0 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
root = true
|
|
2
|
+
|
|
3
|
+
[*]
|
|
4
|
+
charset = utf-8
|
|
5
|
+
end_of_line = lf
|
|
6
|
+
insert_final_newline = true
|
|
7
|
+
indent_style = space
|
|
8
|
+
indent_size = 4
|
|
9
|
+
tab_width = 4
|
|
10
|
+
trim_trailing_whitespace = true
|
|
11
|
+
|
|
12
|
+
[*.tf]
|
|
13
|
+
indent_size = 2
|
|
14
|
+
|
|
15
|
+
[{*.go,Makefile}]
|
|
16
|
+
indent_style = tab
|
cecil-0.0.16/.gitignore
ADDED
cecil-0.0.16/Makefile
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
HL = @printf "\033[36m>> $1\033[0m\n"
|
|
2
|
+
|
|
3
|
+
.PHONY: build
|
|
4
|
+
build:
|
|
5
|
+
$(call HL,build)
|
|
6
|
+
@hatch build
|
|
7
|
+
|
|
8
|
+
.PHONY: clean
|
|
9
|
+
clean:
|
|
10
|
+
$(call HL,clean)
|
|
11
|
+
@hatch clean
|
|
12
|
+
|
|
13
|
+
.PHONY: publish.prod
|
|
14
|
+
publish.prod: clean build
|
|
15
|
+
$(call HL,publish.prod)
|
|
16
|
+
@twine upload --repository pypi dist/*
|
|
17
|
+
|
|
18
|
+
.PHONY: publish.test
|
|
19
|
+
publish.test: clean build
|
|
20
|
+
$(call HL,publish.test)
|
|
21
|
+
@twine upload --repository testpypi dist/*
|
|
22
|
+
|
|
23
|
+
.PHONY: test
|
|
24
|
+
test:
|
|
25
|
+
$(call HL,test)
|
|
26
|
+
@hatch test -v
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: cecil
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.16
|
|
4
4
|
Summary: Python SDK for Cecil Earth
|
|
5
5
|
License-Expression: MIT
|
|
6
6
|
License-File: LICENSE.txt
|
|
@@ -71,30 +71,30 @@ my_data_request = client.create_data_request(
|
|
|
71
71
|
dataset_id=planet_forest_carbon_diligence_id,
|
|
72
72
|
)
|
|
73
73
|
|
|
74
|
-
print(client.get_data_request(my_data_request.id)
|
|
74
|
+
print(client.get_data_request(my_data_request.id))
|
|
75
75
|
```
|
|
76
76
|
|
|
77
|
-
### Create a
|
|
77
|
+
### Create a transformation using the Cecil client
|
|
78
78
|
|
|
79
79
|
```python
|
|
80
|
-
|
|
80
|
+
my_transformation = client.create_transformation(
|
|
81
81
|
data_request_id=my_data_request.id,
|
|
82
82
|
crs="EPSG:4326",
|
|
83
|
-
|
|
83
|
+
spatial_resolution=0.005,
|
|
84
84
|
)
|
|
85
85
|
|
|
86
|
-
print(client.
|
|
86
|
+
print(client.get_transformation(my_transformation.id))
|
|
87
87
|
```
|
|
88
88
|
|
|
89
|
-
### Query data (once
|
|
89
|
+
### Query data (once transformation is completed)
|
|
90
90
|
|
|
91
91
|
```python
|
|
92
92
|
df = client.query(f'''
|
|
93
93
|
SELECT *
|
|
94
|
-
FROM
|
|
94
|
+
FROM
|
|
95
95
|
planet.forest_carbon_diligence
|
|
96
96
|
WHERE
|
|
97
|
-
|
|
97
|
+
transformation_id = '{my_transformation.id}'
|
|
98
98
|
''')
|
|
99
99
|
```
|
|
100
100
|
|
|
@@ -109,9 +109,9 @@ client.list_data_requests()
|
|
|
109
109
|
|
|
110
110
|
client.get_data_request(my_data_request.id)
|
|
111
111
|
|
|
112
|
-
client.
|
|
112
|
+
client.list_transformations()
|
|
113
113
|
|
|
114
|
-
client.
|
|
114
|
+
client.get_transformation(my_transformation.id)
|
|
115
115
|
```
|
|
116
116
|
|
|
117
117
|
## License
|
|
@@ -55,30 +55,30 @@ my_data_request = client.create_data_request(
|
|
|
55
55
|
dataset_id=planet_forest_carbon_diligence_id,
|
|
56
56
|
)
|
|
57
57
|
|
|
58
|
-
print(client.get_data_request(my_data_request.id)
|
|
58
|
+
print(client.get_data_request(my_data_request.id))
|
|
59
59
|
```
|
|
60
60
|
|
|
61
|
-
### Create a
|
|
61
|
+
### Create a transformation using the Cecil client
|
|
62
62
|
|
|
63
63
|
```python
|
|
64
|
-
|
|
64
|
+
my_transformation = client.create_transformation(
|
|
65
65
|
data_request_id=my_data_request.id,
|
|
66
66
|
crs="EPSG:4326",
|
|
67
|
-
|
|
67
|
+
spatial_resolution=0.005,
|
|
68
68
|
)
|
|
69
69
|
|
|
70
|
-
print(client.
|
|
70
|
+
print(client.get_transformation(my_transformation.id))
|
|
71
71
|
```
|
|
72
72
|
|
|
73
|
-
### Query data (once
|
|
73
|
+
### Query data (once transformation is completed)
|
|
74
74
|
|
|
75
75
|
```python
|
|
76
76
|
df = client.query(f'''
|
|
77
77
|
SELECT *
|
|
78
|
-
FROM
|
|
78
|
+
FROM
|
|
79
79
|
planet.forest_carbon_diligence
|
|
80
80
|
WHERE
|
|
81
|
-
|
|
81
|
+
transformation_id = '{my_transformation.id}'
|
|
82
82
|
''')
|
|
83
83
|
```
|
|
84
84
|
|
|
@@ -93,9 +93,9 @@ client.list_data_requests()
|
|
|
93
93
|
|
|
94
94
|
client.get_data_request(my_data_request.id)
|
|
95
95
|
|
|
96
|
-
client.
|
|
96
|
+
client.list_transformations()
|
|
97
97
|
|
|
98
|
-
client.
|
|
98
|
+
client.get_transformation(my_transformation.id)
|
|
99
99
|
```
|
|
100
100
|
|
|
101
101
|
## License
|
|
@@ -1,18 +1,25 @@
|
|
|
1
1
|
import os
|
|
2
|
-
from typing import Dict, List
|
|
3
|
-
|
|
4
2
|
import requests
|
|
5
3
|
import snowflake.connector
|
|
4
|
+
|
|
6
5
|
from pydantic import BaseModel
|
|
7
6
|
from requests import auth
|
|
7
|
+
from typing import Dict, List
|
|
8
|
+
|
|
9
|
+
from .errors import (
|
|
10
|
+
Error,
|
|
11
|
+
_handle_bad_request,
|
|
12
|
+
_handle_not_found,
|
|
13
|
+
_handle_unprocessable_entity,
|
|
14
|
+
)
|
|
8
15
|
|
|
9
16
|
from .models import (
|
|
10
17
|
AOI,
|
|
11
18
|
AOICreate,
|
|
12
19
|
DataRequest,
|
|
13
20
|
DataRequestCreate,
|
|
14
|
-
|
|
15
|
-
|
|
21
|
+
Transformation,
|
|
22
|
+
TransformationCreate,
|
|
16
23
|
RecoverAPIKey,
|
|
17
24
|
RecoverAPIKeyRequest,
|
|
18
25
|
RotateAPIKey,
|
|
@@ -20,8 +27,7 @@ from .models import (
|
|
|
20
27
|
SnowflakeCredentials,
|
|
21
28
|
)
|
|
22
29
|
|
|
23
|
-
|
|
24
|
-
SDK_VERSION = "0.0.14"
|
|
30
|
+
from .version import __version__
|
|
25
31
|
|
|
26
32
|
# TODO: Documentation (Google style)
|
|
27
33
|
# TODO: Add HTTP retries
|
|
@@ -31,9 +37,7 @@ class Client:
|
|
|
31
37
|
def __init__(self, env=None):
|
|
32
38
|
self._api_auth = None
|
|
33
39
|
self._base_url = (
|
|
34
|
-
"https://api.cecil.earth"
|
|
35
|
-
if env is None
|
|
36
|
-
else f"https://{env}-api.cecil.earth"
|
|
40
|
+
"https://api.cecil.earth" if env is None else f"https://{env}.cecil.earth"
|
|
37
41
|
)
|
|
38
42
|
self._snowflake_creds = None
|
|
39
43
|
|
|
@@ -65,27 +69,27 @@ class Client:
|
|
|
65
69
|
res = self._get(url="/v0/data-requests")
|
|
66
70
|
return [DataRequest(**record) for record in res["records"]]
|
|
67
71
|
|
|
68
|
-
def
|
|
69
|
-
self, data_request_id: str, crs: str,
|
|
70
|
-
) ->
|
|
71
|
-
# TODO: check if data request is completed before creating
|
|
72
|
+
def create_transformation(
|
|
73
|
+
self, data_request_id: str, crs: str, spatial_resolution: float
|
|
74
|
+
) -> Transformation:
|
|
75
|
+
# TODO: check if data request is completed before creating transformation
|
|
72
76
|
res = self._post(
|
|
73
|
-
url="/v0/
|
|
74
|
-
model=
|
|
77
|
+
url="/v0/transformations",
|
|
78
|
+
model=TransformationCreate(
|
|
75
79
|
data_request_id=data_request_id,
|
|
76
80
|
crs=crs,
|
|
77
|
-
|
|
81
|
+
spatial_resolution=spatial_resolution,
|
|
78
82
|
),
|
|
79
83
|
)
|
|
80
|
-
return
|
|
84
|
+
return Transformation(**res)
|
|
81
85
|
|
|
82
|
-
def
|
|
83
|
-
res = self._get(url=f"/v0/
|
|
84
|
-
return
|
|
86
|
+
def get_transformation(self, id: str) -> Transformation:
|
|
87
|
+
res = self._get(url=f"/v0/transformations/{id}")
|
|
88
|
+
return Transformation(**res)
|
|
85
89
|
|
|
86
|
-
def
|
|
87
|
-
res = self._get(url="/v0/
|
|
88
|
-
return [
|
|
90
|
+
def list_transformations(self) -> List[Transformation]:
|
|
91
|
+
res = self._get(url="/v0/transformations")
|
|
92
|
+
return [Transformation(**record) for record in res["records"]]
|
|
89
93
|
|
|
90
94
|
def query(self, sql):
|
|
91
95
|
if self._snowflake_creds is None:
|
|
@@ -121,7 +125,7 @@ class Client:
|
|
|
121
125
|
if skip_auth is False:
|
|
122
126
|
self._set_auth()
|
|
123
127
|
|
|
124
|
-
headers = {"cecil-python-sdk-version":
|
|
128
|
+
headers = {"cecil-python-sdk-version": __version__}
|
|
125
129
|
|
|
126
130
|
try:
|
|
127
131
|
r = requests.request(
|
|
@@ -135,14 +139,25 @@ class Client:
|
|
|
135
139
|
r.raise_for_status()
|
|
136
140
|
return r.json()
|
|
137
141
|
|
|
138
|
-
except requests.exceptions.ConnectionError
|
|
139
|
-
raise
|
|
142
|
+
except requests.exceptions.ConnectionError:
|
|
143
|
+
raise Error("failed to connect to the Cecil Platform")
|
|
140
144
|
except requests.exceptions.HTTPError as err:
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
145
|
+
match err.response.status_code:
|
|
146
|
+
case 400:
|
|
147
|
+
_handle_bad_request(err.response)
|
|
148
|
+
case 401:
|
|
149
|
+
raise Error("unauthorised")
|
|
150
|
+
case 404:
|
|
151
|
+
_handle_not_found(err.response)
|
|
152
|
+
case 422:
|
|
153
|
+
_handle_unprocessable_entity(err.response)
|
|
154
|
+
case 500:
|
|
155
|
+
raise Error("internal server error")
|
|
156
|
+
case _:
|
|
157
|
+
raise Error(
|
|
158
|
+
f"request failed with code {err.response.status_code}",
|
|
159
|
+
err.response.text,
|
|
160
|
+
)
|
|
146
161
|
|
|
147
162
|
def _get(self, url: str, **kwargs) -> Dict:
|
|
148
163
|
return self._request(method="get", url=url, **kwargs)
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import json
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class Error(Exception):
|
|
5
|
+
def __init__(self, message: str, details=None):
|
|
6
|
+
self.message = message
|
|
7
|
+
self.details = details
|
|
8
|
+
|
|
9
|
+
if self.details is not None:
|
|
10
|
+
super().__init__(f"{self.message} \n{json.dumps(self.details, indent=2)}")
|
|
11
|
+
return
|
|
12
|
+
|
|
13
|
+
super().__init__(self.message)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def _format_json_key(value: str):
|
|
17
|
+
return "".join(["_" + i.lower() if i.isupper() else i for i in value]).lstrip("_")
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def _is_json(value: str):
|
|
21
|
+
try:
|
|
22
|
+
json.loads(value)
|
|
23
|
+
return True
|
|
24
|
+
except ValueError:
|
|
25
|
+
return False
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
def _handle_bad_request(response):
|
|
29
|
+
if not _is_json(response.text):
|
|
30
|
+
raise Error("bad request")
|
|
31
|
+
|
|
32
|
+
details = {}
|
|
33
|
+
for key, value in response.json().items():
|
|
34
|
+
details[_format_json_key(key)] = value
|
|
35
|
+
|
|
36
|
+
raise Error("bad request", details)
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def _handle_not_found(response):
|
|
40
|
+
if not _is_json(response.text):
|
|
41
|
+
raise Error("resource not found")
|
|
42
|
+
|
|
43
|
+
details = {}
|
|
44
|
+
for key, value in response.json().items():
|
|
45
|
+
details[_format_json_key(key)] = value
|
|
46
|
+
|
|
47
|
+
raise Error("resource not found", details)
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
def _handle_unprocessable_entity(response):
|
|
51
|
+
if not _is_json(response.text):
|
|
52
|
+
raise Error(f"failed to process request")
|
|
53
|
+
|
|
54
|
+
res_body = response.json()
|
|
55
|
+
if "params" not in res_body:
|
|
56
|
+
raise Error(f"failed to process request")
|
|
57
|
+
|
|
58
|
+
details = {}
|
|
59
|
+
for key, value in res_body["params"].items():
|
|
60
|
+
details[_format_json_key(key)] = value
|
|
61
|
+
|
|
62
|
+
raise Error(f"failed to process request", details)
|
|
@@ -1,23 +1,10 @@
|
|
|
1
1
|
import datetime
|
|
2
|
-
from
|
|
3
|
-
from typing import Dict, List, Optional
|
|
2
|
+
from typing import Dict
|
|
4
3
|
|
|
5
4
|
from pydantic import BaseModel, ConfigDict, SecretStr
|
|
6
5
|
from pydantic.alias_generators import to_camel
|
|
7
6
|
|
|
8
7
|
|
|
9
|
-
class SubRequestStatus(str, Enum):
|
|
10
|
-
COMPLETED = "completed"
|
|
11
|
-
FAILED = "failed"
|
|
12
|
-
PROCESSING = "processing"
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
class DataRequestStatus(str, Enum):
|
|
16
|
-
COMPLETED = "completed"
|
|
17
|
-
FAILED = "failed"
|
|
18
|
-
PROCESSING = "processing"
|
|
19
|
-
|
|
20
|
-
|
|
21
8
|
class AOI(BaseModel):
|
|
22
9
|
model_config = ConfigDict(alias_generator=to_camel, populate_by_name=True)
|
|
23
10
|
id: str
|
|
@@ -34,21 +21,11 @@ class AOICreate(BaseModel):
|
|
|
34
21
|
geometry: Dict
|
|
35
22
|
|
|
36
23
|
|
|
37
|
-
class SubRequest(BaseModel):
|
|
38
|
-
model_config = ConfigDict(alias_generator=to_camel, populate_by_name=True)
|
|
39
|
-
external_id: str
|
|
40
|
-
description: str
|
|
41
|
-
status: SubRequestStatus
|
|
42
|
-
error_message: Optional[str]
|
|
43
|
-
|
|
44
|
-
|
|
45
24
|
class DataRequest(BaseModel):
|
|
46
25
|
model_config = ConfigDict(alias_generator=to_camel, populate_by_name=True)
|
|
47
26
|
id: str
|
|
48
27
|
aoi_id: str
|
|
49
28
|
dataset_id: str
|
|
50
|
-
sub_requests: List[SubRequest]
|
|
51
|
-
status: DataRequestStatus
|
|
52
29
|
created_at: datetime.datetime
|
|
53
30
|
created_by: str
|
|
54
31
|
|
|
@@ -78,21 +55,21 @@ class RotateAPIKeyRequest(BaseModel):
|
|
|
78
55
|
model_config = ConfigDict(alias_generator=to_camel, populate_by_name=True)
|
|
79
56
|
|
|
80
57
|
|
|
81
|
-
class
|
|
58
|
+
class Transformation(BaseModel):
|
|
82
59
|
model_config = ConfigDict(alias_generator=to_camel, populate_by_name=True)
|
|
83
60
|
id: str
|
|
84
61
|
data_request_id: str
|
|
85
62
|
crs: str
|
|
86
|
-
|
|
63
|
+
spatial_resolution: float
|
|
87
64
|
created_at: datetime.datetime
|
|
88
65
|
created_by: str
|
|
89
66
|
|
|
90
67
|
|
|
91
|
-
class
|
|
68
|
+
class TransformationCreate(BaseModel):
|
|
92
69
|
model_config = ConfigDict(alias_generator=to_camel, populate_by_name=True)
|
|
93
70
|
data_request_id: str
|
|
94
71
|
crs: str
|
|
95
|
-
|
|
72
|
+
spatial_resolution: float
|
|
96
73
|
|
|
97
74
|
|
|
98
75
|
class SnowflakeCredentials(BaseModel):
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.0.16"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import responses
|
|
2
2
|
|
|
3
3
|
from src.cecil.client import Client
|
|
4
|
-
from src.cecil.models import DataRequest
|
|
4
|
+
from src.cecil.models import DataRequest
|
|
5
5
|
|
|
6
6
|
FROZEN_TIME = "2024-01-01T00:00:00.000Z"
|
|
7
7
|
|
|
@@ -20,8 +20,6 @@ def test_client_create_data_request():
|
|
|
20
20
|
"id": "id",
|
|
21
21
|
"aoiId": "aoi_id",
|
|
22
22
|
"datasetId": "dataset_id",
|
|
23
|
-
"subRequests": [],
|
|
24
|
-
"status": "processing",
|
|
25
23
|
"created_at": FROZEN_TIME,
|
|
26
24
|
"created_by": "user_id",
|
|
27
25
|
},
|
|
@@ -35,8 +33,6 @@ def test_client_create_data_request():
|
|
|
35
33
|
id="id",
|
|
36
34
|
aoiId="aoi_id",
|
|
37
35
|
datasetId="dataset_id",
|
|
38
|
-
subRequests=[],
|
|
39
|
-
status="processing",
|
|
40
36
|
created_at="2024-01-01T00:00:00.000Z",
|
|
41
37
|
created_by="user_id",
|
|
42
38
|
)
|
|
@@ -53,8 +49,6 @@ def test_client_list_data_requests():
|
|
|
53
49
|
"id": "data_request_id_1",
|
|
54
50
|
"aoiId": "aoi_id",
|
|
55
51
|
"datasetId": "dataset_id",
|
|
56
|
-
"subRequests": [], # TODO: Add some SubRequests
|
|
57
|
-
"status": "processing",
|
|
58
52
|
"created_at": "2024-09-19T04:45:57.561Z",
|
|
59
53
|
"created_by": "user_id",
|
|
60
54
|
},
|
|
@@ -62,8 +56,6 @@ def test_client_list_data_requests():
|
|
|
62
56
|
"id": "data_request_id_2",
|
|
63
57
|
"aoiId": "aoi_id",
|
|
64
58
|
"datasetId": "dataset_id",
|
|
65
|
-
"subRequests": [], # TODO: Add some SubRequests
|
|
66
|
-
"status": "completed",
|
|
67
59
|
"created_at": "2024-09-19T04:54:38.252Z",
|
|
68
60
|
"created_by": "user_id",
|
|
69
61
|
},
|
|
@@ -79,8 +71,6 @@ def test_client_list_data_requests():
|
|
|
79
71
|
id="data_request_id_1",
|
|
80
72
|
aoiId="aoi_id",
|
|
81
73
|
datasetId="dataset_id",
|
|
82
|
-
subRequests=[],
|
|
83
|
-
status=DataRequestStatus.PROCESSING,
|
|
84
74
|
created_at="2024-09-19T04:45:57.561Z",
|
|
85
75
|
created_by="user_id",
|
|
86
76
|
),
|
|
@@ -88,8 +78,6 @@ def test_client_list_data_requests():
|
|
|
88
78
|
id="data_request_id_2",
|
|
89
79
|
aoiId="aoi_id",
|
|
90
80
|
datasetId="dataset_id",
|
|
91
|
-
subRequests=[],
|
|
92
|
-
status=DataRequestStatus.COMPLETED,
|
|
93
81
|
created_at="2024-09-19T04:54:38.252Z",
|
|
94
82
|
created_by="user_id",
|
|
95
83
|
),
|
cecil-0.0.14/.gitignore
DELETED
cecil-0.0.14/Makefile
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
HL = @printf "\033[36m>> $1\033[0m\n"
|
|
2
|
-
|
|
3
|
-
default: help
|
|
4
|
-
|
|
5
|
-
.PHONY: help
|
|
6
|
-
help:
|
|
7
|
-
@echo "Usage: make <target>\n"
|
|
8
|
-
@grep -E ".+:\s.*?##" $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?##"}; {printf "\033[36m%-24s\033[0m %s\n", $$1, $$2}'
|
|
9
|
-
|
|
10
|
-
.PHONY: build
|
|
11
|
-
build: clean test ## Build package
|
|
12
|
-
$(call HL,build)
|
|
13
|
-
hatch build
|
|
14
|
-
|
|
15
|
-
.PHONY: clean
|
|
16
|
-
clean: ## Clean dist
|
|
17
|
-
$(call HL,clean)
|
|
18
|
-
hatch clean
|
|
19
|
-
|
|
20
|
-
.PHONY: publish-test
|
|
21
|
-
publish-test: build ## Publish package to testpypi
|
|
22
|
-
$(call HL,publish-test)
|
|
23
|
-
twine upload --repository testpypi dist/*
|
|
24
|
-
|
|
25
|
-
.PHONY: publish-prod
|
|
26
|
-
publish-prod: build ## Publish package to pypi
|
|
27
|
-
$(call HL,publish-prod)
|
|
28
|
-
twine upload --repository pypi dist/*
|
|
29
|
-
|
|
30
|
-
.PHONY: test
|
|
31
|
-
test: ## Run tests
|
|
32
|
-
$(call HL,test)
|
|
33
|
-
hatch test -v
|
cecil-0.0.14/__about__.py
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.0.14"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
from .client import Client
|
|
File without changes
|
|
File without changes
|
|
File without changes
|