1.1 Github link
Github link: https://github.com/universe-tong/03170262
2.1PSP
PSP purpose is to record how time consuming demand, and the time to complete the entire project needs.
PSP2.1 | Personal Software Process Stages | Estimated time consuming (minutes) | The actual time-consuming (minutes) |
---|---|---|---|
Planing | plan | 30min | 25min |
Estimate | Estimate how much time this task requires | 20min | 20min |
Development | Develop | 30min | 40min |
Analysis | Needs analysis (including learning new skills) | 100min | 90min |
Design Spec | Generate design documents | 50min | 50min |
Design Review | Design Review | 20min | 30min |
Coding Standard | Code specifications (development of appropriate norms for the current development) | 20min | 40min |
Design | Specific design | 20min | 20min |
Coding | Specific coding | 100min | 120min |
Code Review | Code Review | 10min | 20min |
Test | Test (self-test, modify the code) | 10min | 15min |
Reporting | report | 20min | 40min |
test repor | testing report | 20min | 30min |
Size Measurement | Computing workload | 40min | 20min |
Postmortem & Process Improvement Plan | Later summarized, and process improvement plan | 30min | 35min |
Total | total | 620min | 595min |
3.1 Calculation module interface design and implementation process
3.2 The following is the use of functions and classes
Import two initialization list, is the name of the provinces of the country, then one of the various provinces, including City
def Provincelist()
def Citylist()
Then a few important functions of the program
string input speak in the name and phone number is extracted, then returned after a rest of the address string
def GetNameAndNumber(str,list,index)
In the character string extracted provinces
def findprovicne(str,list,index)
Extract the name of the city in a string
def findcity(str,list,index)
Extract the county / district / village in the string
def findtown(str,list,index)
3.3 unique
Importing the provinces and the city library, the result of more accurate matching.
3.2 Performance improvement calculation module interface section
Pycharm use in performance testing tools, the use of test performance and function, and coverage
function call graph
time overhead chart:
Code coverage:
3.3 calculating unit test display module
Input:
! 1 Lu cells, Changning District, Shanghai Changning week 18,951,233,466 Bridge Street 999 Spring Garden Road.
1 through Zang Street, Dongcheng District, Beijing Beixinqiao Street Dongzhimen Street, Building 8 people 15679601503 An district!.
1 couplet! Anhui Huangshan City County Xiong County Road 006 villages and G56-Hangzhou high-speed Shexian male Swiss village preventive care station 13575634949.
1! seedlings bud rot, 13884441418 Xiaogan City of Hubei Province Yunmeng County village village square.
1! Yan hole, Wushan County Dachang town 13,097,181,946 ocean village convenience supermarkets.
1! Ma Jing, Huai 13,282,875,332 Tianjin North lake village town Else Else village primary school.
1! Zhu Ge Ningsheng, Henan Jiaozuo City Shanyang District 15,613,629,652 fixed and streets Tanan Road 287 new cosmetic.
1! Feng Xi alas, Lujiang County, Anhui Province, Hefei, Beijing and Taiwan Guo town G3 high-speed 18,835,354,291 Hefei Lujiang county wide cold bridge street.
1! Barry screen stuffy, Guangxi Zhuang Autonomous Region, Guilin Lingchuan County town of Lake 13,315,249,688 at 004 County Road Lingchuan County creek in the town righteous cause of the village committee.
1! Xu brief negative, Hebei District, Tianjin Yueyahe street, Building 58 Oe 13289199578.
1! Lou wrapped around strong, Shandong Province, Yantai Laishan 14732355817 South street Laishan District Chen Tuan district 10.
1! Cao held, Jiangsu Taizhou 13066409994 Hailing welcome Chunlan Road 88 business hotel.
Output:
{
"Level": 1,
"name": "Lu cell",
"mobile phone": "18951233466",
"address": [
"Shanghai",
"Changning District",
"Zhou Bridge Street",
"Changning Road 999, Spring Garden"
]
},
{
"Level": 1,
"name": "Zang Street Classic",
"mobile phone": "15679601503",
"address": [
"Beijing",
"Beijing",
"Dongcheng District",
"Beixinqiao street",
"Dongzhimen street Minanxiaoqu Building 8"
]
},
{
"Level": 1,
"name": "couplet" ,
"mobile phone": "13575634949",
"address": [
"Anhui Province",
"Huangshan City",
"Shexian",
"male towns and villages",
"006 and County Road G56 Hangzhou high-speed Shexian male Swiss village preventive station "
]
},
{
"Level": 1,
"name": "Miao rotten bud",
"mobile phone": "13884441418",
"address": [
"Hubei",
"Xiaogan City,"
"Yunmeng County",
"",
" village village square "
]
},
{
"Level": 1,
"name": "Yan hole",
"mobile phone": "13097181946",
"address": [
"Chongqing",
"Chongqing",
"Wushan County",
"Dachang Town" ,
"ocean Village convenience supermarket"
]
},
{
"Level": 1,
"name": "Jing Ma",
"mobile phone": "13282875332",
"address": [
"Tianjin",
"Tianjin",
"" ,
"North Huai town lake",
"Leshan village Else village primary school"
]
},
{
"Level": 1,
"name": "Zhu Ge Ningsheng",
"mobile phone": "15613629652 ",
" address ": [
" Henan ",
" Jiaozuo City, "
" Sanyo area ",
" set and streets ",
" Tanan Road 287 days of the new "
]
},
{
" Level ": 1,
"Name": "Oh Feng Xi",
"mobile phone": "18835354291",
"address": [
"Anhui Province",
"Hefei",
"Lujiang County",
"Guo Town",
"G3 Beijing high-speed Hefei Lujiang County, the city of Guanghan bridge street "
]
},
{
" Level ": 1,
" name ":" Barry screen boring ",
" mobile phone ":" 13315249688 ",
" address ": [
" Guangxi Zhuang Autonomous Region ",
" Guilin City ",
" Planted ",
" creek in the town ",
" 004 Township Road Lingchuan County, Lake town, the village committee righteousness "
]
},
{
" Level ": 1,
" name ":" Xu brief negative ",
" phone ":" 13289199578 ",
" address ":[
"Tianjin",
"Tianjin",
"Hebei District,"
"Yueyahe street",
"River, Building 58"
]
},
{
"Level": 1,
"name": "Lou wrapped around strong,"
"mobile phone ":" 14732355817 "
"Address": [
"Shandong Province",
"Yantai",
"Laishan",
"Lai Shan street",
"South Chen Tuan district 10"
]
},
{
"Level": 1,
"name": "Cao hold ",
" mobile phone ":" 13066409994 ",
" address ": [
" Jiangsu Province ",
" Taizhou City, "
" Hailing ",
" ",
" welcome Road No. 88 Chunlan business hotel "
]
},
3.4 part of exception handling instructions calculation module
When you enter the third tranche of difficulty, such as 3! Sun flag good, 13366755810 White City Taobei Changqing South Street 65 can not be filled front, the solution is introduced into the city library to match the provinces.