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

Black tests #1798

Merged
merged 2 commits into from Apr 14, 2022
Merged

Conversation

aucampia
Copy link
Member

@aucampia aucampia commented Apr 9, 2022

Summary of changes

This changes black config to not exclude tests, once we are ready to
merge this we can use pre-commit.ci autofix to actually apply black,
thereby not having to worry if something more slipped in.

Checklist

  • Checked that there aren't other open pull requests for
    the same change.
  • Considered granting push permissions to the PR branch,
    so maintainers can fix minor issues and keep your PR up to date.

@aucampia
Copy link
Member Author

aucampia commented Apr 9, 2022

Not sure how everyone feels about this, I find that not having black on tests makes it more likely to get merge conflicts, and most of the test files are more or less black compliant anyway, so this does not make a huge difference. I'm fine if we don't merge this, but would like to consider it.

@aucampia aucampia requested review from ashleysommer, nicholascar and a user April 9, 2022 13:49
@aucampia
Copy link
Member Author

@gjhiggins seeing as you work a lot on test it probably makes sense to check with you also, not sure if you find black a nuisance or a benefit.

@ghost
Copy link

ghost commented Apr 12, 2022

@gjhiggins seeing as you work a lot on test it probably makes sense to check with you also, not sure if you find black a nuisance or a benefit.

Thanks for the consideration, I think black is an extremely useful benefit and makes a significant positive contribution both to reducing the maintenance effort and to supporting a well-founded shared model of the codebase.

fwiw, black would reformat 37 files in the test subdirectory:

test/helper.py
test/jsonld/runner.py
test/jsonld/test_localsuite.py
test/jsonld/test_onedotone.py
test/jsonld/test_testsuite.py
test/plugins/parser/example/rdflib/plugin/parser/__init__.py
test/test_conjunctivegraph/test_conjunctivegraph_generators.py
test/test_conjunctivegraph/test_conjunctivegraph_operator_combinations.py
test/test_definednamespace.py
test/test_extras_external_graph_libs.py
test/test_graph/test_graph_context.py
test/test_graph/test_graph_formula.py
test/test_graph/test_graph_generators.py
test/test_graph/test_graph_http.py
test/test_graph/test_slice.py
test/test_infixowl.py
test/test_issues/test_issue1404.py
test/test_issues/test_issue1484.py
test/test_literal/test_normalized_string.py
test/test_literal/test_term.py
test/test_literal/test_tokendatatype.py
test/test_misc/test_b64_binary.py
test/test_misc/test_create_input_source.py
test/test_misc/test_parse_file_guess_format.py
test/test_misc/test_prefix_types.py
test/test_namespace/test_definednamespace_creator.py
test/test_parsers/test_empty_xml_base.py
test/test_parsers/test_parser_hext.py
test/test_rdfxml.py
test/test_serializers/test_serializer_hext.py
test/test_sparql/test_construct_bindings.py
test/test_sparql/test_evaluate_bind.py
test/test_sparql/test_operators.py
test/test_sparql/test_prepare.py
test/test_sparql/test_sparql.py
test/test_tools/test_csv2rdf.py
test/test_typing.py

For convenience, I'm including the diff here (having browsed it) because I'm inclined to just let it rip and merge the result.
test.diff.gz

@aucampia
Copy link
Member Author

Planning to merge this on 2022-04-20.

@aucampia
Copy link
Member Author

@gjhiggins with all the work on tests, I think you are right, I was waiting for #1686 but I don't think it is coming soon, so I'm just going to go ahead with this and we can just rebase all the other things.

This changes black config to not exclude tests, once we are ready to
merge this we can use pre-commit.ci autofix to actually apply black,
thereby not having to worry if something more slipped in.
@aucampia aucampia force-pushed the iwana-20220409T1540-black_tests branch from 29fc6b9 to 28701db Compare April 14, 2022 17:23
@aucampia
Copy link
Member Author

pre-commit.ci autofix

@aucampia aucampia merged commit 8bad917 into RDFLib:master Apr 14, 2022
@aucampia aucampia mentioned this pull request Apr 14, 2022
3 tasks
@aucampia aucampia deleted the iwana-20220409T1540-black_tests branch June 4, 2022 21:56
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.

None yet

1 participant