asreview / asreview-datatools

Tool to preprocess datasets for ASReview
MIT License
19 stars 13 forks source link

Error message for Sample should be explicit in column name for publication year #50

Open Rensvandeschoot opened 1 month ago

Rensvandeschoot commented 1 month ago

See the feedback provided by @RiannevanderFeen in https://github.com/asreview/asreview/discussions/1853#discussioncomment-10904582

 it says the publication year column is missing.

File "(...)Python312\site-packages\asreviewcontrib\datatools\sample.py", line 13, in sample
raise ValueError(f"• The input file should have a {year_column} column.")
ValueError: • The input file should have a publication_year column.

It seems like I fixed this by changing the "year" column to "publication_year" in the Excel file.

We could improve the error message or add year as a recognizable column name.