Skip to content

Commit

Permalink
Fixes #11: add a __version__ constant
Browse files Browse the repository at this point in the history
  • Loading branch information
multimeric committed Nov 16, 2019
1 parent 4f64baa commit 9883380
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 5 deletions.
2 changes: 2 additions & 0 deletions pandas_schema/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from .column import Column
from .validation_warning import ValidationWarning
from .schema import Schema

__version__ = '0.3.3'
10 changes: 5 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#!/usr/bin/env python

# Always prefer setuptools over distutils
import distutils
import os
import subprocess
from pathlib import Path

from setuptools import setup, find_packages
import distutils
from pathlib import Path

from pandas_schema import __version__

here = Path(__file__).parent
readme = (here / 'README.rst')
Expand Down Expand Up @@ -61,7 +61,7 @@ def run(self):

setup(
name='pandas_schema',
version='0.3.2',
version=__version__,
description='A validation library for Pandas data frames using user-friendly schemas',
long_description=long_description,
url='https://github.com/TMiguelT/PandasSchema',
Expand Down
13 changes: 13 additions & 0 deletions test/test_metadata.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import unittest
from packaging import version
import pandas_schema


class Version(unittest.TestCase):
def test_version(self):
"""
Check that we have a __version__ defined, and that it's at least 0.3.0
"""
self.assertIsNotNone(pandas_schema.__version__)
parsed = version.parse(pandas_schema.__version__)
self.assertGreaterEqual(parsed, version.Version('0.3.0'))
1 change: 1 addition & 0 deletions test/test_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from pandas_schema.validation import LeadingWhitespaceValidation
from pandas_schema.errors import PanSchArgumentError


class UnorderedSchema(unittest.TestCase):
schema = Schema([
Column('a'),
Expand Down

0 comments on commit 9883380

Please sign in to comment.