stan-dev / posteriordb

Database with posteriors of interest for Bayesian inference
181 stars 36 forks source link

Commented out Python 3.7 #57

Closed MansMeg closed 5 years ago

MansMeg commented 5 years ago

It fails in Travis so I commented it out. I leave this as an issue.

eerolinna commented 5 years ago

The reason why it failed in travis can be seen in the error message here: https://travis-ci.org/MansMeg/posteriordb/jobs/601185982

Trim Trailing Whitespace.................................................Failed

hookid: trailing-whitespace

Files were modified by this hook. Additional output:

Fixing rpackage/tests/testthat/test-content.R

I created a PR #58 that strips this trailing whitespace and re-enables python3.7 job (this is the job that performs general linting like checking for trailing whitespace)

eerolinna commented 5 years ago

You can install pre-commit hooks that help notice trailing whitespace before committing (or you can choose to run the hooks also only before git push if you prefer). The instructions are here https://github.com/MansMeg/posteriordb/blob/master/CONTRIBUTING.md

If you don't want to run the checks automatically you can also replicate what the CI does by locally running

pre-commit run --all-files

This will automatically fix trailing whitespace issues, you'll only have to commit the changes afterwards (this is what Files were modified by this hook means in the error message)

eerolinna commented 5 years ago

You can also have RStudio remove trailing whitespace automatically when saving, see https://support.rstudio.com/hc/en-us/articles/200549016-Customizing-RStudio?mobile_site=true and "Strip trailing horizontal whitespace when saving"

You might also want to enable "Ensure that source files end with a new line" as CI checks for that as well.

MansMeg commented 5 years ago

Ah alright, so it is actually a problem with the R code?

MansMeg commented 5 years ago

Now fixed in https://github.com/MansMeg/posteriordb/commit/25d94d3d84ec9b7387dc9f794509a5777aab62ee

eerolinna commented 5 years ago

Yeah in this case the error was with general checks that apply to all files. There are also python-specific tests in the same job. I'll see if I can make a separate job for the general linting-like checks so it will be easier to pinpoint where the failure comes from

eerolinna commented 5 years ago

PR #60 separates the generic checks from python package tests