Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add static analysis using fortitude, clang, and ruff #187

Merged
merged 13 commits into from
Nov 25, 2024

Conversation

jatkinson1000
Copy link
Member

@jatkinson1000 jatkinson1000 commented Nov 11, 2024

Add static analysis to the repo using:

  • fortitude for Fortran
  • clang format and tidy for C and C++
  • ruff for Python
  • Apply workflows for these checks
  • Update developer docs etc to note these

Copy link
Contributor

@jwallwork23 jwallwork23 left a comment

Choose a reason for hiding this comment

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

Looks great! Happy for this to be submitted once a few small things are addressed.

The software citations for (Ruff, Fortitude, Clang-*, TorchFort, CAM-GW, ...) show as 'n.d' (no date) in the pdf. Does the 'year' attribute need to be set as well as the 'accessed' attribute? The date of access doesn't show in the references anyway.

Argh wrong PR!

@jwallwork23
Copy link
Contributor

Argh wrong PR!

Will review properly during the hackathon today.

Copy link
Contributor

@jwallwork23 jwallwork23 left a comment

Choose a reason for hiding this comment

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

This is a great contribution, thanks @jatkinson1000! A few comments and requested changes.

Worth noting that for nextSIM-DG we ended up pinning clang-format version 18 because the default settings sometimes change between versions and we hadn't set any of them in the config file (nor have you here, it seems).

.github/workflows/linting.yml Outdated Show resolved Hide resolved
.github/workflows/linting.yml Outdated Show resolved Hide resolved
examples/1_SimpleNet/pt2ts.py Outdated Show resolved Hide resolved
examples/2_ResNet18/pt2ts.py Outdated Show resolved Hide resolved
examples/2_ResNet18/resnet_infer_python.py Show resolved Hide resolved
examples/5_Looping/pt2ts.py Outdated Show resolved Hide resolved
examples/6_Autograd/autograd.py Outdated Show resolved Hide resolved
examples/6_Autograd/autograd.py Outdated Show resolved Hide resolved
utils/pt2ts.py Outdated Show resolved Hide resolved
pages/developer.md Show resolved Hide resolved
.github/workflows/linting.yml Outdated Show resolved Hide resolved
.github/workflows/linting.yml Show resolved Hide resolved
@Cambridge-ICCS Cambridge-ICCS deleted a comment from jatkinson1000 Nov 19, 2024
Copy link
Member

@TomMelt TomMelt left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@jwallwork23 jwallwork23 left a comment

Choose a reason for hiding this comment

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

Nice, thanks @jatkinson1000!

@jatkinson1000 jatkinson1000 merged commit cce8562 into main Nov 25, 2024
6 checks passed
@jatkinson1000 jatkinson1000 deleted the static-analysis branch November 25, 2024 09:34
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.

3 participants