flatdata icon indicating copy to clipboard operation
flatdata copied to clipboard

Create a `How to contribute` section

Open InfinityByTen opened this issue 5 years ago • 1 comments

Based on the discussion below, create a new contribution guide section, including what tests to run and how to verify things locally.

I seem to often run into this issue of tests failing on CI. This time it happened because I just had forgotten where to run the tests from. Should we have a separate task to put into a README how to run tests locally?

That makes sense: Some How to contribute section with advice how to test the individual components:

  • How to use local generator via export FLATDATA_GENERATOR_PATH=${PWD}/../flatdata-generator
  • python -m nose for generator tests
  • how to manually run generator for a test to get a new reference, e.g. ./generator.py -s ../test_cases/archives/multivector.flatdata -g rust -O tests/generators/rust_expectations/archives/multivector.rs.1
  • how to update the checked in generated rust test code, e.g.: ../flatdata-generator/generator.py -s lib/src/test/test.flatdata -g rust -O lib/src/test/test_generated.rs && sed -i 's/flatdata::/crate::/g' ../flatdata-rs/lib/src/test/test_generated.rs
  • etc

Do you want to create a new issue for that? And would you like to fill that yourself, or have it filled by regular contributors?

Originally posted by @VeaaC in https://github.com/heremaps/flatdata/pull/189#issuecomment-656626074

InfinityByTen avatar Jul 10 '20 16:07 InfinityByTen

I would even go further and add a Makefile to do all of this in one command. It can even be properly documented with very exhaustive comments.

gferon avatar Aug 02 '20 10:08 gferon