1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
|
%global _empty_manifest_terminate_build 0
Name: python-DXC-Industrialized-AI-Starter
Version: 3.2.0
Release: 1
Summary: Python library which is extensively used for all AI projects
License: Apache License 2.0
URL: https://github.com/dxc-technology/DXC-Industrialized-AI-Starter
Source0: https://mirrors.nju.edu.cn/pypi/web/packages/f4/0b/4f7fa3428c36e4db8cd3613198ad1d0f18e484c1810b9648c0eff0948359/DXC-Industrialized-AI-Starter-3.2.0.tar.gz
BuildArch: noarch
Requires: python3-TPOT
Requires: python3-yellowbrick
Requires: python3-scrubadub
Requires: python3-feature-engine
Requires: python3-pymongo
Requires: python3-pmdarima
Requires: python3-ftfy
Requires: python3-interpret-community
Requires: python3-missingno
Requires: python3-arrow
Requires: python3-pyjanitor
Requires: python3-pyaf
Requires: python3-pandas-profiling
Requires: python3-datacleaner
Requires: python3-GitPython
Requires: python3-ipython
Requires: python3-raiwidgets
Requires: python3-scikit-learn
Requires: python3-flatten-json
Requires: python3-sqlalchemy
Requires: python3-dnspython
Requires: python3-pytest
Requires: python3-PyGithub
Requires: python3-google-api-python-client
%description

<img src="https://raw.githubusercontent.com/dxc-technology/DXC-Industrialized-AI-Starter/master/Industrialized_AI_Animation.gif" height="500" width="900" ></img>
# DXC Industrialized AI Starter
DXC Industrialized AI Starter makes it easy for you to deploy your AI algorithms (Industrialize). If you are a data scientist, working on an algorithm that you would like to deploy across the enterprise, DXC's Industrialized AI starter makes it easier for you to:
- Access, clean, and explore raw data
- Build data pipelines
- Run AI experiments
- Publish microservices
## Installation
In order to install and use the DXC AI Starter library, please use the below code snippet:
```python
1. pip install DXC-Industrialized-AI-Starter
2. from dxc import ai
```
## Getting Started
### Access, Clean, and Explore Raw Data
Use the library to access, clean, and explore your raw data.
``` python
#Access raw data
df = ai.read_data_frame_from_remote_json(json_url)
df = ai.read_data_frame_from_remote_csv(csv_url)
df = ai.read_data_frame_from_local_json()
df = ai.read_data_frame_from_local_csv()
df = ai.read_data_frame_from_local_excel_file()
#Clean data: Imputes missing data, removes empty rows and columns, anonymizes text.
raw_data = ai.clean_dataframe(df)
#Explore complete data as a HTML interactive report
report = ai.explore_complete_data(df)
report.to_notebook_iframe()
#Explore raw data:
ai.visualize_missing_data(raw_data) #visualizes relationships between all features in data.
ai.explore_features(raw_data) #creates a visual display of missing data.
ai.plot_distributions(raw_data) #creates a distribution graph for each column.
```
[Click here](https://dxc-technology.github.io/DXC-Industrialized-AI-Starter/access_clean/) for details about Acess,clean,explore raw data.
### Build Data Pipelines
Pipelines are a standard way to process your data towards modeling and interpreting. By default, the DXC AI Starter library uses the free tier of [MongoDB Atlas](https://account.mongodb.com/account/register) to store raw data and execute pipelines. In order to get started, you need to first have an <a href= "https://account.mongodb.com/account/register" target="_blank">MongoDB</a> account which you can signup for free and create a database "connection_string" and specify those details in the data_layer below. The following code connects to MongoDB and stores raw data for processing.
```python
#Insert data into MongoDB:
data_layer = {
"connection_string": "<your connection_string>",
"collection_name": "<your collection_name>",
"database_name": "<your database_name>",
"data_source":"<Source of your datset>",
"cleaner":"<whether applied cleaner yes/no >"
}
wrt_raw_data = ai.write_raw_data(data_layer, raw_data, date_fields = [])
```
Once raw data is stored, you can run pipelines to transform the data. This code instructs the data store on how to refine the output of raw data into something that can be used to train a machine-learning model. Please refer to the syntax of [MongDB pipelines](https://docs.mongodb.com/manual/core/aggregation-pipeline/) for the details of how to write a pipeline. Below is an example of creating and executing a pipeline.
```python
pipeline = [
{
'$group':{
'_id': {
"funding_source":"$funding_source",
"request_type":"$request_type",
"department_name":"$department_name",
"replacement_body_style":"$replacement_body_style",
"equipment_class":"$equipment_class",
"replacement_make":"$replacement_make",
"replacement_model":"$replacement_model",
"procurement_plan":"$procurement_plan"
},
"avg_est_unit_cost":{"$avg":"$est_unit_cost"},
"avg_est_unit_cost_error":{"$avg":{ "$subtract": [ "$est_unit_cost", "$actual_unit_cost" ] }}
}
}
]
df = ai.access_data_from_pipeline(wrt_raw_data, pipeline) #refined data will be stored in pandas dataframe.
```
<a href= "https://dxc-technology.github.io/DXC-Industrialized-AI-Starter/data_pipeline/" target="_blank">Click here</a> for details about building data pipeline.
### Run AI Experiments
Use the DXC AI Starter to build and test algorithms. This code executes an experiment by running run_experiment() on an experiment design.
```python
experiment_design = {
#model options include ['tpot_regression()', 'tpot_classification()', 'timeseries']
"model": ai.tpot_regression(),
"labels": df.avg_est_unit_cost_error,
"data": df,
#Tell the model which column is 'output'
#Also note columns that aren't purely numerical
#Examples include ['nlp', 'date', 'categorical', 'ignore']
"meta_data": {
"avg_est_unit_cost_error": "output",
"_id.funding_source": "categorical",
"_id.department_name": "categorical",
"_id.replacement_body_style": "categorical",
"_id.replacement_make": "categorical",
"_id.replacement_model": "categorical",
"_id.procurement_plan": "categorical"
}
}
trained_model = ai.run_experiment(experiment_design, verbose = False, max_time_mins = 5, max_eval_time_mins = 0.04, config_dict = None, warm_start = False, export_pipeline = True, scoring = None)
```
[Click here](https://dxc-technology.github.io/DXC-Industrialized-AI-Starter/experiment/) for details about run AI experiments.
### Publish Microservice
The DXC AI Starter library makes it easy to publish your models as working microservices. By default, the DXC AI Starter library uses free tier of [Algorithmia](https://algorithmia.com/signup) to publish models as microservices. You must create an [Algorithmia](https://algorithmia.com/signup) account to use. Below is the example for publishing a microservice.
```python
#trained_model is the output of run_experiment() function
microservice_design = {
"microservice_name": "<Name of your microservice>",
"microservice_description": "<Brief description about your microservice>",
"execution_environment_username": "<Algorithmia username>",
"api_key": "<your api_key>",
"api_namespace": "<your api namespace>",
"model_path":"<your model_path>"
}
#publish the micro service and display the url of the api
api_url = ai.publish_microservice(microservice_design, trained_model)
print("api url: " + api_url)
```
[Click here](https://dxc-technology.github.io/DXC-Industrialized-AI-Starter/publish_microservice/) for details about publishing microservice.
## Docs
For detailed and complete documentation, please <a href="https://dxc-technology.github.io/DXC-Industrialized-AI-Starter/" target="_blank">click here</a>
### Example notebooks
<a href="https://nbviewer.jupyter.org/github/dxc-technology/DXC-Industrialized-AI-Starter/tree/c58754247060262ac0949396e48f71861cb79d4e/Examples/" target="_blank">Here</a> are example notebooks for individual models. These sample notebooks help to understand on how to use each function, what parameters are expected for each function and what will be the output of each function in a model.
### Contributing Guide
To know more about the contribution and guidelines please <a href="https://github.com/dxc-technology/DXC-Industrialized-AI-Starter/blob/master/CONTRIBUTING.md" target="_blank">click here</a>
### Reporting Issues
If you find any issues, feel free to report them <a href="https://github.com/dxc-technology/DXC-Industrialized-AI-Starter/issues" target="_blank">here</a> with clear description of your issue. You can use the existing templates for creating issues.
%package -n python3-DXC-Industrialized-AI-Starter
Summary: Python library which is extensively used for all AI projects
Provides: python-DXC-Industrialized-AI-Starter
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-pip
%description -n python3-DXC-Industrialized-AI-Starter

<img src="https://raw.githubusercontent.com/dxc-technology/DXC-Industrialized-AI-Starter/master/Industrialized_AI_Animation.gif" height="500" width="900" ></img>
# DXC Industrialized AI Starter
DXC Industrialized AI Starter makes it easy for you to deploy your AI algorithms (Industrialize). If you are a data scientist, working on an algorithm that you would like to deploy across the enterprise, DXC's Industrialized AI starter makes it easier for you to:
- Access, clean, and explore raw data
- Build data pipelines
- Run AI experiments
- Publish microservices
## Installation
In order to install and use the DXC AI Starter library, please use the below code snippet:
```python
1. pip install DXC-Industrialized-AI-Starter
2. from dxc import ai
```
## Getting Started
### Access, Clean, and Explore Raw Data
Use the library to access, clean, and explore your raw data.
``` python
#Access raw data
df = ai.read_data_frame_from_remote_json(json_url)
df = ai.read_data_frame_from_remote_csv(csv_url)
df = ai.read_data_frame_from_local_json()
df = ai.read_data_frame_from_local_csv()
df = ai.read_data_frame_from_local_excel_file()
#Clean data: Imputes missing data, removes empty rows and columns, anonymizes text.
raw_data = ai.clean_dataframe(df)
#Explore complete data as a HTML interactive report
report = ai.explore_complete_data(df)
report.to_notebook_iframe()
#Explore raw data:
ai.visualize_missing_data(raw_data) #visualizes relationships between all features in data.
ai.explore_features(raw_data) #creates a visual display of missing data.
ai.plot_distributions(raw_data) #creates a distribution graph for each column.
```
[Click here](https://dxc-technology.github.io/DXC-Industrialized-AI-Starter/access_clean/) for details about Acess,clean,explore raw data.
### Build Data Pipelines
Pipelines are a standard way to process your data towards modeling and interpreting. By default, the DXC AI Starter library uses the free tier of [MongoDB Atlas](https://account.mongodb.com/account/register) to store raw data and execute pipelines. In order to get started, you need to first have an <a href= "https://account.mongodb.com/account/register" target="_blank">MongoDB</a> account which you can signup for free and create a database "connection_string" and specify those details in the data_layer below. The following code connects to MongoDB and stores raw data for processing.
```python
#Insert data into MongoDB:
data_layer = {
"connection_string": "<your connection_string>",
"collection_name": "<your collection_name>",
"database_name": "<your database_name>",
"data_source":"<Source of your datset>",
"cleaner":"<whether applied cleaner yes/no >"
}
wrt_raw_data = ai.write_raw_data(data_layer, raw_data, date_fields = [])
```
Once raw data is stored, you can run pipelines to transform the data. This code instructs the data store on how to refine the output of raw data into something that can be used to train a machine-learning model. Please refer to the syntax of [MongDB pipelines](https://docs.mongodb.com/manual/core/aggregation-pipeline/) for the details of how to write a pipeline. Below is an example of creating and executing a pipeline.
```python
pipeline = [
{
'$group':{
'_id': {
"funding_source":"$funding_source",
"request_type":"$request_type",
"department_name":"$department_name",
"replacement_body_style":"$replacement_body_style",
"equipment_class":"$equipment_class",
"replacement_make":"$replacement_make",
"replacement_model":"$replacement_model",
"procurement_plan":"$procurement_plan"
},
"avg_est_unit_cost":{"$avg":"$est_unit_cost"},
"avg_est_unit_cost_error":{"$avg":{ "$subtract": [ "$est_unit_cost", "$actual_unit_cost" ] }}
}
}
]
df = ai.access_data_from_pipeline(wrt_raw_data, pipeline) #refined data will be stored in pandas dataframe.
```
<a href= "https://dxc-technology.github.io/DXC-Industrialized-AI-Starter/data_pipeline/" target="_blank">Click here</a> for details about building data pipeline.
### Run AI Experiments
Use the DXC AI Starter to build and test algorithms. This code executes an experiment by running run_experiment() on an experiment design.
```python
experiment_design = {
#model options include ['tpot_regression()', 'tpot_classification()', 'timeseries']
"model": ai.tpot_regression(),
"labels": df.avg_est_unit_cost_error,
"data": df,
#Tell the model which column is 'output'
#Also note columns that aren't purely numerical
#Examples include ['nlp', 'date', 'categorical', 'ignore']
"meta_data": {
"avg_est_unit_cost_error": "output",
"_id.funding_source": "categorical",
"_id.department_name": "categorical",
"_id.replacement_body_style": "categorical",
"_id.replacement_make": "categorical",
"_id.replacement_model": "categorical",
"_id.procurement_plan": "categorical"
}
}
trained_model = ai.run_experiment(experiment_design, verbose = False, max_time_mins = 5, max_eval_time_mins = 0.04, config_dict = None, warm_start = False, export_pipeline = True, scoring = None)
```
[Click here](https://dxc-technology.github.io/DXC-Industrialized-AI-Starter/experiment/) for details about run AI experiments.
### Publish Microservice
The DXC AI Starter library makes it easy to publish your models as working microservices. By default, the DXC AI Starter library uses free tier of [Algorithmia](https://algorithmia.com/signup) to publish models as microservices. You must create an [Algorithmia](https://algorithmia.com/signup) account to use. Below is the example for publishing a microservice.
```python
#trained_model is the output of run_experiment() function
microservice_design = {
"microservice_name": "<Name of your microservice>",
"microservice_description": "<Brief description about your microservice>",
"execution_environment_username": "<Algorithmia username>",
"api_key": "<your api_key>",
"api_namespace": "<your api namespace>",
"model_path":"<your model_path>"
}
#publish the micro service and display the url of the api
api_url = ai.publish_microservice(microservice_design, trained_model)
print("api url: " + api_url)
```
[Click here](https://dxc-technology.github.io/DXC-Industrialized-AI-Starter/publish_microservice/) for details about publishing microservice.
## Docs
For detailed and complete documentation, please <a href="https://dxc-technology.github.io/DXC-Industrialized-AI-Starter/" target="_blank">click here</a>
### Example notebooks
<a href="https://nbviewer.jupyter.org/github/dxc-technology/DXC-Industrialized-AI-Starter/tree/c58754247060262ac0949396e48f71861cb79d4e/Examples/" target="_blank">Here</a> are example notebooks for individual models. These sample notebooks help to understand on how to use each function, what parameters are expected for each function and what will be the output of each function in a model.
### Contributing Guide
To know more about the contribution and guidelines please <a href="https://github.com/dxc-technology/DXC-Industrialized-AI-Starter/blob/master/CONTRIBUTING.md" target="_blank">click here</a>
### Reporting Issues
If you find any issues, feel free to report them <a href="https://github.com/dxc-technology/DXC-Industrialized-AI-Starter/issues" target="_blank">here</a> with clear description of your issue. You can use the existing templates for creating issues.
%package help
Summary: Development documents and examples for DXC-Industrialized-AI-Starter
Provides: python3-DXC-Industrialized-AI-Starter-doc
%description help

<img src="https://raw.githubusercontent.com/dxc-technology/DXC-Industrialized-AI-Starter/master/Industrialized_AI_Animation.gif" height="500" width="900" ></img>
# DXC Industrialized AI Starter
DXC Industrialized AI Starter makes it easy for you to deploy your AI algorithms (Industrialize). If you are a data scientist, working on an algorithm that you would like to deploy across the enterprise, DXC's Industrialized AI starter makes it easier for you to:
- Access, clean, and explore raw data
- Build data pipelines
- Run AI experiments
- Publish microservices
## Installation
In order to install and use the DXC AI Starter library, please use the below code snippet:
```python
1. pip install DXC-Industrialized-AI-Starter
2. from dxc import ai
```
## Getting Started
### Access, Clean, and Explore Raw Data
Use the library to access, clean, and explore your raw data.
``` python
#Access raw data
df = ai.read_data_frame_from_remote_json(json_url)
df = ai.read_data_frame_from_remote_csv(csv_url)
df = ai.read_data_frame_from_local_json()
df = ai.read_data_frame_from_local_csv()
df = ai.read_data_frame_from_local_excel_file()
#Clean data: Imputes missing data, removes empty rows and columns, anonymizes text.
raw_data = ai.clean_dataframe(df)
#Explore complete data as a HTML interactive report
report = ai.explore_complete_data(df)
report.to_notebook_iframe()
#Explore raw data:
ai.visualize_missing_data(raw_data) #visualizes relationships between all features in data.
ai.explore_features(raw_data) #creates a visual display of missing data.
ai.plot_distributions(raw_data) #creates a distribution graph for each column.
```
[Click here](https://dxc-technology.github.io/DXC-Industrialized-AI-Starter/access_clean/) for details about Acess,clean,explore raw data.
### Build Data Pipelines
Pipelines are a standard way to process your data towards modeling and interpreting. By default, the DXC AI Starter library uses the free tier of [MongoDB Atlas](https://account.mongodb.com/account/register) to store raw data and execute pipelines. In order to get started, you need to first have an <a href= "https://account.mongodb.com/account/register" target="_blank">MongoDB</a> account which you can signup for free and create a database "connection_string" and specify those details in the data_layer below. The following code connects to MongoDB and stores raw data for processing.
```python
#Insert data into MongoDB:
data_layer = {
"connection_string": "<your connection_string>",
"collection_name": "<your collection_name>",
"database_name": "<your database_name>",
"data_source":"<Source of your datset>",
"cleaner":"<whether applied cleaner yes/no >"
}
wrt_raw_data = ai.write_raw_data(data_layer, raw_data, date_fields = [])
```
Once raw data is stored, you can run pipelines to transform the data. This code instructs the data store on how to refine the output of raw data into something that can be used to train a machine-learning model. Please refer to the syntax of [MongDB pipelines](https://docs.mongodb.com/manual/core/aggregation-pipeline/) for the details of how to write a pipeline. Below is an example of creating and executing a pipeline.
```python
pipeline = [
{
'$group':{
'_id': {
"funding_source":"$funding_source",
"request_type":"$request_type",
"department_name":"$department_name",
"replacement_body_style":"$replacement_body_style",
"equipment_class":"$equipment_class",
"replacement_make":"$replacement_make",
"replacement_model":"$replacement_model",
"procurement_plan":"$procurement_plan"
},
"avg_est_unit_cost":{"$avg":"$est_unit_cost"},
"avg_est_unit_cost_error":{"$avg":{ "$subtract": [ "$est_unit_cost", "$actual_unit_cost" ] }}
}
}
]
df = ai.access_data_from_pipeline(wrt_raw_data, pipeline) #refined data will be stored in pandas dataframe.
```
<a href= "https://dxc-technology.github.io/DXC-Industrialized-AI-Starter/data_pipeline/" target="_blank">Click here</a> for details about building data pipeline.
### Run AI Experiments
Use the DXC AI Starter to build and test algorithms. This code executes an experiment by running run_experiment() on an experiment design.
```python
experiment_design = {
#model options include ['tpot_regression()', 'tpot_classification()', 'timeseries']
"model": ai.tpot_regression(),
"labels": df.avg_est_unit_cost_error,
"data": df,
#Tell the model which column is 'output'
#Also note columns that aren't purely numerical
#Examples include ['nlp', 'date', 'categorical', 'ignore']
"meta_data": {
"avg_est_unit_cost_error": "output",
"_id.funding_source": "categorical",
"_id.department_name": "categorical",
"_id.replacement_body_style": "categorical",
"_id.replacement_make": "categorical",
"_id.replacement_model": "categorical",
"_id.procurement_plan": "categorical"
}
}
trained_model = ai.run_experiment(experiment_design, verbose = False, max_time_mins = 5, max_eval_time_mins = 0.04, config_dict = None, warm_start = False, export_pipeline = True, scoring = None)
```
[Click here](https://dxc-technology.github.io/DXC-Industrialized-AI-Starter/experiment/) for details about run AI experiments.
### Publish Microservice
The DXC AI Starter library makes it easy to publish your models as working microservices. By default, the DXC AI Starter library uses free tier of [Algorithmia](https://algorithmia.com/signup) to publish models as microservices. You must create an [Algorithmia](https://algorithmia.com/signup) account to use. Below is the example for publishing a microservice.
```python
#trained_model is the output of run_experiment() function
microservice_design = {
"microservice_name": "<Name of your microservice>",
"microservice_description": "<Brief description about your microservice>",
"execution_environment_username": "<Algorithmia username>",
"api_key": "<your api_key>",
"api_namespace": "<your api namespace>",
"model_path":"<your model_path>"
}
#publish the micro service and display the url of the api
api_url = ai.publish_microservice(microservice_design, trained_model)
print("api url: " + api_url)
```
[Click here](https://dxc-technology.github.io/DXC-Industrialized-AI-Starter/publish_microservice/) for details about publishing microservice.
## Docs
For detailed and complete documentation, please <a href="https://dxc-technology.github.io/DXC-Industrialized-AI-Starter/" target="_blank">click here</a>
### Example notebooks
<a href="https://nbviewer.jupyter.org/github/dxc-technology/DXC-Industrialized-AI-Starter/tree/c58754247060262ac0949396e48f71861cb79d4e/Examples/" target="_blank">Here</a> are example notebooks for individual models. These sample notebooks help to understand on how to use each function, what parameters are expected for each function and what will be the output of each function in a model.
### Contributing Guide
To know more about the contribution and guidelines please <a href="https://github.com/dxc-technology/DXC-Industrialized-AI-Starter/blob/master/CONTRIBUTING.md" target="_blank">click here</a>
### Reporting Issues
If you find any issues, feel free to report them <a href="https://github.com/dxc-technology/DXC-Industrialized-AI-Starter/issues" target="_blank">here</a> with clear description of your issue. You can use the existing templates for creating issues.
%prep
%autosetup -n DXC-Industrialized-AI-Starter-3.2.0
%build
%py3_build
%install
%py3_install
install -d -m755 %{buildroot}/%{_pkgdocdir}
if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
pushd %{buildroot}
if [ -d usr/lib ]; then
find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/lib64 ]; then
find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/bin ]; then
find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/sbin ]; then
find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
fi
touch doclist.lst
if [ -d usr/share/man ]; then
find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
fi
popd
mv %{buildroot}/filelist.lst .
mv %{buildroot}/doclist.lst .
%files -n python3-DXC-Industrialized-AI-Starter -f filelist.lst
%dir %{python3_sitelib}/*
%files help -f doclist.lst
%{_docdir}/*
%changelog
* Fri May 05 2023 Python_Bot <Python_Bot@openeuler.org> - 3.2.0-1
- Package Spec generated
|