pdb2pqr icon indicating copy to clipboard operation
pdb2pqr copied to clipboard

Update build system to fail more quickly

Open sobolevnrm opened this issue 1 year ago • 6 comments

Update GitHub workflows to fail quickly on linting errors before running the more time-consuming functional tests.

sobolevnrm avatar Dec 30 '24 03:12 sobolevnrm

Or, you can separate the test to a different workflow to identify which part is failing more clearly

kiyoon avatar Dec 30 '24 03:12 kiyoon

@kiyoon can you please explain the differences between these three instances of the ruff linting checks?

  1. https://github.com/Electrostatics/pdb2pqr/blob/9dd79cb9589ea8fac701dc40a70698baa7dd009e/.github/workflows/python-package.yml#L30
  2. https://github.com/Electrostatics/pdb2pqr/blob/9dd79cb9589ea8fac701dc40a70698baa7dd009e/.github/workflows/check-styles.yml#L12
  3. https://github.com/Electrostatics/pdb2pqr/blob/9dd79cb9589ea8fac701dc40a70698baa7dd009e/.github/workflows/check-styles.yml#L37

sobolevnrm avatar Dec 31 '24 05:12 sobolevnrm

  1. It's a syntax error check. It already existed in this project in the CI with flake8, so I kept the same rules.
  2. You can fix by ruff format . (apply ruff formatter)
  3. You can fix by ruff check --select I --fix . (fix ruff import sorting lint)

So 2, 3 are not as important as 1.

kiyoon avatar Dec 31 '24 07:12 kiyoon

If you go in the action, there is a summary of the run where you can see the diff output of how you would fix them. Currecntly they all pass so there's no output here

image

kiyoon avatar Dec 31 '24 07:12 kiyoon

Yes, I understand how to view the output. I was just asking why there were 3 different linting tests. It seems like the first test duplicates the other two.

sobolevnrm avatar Dec 31 '24 16:12 sobolevnrm

The first test is completely different from the other two, but if you wish you can combine all of them in one. The problem is that there are important tests and there are just style checks. If too many things are combined, maybe it's hard to review others code and ask them to fix stuff, for that I preferred separated tests

kiyoon avatar Dec 31 '24 17:12 kiyoon