Skip to content
Open
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
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
PATH_add devbin
25 changes: 25 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Docs

on: [pull_request]

jobs:
docs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- uses: actions/setup-python@v4
with:
python-version: "3.x"

- name: Install enchant and dictionary
run: |
sudo apt-get -qq update
sudo apt-get -y install enchant-2 hunspell-en-us

- name: Install dependencies
run: pip install .[dev]

- name: Build docs
run: devbin/build-docs
5 changes: 0 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,6 @@ jobs:
restore-keys: |
${{ matrix.os }}-${{ matrix.python-version }}-v1-

- name: Install enchant
run: |
sudo apt-get -qq update
sudo apt-get -y install enchant-2

- name: Install dependencies
run: |
python -m pip install -U pip
Expand Down
2 changes: 1 addition & 1 deletion HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ History
2.5.0 (2021-07-26)
++++++++++++++++++

* Improvied error messages for field validation errors.
* Improvised error messages for field validation errors.
* Allowed to validate non model list items.
* Added DictField.

Expand Down
52 changes: 0 additions & 52 deletions Makefile

This file was deleted.

2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ that can be expressed in json schema if you want to be 100% correct on schema si

* Dealing with schemaless data

(Plese note that using schemaless fields can cause your models to get out of control - especially if
(Please note that using schemaless fields can cause your models to get out of control - especially if
you are the one responsible for data schema. On the other hand there is usually the case when incomming
data are with no schema defined and schemaless fields are the way to go.)

Expand Down
4 changes: 4 additions & 0 deletions devbin/build-docs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env bash
set -euo pipefail

sphinx-build -b spelling -d docs/_build/doctress docs docs/build/spelling
3 changes: 3 additions & 0 deletions docs/spelling_wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ explicite
django
docstring
docstrings
Garimort
indices
jsonmodels
jsonschema
kwargs
metaclass
namedtuple
Expand All @@ -16,3 +18,4 @@ szczepan
regex
validator
validators
virtualenv
2 changes: 1 addition & 1 deletion docs/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ is possible to you to operate just on models.
>>> person = Person()
>>> schema = person.to_json_schema()

And thats it! You can serve then this schema through your API or use it for
And that's it! You can serve then this schema through your API or use it for
validation incoming data.

Different names in structure and objects
Expand Down
6 changes: 6 additions & 0 deletions jsonmodels/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from importlib.metadata import PackageNotFoundError, version

try:
__version__ = version("jsonmodels")
except PackageNotFoundError:
__version__ = "unknown"
10 changes: 0 additions & 10 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,8 @@ dev = [
"Sphinx",
"coverage",
"docutils",
"flake8",
"flake8-pyproject",
"invoke",
"isort",
"mccabe",
"pep8",
"pyflakes",
"pytest",
"pytest-cov",
"sphinxcontrib-spelling",
Expand All @@ -47,10 +42,5 @@ dev = [
[project.urls]
"Home" = "https://github.com/jazzband/jsonmodels"

[tool.flake8]
exclude = ["./docs/conf.py"]
max-complexity = 8
max_line_length = 88

[tool.isort]
profile = "black"
11 changes: 0 additions & 11 deletions tests/__init__.py
Original file line number Diff line number Diff line change
@@ -1,11 +0,0 @@
def _have_flake8():
try:
import flake8 # noqa: F401

return True
except ImportError:
return False


LINT = _have_flake8()
CHECK_SPELLING = False
46 changes: 0 additions & 46 deletions tests/test_project.py

This file was deleted.

Loading