edb-noumea 0.2.13__py3-none-any.whl → 0.2.15__py3-none-any.whl

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.
edb_noumea/details.py CHANGED
@@ -101,13 +101,19 @@ def get_detailed_results():
101
101
  e_coli_col = next((col for col in df.columns if "Escherichia" in str(col) or "coli" in str(col)), None)
102
102
  entero_col = next((col for col in df.columns if "Entérocoques" in str(col)), None)
103
103
 
104
- if e_coli_col is None or entero_col is None:
105
- print(f"❌ Colonnes bactéries non trouvées dans le tableau extrait. Colonnes disponibles : {list(df.columns)}")
104
+ # Dynamically find all required columns
105
+ site_col = next((col for col in df.columns if "Nom du site" in str(col)), None)
106
+ point_prelevement_col = next((col for col in df.columns if "Point de prélèvement" in str(col)), None)
107
+ date_col = next((col for col in df.columns if "Date du prélèvement" in str(col)), None)
108
+ heure_col = next((col for col in df.columns if "Heure du prélèvement" in str(col)), None)
109
+
110
+ # Check if all required columns are found
111
+ if not all([site_col, point_prelevement_col, date_col, heure_col, e_coli_col, entero_col]):
112
+ print(f"❌ Certaines colonnes requises n'ont pas été trouvées. Colonnes disponibles : {list(df.columns)}")
106
113
  return None
107
114
 
108
- # Sélectionne les 4 premières colonnes + colonnes bactéries trouvées
109
- selected_cols = [df.columns[0], df.columns[1], df.columns[2], df.columns[4], e_coli_col, entero_col]
110
- cleaned_df = df.loc[:, selected_cols].copy()
115
+ # Select and rename columns to internal consistent names
116
+ cleaned_df = df.loc[:, [site_col, point_prelevement_col, date_col, heure_col, e_coli_col, entero_col]].copy()
111
117
  cleaned_df.columns = [
112
118
  "site",
113
119
  "point_de_prelevement",
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: edb-noumea
3
- Version: 0.2.13
4
- Summary: Un scraper pour la qualité des eaux de baignade à Nouméa.
3
+ Version: 0.2.15
4
+ Summary: Un scraper pour la qualité des eaux de baignade à Nouméa. (Bug fix release: improved PDF column detection and added jpype1 dependency)
5
5
  Project-URL: Homepage, https://github.com/adriens/edb-noumea
6
6
  Project-URL: Repository, https://github.com/adriens/edb-noumea
7
7
  Requires-Dist: requests
@@ -9,4 +9,5 @@ Requires-Dist: beautifulsoup4
9
9
  Requires-Dist: pandas
10
10
  Requires-Dist: lxml
11
11
  Requires-Dist: tabula-py
12
+ Requires-Dist: jpype1
12
13
  Requires-Dist: matplotlib
@@ -0,0 +1,7 @@
1
+ edb_noumea/__init__.py,sha256=G7WKTGLsr2wtW1E2jYpqq4miZLoSGhTifSE36CGNkLo,60
2
+ edb_noumea/details.py,sha256=4MVAEzeBLhXZmI034sWGcgZ-vF92kCoK6mW1-3mIZx8,7394
3
+ edb_noumea/main.py,sha256=KWT0ZGrHlbhEsQxi_Rw0Mm1syDIxoY-Px1yab94IbJc,2115
4
+ edb_noumea-0.2.15.dist-info/METADATA,sha256=XKxMi19cWb7h3WOflI3mJFjMpR1K89_cpSJvZr2z5-k,495
5
+ edb_noumea-0.2.15.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
6
+ edb_noumea-0.2.15.dist-info/top_level.txt,sha256=Dj3JusM0b5H9_f9yZeO-IwucCZzI1OHSjLMKtvRjq6k,11
7
+ edb_noumea-0.2.15.dist-info/RECORD,,
@@ -1,7 +0,0 @@
1
- edb_noumea/__init__.py,sha256=G7WKTGLsr2wtW1E2jYpqq4miZLoSGhTifSE36CGNkLo,60
2
- edb_noumea/details.py,sha256=026ap0SFLccFVZky6LZNZ0DXJN2dvsFRJfjFl7jhUqU,6934
3
- edb_noumea/main.py,sha256=KWT0ZGrHlbhEsQxi_Rw0Mm1syDIxoY-Px1yab94IbJc,2115
4
- edb_noumea-0.2.13.dist-info/METADATA,sha256=-ODF8hC58NMSgZJXVTRx3UrlzFNKedwPDJILaOVGDCo,396
5
- edb_noumea-0.2.13.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
6
- edb_noumea-0.2.13.dist-info/top_level.txt,sha256=Dj3JusM0b5H9_f9yZeO-IwucCZzI1OHSjLMKtvRjq6k,11
7
- edb_noumea-0.2.13.dist-info/RECORD,,