mirror of
https://github.com/coulisse/spiderweb.git
synced 2024-09-21 07:27:09 +00:00
lint
This commit is contained in:
parent
7ba2c85d39
commit
b6eeafd9cd
@ -1,8 +1,9 @@
|
||||
### Change log
|
||||
Date: 19/02/2022
|
||||
Release: v2.3
|
||||
- lint on code with sonarqube
|
||||
___
|
||||
- lint on code with codefactor
|
||||
- added new world qso in lasth month plot
|
||||
__
|
||||
Date: 13/01/2022
|
||||
Release: v2.2
|
||||
- fixed country code of Curacao
|
||||
@ -14,7 +15,7 @@ Release: v2.2
|
||||
- modified modes.json in order to improve modes filter
|
||||
- fixed forecast on months plots
|
||||
- upgraded pillow library to 9.0 for security issues
|
||||
___
|
||||
__
|
||||
Date: 04/12/2021
|
||||
Release: v2.1
|
||||
- created a new "spider" icon
|
||||
@ -29,16 +30,16 @@ Release: v2.1
|
||||
- added cross-site request forgery security
|
||||
- added security headers
|
||||
- added cache control headers
|
||||
___
|
||||
__
|
||||
16/05/2021: 2.0.2
|
||||
- Fixed frequency mode on 40 meters
|
||||
- Fixed unicode query
|
||||
- used qry.py also inside webapp.py
|
||||
- replaced MySqlDb with mysql.connector
|
||||
___
|
||||
__
|
||||
14/05/2021: 2.0.1
|
||||
- Addded installation with requirements
|
||||
___
|
||||
__
|
||||
06/05/2021: 2.0
|
||||
- Migrated to bootstrap 5
|
||||
- Migrated to python 3
|
||||
@ -63,17 +64,17 @@ ___
|
||||
- added "Announced Dx Operation" integration with ng3k website
|
||||
- used bootstrap icons instead of custom icons
|
||||
- migrated to last jquery version 3.6.0
|
||||
___
|
||||
__
|
||||
04/10/2020: 1.2.2
|
||||
- Added config.sh utilty in script folder, in order to avoid edit manually config.json
|
||||
- fixex menu on callsign page
|
||||
___
|
||||
__
|
||||
21/09/2020: 1.2.1
|
||||
- Added country column (only on desktop version)
|
||||
- Added external configurable menu
|
||||
- Renamed json.config.example json.config.template
|
||||
- Added code of conduct and issue templates
|
||||
___
|
||||
__
|
||||
08/09/2020: 1.2
|
||||
- Modified cookies.html in order to insert dinamically the host name (instead of dxcluster.iu1bobw.it)
|
||||
- Removed sitemap.xml from git
|
||||
@ -82,30 +83,29 @@ ___
|
||||
- made flags responsive
|
||||
- some little changes on meta tag and pages descriptions
|
||||
- fixed day on datas
|
||||
___
|
||||
__
|
||||
08/09/2020: 1.1.4
|
||||
- Fixed menu on cookies and plots
|
||||
___
|
||||
__
|
||||
08/09/2020: 1.1.3
|
||||
- pretty print html pages
|
||||
- removed horizontal scrollbar
|
||||
- fixed icon apple not found
|
||||
___
|
||||
__
|
||||
04/09/2020: 1.1.2
|
||||
- Fix on continents.cfg
|
||||
- minor changes on html tags
|
||||
___
|
||||
__
|
||||
20/06/2020: 1.1.1
|
||||
- managed plot refresh
|
||||
___
|
||||
__
|
||||
16/06/2020: 1.1
|
||||
- updated plots page in order to not cache images
|
||||
___
|
||||
__
|
||||
02/06/2020: 1.0
|
||||
- added cookie bar
|
||||
- added cookie policy
|
||||
- added nav bar
|
||||
- added plots
|
||||
___
|
||||
__
|
||||
08/03/2020: beta release
|
||||
|
||||
|
10
lib/cty.py
10
lib/cty.py
@ -47,9 +47,11 @@ def get_cty(url,local):
|
||||
if age>7:
|
||||
logging.info(cty_local+' too old ('+str(round(age,0))+' days): proceding to download it')
|
||||
return download_cty(url,local)
|
||||
else:
|
||||
logging.info(cty_local+' updated ('+str(round(age,0))+' days), is not necessary to download it')
|
||||
return 0
|
||||
# else:
|
||||
# logging.info(cty_local+' updated ('+str(round(age,0))+' days), is not necessary to download it')
|
||||
# return 0
|
||||
logging.info(cty_local+' updated ('+str(round(age,0))+' days), is not necessary to download it')
|
||||
return 0
|
||||
# else:
|
||||
# logging.info(cty_local+' not present: proceding to download it')
|
||||
# return download_cty(url,local)
|
||||
@ -205,7 +207,7 @@ class prefix_table:
|
||||
def __init__(self):
|
||||
|
||||
global prefix_master
|
||||
prefix_master=dict() #TODO: define how to reset
|
||||
prefix_master=dict()
|
||||
initialization()
|
||||
return
|
||||
|
||||
|
@ -85,37 +85,37 @@ bands=band_frequencies["bands"]
|
||||
|
||||
|
||||
continents_ar=[]
|
||||
for i in range(len(continents)):
|
||||
continents_ar.append(continents[i]["id"])
|
||||
for i, item_continent in enumerate(continents):
|
||||
continents_ar.append(item_continent["id"])
|
||||
|
||||
bands_ar=[]
|
||||
for i in range(len(bands)):
|
||||
bands_ar.append(bands[i]["id"])
|
||||
for i, item_band in enumerate(bands):
|
||||
bands_ar.append(item_band["id"])
|
||||
|
||||
# fucntion for search continent in the global data returned by query and making a cartesian product
|
||||
# in order to prepare data for heatmap
|
||||
def filter_de(data_list,continent,continents_list, band_list):
|
||||
data_filtered=[]
|
||||
for i in range(len(data_list)):
|
||||
if data_list[i][0]==continent and not (data_list[i][3] is None):
|
||||
for i, item_data in enumerate(data_list):
|
||||
if item_data[0]==continent and not (item_data[3] is None):
|
||||
element=[]
|
||||
element.append(data_list[i][1])
|
||||
element.append(data_list[i][2])
|
||||
element.append(data_list[i][3])
|
||||
element.append(item_data[1])
|
||||
element.append(item_data[2])
|
||||
element.append(item_data[3])
|
||||
data_filtered.append(element)
|
||||
|
||||
cartesian_product = []
|
||||
for j in range(len(continents_list)):
|
||||
for k in range(len(band_list)):
|
||||
for k, item_band in enumerate(band_list):
|
||||
found=0
|
||||
for l in range(len(data_filtered)):
|
||||
if data_filtered[l][0]==continents_list[j]["id"] and data_filtered[l][1]==band_list[k]["id"]:
|
||||
cartesian_product.append(data_filtered[l])
|
||||
for l, item_filtered in enumerate(data_filtered):
|
||||
if item_filtered[0]==continents_list[j]["id"] and item_filtered[1]==item_band["id"]:
|
||||
cartesian_product.append(item_filtered)
|
||||
found=1
|
||||
if found==0:
|
||||
element=[]
|
||||
element.append(continents_list[j]["id"])
|
||||
element.append(band_list[k]["id"])
|
||||
element.append(item_band["id"])
|
||||
element.append(0)
|
||||
cartesian_product.append(element)
|
||||
|
||||
@ -125,8 +125,8 @@ def filter_de(data_list,continent,continents_list, band_list):
|
||||
|
||||
#main
|
||||
dt_string = datetime.now().strftime("%d/%m/%Y %H:%M")
|
||||
for i in range(len(continents)):
|
||||
continent=continents[i]["id"]
|
||||
for i, item in enumerate(continents):
|
||||
continent=item["id"]
|
||||
data_de=filter_de(data,continent,continents,bands)
|
||||
dx, band, number=zip(*data_de)
|
||||
|
||||
|
@ -144,5 +144,3 @@ plt.xticks(np.arange(min(months), max(months)+1, 1.0),rotation='horizontal')
|
||||
saveplt(plt,file_output)
|
||||
|
||||
logger.info("End")
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user