27/01/23 - 15h

master
cherif 2023-01-27 15:58:33 +01:00
parent 77e8be1c6e
commit eafc70f7de
6 changed files with 2397 additions and 13 deletions

View File

@ -1,14 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="1122d9e2-679f-46d6-8c4f-97e9ae4041b5" name="Changes" comment="25/01/23 - 16h">
<list default="true" id="1122d9e2-679f-46d6-8c4f-97e9ae4041b5" name="Changes" comment="25/01/23 - 20h">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Emargement/fichier_presence.pdf" beforeDir="false" afterPath="$PROJECT_DIR$/Emargement/fichier_presence.pdf" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Inscription_mgt.py" beforeDir="false" afterPath="$PROJECT_DIR$/Inscription_mgt.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/GlobalVariable.py" beforeDir="false" afterPath="$PROJECT_DIR$/GlobalVariable.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Log/log_file.log" beforeDir="false" afterPath="$PROJECT_DIR$/Log/log_file.log" afterDir="false" />
<change beforePath="$PROJECT_DIR$/class_mgt.py" beforeDir="false" afterPath="$PROJECT_DIR$/class_mgt.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/data_indexees.csv" beforeDir="false" afterPath="$PROJECT_DIR$/data_indexees.csv" afterDir="false" />
<change beforePath="$PROJECT_DIR$/strype_payement.py" beforeDir="false" afterPath="$PROJECT_DIR$/strype_payement.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/ela_output_test_file_pandas_2.txt" beforeDir="false" afterPath="$PROJECT_DIR$/ela_output_test_file_pandas_2.txt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/prj_common.py" beforeDir="false" afterPath="$PROJECT_DIR$/prj_common.py" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -38,7 +37,7 @@
&quot;ASKED_ADD_EXTERNAL_FILES&quot;: &quot;true&quot;,
&quot;RunOnceActivity.OpenProjectViewOnStart&quot;: &quot;true&quot;,
&quot;RunOnceActivity.ShowReadmeOnStart&quot;: &quot;true&quot;,
&quot;last_opened_file_path&quot;: &quot;C:/Users/cheri/Documents/myclass.com/Siteweb/Production/Ela_back/Back_Office&quot;,
&quot;last_opened_file_path&quot;: &quot;C:/Users/cheri/Documents/myclass.com/Siteweb/Production/Ela_back/Modules/Crawl_website&quot;,
&quot;settings.editor.selected.configurable&quot;: &quot;com.jetbrains.python.configuration.PyActiveSdkModuleConfigurable&quot;
}
}</component>
@ -235,7 +234,14 @@
<option name="project" value="LOCAL" />
<updated>1674659827829</updated>
</task>
<option name="localTasksCounter" value="24" />
<task id="LOCAL-00024" summary="25/01/23 - 20h">
<created>1674674874619</created>
<option name="number" value="00024" />
<option name="presentableId" value="LOCAL-00024" />
<option name="project" value="LOCAL" />
<updated>1674674874619</updated>
</task>
<option name="localTasksCounter" value="25" />
<servers />
</component>
<component name="Vcs.Log.Tabs.Properties">
@ -273,7 +279,8 @@
<MESSAGE value="21/01/23 - 12h" />
<MESSAGE value="24/01/23 - 19h" />
<MESSAGE value="25/01/23 - 16h" />
<option name="LAST_COMMIT_MESSAGE" value="25/01/23 - 16h" />
<MESSAGE value="25/01/23 - 20h" />
<option name="LAST_COMMIT_MESSAGE" value="25/01/23 - 20h" />
</component>
<component name="XDebuggerManager">
<breakpoint-manager>

View File

@ -271,3 +271,12 @@ elif (MYSY_ENV == "REC"):
STRIPE_CONFIG_KEY_PUB = "pk_test_51LUUfAAbmaEugrFTI25uZBD3IFjbtaL6jUfRV83diDf7nco8worna4NGKhMHbPP71WCwT5EHFRdDNatxPrJWwgZ300kgH5EO4p"
STRIPE_CONFIG_API_KEY = "sk_test_51LUUfAAbmaEugrFTrWsfcBWZtbBh9r3HCa2sgeyikG808LjSk3bAdFhV6KxgRZ3vFxooa6RE0c5zBkTuOUrKkyjy00BrsIXAPs"
"""
Limite des zones de texte des formation
- porgramme
- objectif
- description
"""
CLASS_ZONE_PROGRAM_LIMIT = 700
CLASS_ZONE_DESCRIP_LIMIT = 700
CLASS_ZONE_OBJECTIF_LIMIT = 300

File diff suppressed because one or more lines are too long

View File

@ -163,10 +163,26 @@ def add_class(diction):
if ("objectif" in diction.keys()):
if diction['objectif']:
mydata['objectif'] = diction['objectif']
if (len(mycommon.cleanhtml(diction['objectif'])) > MYSY_GV.CLASS_ZONE_OBJECTIF_LIMIT):
mycommon.myprint(
str(inspect.stack()[0][3]) + " : le champ 'objectif' de La formation " + str(
mydata['external_code']) + " a plus de " + str(MYSY_GV.CLASS_ZONE_OBJECTIF_LIMIT) + " caractères")
return False, " le champ 'objectif' de La formation " + str(
mydata['external_code']) + " a plus de " + str(MYSY_GV.CLASS_ZONE_OBJECTIF_LIMIT) + " caractères"
if ("programme" in diction.keys()):
if diction['programme']:
mydata['programme'] = diction['programme']
if(len(mycommon.cleanhtml(diction['programme'])) > MYSY_GV.CLASS_ZONE_PROGRAM_LIMIT ):
mycommon.myprint(
str(inspect.stack()[0][3]) + " : le champ 'Progamme' de La formation " + str(
mydata['external_code']) + " a plus de " + str(MYSY_GV.CLASS_ZONE_PROGRAM_LIMIT) + " caractères")
return False, " le champ 'Progamme' de La formation " + str(
mydata['external_code']) + " a plus de " + str(MYSY_GV.CLASS_ZONE_PROGRAM_LIMIT) + " caractères"
if ("prerequis" in diction.keys()):
if diction['prerequis']:
@ -175,6 +191,14 @@ def add_class(diction):
if ("description" in diction.keys()):
if diction['description']:
mydata['description'] = diction['description']
if (len(mycommon.cleanhtml(diction['description'])) > MYSY_GV.CLASS_ZONE_DESCRIP_LIMIT):
mycommon.myprint(
str(inspect.stack()[0][3]) + " : le champ 'description' de La formation " + str(
mydata['external_code']) + " a plus de " + str(
MYSY_GV.CLASS_ZONE_DESCRIP_LIMIT) + " caractères")
return False, " le champ 'description' de La formation " + str(
mydata['external_code']) + " a plus de " + str(MYSY_GV.CLASS_ZONE_DESCRIP_LIMIT) + " caractères"
if ("metier" in diction.keys()):
@ -629,9 +653,25 @@ def update_class(diction):
if ("objectif" in diction.keys()):
mydata['objectif'] = diction['objectif']
if (len(mycommon.cleanhtml(diction['objectif'])) > MYSY_GV.CLASS_ZONE_OBJECTIF_LIMIT):
mycommon.myprint(
str(inspect.stack()[0][3]) + " : le champ 'objectif' de La formation " + str(
mydata['external_code']) + " a plus de " + str(
MYSY_GV.CLASS_ZONE_OBJECTIF_LIMIT) + " caractères")
return False, " le champ 'objectif' de La formation " + str(
diction['external_code']) + " a plus de " + str(MYSY_GV.CLASS_ZONE_OBJECTIF_LIMIT) + " caractères"
if ("programme" in diction.keys()):
mydata['programme'] = diction['programme']
if (len(mycommon.cleanhtml(diction['programme'])) > MYSY_GV.CLASS_ZONE_PROGRAM_LIMIT):
mycommon.myprint(
str(inspect.stack()[0][3]) + " : le champ 'Progamme' de La formation " + str(
mydata['external_code']) + " a plus de " + str(
MYSY_GV.CLASS_ZONE_PROGRAM_LIMIT) + " caractères")
return False, " le champ 'Progamme' de La formation " + str(
diction['external_code']) + " a plus de " + str(MYSY_GV.CLASS_ZONE_PROGRAM_LIMIT) + " caractères"
if ("cpf" in diction.keys()):
mydata['cpf'] = diction['cpf']
@ -667,6 +707,14 @@ def update_class(diction):
if ("description" in diction.keys()):
mydata['description'] = diction['description']
if (len(mycommon.cleanhtml(diction['description'])) > MYSY_GV.CLASS_ZONE_DESCRIP_LIMIT):
mycommon.myprint(
str(inspect.stack()[0][3]) + " : le champ 'description' de La formation " + str(
mydata['external_code']) + " a plus de " + str(
MYSY_GV.CLASS_ZONE_DESCRIP_LIMIT) + " caractères")
return False, " le champ 'description' de La formation " + str(
diction['external_code']) + " a plus de " + str(MYSY_GV.CLASS_ZONE_DESCRIP_LIMIT) + " caractères"
if ("trainer" in diction.keys()):
mydata['trainer'] = diction['trainer']
@ -1750,7 +1798,11 @@ def get_class(diction):
if (len(retVal['pedagogie']) > MYSY_GV.MAX_CARACT_DETAIL):
retVal['pedagogie'] = tmp_str[:MYSY_GV.MAX_CARACT_DETAIL] + " ..."
retVal["text_size"] = str(text_size)
#retVal["text_size"] = str(text_size)
retVal["text_size"] = "1600"
print(" #### Pour la formation :",internal_url, " text_size = ", str(text_size))
#mycommon.myprint(" #### "+str(retVal))
user = retVal
RetObject.append(JSONEncoder().encode(user))

View File

@ -1,3 +1,3 @@
Empty DataFrame
Columns: [mots, occurence, moyenne, id_formation, source_field]
Index: []
mots occurence moyenne id_formation source_field
0 management 1 0.5 MYSY_10022 title
1 fondamentau 1 0.5 MYSY_10022 title

View File

@ -2674,7 +2674,9 @@ def get_List_domaine_metier():
"""
Cette fonction retourne un texte sans les tag html
"""
def cleanhtml(raw_html):
CLEANR = re.compile('<.*?>')
cleantext = re.sub(CLEANR, '', raw_html).replace("&nbsp;", "")