root
root copied to clipboard
[DF] Rename RDF factory functions
This PR changes names such as ROOT::RDF::MakeCsvDataFrame
to the nicer/clearer convention ROOT::RDF::FromCSV
, deprecating the previous spellings.
Although what's nicer and clearer is generally subjective, I think there is strong enough evidence in this case to warrant the change:
- https://root-forum.cern.ch/t/makenumpydataframe-function-name/50566
- the
FromXXX
naming convention is already widespread across libraries and programming languages (e.g. rust naming conventions, pandas - the current naming convention does not work for factory functions that we might want in the future such as
ROOT::RDF::FromJSONDatasetSpec
(MakeJSONDatasetSpecDataFrame
,MakeJSONDataFrame
?)
To do
- [x] check with @jblomer that moving
ROOT::Experimental::MakeNTupleDataFrame
toROOT::RDF::Experimental::FromNTuple
(not the change of namespace) is ok - [ ] rename
ROOT.RDF.MakeNumpyDataFrame
toROOT.RDF.FromNumpy
: @etejedor how do I deprecate a Python-only method? - [x]
FromCSV
vsFromCsv
-- I think it should beCSV
, just like we already haveTBufferJSON::FromJSON
P.S. in case it wasn't clear, this is basically a RFC :)
Starting build on ROOT-debian10-i386
/soversion
, ROOT-performance-centos8-multicore
/cxx17
, ROOT-ubuntu18.04
/nortcxxmod
, ROOT-ubuntu2004
/python3
, mac1015
/cxx17
, mac11
/cxx14
, windows10
/cxx14
How to customize builds
rename ROOT.RDF.MakeNumpyDataFrame to ROOT.RDF.FromNumpy: @etejedor how do I deprecate a Python-only method?
We can do the same as for the deprecation of TTree.AsMatrix
, see commit, which mainly consists in issuing a Python FutureWarning for the old API during one release.
I agree that FromCSV
should be more consistent with our current api.
Thanks Enric, I took a quick look and there is a number of places that need updating in the bindings, let's take a look together when you are back :)
While we are at it, should we call it ROOT::RDF::Experimental::FromRNTuple
to avoid confusion with TNtuple
Starting build on ROOT-debian10-i386
/soversion
, ROOT-performance-centos8-multicore
/cxx17
, ROOT-ubuntu18.04
/nortcxxmod
, ROOT-ubuntu2004
/python3
, mac1015
/cxx17
, mac11
/cxx14
, windows10
/cxx14
How to customize builds
Starting build on ROOT-debian10-i386
/soversion
, ROOT-performance-centos8-multicore
/cxx17
, ROOT-ubuntu18.04
/nortcxxmod
, ROOT-ubuntu2004
/python3
, mac12
/noimt
, mac11
/cxx14
, windows10
/cxx14
How to customize builds
Build failed on ROOT-ubuntu18.04/nortcxxmod. Running on sft-ubuntu-1804-2.cern.ch:/build/workspace/root-pullrequests-build See console output.
Errors:
- [2022-12-09T15:55:32.542Z] FAILED: lib/libROOTPythonizations2_7.so.6.27 lib/libROOTPythonizations2_7.so
Build failed on windows10/cxx14. Running on null:C:\build\workspace\root-pullrequests-build See console output.
Failing tests:
Build failed on ROOT-performance-centos8-multicore/cxx17. Running on olbdw-01.cern.ch:/data/sftnight/workspace/root-pullrequests-build See console output.
Build failed on ROOT-debian10-i386/soversion. Running on pcepsft10.dyndns.cern.ch:/build/workspace/root-pullrequests-build See console output.
Build failed on mac11/cxx14. Running on macphsft23.dyndns.cern.ch:/Users/sftnight/build/workspace/root-pullrequests-build See console output.
Errors:
- [2022-12-09T23:26:50.630Z] FAILED: lib/libROOTPythonizations2_7.6.27.so lib/libROOTPythonizations2_7.so
Starting build on ROOT-debian10-i386
/soversion
, ROOT-performance-centos8-multicore
/cxx17
, ROOT-ubuntu18.04
/nortcxxmod
, ROOT-ubuntu2004
/python3
, mac12
/noimt
, mac11
/cxx14
, windows10
/cxx14
How to customize builds
Need to fix Python 2 and change the capitalization of RSqliteDS.hxx
to RSQLiteDS.hxx
Build failed on ROOT-performance-centos8-multicore/cxx17. See console output.
Starting build on ROOT-debian10-i386
/soversion
, ROOT-performance-centos8-multicore
/cxx17
, ROOT-ubuntu18.04
/nortcxxmod
, ROOT-ubuntu2004
/python3
, mac12
/noimt
, mac11
/cxx14
, windows10
/cxx14
How to customize builds
Build failed on mac12/noimt. Running on macphsft18.dyndns.cern.ch:/Users/sftnight/build/jenkins/workspace/root-pullrequests-build See console output.
Errors:
- [2022-12-12T09:31:23.308Z] FAILED: tree/dataframe/CMakeFiles/ROOTDataFrame.dir/src/RSQLiteDS.cxx.o
- [2022-12-12T09:31:23.869Z] /Users/sftnight/build/jenkins/workspace/root-pullrequests-build/root/tree/dataframe/src/RSQLiteDS.cxx:336:1: error: use of undeclared identifier 'RSqliteDS'
- [2022-12-12T09:31:23.869Z] /Users/sftnight/build/jenkins/workspace/root-pullrequests-build/root/tree/dataframe/src/RSQLiteDS.cxx:336:29: error: use of undeclared identifier 'RSqliteDS'
- [2022-12-12T09:31:23.869Z] /Users/sftnight/build/jenkins/workspace/root-pullrequests-build/root/tree/dataframe/src/RSQLiteDS.cxx:336:47: error: expected ')'
- [2022-12-12T09:31:23.869Z] /Users/sftnight/build/jenkins/workspace/root-pullrequests-build/root/tree/dataframe/src/RSQLiteDS.cxx:349:23: error: use of undeclared identifier 'RSqliteDS'
- [2022-12-12T09:31:23.869Z] /Users/sftnight/build/jenkins/workspace/root-pullrequests-build/root/tree/dataframe/src/RSQLiteDS.cxx:357:1: error: use of undeclared identifier 'RSqliteDS'
- [2022-12-12T09:31:23.869Z] /Users/sftnight/build/jenkins/workspace/root-pullrequests-build/root/tree/dataframe/src/RSQLiteDS.cxx:443:1: error: use of undeclared identifier 'RSqliteDS'
- [2022-12-12T09:31:23.869Z] /Users/sftnight/build/jenkins/workspace/root-pullrequests-build/root/tree/dataframe/src/RSQLiteDS.cxx:456:33: error: use of undeclared identifier 'RSqliteDS'
- [2022-12-12T09:31:23.869Z] /Users/sftnight/build/jenkins/workspace/root-pullrequests-build/root/tree/dataframe/src/RSQLiteDS.cxx:463:1: error: use of undeclared identifier 'RDataSource'
- [2022-12-12T09:31:23.869Z] /Users/sftnight/build/jenkins/workspace/root-pullrequests-build/root/tree/dataframe/src/RSQLiteDS.cxx:463:23: error: use of undeclared identifier 'RSqliteDS'
And 24 more
Warnings:
- [2022-12-12T09:31:21.164Z] /Users/sftnight/build/jenkins/workspace/root-pullrequests-build/build/include/ROOT/RSQLiteDS.hxx:14:2: warning: "RSqliteDS.hxx was renamed to RSQLiteDS.hxx. Please change your includes accordingly." [-W#warnings]
- [2022-12-12T09:31:21.164Z] <<< cling interactive line includer >>>:55:10: warning: non-portable path to file '"ROOT/RSqliteDS.hxx"'; specified path differs in case from file name on disk [-Wnonportable-include-path]
- [2022-12-12T09:31:21.164Z] /Users/sftnight/build/jenkins/workspace/root-pullrequests-build/build/include/ROOT/RSQLiteDS.hxx:14:2: warning: "RSqliteDS.hxx was renamed to RSQLiteDS.hxx. Please change your includes accordingly." [-W#warnings]
- [2022-12-12T09:31:21.164Z] /Users/sftnight/build/jenkins/workspace/root-pullrequests-build/build/include/ROOT/RSQLiteDS.hxx:15:10: warning: non-portable path to file '"RSqliteDS.hxx"'; specified path differs in case from file name on disk [-Wnonportable-include-path]
- [2022-12-12T09:31:23.869Z] /Users/sftnight/build/jenkins/workspace/root-pullrequests-build/root/tree/dataframe/src/RSQLiteDS.cxx:11:10: warning: non-portable path to file '<ROOT/RSqliteDS.hxx>'; specified path differs in case from file name on disk [-Wnonportable-include-path]
- [2022-12-12T09:31:23.869Z] /Users/sftnight/build/jenkins/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RSQLiteDS.hxx:14:2: warning: "RSqliteDS.hxx was renamed to RSQLiteDS.hxx. Please change your includes accordingly." [-W#warnings]
- [2022-12-12T09:31:23.869Z] /Users/sftnight/build/jenkins/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RSQLiteDS.hxx:15:10: warning: non-portable path to file '"RSqliteDS.hxx"'; specified path differs in case from file name on disk [-Wnonportable-include-path]
- [2022-12-12T09:31:25.503Z] /Users/sftnight/build/jenkins/workspace/root-pullrequests-build/root/tree/dataframe/test/datasource_sqlite.cxx:4:10: warning: non-portable path to file '<ROOT/RSqliteDS.hxx>'; specified path differs in case from file name on disk [-Wnonportable-include-path]
- [2022-12-12T09:31:25.503Z] /Users/sftnight/build/jenkins/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RSQLiteDS.hxx:14:2: warning: "RSqliteDS.hxx was renamed to RSQLiteDS.hxx. Please change your includes accordingly." [-W#warnings]
- [2022-12-12T09:31:25.503Z] /Users/sftnight/build/jenkins/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RSQLiteDS.hxx:15:10: warning: non-portable path to file '"RSqliteDS.hxx"'; specified path differs in case from file name on disk [-Wnonportable-include-path]
And 3 more
Build failed on windows10/cxx14. Running on null:C:\build\workspace\root-pullrequests-build See console output.
Errors:
- [2022-12-12T10:48:15.263Z] stderr: error: Your local changes to the following files would be overwritten by checkout:
- [2022-12-12T10:48:19.461Z] stderr: error: Cannot delete branch 'eguiraud-df-rename-factories' checked out at 'C:/build/workspace/root-pullrequests-build/root'
Build failed on mac11/cxx14. Running on macphsft20.dyndns.cern.ch:/Users/sftnight/build/workspace/root-pullrequests-build See console output.
Errors:
- [2022-12-12T11:05:00.989Z] FAILED: tree/dataframe/test/CMakeFiles/datasource_sqlite.dir/datasource_sqlite.cxx.o
- [2022-12-12T11:05:01.955Z] /Users/sftnight/build/workspace/root-pullrequests-build/root/tree/dataframe/test/datasource_sqlite.cxx:27:26: error: no member named 'FromSQLite' in namespace 'ROOT::RDF'
- [2022-12-12T11:05:01.955Z] /Users/sftnight/build/workspace/root-pullrequests-build/root/tree/dataframe/test/datasource_sqlite.cxx:31:28: error: no member named 'FromSQLite' in namespace 'ROOT::RDF'
- [2022-12-12T11:05:01.955Z] /Users/sftnight/build/workspace/root-pullrequests-build/root/tree/dataframe/test/datasource_sqlite.cxx:32:28: error: no member named 'FromSQLite' in namespace 'ROOT::RDF'
- [2022-12-12T11:05:01.955Z] /Users/sftnight/build/workspace/root-pullrequests-build/root/tree/dataframe/test/datasource_sqlite.cxx:38:26: error: no member named 'FromSQLite' in namespace 'ROOT::RDF'
- [2022-12-12T11:05:01.955Z] /Users/sftnight/build/workspace/root-pullrequests-build/root/tree/dataframe/test/datasource_sqlite.cxx:69:4: error: unknown type name 'RSqliteDS'
- [2022-12-12T11:05:01.955Z] /Users/sftnight/build/workspace/root-pullrequests-build/root/tree/dataframe/test/datasource_sqlite.cxx:97:4: error: unknown type name 'RSqliteDS'
- [2022-12-12T11:05:01.955Z] /Users/sftnight/build/workspace/root-pullrequests-build/root/tree/dataframe/test/datasource_sqlite.cxx:109:4: error: unknown type name 'RSqliteDS'
- [2022-12-12T11:05:01.955Z] /Users/sftnight/build/workspace/root-pullrequests-build/root/tree/dataframe/test/datasource_sqlite.cxx:125:4: error: unknown type name 'RSqliteDS'
- [2022-12-12T11:05:01.955Z] /Users/sftnight/build/workspace/root-pullrequests-build/root/tree/dataframe/test/datasource_sqlite.cxx:145:4: error: unknown type name 'RSqliteDS'
And 4 more
Warnings:
- [2022-12-12T11:02:53.797Z] /Users/sftnight/build/workspace/root-pullrequests-build/build/include/ROOT/RSQLiteDS.hxx:14:2: warning: "RSqliteDS.hxx was renamed to RSQLiteDS.hxx. Please change your includes accordingly." [-W#warnings]
- [2022-12-12T11:02:53.797Z] <<< cling interactive line includer >>>:55:10: warning: non-portable path to file '"ROOT/RSqliteDS.hxx"'; specified path differs in case from file name on disk [-Wnonportable-include-path]
- [2022-12-12T11:02:53.797Z] /Users/sftnight/build/workspace/root-pullrequests-build/build/include/ROOT/RSQLiteDS.hxx:14:2: warning: "RSqliteDS.hxx was renamed to RSQLiteDS.hxx. Please change your includes accordingly." [-W#warnings]
- [2022-12-12T11:02:53.797Z] /Users/sftnight/build/workspace/root-pullrequests-build/build/include/ROOT/RSQLiteDS.hxx:15:10: warning: non-portable path to file '"RSqliteDS.hxx"'; specified path differs in case from file name on disk [-Wnonportable-include-path]
- [2022-12-12T11:05:01.955Z] /Users/sftnight/build/workspace/root-pullrequests-build/root/tree/dataframe/test/datasource_sqlite.cxx:4:10: warning: non-portable path to file '<ROOT/RSqliteDS.hxx>'; specified path differs in case from file name on disk [-Wnonportable-include-path]
- [2022-12-12T11:05:01.955Z] /Users/sftnight/build/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RSQLiteDS.hxx:14:2: warning: "RSqliteDS.hxx was renamed to RSQLiteDS.hxx. Please change your includes accordingly." [-W#warnings]
- [2022-12-12T11:05:01.955Z] /Users/sftnight/build/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RSQLiteDS.hxx:15:10: warning: non-portable path to file '"RSqliteDS.hxx"'; specified path differs in case from file name on disk [-Wnonportable-include-path]
Build failed on ROOT-performance-centos8-multicore/cxx17. Running on olbdw-01.cern.ch:/data/sftnight/workspace/root-pullrequests-build See console output.
Errors:
- [2022-12-12T13:12:48.305Z] 1330/2416 Test #1061: tutorial-v7-ntuple-ntpl004_dimuon .................................................................***Failed Error regular expression found in output. Regex=[: error:] 0.59 sec
- [2022-12-12T13:12:52.460Z] 1366/2416 Test #1079: tutorial-v7-global_temperatures.cxx ...............................................................***Failed Error regular expression found in output. Regex=[: error:] 2.07 sec
Failing tests:
Starting build on ROOT-debian10-i386
/soversion
, ROOT-performance-centos8-multicore
/cxx17
, ROOT-ubuntu18.04
/nortcxxmod
, ROOT-ubuntu2004
/python3
, mac12
/noimt
, mac11
/cxx14
, windows10
/cxx14
How to customize builds
Build failed on mac12/noimt. Running on macphsft18.dyndns.cern.ch:/Users/sftnight/build/jenkins/workspace/root-pullrequests-build See console output.
Errors:
- [2022-12-12T14:24:39.312Z] FAILED: tree/dataframe/CMakeFiles/ROOTDataFrame.dir/src/RSQLiteDS.cxx.o
- [2022-12-12T14:24:39.873Z] /Users/sftnight/build/jenkins/workspace/root-pullrequests-build/root/tree/dataframe/src/RSQLiteDS.cxx:336:1: error: use of undeclared identifier 'RSqliteDS'
- [2022-12-12T14:24:39.873Z] /Users/sftnight/build/jenkins/workspace/root-pullrequests-build/root/tree/dataframe/src/RSQLiteDS.cxx:336:29: error: use of undeclared identifier 'RSqliteDS'
- [2022-12-12T14:24:39.873Z] /Users/sftnight/build/jenkins/workspace/root-pullrequests-build/root/tree/dataframe/src/RSQLiteDS.cxx:336:47: error: expected ')'
- [2022-12-12T14:24:39.873Z] /Users/sftnight/build/jenkins/workspace/root-pullrequests-build/root/tree/dataframe/src/RSQLiteDS.cxx:349:23: error: use of undeclared identifier 'RSqliteDS'
- [2022-12-12T14:24:39.873Z] /Users/sftnight/build/jenkins/workspace/root-pullrequests-build/root/tree/dataframe/src/RSQLiteDS.cxx:357:1: error: use of undeclared identifier 'RSqliteDS'
- [2022-12-12T14:24:39.873Z] /Users/sftnight/build/jenkins/workspace/root-pullrequests-build/root/tree/dataframe/src/RSQLiteDS.cxx:443:1: error: use of undeclared identifier 'RSqliteDS'
- [2022-12-12T14:24:39.873Z] /Users/sftnight/build/jenkins/workspace/root-pullrequests-build/root/tree/dataframe/src/RSQLiteDS.cxx:456:33: error: use of undeclared identifier 'RSqliteDS'
- [2022-12-12T14:24:39.873Z] /Users/sftnight/build/jenkins/workspace/root-pullrequests-build/root/tree/dataframe/src/RSQLiteDS.cxx:463:1: error: use of undeclared identifier 'RDataSource'
- [2022-12-12T14:24:39.873Z] /Users/sftnight/build/jenkins/workspace/root-pullrequests-build/root/tree/dataframe/src/RSQLiteDS.cxx:463:23: error: use of undeclared identifier 'RSqliteDS'
And 24 more
Warnings:
- [2022-12-12T14:24:37.869Z] /Users/sftnight/build/jenkins/workspace/root-pullrequests-build/build/include/ROOT/RSQLiteDS.hxx:14:2: warning: "RSqliteDS.hxx was renamed to RSQLiteDS.hxx. Please change your includes accordingly." [-W#warnings]
- [2022-12-12T14:24:37.869Z] <<< cling interactive line includer >>>:55:10: warning: non-portable path to file '"ROOT/RSqliteDS.hxx"'; specified path differs in case from file name on disk [-Wnonportable-include-path]
- [2022-12-12T14:24:37.869Z] /Users/sftnight/build/jenkins/workspace/root-pullrequests-build/build/include/ROOT/RSQLiteDS.hxx:14:2: warning: "RSqliteDS.hxx was renamed to RSQLiteDS.hxx. Please change your includes accordingly." [-W#warnings]
- [2022-12-12T14:24:37.869Z] /Users/sftnight/build/jenkins/workspace/root-pullrequests-build/build/include/ROOT/RSQLiteDS.hxx:15:10: warning: non-portable path to file '"RSqliteDS.hxx"'; specified path differs in case from file name on disk [-Wnonportable-include-path]
- [2022-12-12T14:24:38.129Z] /Users/sftnight/build/jenkins/workspace/root-pullrequests-build/build/tree/dataframe/G__ROOTDataFrame.cxx:92:10: warning: non-portable path to file '"ROOT/RSqliteDS.hxx"'; specified path differs in case from file name on disk [-Wnonportable-include-path]
- [2022-12-12T14:24:38.129Z] /Users/sftnight/build/jenkins/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RSQLiteDS.hxx:14:2: warning: "RSqliteDS.hxx was renamed to RSQLiteDS.hxx. Please change your includes accordingly." [-W#warnings]
- [2022-12-12T14:24:38.129Z] /Users/sftnight/build/jenkins/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RSQLiteDS.hxx:15:10: warning: non-portable path to file '"RSqliteDS.hxx"'; specified path differs in case from file name on disk [-Wnonportable-include-path]
- [2022-12-12T14:24:39.873Z] /Users/sftnight/build/jenkins/workspace/root-pullrequests-build/root/tree/dataframe/src/RSQLiteDS.cxx:11:10: warning: non-portable path to file '<ROOT/RSqliteDS.hxx>'; specified path differs in case from file name on disk [-Wnonportable-include-path]
- [2022-12-12T14:24:39.873Z] /Users/sftnight/build/jenkins/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RSQLiteDS.hxx:14:2: warning: "RSqliteDS.hxx was renamed to RSQLiteDS.hxx. Please change your includes accordingly." [-W#warnings]
- [2022-12-12T14:24:39.873Z] /Users/sftnight/build/jenkins/workspace/root-pullrequests-build/root/tree/dataframe/inc/ROOT/RSQLiteDS.hxx:15:10: warning: non-portable path to file '"RSqliteDS.hxx"'; specified path differs in case from file name on disk [-Wnonportable-include-path]
And 3 more
Build failed on windows10/cxx14. Running on null:C:\build\workspace\root-pullrequests-build See console output.
Errors:
- [2022-12-12T15:14:57.606Z] stderr: error: Your local changes to the following files would be overwritten by checkout:
- [2022-12-12T15:15:04.158Z] stderr: error: Cannot delete branch 'eguiraud-df-rename-factories' checked out at 'C:/build/workspace/root-pullrequests-build/root'
Starting build on ROOT-debian10-i386
/soversion
, ROOT-performance-centos8-multicore
/cxx17
, ROOT-ubuntu18.04
/nortcxxmod
, ROOT-ubuntu2004
/python3
, mac12
/noimt
, mac11
/cxx14
, windows10
/cxx14
How to customize builds
@vepadulano I tried to get FromSQLite
instead of FromSqlite
but that would kind of require that we also rename RSqliteDS.hxx
to RSQLiteDS.hxx
and MacOS has a case-insensitive file-system which makes that really hard (because I'd like to have both spellings in, deprecating the old one, but MacOS doesn't like that at all).
I'd propose to address FromSqlite/FromSQLite in a different PR.
Build failed on ROOT-performance-centos8-multicore/cxx17. Running on olbdw-01.cern.ch:/data/sftnight/workspace/root-pullrequests-build See console output.
Errors:
- [2022-12-12T19:46:24.696Z] 1331/2416 Test #1061: tutorial-v7-ntuple-ntpl004_dimuon .................................................................***Failed Error regular expression found in output. Regex=[: error:] 0.55 sec
- [2022-12-12T19:46:29.257Z] 1364/2416 Test #1079: tutorial-v7-global_temperatures.cxx ...............................................................***Failed Error regular expression found in output. Regex=[: error:] 1.90 sec
Failing tests:
@eguiraud Regarding ROOT::RDF::Experimental::FromNTuple
: looks good to me!
Starting build on ROOT-debian10-i386
/soversion
, ROOT-performance-centos8-multicore
/cxx17
, ROOT-ubuntu18.04
/nortcxxmod
, ROOT-ubuntu2004
/python3
, mac12
/noimt
, mac11
/cxx14
, windows10
/cxx14
How to customize builds
Build failed on windows10/cxx14. Running on null:C:\build\workspace\root-pullrequests-build See console output.
@phsft-bot build just on windows10/cxx14