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

Adapt creation of AUTHORS.sorted to changes in format of AUTHORS #372

Merged
merged 1 commit into from
Jul 7, 2021

Conversation

rartino
Copy link
Contributor

@rartino rartino commented Jul 7, 2021

The recent changes in the format of AUTHORS have broken the automatic auditing of the alphabetical order in AUTHORS. This PR fixes that problem.

Would be great to get this in for v1.1.

@rartino rartino added the blocking-release This is a PR or issue that presently blocks the release of next version of the spec. label Jul 7, 2021
@rartino rartino requested a review from ml-evs July 7, 2021 06:44
@CasperWA
Copy link
Member

CasperWA commented Jul 7, 2021

How does a content change in the AUTHORS_TAG variable fix the automatic auditing? Am I missing something? 😅

@rartino
Copy link
Contributor Author

rartino commented Jul 7, 2021

How does a content change in the AUTHORS_TAG variable fix the automatic auditing? Am I missing something?

If nothing matches the AUTHORS_TAG, then the whole file is counted as "header" and nothing gets sorted in AUTHORS.sorted, which makes `make audit_authors' always pass.

Copy link
Member

@ml-evs ml-evs left a comment

Choose a reason for hiding this comment

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

Thanks for this @rartino, wasn't aware we had broken it.

Not for this PR, but did we ever discuss about adding workshop 2021 attendees to the list? I guess we can argue here that for 1.1, the 2021 workshop didn't really add anything.

@ml-evs ml-evs requested a review from CasperWA July 7, 2021 10:03
@CasperWA
Copy link
Member

CasperWA commented Jul 7, 2021

If nothing matches the AUTHORS_TAG, then the whole file is counted as "header" and nothing gets sorted in AUTHORS.sorted, which makes `make audit_authors' always pass.

Okay - this seems a bit beyond my basic knowledge of this then. But how can I then see that this issue exists from the tests? I guess I can't if it passes in both cases - is there a way this could be made more transparent though? I mean, if I compare the "Tests / Audit the AUTHORS list" with a similar test run that doesn't have this change I see absolutely no difference - which I would also expect if it passes in both cases, but I'd like to be able to see a difference to confirm this now works (and maybe stops at some point). Would it be possible to cat some file contents or similar to be able to also manually confirm what the tests proclaim? :)

@rartino
Copy link
Contributor Author

rartino commented Jul 7, 2021

if I compare the "Tests / Audit the AUTHORS list" with a similar test run that doesn't have this change I see absolutely no difference - which I would also expect if it passes in both cases, but I'd like to be able to see a difference to confirm this now works (and maybe stops at some point). Would it be possible to cat some file contents or similar to be able to also manually confirm what the tests proclaim? :)

Swap two names in the AUTHORS list, run 'make audit_authors' and note the difference?

It isn't a super unusual thing that a change breaks a test so that it no longer tests the intended thing. Usually one can try to program defensively so the test more easily returns a false positive than a false negative, but for something as non-critical as ordering the AUTHOR list alphabetically I wouldn't overdo things. But if you are greatly concerned, I suppose we can add code to the test to verify that the sorted part of the file has non-zero length.

@CasperWA
Copy link
Member

CasperWA commented Jul 7, 2021

It isn't a super unusual thing that a change breaks a test so that it no longer tests the intended thing. Usually one can try to program defensively so the test more easily returns a false positive than a false negative, but for something as non-critical as ordering the AUTHOR list alphabetically I wouldn't overdo things. But if you are greatly concerned, I suppose we can add code to the test to verify that the sorted part of the file has non-zero length.

When you put it like that, I agree that putting more work into this seems counter-productive, unless it is an extremely easy check to add. Otherwise, yeah. all good for me.

Just questioning the usefulness of the test here if it didn't catch this. Also after knowing that tests cannot reasonably take into account all edge cases.

@rartino
Copy link
Contributor Author

rartino commented Jul 7, 2021

unless it is an extremely easy check to add. Otherwise, yeah. all good for me.

I propose merging the PR as it is and possibly improve the test in a future PR.

Just questioning the usefulness of the test here if it didn't catch this. Also after knowing that tests cannot reasonably take into account all edge cases.

As long as the line before the list of alphabetically ordered AUTHORS remain intact (something we've changed maybe 1-2 times during the lifetime of this project), the test fixes errors that we frequently do. That seems useful to me.

@ml-evs ml-evs modified the milestones: 1.1 release, 1.0.1 release Jul 7, 2021
@ml-evs ml-evs merged commit 037b323 into Materials-Consortia:develop Jul 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocking-release This is a PR or issue that presently blocks the release of next version of the spec.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants