Skip to content
Snippets Groups Projects
  1. Jan 28, 2020
  2. Jan 27, 2020
  3. Jan 24, 2020
  4. Dec 13, 2019
  5. Dec 12, 2019
  6. Dec 13, 2019
    • Laurent Peuch's avatar
      [error/ux] improve lisibility of RQLSyntaxError messages · a35ff5755d82
      Laurent Peuch authored
      This is a first step in trying to make syntax error messages more useful.
      
      For this faulty RQL:
      
          DISTINCT Any N WHERE N is Network, N type "cold water", FCC calibration_for N, FCC variables ILIKE "%conso%", FCC in_state SFCC, FC use_calibration FCC, FC in_state SFC, SFC name "wfs_finished", FC prediction_date FCB, FC nhours FCH, FCP calibration_for N, FCP variables ILIKE "%prod%", FCP in_state SFCP, FP use_calibration FCP, FP in_state SFP, SFP name "wfs_finished", FP prediction_date FPB, FP nhours FPH, MAX(FCB, FCP) < MIN(FCB + CAST(Interval,CAST (String,FCH)+" hours"), FPB + CAST(Interval,CAST(String,FPH)+" hours"))'
      
      It will turn the error message from:
      
          RQLSyntaxError: DISTINCT Any N WHERE N is Network, N type "cold water", FCC calibration_for N, FCC variables ILIKE "%conso%", FCC in_state SFCC, FC use_calibration FCC, FC in_state SFC, SFC name "wfs_finished", FC prediction_date FCB, FC nhours FCH, FCP calibration_for N, FCP variables ILIKE "%prod%", FCP in_state SFCP, FP use_calibration FCP, FP in_state SFP, SFP name "wfs_finished", FP prediction_date FPB, FP nhours FPH, MAX(FCB, FCP) < MIN(FCB + CAST(Interval,CAST(String,FCH)+" hours"), FPB + CAST(Interval,CAST(String,FPH)+" hours"));
          at: ('<f.3664>', 1, 414)
          Trying to find one of QMARK, R_TYPE, CMP_OP, 'IN'
      
      To:
      
          RQLSyntaxError: Trying to find one of QMARK, R_TYPE, CMP_OP, 'IN' in:
          DISTINCT Any N WHERE N is Network, N type "cold water", FCC calibration_for N, FCC variables ILIKE "%conso%", FCC in_state SFCC, FC use_calibration FCC, FC in_state SFC, SFC name "wfs_finished", FC prediction_date FCB, FC nhours FCH, FCP calibration_for N, FCP variables ILIKE "%prod%", FCP in_state SFCP, FP use_calibration FCP, FP in_state SFP, SFP name "wfs_finished", FP prediction_date FPB, FP nhours FPH, MAX(FCB, FCP) < MIN(FCB + CAST(Interval,CAST(String,FCH)+" hours"), FPB + CAST(Interval,CAST(String,FPH)+" hours"));
      
          at line 1 and column 414
          around: ...n_date FPB, FP nhours FPH, MAX(FCB, FCP) < MIN(FCB + CAST(In...
                                                   ^ here
      
      Similarly, for this RQL (the same but on several lines):
      
          DISTINCT Any N WHERE N is Network, N type "cold water",
          FCC calibration_for N, FCC variables ILIKE "%conso%",
          FCC in_state SFCC, FC use_calibration FCC,
          FC in_state SFC, SFC name "wfs_finished",
          FC prediction_date FCB, FC nhours FCH,
          FCP calibration_for N, FCP variables ILIKE "%prod%",
          FCP in_state SFCP, FP use_calibration FCP,
          FP in_state SFP, SFP name "wfs_finished",
          FP prediction_date FPB, FP nhours FPH,
          MAX(FCB, FCP) <
          MIN(FCB + CAST(Interval,CAST(String,FCH)+" hours"),
              FPB + CAST(Interval,CAST(String,FPH)+" hours"));
      
      It will turn the error message from:
      
          RQLSyntaxError:   1: DISTINCT Any N WHERE N is Network, N type "cold water",
             2: FCC calibration_for N, FCC variables ILIKE "%conso%",
             3: FCC in_state SFCC, FC use_calibration FCC,
             4: FC in_state SFC, SFC name "wfs_finished",
             5: FC prediction_date FCB, FC nhours FCH,
             6: FCP calibration_for N, FCP variables ILIKE "%prod%",
             7: FCP in_state SFCP, FP use_calibration FCP,
             8: FP in_state SFP, SFP name "wfs_finished",
             9: FP prediction_date FPB, FP nhours FPH,
            10: MAX(FCB, FCP) <
            11: MIN(FCB + CAST(Interval,CAST(String,FCH)+" hours"),
            12:     FPB + CAST(Interval,CAST(String,FPH)+" hours"));
          at: ('<f.3665>', 10, 4)
          Trying to find one of QMARK, R_TYPE, CMP_OP, 'IN'
      
      To:
      
          RQLSyntaxError: Trying to find one of QMARK, R_TYPE, CMP_OP, 'IN' in:
            1: DISTINCT Any N WHERE N is Network, N type "cold water",
            2: FCC calibration_for N, FCC variables ILIKE "%conso%",
            3: FCC in_state SFCC, FC use_calibration FCC,
            4: FC in_state SFC, SFC name "wfs_finished",
            5: FC prediction_date FCB, FC nhours FCH,
            6: FCP calibration_for N, FCP variables ILIKE "%prod%",
            7: FCP in_state SFCP, FP use_calibration FCP,
            8: FP in_state SFP, SFP name "wfs_finished",
            9: FP prediction_date FPB, FP nhours FPH,
           10: MAX(FCB, FCP) <
           11: MIN(FCB + CAST(Interval,CAST(String,FCH)+" hours"),
           12:     FPB + CAST(Interval,CAST(String,FPH)+" hours"));
      
          at line 10 and column 4
          around: MAX(FCB, FCP) <
                     ^ here
      
      Closes #17256169
      a35ff5755d82
  7. Nov 07, 2019
  8. Nov 06, 2019
  9. Jun 26, 2019
  10. Jun 04, 2019
    • Jérémy Bobbio (Lunar)'s avatar
      Update Debian packaging · 942ef0731f4c
      Jérémy Bobbio (Lunar) authored
      Various improvements to Debian packaging:
      
       - Depend on python-yapps and python3-yapps for YAPPS runtime.
       - Use PYBUILD_NAME instead of debian/*.install files.
       - Use python3-sphinx instead of obsolete Python 2 version.
       - Always build Python 3 package.
       - Run tests at build time and adds relevant packages to Build-Depends.
       - Add superficial autopkgtest using autodep8.
       - Add autopkgtest script to run unittest against installed packages.
       - Add Vcs-Hg and Vcs-Browser fields.
       - Update Standards-Version to 4.3.0.
      
      In order to run the tests at build time and with autopkgtest, they need
      to be made part of the Python source package. The manifest has been
      modified accordingly.
      942ef0731f4c
  11. Feb 15, 2019
  12. Feb 13, 2019
Loading