gea-program 0.1.0__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.
- gea/BENCH_TEST_PROTOCOL.md +97 -0
- gea/IMPORT_RECORD.md +61 -0
- gea/__init__.py +160 -0
- gea/__main__.py +661 -0
- gea/acceptance_tests.py +1315 -0
- gea/accuracy_statement.py +181 -0
- gea/alarm_engine.py +307 -0
- gea/bench.py +144 -0
- gea/blind_harness.py +108 -0
- gea/case_study.py +229 -0
- gea/catalog/acex_lomonosov_age_depth_model.provenance.json +23 -0
- gea/catalog/acex_lomonosov_age_depth_model.txt +28 -0
- gea/catalog/agassiz77_canada_temperature.csv +68 -0
- gea/catalog/agassiz77_canada_temperature.provenance.json +17 -0
- gea/catalog/barbados_110_consolidation.provenance.json +24 -0
- gea/catalog/barbados_110_consolidation.txt +91 -0
- gea/catalog/bengal_u1452_grain_size.provenance.json +20 -0
- gea/catalog/bengal_u1452_grain_size.txt +252 -0
- gea/catalog/blake_164_methane_isotopes.provenance.json +22 -0
- gea/catalog/blake_164_methane_isotopes.txt +68 -0
- gea/catalog/chicxulub_m0077a_pwave_velocity.provenance.json +23 -0
- gea/catalog/chicxulub_m0077a_pwave_velocity.txt +735 -0
- gea/catalog/collingwood_1_28_ks_complete.las +128 -0
- gea/catalog/collingwood_1_28_ks_complete.provenance.json +17 -0
- gea/catalog/costa_rica_odp_friction_envelope.provenance.json +24 -0
- gea/catalog/costa_rica_odp_friction_envelope.txt +57 -0
- gea/catalog/dead_sea_5017_debrite_xrf_ms.provenance.json +21 -0
- gea/catalog/dead_sea_5017_debrite_xrf_ms.txt +94 -0
- gea/catalog/dsdp_504b_physical_properties.provenance.json +24 -0
- gea/catalog/dsdp_504b_physical_properties.txt +82 -0
- gea/catalog/dsdp_504b_sound_velocity.provenance.json +21 -0
- gea/catalog/dsdp_504b_sound_velocity.txt +81 -0
- gea/catalog/elgygytgyn_5011_turbidites.provenance.json +20 -0
- gea/catalog/elgygytgyn_5011_turbidites.txt +193 -0
- gea/catalog/epica_domec_co2_800kyr.provenance.json +21 -0
- gea/catalog/epica_domec_co2_800kyr.txt +265 -0
- gea/catalog/fram_909_organic_petrography.provenance.json +22 -0
- gea/catalog/fram_909_organic_petrography.txt +40 -0
- gea/catalog/gbr_325_coral_uth_ages.provenance.json +23 -0
- gea/catalog/gbr_325_coral_uth_ages.txt +71 -0
- gea/catalog/gisp2_greenland_temperature.csv +599 -0
- gea/catalog/gisp2_greenland_temperature.provenance.json +17 -0
- gea/catalog/gom_308_t2p_insitu.provenance.json +21 -0
- gea/catalog/gom_308_t2p_insitu.txt +40 -0
- gea/catalog/guaymas_385_dom_d13c.provenance.json +21 -0
- gea/catalog/guaymas_385_dom_d13c.txt +103 -0
- gea/catalog/hikurangi_u1520_friction_insitu.provenance.json +26 -0
- gea/catalog/hikurangi_u1520_friction_insitu.txt +74 -0
- gea/catalog/hydrate_ridge_204_ncr_hydrate.provenance.json +22 -0
- gea/catalog/hydrate_ridge_204_ncr_hydrate.txt +60 -0
- gea/catalog/iodp_u1324_pore_pressure.provenance.json +22 -0
- gea/catalog/iodp_u1324_pore_pressure.txt +42 -0
- gea/catalog/jfast_c0019_slow_slip_events.provenance.json +28 -0
- gea/catalog/jfast_c0019_slow_slip_events.txt +35 -0
- gea/catalog/kennetcook_2_p129_excerpt.las +139 -0
- gea/catalog/kennetcook_2_p129_excerpt.provenance.json +17 -0
- gea/catalog/ktb_hb_bhgm_density.dat +227 -0
- gea/catalog/ktb_hb_bhgm_density.provenance.json +22 -0
- gea/catalog/ktb_hb_complog_6020_excerpt.provenance.json +20 -0
- gea/catalog/ktb_hb_complog_6020_excerpt.txt +72 -0
- gea/catalog/ktb_hb_hlog246_temperature.dat +1636 -0
- gea/catalog/ktb_hb_hlog246_temperature.provenance.json +22 -0
- gea/catalog/ktb_hb_rockmech_compress.dat +33 -0
- gea/catalog/ktb_hb_rockmech_compress.provenance.json +22 -0
- gea/catalog/ktb_hb_tvd_0_9080_excerpt.dat +2817 -0
- gea/catalog/ktb_hb_tvd_0_9080_excerpt.provenance.json +20 -0
- gea/catalog/ktb_vb_rockmech_compress.dat +125 -0
- gea/catalog/ktb_vb_rockmech_compress.provenance.json +22 -0
- gea/catalog/ktb_vb_vlog251_temperature.dat +1127 -0
- gea/catalog/ktb_vb_vlog251_temperature.provenance.json +24 -0
- gea/catalog/l06_06_nl_survey.csv +201 -0
- gea/catalog/l06_06_nl_survey.provenance.json +17 -0
- gea/catalog/l07_01_nl_excerpt.las +90 -0
- gea/catalog/l07_01_nl_excerpt.provenance.json +17 -0
- gea/catalog/mariana_1200_serpentinite_geochem.provenance.json +21 -0
- gea/catalog/mariana_1200_serpentinite_geochem.txt +63 -0
- gea/catalog/med_160_sapropels.provenance.json +22 -0
- gea/catalog/med_160_sapropels.txt +43 -0
- gea/catalog/nankai_megasplay_shear_strength.provenance.json +26 -0
- gea/catalog/nankai_megasplay_shear_strength.txt +42 -0
- gea/catalog/odp_1027b_thermal_conductivity.provenance.json +21 -0
- gea/catalog/odp_1027b_thermal_conductivity.txt +52 -0
- gea/catalog/odp_1027c_cork_temperature.provenance.json +20 -0
- gea/catalog/odp_1027c_cork_temperature.txt +26 -0
- gea/catalog/odp_1165b_thermal_conductivity.provenance.json +22 -0
- gea/catalog/odp_1165b_thermal_conductivity.txt +102 -0
- gea/catalog/odp_1274a_mantle_peridotite_mad.provenance.json +27 -0
- gea/catalog/odp_1274a_mantle_peridotite_mad.txt +44 -0
- gea/catalog/odp_504b_dike_elastic_moduli.provenance.json +27 -0
- gea/catalog/odp_504b_dike_elastic_moduli.txt +85 -0
- gea/catalog/odp_504b_leg137_borehole_fluids.provenance.json +19 -0
- gea/catalog/odp_504b_leg137_borehole_fluids.txt +68 -0
- gea/catalog/odp_735b_gabbro_elastic_moduli.provenance.json +28 -0
- gea/catalog/odp_735b_gabbro_elastic_moduli.txt +127 -0
- gea/catalog/peru_201_sulfate_reduction.provenance.json +22 -0
- gea/catalog/peru_201_sulfate_reduction.txt +322 -0
- gea/catalog/scorpio_e1_sa_excerpt.las +113 -0
- gea/catalog/scorpio_e1_sa_excerpt.provenance.json +17 -0
- gea/catalog/sumatra_362_cohesion.provenance.json +21 -0
- gea/catalog/sumatra_362_cohesion.txt +38 -0
- gea/catalog/university_6_17_no1_tx_excerpt.las +119 -0
- gea/catalog/university_6_17_no1_tx_excerpt.provenance.json +17 -0
- gea/catalog/ursa_308_xrd_mineralogy.provenance.json +21 -0
- gea/catalog/ursa_308_xrd_mineralogy.txt +46 -0
- gea/catalog/volve_15_9_19_sr_excerpt.las +183 -0
- gea/catalog/volve_15_9_19_sr_excerpt.provenance.json +16 -0
- gea/catalog/volve_15_9_19a_core_excerpt.csv +88 -0
- gea/catalog/volve_15_9_19a_core_excerpt.provenance.json +18 -0
- gea/catalog/volve_f12_f14_production_excerpt.csv +167 -0
- gea/catalog/volve_f12_f14_production_excerpt.provenance.json +21 -0
- gea/catalog/walvis_208_petm_carbonate.provenance.json +21 -0
- gea/catalog/walvis_208_petm_carbonate.txt +268 -0
- gea/catalog/woodlark_1109_rock_eval.provenance.json +23 -0
- gea/catalog/woodlark_1109_rock_eval.txt +30 -0
- gea/cli.py +125 -0
- gea/client_reports.py +943 -0
- gea/config_versioning.py +133 -0
- gea/correlation.py +155 -0
- gea/dashboard.py +390 -0
- gea/deviation.py +70 -0
- gea/downhole_engine.py +395 -0
- gea/drift_monitor.py +310 -0
- gea/earth_model.py +230 -0
- gea/example_register_map.json +14 -0
- gea/fat_sat.py +68 -0
- gea/follower.py +98 -0
- gea/forward_model.py +139 -0
- gea/gamma.py +176 -0
- gea/gauge_specs.py +112 -0
- gea/gravity_reference.py +116 -0
- gea/inverse_engine.py +215 -0
- gea/matplotlib_demo.py +85 -0
- gea/modbus.py +229 -0
- gea/model_card.py +248 -0
- gea/operator_app.py +442 -0
- gea/ports.py +340 -0
- gea/profile_catalog.py +773 -0
- gea/project.py +213 -0
- gea/qt6_downhole_app.py +144 -0
- gea/quartz_hpht_extension.py +152 -0
- gea/reconciler.py +206 -0
- gea/rock_inventory.py +404 -0
- gea/sample_record.py +430 -0
- gea/sample_well_profile.csv +15 -0
- gea/sbom.py +116 -0
- gea/segy.py +181 -0
- gea/service_life.py +173 -0
- gea/shell.py +107 -0
- gea/sla_report.py +199 -0
- gea/store_forward.py +234 -0
- gea/strata_join.py +186 -0
- gea/survey_cmd.py +264 -0
- gea/survey_view.py +138 -0
- gea/telemetry.py +306 -0
- gea/tool_library.py +260 -0
- gea/well_assembler.py +457 -0
- gea/well_test_validation.py +369 -0
- gea_program-0.1.0.dist-info/METADATA +138 -0
- gea_program-0.1.0.dist-info/RECORD +163 -0
- gea_program-0.1.0.dist-info/WHEEL +5 -0
- gea_program-0.1.0.dist-info/entry_points.txt +2 -0
- gea_program-0.1.0.dist-info/licenses/LICENSE +373 -0
- gea_program-0.1.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"entry": "woodlark_1109_rock_eval",
|
|
3
|
+
"kind": "REAL_ROCK_EVAL_PYROLYSIS",
|
|
4
|
+
"well": "ODP Hole 180-1109D - WOODLARK BASIN, Solomon Sea, offshore Papua New Guinea (9.5063 S, 151.5726 E; seafloor -2,211 m), the type locality for ACTIVE low-angle normal-fault continental rifting (the Moresby detachment); ODP Leg 180 (1998), the organic-rich Miocene interval 688.23-706.36 mbsf",
|
|
5
|
+
"operator_on_log": "Katz, Barry J (Texaco) - LECO TOC + Rock-Eval pyrolysis per Espitalie et al. 1977 (the founding method paper, cited with DOI in the file's own header): S1/S2 hydrocarbon yields, hydrogen and oxygen indices, transformation ratio, Tmax; drilling by JOIDES Resolution",
|
|
6
|
+
"source_database": "PANGAEA, dataset doi:10.1594/PANGAEA.787052 ('(Table T2) TOC, hydrocarbon characteristics and hydrogen and oxygen index, ODP Hole 180-1109D'); supplement to Katz 2001, Proc. ODP Sci. Results 180, 1-19 (doi:10.2973/odp.proc.sr.180.151.2001)",
|
|
7
|
+
"source_url": "https://doi.pangaea.de/10.1594/PANGAEA.787052?format=textfile",
|
|
8
|
+
"license": "Creative Commons Attribution 3.0 Unported (CC-BY-3.0), declared IN the file's own header and license-checked BEFORE cataloguing. Attribution: Katz / PANGAEA / ODP",
|
|
9
|
+
"fetch_date": "2026-08-28",
|
|
10
|
+
"fetch_method": "read-only HTTPS fetch of the PANGAEA textfile export - COMPLETE dataset (68 data points per the header's own Size declaration, re-counted EXACT at gate time: 9 sample labels + 59 numeric cells with the geocode excluded - note this dataset's counting convention includes the label column, measured not assumed) in one fetch",
|
|
11
|
+
"coverage": "COMPLETE DATASET: 9 source-rock screening analyses through the organic-rich interval - TOC 1.46-32.86 pct, S1 0.09-11.45 and S2 0.24-86.92 mg HC/g rock, HI 13-314, OI 7-82, transformation ratio 0.09-0.16, Tmax 397-424 C; the full Rock-Eval parameter suite of petroleum-systems screening",
|
|
12
|
+
"curves": [
|
|
13
|
+
"Depth sed [m] mbsf 688.23-706.36 (GEOCODE)",
|
|
14
|
+
"TOC [%] (LECO) 1.46-32.86",
|
|
15
|
+
"S1 / S2 [mg HC/g sed] (Rock-Eval per Espitalie 1977)",
|
|
16
|
+
"HI [mg HC/g TOC] 13-314 + OI [mg CO2/g TOC] 7-82",
|
|
17
|
+
"Transformation ratio S1/(S1+S2) + Tmax [degC]",
|
|
18
|
+
"ODP sample labels verbatim (counted by the archive's own Size convention)"
|
|
19
|
+
],
|
|
20
|
+
"source_anomaly_disclosure": "No internal inconsistencies detected - the archive closes against its own definitions: HI = S2/TOC x 100 re-derives on ALL 9 rows within 0.47 units of the archived integers, and the transformation ratio S1/(S1+S2) re-derives on all 7 populated rows within 0.005; noted for the record: TR and Tmax are BLANK on exactly the same two rows (the two lowest-S2 samples, 0.75 and 0.24 mg/g, where the S2 peak is too small for a reliable Tmax) although TR is arithmetically computable there - the archive's own quality judgment, preserved as blanks",
|
|
21
|
+
"purpose": "forty-third catalogue entry - the WOODLARK BASIN / SOLOMON SEA joins as region THIRTY-ONE (the type locality of active low-angle-normal-fault rifting) and ROCK-EVAL PYROLYSIS is kind THIRTY-TWO: the petroleum-systems screening quantity itself, the first source-rock assessment data in an energy-industry catalogue - and the verdict re-derives as arithmetic on every gate run: SPECTACULAR RICHNESS WITHOUT MATURITY - TOC to 32.86 pct and S2 to 86.92 mg/g (genuine source potential in the Miocene coaly interval), yet every measured Tmax sits at 397-424 C, below the ~435 C oil-window threshold (thermally immature), with 8 of 9 samples at HI < 160 (gas-prone Type III/IV terrestrial organic matter) - a source rock that has everything except time and temperature",
|
|
22
|
+
"verified": "9 rows / 68 counted cells against the header's own Size declaration (EXACT under the measured convention: labels counted, geocode excluded); HI identity 9/9 within 0.47; transformation-ratio identity 7/7 within 0.005; TR/Tmax blank-coupling pinned on the two low-S2 rows; all Tmax < 435 with range 397-424; TOC maximum 32.86 and S2 maximum 86.92 pinned; 8/9 rows below HI 160; gate-pinned; source URL serves the identical dataset"
|
|
23
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/* DATA DESCRIPTION:
|
|
2
|
+
Citation: Katz, Barry J (2001): (Table T2) Total organic carbon content, hydrocarbon characteristics and hydrogen and oxygen index of samples from ODP Hole 180-1109D [dataset]. PANGAEA, https://doi.org/10.1594/PANGAEA.787052,
|
|
3
|
+
In supplement to: Katz, BJ (2001): Geochemical investigation of Sites 1108 and 1109, Leg 180. In: Huchon, P; Taylor, B; Klaus, A (eds.) Proceedings of the Ocean Drilling Program, Scientific Results, College Station, TX (Ocean Drilling Program), 180, 1-19, https://doi.org/10.2973/odp.proc.sr.180.151.2001
|
|
4
|
+
Project(s): Ocean Drilling Program (ODP) (URI: https://www-odp.tamu.edu:443/)
|
|
5
|
+
Coverage: LATITUDE: -9.506330 * LONGITUDE: 151.572580
|
|
6
|
+
DATE/TIME START: 1998-06-27T08:00:00 * DATE/TIME END: 1998-07-04T00:15:00
|
|
7
|
+
MINIMUM DEPTH, sediment/rock: 688.23 m * MAXIMUM DEPTH, sediment/rock: 706.36 m
|
|
8
|
+
Event(s): 180-1109D * LATITUDE: -9.506330 * LONGITUDE: 151.572580 * DATE/TIME START: 1998-06-27T08:00:00 * DATE/TIME END: 1998-07-04T00:15:00 * ELEVATION: -2211.0 m * PENETRATION: 802 m * RECOVERY: 299.87 m * LOCATION: Solomon Sea * CAMPAIGN: Leg180 * BASIS: Joides Resolution (URI: https://www-odp.tamu.edu:443/resolutn.html) * METHOD/DEVICE: Drilling/drill rig (DRILL) * COMMENT: 51 core; 449.2 m cored; 352.8 m drilled; 66.8 % recovery
|
|
9
|
+
Parameter(s): Sample code/label (Sample label) * PI: Katz, Barry J * METHOD/DEVICE: DSDP/ODP/IODP sample designation (URI: hdl:10013/epic.27914.d001)
|
|
10
|
+
DEPTH, sediment/rock [m] (Depth sed) * GEOCODE * COMMENT: mbsf
|
|
11
|
+
Carbon, organic, total [%] (TOC) * PI: Katz, Barry J * METHOD/DEVICE: Element analyser CS, LECO
|
|
12
|
+
Hydrocarbon yield, S1, per unit sediment mass [mg/g] (S1 HC/sed) * PI: Katz, Barry J * METHOD/DEVICE: Rock eval pyrolysis (Espitalié et al. 1977) (URI: https://doi.org/10.2516/ogst:1977002)
|
|
13
|
+
Hydrocarbon yield, S2, per unit sediment mass [mg/g] (S2 HC/sed) * PI: Katz, Barry J * METHOD/DEVICE: Rock eval pyrolysis (Espitalié et al. 1977) (URI: https://doi.org/10.2516/ogst:1977002)
|
|
14
|
+
Hydrogen index, mass HC, per unit mass total organic carbon [mg/g] (HI, HC/TOC) * PI: Katz, Barry J
|
|
15
|
+
Oxygen index, mass CO2, per unit mass total organic carbon [mg/g] (OI, CO2/TOC) * PI: Katz, Barry J
|
|
16
|
+
Transformation ratio (S1/(S1 + S2)) * PI: Katz, Barry J
|
|
17
|
+
Pyrolysis temperature maximum [°C] (Tmax) * PI: Katz, Barry J
|
|
18
|
+
License: Creative Commons Attribution 3.0 Unported (CC-BY-3.0) (URI: https://creativecommons.org/licenses/by/3.0/)
|
|
19
|
+
Size: 68 data points
|
|
20
|
+
*/
|
|
21
|
+
Sample label Depth sed [m] TOC [%] S1 HC/sed [mg/g] S2 HC/sed [mg/g] HI, HC/TOC [mg/g] OI, CO2/TOC [mg/g] S1/(S1 + S2) Tmax [°C]
|
|
22
|
+
180-1109D-37R-2,73-75 688.23 17.33 1.60 12.61 73 7 0.11 415
|
|
23
|
+
180-1109D-38R-1,124-125 696.84 32.86 5.03 49.69 151 63 0.09 424
|
|
24
|
+
180-1109D-38R-2,29-31 697.21 27.69 11.45 86.92 314 41 0.12 397
|
|
25
|
+
180-1109D-38R-2,90-92 697.90 22.99 1.97 12.38 54 61 0.14 401
|
|
26
|
+
180-1109D-38R-5,21-22 701.51 1.46 0.09 0.75 51 80
|
|
27
|
+
180-1109D-38R-5,132-134 702.62 1.80 0.10 0.24 13 82
|
|
28
|
+
180-1109D-38R-6,37-39 703.17 5.66 0.34 1.78 31 71 0.16 403
|
|
29
|
+
180-1109D-39R-1,16-18 705.46 3.31 0.24 1.42 43 72 0.14 414
|
|
30
|
+
180-1109D-39R-1,106-108 706.36 14.07 1.08 7.11 51 68 0.13 399
|
gea/cli.py
ADDED
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
2
|
+
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
3
|
+
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
4
|
+
"""gea.cli - the front door.
|
|
5
|
+
|
|
6
|
+
gea quickstart first run: a catalogue well, its reports, the dashboard
|
|
7
|
+
gea survey mywell.las a LAS file in, one strata report out (--demo: bundled KTB excerpt)
|
|
8
|
+
gea dashboard ... the report family + index.html (see `gea dashboard -h`)
|
|
9
|
+
gea client-report ... gea drift-monitor ... gea well-test ... gea alarms ...
|
|
10
|
+
gea model-cards ... gea store-forward ... gea sla-report ... gea fat-sat ...
|
|
11
|
+
gea guide the click-by-click tester guide
|
|
12
|
+
gea docs where the catalogue and the reports live on this machine
|
|
13
|
+
gea gui the desktop window (desktop extra)
|
|
14
|
+
gea accept the product gate
|
|
15
|
+
|
|
16
|
+
Every subcommand not listed here is passed to `python -m gea` unchanged, so the
|
|
17
|
+
full command set is one entry point. PATH-proof form: `python -m gea.cli ...`.
|
|
18
|
+
"""
|
|
19
|
+
from __future__ import annotations
|
|
20
|
+
|
|
21
|
+
import os
|
|
22
|
+
import sys
|
|
23
|
+
from pathlib import Path
|
|
24
|
+
|
|
25
|
+
FRONT = {'quickstart', 'survey', 'guide', 'docs', 'gui', 'help', '-h', '--help'}
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
def _pkg_root() -> Path:
|
|
29
|
+
return Path(__file__).resolve().parent
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
def _repo_root() -> Path:
|
|
33
|
+
return _pkg_root().parent
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def cmd_survey(argv) -> int:
|
|
37
|
+
import argparse
|
|
38
|
+
ap = argparse.ArgumentParser(prog='gea survey', description='a LAS file in, one strata report out')
|
|
39
|
+
ap.add_argument('file', nargs='?', default=None, help='LAS file (omit with --demo)')
|
|
40
|
+
ap.add_argument('--demo', action='store_true', help='run the bundled public KTB excerpt')
|
|
41
|
+
ap.add_argument('--family', default='continental_crystalline', help='prior family for the estimator')
|
|
42
|
+
ap.add_argument('--lat', type=float, default=None)
|
|
43
|
+
ap.add_argument('--elev', type=float, default=None)
|
|
44
|
+
a = ap.parse_args(argv)
|
|
45
|
+
from .survey_cmd import run_survey
|
|
46
|
+
txt, _ = run_survey(path=a.file, demo=a.demo, family=a.family, lat=a.lat, elev=a.elev)
|
|
47
|
+
print(txt)
|
|
48
|
+
return 0
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
def cmd_guide(_argv) -> int:
|
|
52
|
+
for cand in (_repo_root() / 'docs' / 'TESTER_GUIDE.md', _pkg_root() / 'TESTER_GUIDE.md'):
|
|
53
|
+
if cand.exists():
|
|
54
|
+
print(cand.read_text(encoding='utf-8'))
|
|
55
|
+
return 0
|
|
56
|
+
print('TESTER_GUIDE.md not found beside the package')
|
|
57
|
+
return 2
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
def cmd_docs(_argv) -> int:
|
|
61
|
+
from . import __version__
|
|
62
|
+
cat = _pkg_root() / 'catalog'
|
|
63
|
+
n = sum(1 for p in cat.iterdir() if p.suffix != '.json') if cat.exists() else 0
|
|
64
|
+
print(f'gea build {__version__}')
|
|
65
|
+
print(f'package: {_pkg_root()}')
|
|
66
|
+
print(f'catalogue: {cat} ({n} entries, each with a .provenance.json)')
|
|
67
|
+
print(f'reports: written where you point --out (dashboard/, client_report/, model_cards/, ...)')
|
|
68
|
+
print(f'records: drift_monitor/ (evaluations.jsonl, change_log.jsonl), well_tests/ (approvals.jsonl), config_store/')
|
|
69
|
+
print(f'guide: gea guide')
|
|
70
|
+
return 0
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
def cmd_quickstart(_argv) -> int:
|
|
74
|
+
from . import __version__
|
|
75
|
+
print(f'== gea quickstart (build {__version__}) ==')
|
|
76
|
+
print('[1/3] a real catalogue well: Volve 15/9-F-12, 157 daily downhole-pressure samples')
|
|
77
|
+
from .__main__ import main as sub
|
|
78
|
+
out = os.path.abspath('gea_quickstart')
|
|
79
|
+
rc = sub(['dashboard', '--catalog-well', 'volve_f12_f14_production_excerpt:15/9-F-12:10000',
|
|
80
|
+
'--td', '10500', '--name', 'quickstart', '--out', out])
|
|
81
|
+
if rc:
|
|
82
|
+
return rc
|
|
83
|
+
print('[2/3] the strata survey on the bundled KTB excerpt')
|
|
84
|
+
rc = cmd_survey(['--demo'])
|
|
85
|
+
if rc:
|
|
86
|
+
return rc
|
|
87
|
+
print('[3/3] done.')
|
|
88
|
+
print(f' open {os.path.join(out, "index.html")} in a browser - every tile links to its report.')
|
|
89
|
+
print(' next: gea dashboard -h | gea client-report -h | gea guide | gea accept')
|
|
90
|
+
return 0
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
def cmd_gui(_argv) -> int:
|
|
94
|
+
try:
|
|
95
|
+
from .shell import main as shell_main
|
|
96
|
+
except ImportError as e:
|
|
97
|
+
print(f'gea gui needs the desktop extra: pip install "gea-program[desktop]" ({e})')
|
|
98
|
+
return 3
|
|
99
|
+
return shell_main()
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
def main(argv=None) -> int:
|
|
103
|
+
argv = list(sys.argv[1:] if argv is None else argv)
|
|
104
|
+
if not argv or argv[0] in ('help', '-h', '--help'):
|
|
105
|
+
print(__doc__)
|
|
106
|
+
if argv and argv[0] in ('-h', '--help'):
|
|
107
|
+
return 0
|
|
108
|
+
return 0
|
|
109
|
+
cmd, rest = argv[0], argv[1:]
|
|
110
|
+
if cmd == 'quickstart':
|
|
111
|
+
return cmd_quickstart(rest)
|
|
112
|
+
if cmd == 'survey':
|
|
113
|
+
return cmd_survey(rest)
|
|
114
|
+
if cmd == 'guide':
|
|
115
|
+
return cmd_guide(rest)
|
|
116
|
+
if cmd == 'docs':
|
|
117
|
+
return cmd_docs(rest)
|
|
118
|
+
if cmd == 'gui':
|
|
119
|
+
return cmd_gui(rest)
|
|
120
|
+
from .__main__ import main as sub
|
|
121
|
+
return sub(argv)
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
if __name__ == '__main__':
|
|
125
|
+
raise SystemExit(main())
|