Skip to content
Snippets Groups Projects

Run CI on main codemeta.json

Merged Christian Tacke requested to merge pr/ci into master
  • Add a really basic codemeta.json for the project
  • Let codemeta2zenodo run on it, to make sure, that it can be called at all.
Edited by Christian Tacke

Merge request reports

Pipeline #104194 passed

Pipeline passed for e55d09f6 on pr/ci

Approval is optional
Test summary results are being parsed

Merged by Enrique GarciaEnrique Garcia 3 years ago (Feb 12, 2021 9:12am UTC)

Merge details

  • Changes merged into master with 5461e82b.
  • Deleted the source branch.

Pipeline #104233 passed

Pipeline passed for 5461e82b on master

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • added 1 commit

    • dc0aa896 - Add basic codemeta.json and run CI on it

    Compare with previous version

  • 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.

  • Author Developer

    So do you want to close this one?

    Or should I adapt my CI changes to the new CI tooling?

  • 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 echos within the ci file. So the -h, running the converter and cating the result will be more than enough

  • Yeah more tests! :smiley:

    Btw. a much safer way of checking would be putting the expected output file into the tests/samples directory and run a diff 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 yet :wink:

  • Christian Tacke added 6 commits

    added 6 commits

    Compare with previous version

  • added 1 commit

    • 0609dc36 - Run CI on the main codemeta.json

    Compare with previous version

  • 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.

  • Christian Tacke changed title from Add basic codemeta.json and run CI on it to Run CI on main codemeta.json

    changed title from Add basic codemeta.json and run CI on it to Run CI on main codemeta.json

  • Author Developer

    I usually have a Makefile for this stuff, so that I can easily run things on the developer's machine. When we have more stuff, we should refactor for something like scripts and/or Makefiles!

    For now, let's keep it simple.

  • Yes fully agree! On top of that, I also prefer makefiles to move even more logic out of the CI :wink:

  • Author Developer

    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.

  • added 1 commit

    • e55d09f6 - Run CI on the main codemeta.json

    Compare with previous version

  • Enrique Garcia mentioned in commit 5461e82b

    mentioned in commit 5461e82b

  • Enrique Garcia mentioned in merge request !8 (merged)

    mentioned in merge request !8 (merged)

Please register or sign in to reply
Loading