Run CI on main codemeta.json
- Add a really basic codemeta.json for the project
- Let codemeta2zenodo run on it, to make sure, that it can be called at all.
Merge request reports
Activity
Hi @tacke,
Because of the last MR, I will be creating another PR with a more complete
codemeta.json
file. Also the CI has changed quite a bit.Hi @tacke,
as you want :D. However, please take out the codemeta.json file. And, in my opinion, there's no need of all the
echo
s within the ci file. So the-h
, running the converter andcat
ing the result will be more than enoughYeah more tests!
Btw. a much safer way of checking would be putting the expected output file into the
tests/samples
directory and run adiff
against the generated one, so that we get a failed job if there is a difference.A simple
diff
however can of course be screwed up when e.g. dictionary ordering is non-deterministic. Just in case you were not aware of: this was the case before Python 3.6, in Python 3.6 it's an implementation detail (and unlikely to be changed) and in Python 3.7+ it's insertion-ordered.On the CI we currently only have 3.6+ so we are on the safe side but there is no specification in the
setup.py
yetadded 6 commits
-
dc0aa896...d2427228 - 5 commits from branch
master
- 158d1e35 - Run CI on the main codemeta.json
-
dc0aa896...d2427228 - 5 commits from branch
Another small comment (sorry for the spam)...
I usually put such high-level scripts into a directory as
*.sh
shell scripts (e.g.tests/scripts
) and in the CI you can then do something like:- for script in tests/scripts/*.sh; do bash $script; done
...and then put a
set -e
at the top of each script so that the exit code is propagated and the pipeline breaks.It's a quite cheap high-level test-runner with the downside that it stops at the first failing test, which might not be a bad thing per se. Adding tests is just putting more scripts into that directory.
About diff: That's maybe the next step.
In my private stuff, I have started to use python3-jsondiff to compare things.
My idea here is to just make sure, that the CLI is doing something (hopefully useful) at all.
Really, if we want to compare input and output, we maybe should do that in the pytest things. We can generate input and pass it directly to the converter and things.
mentioned in commit 5461e82b
mentioned in merge request !8 (merged)