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

DEMO: pre-commit and pre-commit-ci #35

Closed
wants to merge 4,147 commits into from

Conversation

aucampia
Copy link
Owner

@aucampia aucampia commented Jan 22, 2022

git push origin iwana-20220114T2135-precommit_ci:iwana-20220116T1355-precommit_ci_demo --force

edmondchuc and others added 30 commits December 8, 2021 09:49
Add bindings for rdflib namespaces. Import DCAM.
Fix BNode.skolemize() returning a URIRef instead of an RDFLibGenid.
…tement

Remove deprecated Statement class
RDFLib#893, courtesy of Iddan Aaronsohn
which, depite the Github record [1]  _didn't_ actually make it into master.
[1] RDFLib@a7863d2
Re-make of nicholascar's “Concise Bounded Description” PR RDFLib#968 ...
Raise a more specific Exception when lang isn't valid
nicholascar and others added 5 commits January 21, 2022 08:59
Add IdentifiedNode abstract intermediary class
…space_typing

Add typing to rdflib.namespace
The diagram is based on the diagram created by
Graham Higgins (@gjhiggins) in RDFLib#1526

This shows the class heirarchy of various terms such as Identifier,
IdentifiedNode, URIRef, Literal, etc.

The diagram is in [plantuml](https://plantuml.com/class-diagram) and
compiled to svg by the
[kroki extension for sphinx](https://github.com/sphinx-contrib/kroki).

Diagrams can be rendered from the plantuml at https://kroki.io/.

Other changes:
 - Some updates to the "Writing RDFLib Documentation" page.
…_class_diag

Add a class diagram for terms.
This adds as much typing as possible to `rdflib.term`.

Other changes:
- Added back `warn_unused_ignores`. I actually thought this was enabled
  but I forgot I disabled it because of some issue on python 3.10.
- Disabled `warn_unused_ignores` only for `rdflib.plugin`. There is an
  ignore in this module which is not needed on python 3.10, this is the
  most targetted way to avoid having that fail the type checking that I
  can think of for now.
- Removed unused type ignores.

This changeset includes no runtime changes.
@aucampia
Copy link
Owner Author

pre-commit.ci autofix

aucampia and others added 6 commits January 23, 2022 02:04
Previously if `rdf:type` occurred in subject or object of a triple then
turtle would have not added a prefix for rdf as it considered `rdf:type`
to be a keyword regardless of where in the triple it occurred.

This changeset ensures that rdf:type is only considered a keyword if it
occurs as the predicate of a triple.
$ black --config black.toml .
Co-authored-by: Iwan Aucamp <aucampia@gmail.com>
@aucampia aucampia force-pushed the iwana-20220116T1355-precommit_ci_demo branch from 68df183 to 2ac7771 Compare January 24, 2022 22:18
aucampia and others added 7 commits January 24, 2022 23:38
Black does not read config from black.toml, and without this change the
config has no effect and tools like pre-commit ci will not do what we
want.
…k_config

Rename black.toml to pyproject.toml
…_typing

Merging pull request as it contains only type changes and has one review.
…ld_rdf_prefix

Merging as fix is trivial and PR has one review.
Add pre-commit and pre-commit-ci with the following hooks:

- black for formatting code.

For more info see `docs/developers.rst`.
@aucampia aucampia force-pushed the iwana-20220116T1355-precommit_ci_demo branch from 2ac7771 to b2e124d Compare January 30, 2022 13:07
@aucampia
Copy link
Owner Author

pre-commit.ci autofix

Can be added later with the rest of isort.
This is to work around this issue: psf/black#2493

Without doing this the pre-commit hook for black fails as it thinks it
got the wrong version.
@aucampia aucampia force-pushed the iwana-20220116T1355-precommit_ci_demo branch from 56710e9 to 3700b6c Compare January 30, 2022 14:53
@aucampia
Copy link
Owner Author

pre-commit.ci autofix

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

7 participants