Skip to content
This repository has been archived by the owner on Aug 4, 2023. It is now read-only.

Commit

Permalink
Add docs; Change names
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergey Khalymon committed Jan 8, 2017
1 parent 43eabc3 commit 594956c
Show file tree
Hide file tree
Showing 11 changed files with 53 additions and 17 deletions.
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ clean-test: ## remove test and coverage artifacts
rm -fr htmlcov/

lint: ## check style with flake8
flake8 annots tests
flake8 annot tests

test: ## run tests quickly with the default Python

Expand All @@ -59,16 +59,16 @@ test-all: ## run tests on every Python version with tox

coverage: ## check code coverage quickly with the default Python

coverage run --source annots setup.py test
coverage run --source annot setup.py test

coverage report -m
coverage html
$(BROWSER) htmlcov/index.html

docs: ## generate Sphinx HTML documentation, including API docs
rm -f docs/annots.rst
rm -f docs/annot.rst
rm -f docs/modules.rst
sphinx-apidoc -o docs/ annots
sphinx-apidoc -o docs/ annot
$(MAKE) -C docs clean
$(MAKE) -C docs html
$(BROWSER) docs/_build/html/index.html
Expand Down
7 changes: 5 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,16 @@ Annots

When you wrap a class with ``annots`` decorator ::

@annots
import annot

@annot.s
class Account:
some_common_var = 'account'
__tablename__ = 'account'

username: str
password: str


Annots add class attribute annotations into ``__init__`` ::

class Account:
Expand Down
6 changes: 5 additions & 1 deletion annots/__init__.py → annot/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
# -*- coding: utf-8 -*-
from annots.annots import annots
from annot.main import annots


__author__ = """Sergey Khalymon"""
__email__ = 'sergiykhalimon@gmail.com'
__version__ = '0.1.0'

s = annots

__all__ = ['annots']
File renamed without changes.
2 changes: 1 addition & 1 deletion annots/main.py → annot/main.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-

from annots._utils import _annotations_to_init
from annot._utils import _annotations_to_init


def annots(cls):
Expand Down
22 changes: 22 additions & 0 deletions docs/annot.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
annot package
=============

Submodules
----------

annot.main module
-----------------

.. automodule:: annot.main
:members:
:undoc-members:
:show-inheritance:


Module contents
---------------

.. automodule:: annot
:members:
:undoc-members:
:show-inheritance:
6 changes: 3 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
# version is used.
sys.path.insert(0, project_root)

import annots
import annot

# -- General configuration ---------------------------------------------

Expand Down Expand Up @@ -63,9 +63,9 @@
# the built documents.
#
# The short X.Y version.
version = annots.__version__
version = annot.__version__
# The full version, including alpha/beta/rc tags.
release = annots.__version__
release = annot.__version__

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
7 changes: 7 additions & 0 deletions docs/modules.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
annot
=====

.. toctree::
:maxdepth: 4

annot
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ tag = True
search = version='{current_version}'
replace = version='{new_version}'

[bumpversion:file:annots/__init__.py]
[bumpversion:file:annot/__init__.py]
search = __version__ = '{current_version}'
replace = __version__ = '{new_version}'

Expand Down
8 changes: 4 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@
author_email='sergiykhalimon@gmail.com',
url='https://github.com/infernion/annots',
packages=[
'annots',
'annot',
],
package_dir={'annots':
'annots'},
package_dir={'annot':
'annot'},
include_package_data=True,
install_requires=requirements,
license="MIT license",
zip_safe=False,
keywords='annots',
keywords='annots annotations typing',
classifiers=[
'Development Status :: 2 - Pre-Alpha',
'Intended Audience :: Developers',
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ commands=flake8 annots

[testenv]
setenv =
PYTHONPATH = {toxinidir}:{toxinidir}/annots
PYTHONPATH = {toxinidir}:{toxinidir}/annot

commands = python setup.py test

Expand Down

0 comments on commit 594956c

Please sign in to comment.