Skip to content
This repository has been archived by the owner on Nov 3, 2022. It is now read-only.

Checking that all files have owners. #441

Conversation

gabrieldemarmiesse
Copy link
Contributor

- What I did
I added a test to check that all files have owners.

- How I did it
Read the files in a selected list of directories, then check that those files are either explicitly excluded (temporary, before v1.0) or in the CODEOWNERS.

- How you can verify it

The build passes

this implements part of #418

Copy link
Contributor

@RaphaelMeudec RaphaelMeudec left a comment

Choose a reason for hiding this comment

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

Made some small feedback on the PR.
I think some applications can be dropped as they are in keras-team/keras-applications: densenet, nasnet, resnet. Not sure what the wide-resnet is.

'keras_contrib/optimizers/padam.py',
'keras_contrib/optimizers/yogi.py',
'keras_contrib/metrics/crf_accuracies.py',

Copy link
Contributor

Choose a reason for hiding this comment

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

empty line

'keras_contrib/regularizers',
'keras_contrib/wrappers'
]
directories_to_test = [path_to_keras_contrib / x for x in directories_to_test]
Copy link
Contributor

Choose a reason for hiding this comment

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

Why the use of pathlib instead of classic os.getcwd and os.path.join ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Less typing?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This test only runs on python 3 on travis btw, so it should be ok to use pathlib.

files_with_owners = [x[0] for x in parse_codeowners()]
for children in directory.iterdir():
if children.is_file():
if children.name in pattern_exclude:
Copy link
Contributor

Choose a reason for hiding this comment

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

combiner les deux en un seul if (children in exclude) or (children.name in pattern_exclude)

@gabrieldemarmiesse
Copy link
Contributor Author

We have an owner for the applications. See #415 (comment)

CONTRIBUTING.md Outdated

## About the `CODEOWNERS` file

If you add a new feature to keras-contrib, you should add yourself and your file in the `CODEOWNERS` file. Doing so will, in the future, tag you whenever an issue or a pull request about your feature is opened. Be aware that it represents some work, and in addition of being tagged, you should review new pull requests related to your feature.
Copy link
Contributor

Choose a reason for hiding this comment

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

you should review new pull requests related to your feature.

Will it be possible to soften the tone a lil bit here? Something like "We would appreciate X" instead of "You should do X".

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure thing, I'll change it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@gabrieldemarmiesse
Copy link
Contributor Author

If there is no objection, I'll merge this on Tuesday.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants