Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 21 additions & 23 deletions .drone.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,3 @@
---
kind: pipeline
name: python-3-6
type: docker
platform:
os: linux
arch: amd64

steps:
- name: test
image: python:3.6
commands:
- pip install -U setuptools pip
- bash .travis.fuseki_install_optional.sh
- pip install --default-timeout 60 -r requirements.txt
- pip install --default-timeout 60 -r requirements.dev.txt
- pip install --default-timeout 60 coveralls && export HAS_COVERALLS=1
- python setup.py install
- flake8 --exit-zero rdflib
- PYTHONWARNINGS=default nosetests --with-timer --timer-top-n 42


---
kind: pipeline
name: python-3-7
Expand Down Expand Up @@ -48,6 +26,7 @@ steps:
- pip install --default-timeout 60 -r requirements.dev.txt
- pip install --default-timeout 60 coveralls && export HAS_COVERALLS=1
- python setup.py install
- black --config black.toml --check ./rdflib | true
- flake8 --exit-zero rdflib
- PYTHONWARNINGS=default nosetests --with-timer --timer-top-n 42 --with-coverage --cover-tests --cover-package=rdflib
- coverage report --skip-covered
Expand All @@ -68,8 +47,27 @@ steps:
- bash .travis.fuseki_install_optional.sh
- pip install --default-timeout 60 -r requirements.txt
- pip install --default-timeout 60 -r requirements.dev.txt
- pip install --default-timeout 60 coveralls && export HAS_COVERALLS=1
- python setup.py install
- black --config black.toml --check ./rdflib | true
- flake8 --exit-zero rdflib
- PYTHONWARNINGS=default nosetests --with-timer --timer-top-n 42

---
kind: pipeline
name: python-3-9
type: docker
platform:
os: linux
arch: amd64

steps:
- name: test
image: python:3.9
commands:
- bash .travis.fuseki_install_optional.sh
- pip install --default-timeout 60 -r requirements.txt
- pip install --default-timeout 60 -r requirements.dev.txt
- python setup.py install
- black --config black.toml --check ./rdflib | true
- flake8 --exit-zero rdflib
- PYTHONWARNINGS=default nosetests --with-timer --timer-top-n 42
31 changes: 31 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# EditorConfig is awesome:
# http://EditorConfig.org

# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

# Leave line endings as-is in Markdown and ReStructuredText files
[*.{md, rst}]
charset = utf-8
trim_trailing_whitespace = false

# Matches multiple files with brace expansion notation
# Set default charset
[*.{js, py, pyi, toml, yml, yaml}]
charset = utf-8

# 4 space indentation
[*.py]
indent_style = space
indent_size = 4
max_line_length = 88

# tab indentation
[Makefile]
indent_style = tab
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,10 @@ build:

coverage:
docker-compose -f docker-compose.tests.yml up test-runner-coverage
docker-compose -f docker-compose.tests.yml down
docker-compose -f docker-compose.tests.yml down

reformat:
black --config ./black.toml .

check-format:
black --config ./black.toml --check .
31 changes: 31 additions & 0 deletions black.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
[tool.black]
required-version = "21.6b0"
line-length = "88"
skip-string-normalization = true
target-version = ['py37']
include = '\.pyi?$'
exclude = '''
(
/(
\.eggs # exclude a few common directories in the
| \.git # root of the project
| \.hg
| \.mypy_cache
| \.pytest_cache
| \.tox
| \.venv
| \.github
| _build
| htmlcov
| benchmarks
| examples # No need to Black examples
| test # Tests are a mess, don't black them
| test_reports
| rdflib.egg-info
| buck-out
| build
| dist
| venv
)/
)
'''
8 changes: 5 additions & 3 deletions docs/developers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ developing RDFLib code.
Please be as Pythonic as possible (:pep:`8`).

Code should be formatted using `black <https://github.com/psf/black>`_.
While not yet mandatory, it will be required in the future (6.0.0+).
While not yet mandatory, it will be required in the future (6.0.0+).1
Use Black v21.6b1, with the black.toml config file provided.

Any new functionality being added to RDFLib should have doc tests and
unit tests. Tests should be added for any functionality being changed
Expand All @@ -22,6 +23,7 @@ did not break anything.

If you add a new cool feature, consider also adding an example in ``./examples``


Running tests
-------------
Run tests with `nose <https://nose.readthedocs.org/en/latest/>`_:
Expand Down Expand Up @@ -61,9 +63,9 @@ flag them as expecting to fail.
Compatibility
-------------

RDFLib 5.x.y tries to be compatible with python versions 2.7, 3.4, 3.5, 3.6, 3.7.
RDFLib 5.0.0 maintained compatibility with python versions 2.7, 3.4, 3.5, 3.6, 3.7.

The current master branch (which will be released as 6.0.0) will only support Python 3.6 and newer.
The latest 6.0.0 release and subsequent will only support Python 3.7 and newer.


Releasing
Expand Down
3 changes: 2 additions & 1 deletion requirements.dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ nose-timer
coverage
flake8
doctest-ignore-unicode==0.1.2
berkeleydb
berkeleydb
black==21.6b0
12 changes: 8 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,12 @@
kwargs["tests_require"] = [
"html5lib",
"networkx",
"nose",
"doctest-ignore-unicode",
"nose==1.3.7",
"nose-timer",
"coverage",
"black==21.6b0",
"flake8",
"doctest-ignore-unicode==0.1.2",
]
kwargs["test_suite"] = "nose.collector"
kwargs["extras_require"] = {
Expand Down Expand Up @@ -49,13 +53,13 @@ def find_version(filename):
url="https://github.com/RDFLib/rdflib",
license="BSD-3-Clause",
platforms=["any"],
python_requires=">=3.6",
python_requires=">=3.7",
classifiers=[
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"License :: OSI Approved :: BSD License",
"Topic :: Software Development :: Libraries :: Python Modules",
"Operating System :: OS Independent",
Expand Down