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

Refactored com.google.fonts/check/102 into two checks #2383

Closed
wants to merge 1 commit into from

Conversation

m4rc1e
Copy link
Collaborator

@m4rc1e m4rc1e commented Mar 8, 2019

com.google.fonts/check/102 will not run on upstream font repos since it needs a METADATA.pb file. This check will now only check that METADATA.pb files have the correct copyright string.

com.google.fonts/check/font_copyright will ensure that a font's copyright strings are correct.

Fixes #2210

com.google.fonts/check/102 will not run on upstream font repos
since it needs a METADATA.pb file. This check will now only check
that METADATA.pb files have the correct copyright string.

com.google.fonts/check/font_copyright will ensure that a font's
copyright strings are correct.
import re
from fontbakery.utils import get_name_entry_strings
string = font_metadata.copyright
does_match = re.search(r'Copyright [0-9]{4} The .* Project Authors \([^\@]*\)',
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@felipesanches perhaps we could define our copyright pattern in the constants module?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I tend to only split out things to the constants module if they are used by more than a single check. Otherwise I prefer to keep the code explicit, so that it is easier to grasp at one quick glance without opening multiple source files.

@felipesanches
Copy link
Collaborator

felipesanches commented Mar 8, 2019

since we're changing a lot the behaviour of com_google_fonts_check_102 I would suggest we deprecate it and give a new check id to both halves of it, instead of to only one of them.

@felipesanches
Copy link
Collaborator

that means, let's take all opportunities to gradually change from numerical check-IDs to names using mnemonic keywords.

felipesanches pushed a commit to felipesanches/fontbakery that referenced this pull request Mar 21, 2019
…hecks

com.google.fonts/check/metadata/valid_copyright will not run on upstream
font repos since it needs a METADATA.pb file. This check will now only check
that METADATA.pb files have the correct copyright string.

New check com.google.fonts/check/font_copyright will ensure that a font's
copyright strings are correct.

(follow-up to PR fonttools#2383)
felipesanches pushed a commit that referenced this pull request Mar 21, 2019
…hecks

com.google.fonts/check/metadata/valid_copyright will not run on upstream
font repos since it needs a METADATA.pb file. This check will now only check
that METADATA.pb files have the correct copyright string.

New check com.google.fonts/check/font_copyright will ensure that a font's
copyright strings are correct.

(follow-up to PR #2383)
@yanone yanone mentioned this pull request May 8, 2024
13 tasks
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