Skip to content
#

validation

Here are 239 public repositories matching this topic...

psverkada
psverkada commented Jan 14, 2020

The fact that exclude takes dotted notation for nested fields, but unknown does not apply to nested fields, means that exclude doesn't work for nested fields in some common use cases unless the nested schema(s) have the desired Meta.unknown setting, and then they are not runtime-flexible, which is the great benefit of Schema and load taking exclude. Somewhat new to marshmallow so mayb

charlax
charlax commented Mar 25, 2020

Feature Request

It would be great to include API documentation. The Usage docs are great as a walkthrough, but when you want to go fast ("what is the name for the Field parameter for a constant value?"), API docs provide a faster answer.

Another use case: I want to inspect the __fields__ on a model, and had to read the code to get the attribute name I was looking for.

API docs would

tetraptych
tetraptych commented Nov 11, 2017

DateType and DateTimeType and subclasses use datetime.datetime.strptime, which in turn uses the dateutil library. Unfortunately, this library is much slower at ISO8601 date parsing than C-based alternatives (in particular, ciso8601):

import datetime
import ciso8601
%timeit datetime.datetime.strptime('2018-01-01', '%Y-%m-%d')
# 10.5 µs ± 440 ns per loop (mean ± std. dev. of 7 r
danfowler
danfowler commented Feb 24, 2017

Overview

This issue contains CLI improvements

Tasks

  • support headers options
  • support granular check options
  • support providing validation config instead of options (like stringified json)

My guess would be:

goodtables --checks "{'duplicate-row': True}" datapackage datapackage.json 

But it returns:

goodtables.exceptions.GoodtablesE
cosmicBboy
cosmicBboy commented Apr 11, 2020

Currently, the SeriesSchema object doesn't validate the index of the schema. The purpose of this task is to extend the __init__ signature of SeriesSchema to take an index argument, which would take a pa.Index or pa.MultiIndex. In the validate / __call__ call, the index should be checked.

orsinium
orsinium commented Nov 26, 2019

Write and test a function that takes file content and returns it with @deal.raises added to all functions.

def attach_raises(content: str) -> str:
  ...

Example

Before:

import deal

def f1():
 ...

@deal.raises(ValueError)
def f2():
 ...

@something
def f1():
 ...

After:

import deal

@deal.raises()   # here it is adde
s-knibbs
s-knibbs commented Jun 30, 2019

It seems that the typing module doesn't flatten nested literal type definitions, so the following does not currently work:

SuccessStatus = Literal[200, 201, 204]
ClientError = Literal[404, 401, 403, 409, 400]
ServerError = Literal[500, 504, 503]

@dataclass
class HttpResponse(JsonSchemaMixin):
    status: Literal[SuccessStatus, ClientError, ServerError]
    ...

Improve this page

Add a description, image, and links to the validation topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the validation topic, visit your repo's landing page and select "manage topics."

Learn more

You can’t perform that action at this time.