Skip to content

Conversation

@vandenman
Copy link
Contributor

Part of jasp-stats/INTERNAL-jasp#1635

The bash script verify-capitalization-helpfile-qml-files.sh does the following:

  1. parse all R functions listed in inst/Description.qml and put this in FUNCTIONS.
  2. for FUN in FUNCTIONS test that:
    1. The NAMESPACE contains export($FUN).
    2. There exists a qml file called $FUN.qml.
    3. There either is no help file, or the helpfile matches $FUN.md (or .html).

This does not test translated help files (e.g., Descriptives-nl.md) because those filenames are autogenerated as far as I know.

Example runs:

Example .yml that should be added to all repositories as an action:

on: 
  push:
    paths: ['**.R', 'NAMESPACE', '**.md', '**.html', '**.qml', 'inst/Description.qml']
  pull_request:
    paths: ['**.R', 'NAMESPACE', '**.md', '**.html', '**.qml', 'inst/Description.qml']

name: test-capitalizations

jobs:
  verify-capitalizations:
    runs-on: ubuntu-latest
  
    env:
      GITHUB_TOKEN: ${{ secrets.REPO_KEY }}

    steps:    
      - uses: actions/checkout@v2
      - uses: jasp-stats/jasp-actions/test-capitalizations@verify-capitalization-helpfiles

@amirmasoudabdol
Copy link

I was thinking that you would implement this as part of the unit-testing stage at the R side, which would have been easier. But, I guess this is easier and more general.

Copy link

@amirmasoudabdol amirmasoudabdol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you are sure that the regex works, then this looks good to me! I have tested it on jaspCircular and had the problem that I have mentioned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants