Comments (4)
What I suggested is to put unit test together with the classes. Such as Axis.cpp and Axis.test.cpp in the same folder so it is kind of mandatory to write them at the same time and when we make changes the same pull request should also include the tests. That would be ideal. I have an additional tests folder, which might contain more complicated tests, which might need some manual intervention. For example a MC simulation, which is maybe difficult to formulate as an automatic test. It could create a root file or pdf file which needs inspection. Those tests in /tests would be a higher level and are not strictly needed to verify the mathematics of QnTools. However they might be nicer to look at for physicists. What do you think of this proposal?
from qntools.
Well, I've never seen that way of organization, anyway it sounds reasonable for me. But I get used to have following structure:
src/
|-- targetA/
| `-- ClassA.cpp
`-- targetB/
`-- ClassB.cpp
tests/
|-- targetA/
| `-- TestClassA.cpp
`-- targetB/
`-- TestClassB.cpp
It allows keeping all testing infrastructure (e.g. googletest) inside tests/
and switching on/off all testing by adding or not-adding tests folder to CMake.
MC test is not actually a unit test. I would put it to examples/
.
from qntools.
In the implementation I have largely followed this project structure presented here:
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p1204r0.html
In particular I have implemented this approach:
https://api.csswg.org/bikeshed/?force=1&url=https://raw.githubusercontent.com/vector-of-bool/pitchfork/develop/data/spec.bs
I know some things are a bit controversial.
I quite like the split of unit tests which should test a single class / file. and larger tests which go into tests.
I could not keep all of the source files in the same directory because ROOT caused me some problems during the dictionary generation.
from qntools.
I would argue that we keep a "MC closure test" for physicists to easily digest and appreciate the features of the framework from a physics perspective and that it would belong to the test category. I like your idea of having an examples folder, but I would see this as an additional thing.
from qntools.
Related Issues (20)
- QnTools with old ROOT HOT 3
- Dedicated flag for switching on/of tests
- QnTools as a subproject (subdirectory)
- Backward compatibility
- New correlation weights management HOT 1
- Missing includes
- Problem with Bootstrap error in Qn::DataContainerStatCalculate HOT 2
- Segfault on destruction of CorrectionManager HOT 2
- AverageHelper: crash during Finalize HOT 3
- QnTools - correction logic HOT 7
- cumulants with particle weights.
- Problem with selection bins on axis with non-uniform-width binning HOT 4
- Non-uniform binnning for the QA histograms
- Qn::ToTGraph, counter is not incremented if Sumw <= 0
- nan values from StatCalculate::StdDevOfMeanFromBootstrapVariance HOT 1
- Deprecation of TROOT::GetImplicitMTPoolSize HOT 3
- Bootstrapping enhancements HOT 1
- Machinery for systematics studies in Qn::StatCalculate HOT 4
- googletest master->main HOT 1
- Improper use of the std::array::empty HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qntools.