Skip to content

Commit

Permalink
Merge pull request #33 from cfournie/license
Browse files Browse the repository at this point in the history
Add license string and version
  • Loading branch information
cfournie committed Feb 6, 2017
2 parents 1bb038a + 2dee041 commit 8a55f06
Show file tree
Hide file tree
Showing 14 changed files with 78 additions and 9 deletions.
12 changes: 12 additions & 0 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Contributing
------------

If you would like to contribute to ``important``:

- Log any bugs or feature requests as `issues <https://github.com/cfournie/important/issues>`_
- Try to be as detailed as possible and include OS, Python version, and stack traces, and ideally your project's source code (if it's open source)

- Submit a pull request and I'll review it provided that it:
- Details the problem you're trying to solve,
- Details how your PR solves it, and
- Passes `CI <https://travis-ci.org/cfournie/important>`_
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2016 Chris Fournier
Copyright (c) 2016-2017 Chris Fournier

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
14 changes: 10 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,17 @@ A simple source code import checker that checks your project for whether you:
Installation
------------

Coming to pypi soon, but in the meantime, install from source using:
Install the latest stable version from PyPI using:

.. code:: bash
$ pip install git+https://github.com/cfournie/important.git
pip install important
Otherwise, to grab the latest version on master, use:

.. code:: bash
pip install git+https://github.com/cfournie/important.git
Requirements
------------
Expand All @@ -28,7 +34,7 @@ This works best when run from a virtualenv where your project's requirements
are installed (to translate requirements to module names).

This tool requires that it be installed with the same Python version as the
source code that's analyzing and that the source code is syntactically correct.
source code that it's analyzing and that the source code is syntactically correct.

Usage
-----
Expand Down Expand Up @@ -74,7 +80,7 @@ Ignore errors related to some of your requirements using:
Parsed 52 imports in 8 files
Alternatively, you can configure important using a ``setup.cfg`` file in the current working directory, e.g.:
Alternatively, you can configure ``important`` using a ``setup.cfg`` file in the current working directory, e.g.:

.. code:: ini
Expand Down
5 changes: 5 additions & 0 deletions important/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Copyright (c) 2016-2017 Chris Fournier. All rights reserved.
# Use of this source code is governed by a MIT-style license that can be found
# in the LICENSE file.

__version__ = '0.1.0'
3 changes: 3 additions & 0 deletions important/__main__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) 2016-2017 Chris Fournier. All rights reserved.
# Use of this source code is governed by a MIT-style license that can be found
# in the LICENSE file.
import logging
import os
import sys
Expand Down
3 changes: 3 additions & 0 deletions important/check.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) 2016-2017 Chris Fournier. All rights reserved.
# Use of this source code is governed by a MIT-style license that can be found
# in the LICENSE file.
from __future__ import unicode_literals

from collections import defaultdict
Expand Down
3 changes: 3 additions & 0 deletions important/parse.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) 2016-2017 Chris Fournier. All rights reserved.
# Use of this source code is governed by a MIT-style license that can be found
# in the LICENSE file.
from __future__ import unicode_literals

import ast
Expand Down
22 changes: 18 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,34 @@
#!/usr/bin/env python
# Copyright (c) 2016-2017 Chris Fournier. All rights reserved.
# Use of this source code is governed by a MIT-style license that can be found
# in the LICENSE file.
import re

from distutils.core import setup

with open('README.rst') as fh:
long_description = fh.read()

with open('important/__init__.py', 'r') as fd:
version = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]',
fd.read(), re.MULTILINE).group(1)

if not version:
raise RuntimeError('Cannot find version information')

setup(
name='important',
version='0.0.0.dev1',
description='Import and requirements checking utilities',
version=version,
description='Utility to find unused packages in requirements \
and to constrain package usage',
long_description=long_description,
url='https://github.com/cfournie/important',
download_url='https://github.com/cfournie/important/tarball/0.1.0',
author='Chris Fournier',
author_email='chris.m.fournier@gmail.com',
license='MIT',
classifiers=[
'Development Status :: 3 - Alpha',
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'Topic :: Software Development :: Build Tools',
'Topic :: Software Development :: Testing',
Expand All @@ -34,5 +48,5 @@
'important = important.__main__:check',
],
},
install_requires=['pip', 'click'],
install_requires=['pip>=8', 'click>=5'],
)
3 changes: 3 additions & 0 deletions tests/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Copyright (c) 2016-2017 Chris Fournier. All rights reserved.
# Use of this source code is governed by a MIT-style license that can be found
# in the LICENSE file.
3 changes: 3 additions & 0 deletions tests/important/conftest.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2016-2017 Chris Fournier. All rights reserved.
# Use of this source code is governed by a MIT-style license that can be found
# in the LICENSE file.
from __future__ import unicode_literals

import pytest
Expand Down
3 changes: 3 additions & 0 deletions tests/important/test_check.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) 2016-2017 Chris Fournier. All rights reserved.
# Use of this source code is governed by a MIT-style license that can be found
# in the LICENSE file.
from __future__ import unicode_literals

from important.parse import parse_requirements
Expand Down
3 changes: 3 additions & 0 deletions tests/important/test_main.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Copyright (c) 2016-2017 Chris Fournier. All rights reserved.
# Use of this source code is governed by a MIT-style license that can be found
# in the LICENSE file.
import codecs
import important.__main__
import os
Expand Down
8 changes: 8 additions & 0 deletions tests/important/test_package.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Copyright (c) 2016-2017 Chris Fournier. All rights reserved.
# Use of this source code is governed by a MIT-style license that can be found
# in the LICENSE file.
import important


def test_version():
assert important.__version__
3 changes: 3 additions & 0 deletions tests/important/test_parse.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2016-2017 Chris Fournier. All rights reserved.
# Use of this source code is governed by a MIT-style license that can be found
# in the LICENSE file.
from __future__ import unicode_literals

import codecs
Expand Down

0 comments on commit 8a55f06

Please sign in to comment.