diff options
-rw-r--r-- | .coveragerc | 15 | ||||
-rw-r--r-- | .gitignore | 35 | ||||
-rw-r--r-- | .mypy.ini | 3 | ||||
-rw-r--r-- | .pylintrc | 193 | ||||
-rw-r--r-- | LICENSE | 24 | ||||
-rw-r--r-- | README | 57 | ||||
-rw-r--r-- | setup.py | 20 | ||||
-rw-r--r-- | tagit.toml | 11 | ||||
-rw-r--r-- | tagit/__init__.py | 18 |
9 files changed, 376 insertions, 0 deletions
diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 0000000..9e77a35 --- /dev/null +++ b/.coveragerc @@ -0,0 +1,15 @@ +[run] +dynamic_context = test_function +branch = True +source = tagit +data_file = .coverage +command_line = -m unittest + +[report] +show_missing = True +skip_empty = True + +[html] +directory = .htmlcov +show_contexts = True + diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ba88570 --- /dev/null +++ b/.gitignore @@ -0,0 +1,35 @@ + +# python runtime files +__pycache__ +*.pyc +*.pyo + +# development files +*.pth +.coverage +.pypirc +.mypy_cache +bsfs.egg-info +htmlcov +tags +dev/ +env + +# dist builds +MANIFEST +dist/ +build/ + +# doc builds +doc/build/ + +# doc extra files + +# test data binaries (keep the builder scripts only) + +# external builds + +# assets + + +## EOF ## diff --git a/.mypy.ini b/.mypy.ini new file mode 100644 index 0000000..4188cc7 --- /dev/null +++ b/.mypy.ini @@ -0,0 +1,3 @@ +[mypy] +ignore_missing_imports = True +packages=tagit diff --git a/.pylintrc b/.pylintrc new file mode 100644 index 0000000..7ea4957 --- /dev/null +++ b/.pylintrc @@ -0,0 +1,193 @@ +[MAIN] + +# Pickle collected data for later comparisons. +persistent=no + +# Minimum Python version to use for version dependent checks. Will default to +# the version used to run pylint. +py-version=3.8 + +# Discover python modules and packages in the file system subtree. +recursive=yes + +# When enabled, pylint would attempt to guess common misconfiguration and emit +# user-friendly hints instead of false-positive error messages. +suggestion-mode=yes + + +[BASIC] + +# Minimum line length for functions/classes that require docstrings, shorter +# ones are exempt. +docstring-min-length=-1 + +# Bad variable names which should always be refused, separated by a comma. +bad-names=foo,bar,abc,cba,xyz,zyx,foobar,hello,world + +# Good variable names which should always be accepted, separated by a comma. +good-names=i,j,k,n,_,rx + +# Naming style matching correct argument names. +argument-naming-style=snake_case + +# Naming style matching correct attribute names. +attr-naming-style=snake_case + +# Naming style matching correct class attribute names. +class-attribute-naming-style=any + +# Naming style matching correct class constant names. +class-const-naming-style=UPPER_CASE + +# Naming style matching correct class names. +class-naming-style=PascalCase + +# Naming style matching correct constant names. +const-naming-style=UPPER_CASE + +# Naming style matching correct function names. +function-naming-style=snake_case + +# Include a hint for the correct naming format with invalid-name. +include-naming-hint=yes + +# Naming style matching correct inline iteration names. +inlinevar-naming-style=any + +# Naming style matching correct method names. +method-naming-style=snake_case + +# Naming style matching correct module names. +module-naming-style=snake_case + +# Naming style matching correct variable names. +variable-naming-style=snake_case + + +[DESIGN] + +# Maximum number of arguments for function / method. +max-args=10 + +# Maximum number of attributes for a class (see R0902). +max-attributes=7 + +# Maximum number of boolean expressions in an if statement (see R0916). +max-bool-expr=5 + +# Maximum number of branch for function / method body. +max-branches=12 + +# Maximum number of locals for function / method body. +max-locals=15 + +# Maximum number of parents for a class (see R0901). +max-parents=7 + +# Maximum number of public methods for a class (see R0904). +max-public-methods=20 + +# Maximum number of return / yield for function / method body. +max-returns=6 + +# Maximum number of statements in function / method body. +max-statements=50 + +# Minimum number of public methods for a class (see R0903). +min-public-methods=1 + + +[FORMAT] + +# Expected format of line ending, e.g. empty (any line ending), LF or CRLF. +expected-line-ending-format= + +# Regexp for a line that is allowed to be longer than the limit. +ignore-long-lines=^\s*(# )?<?https?://\S+>?$ + +# Number of spaces of indent required inside a hanging or continued line. +indent-after-paren=4 + +# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1 +# tab). +indent-string=' ' + +# Maximum number of characters on a single line. +max-line-length=120 + +# Maximum number of lines in a module. +max-module-lines=1000 + +# Allow the body of a class to be on the same line as the declaration if body +# contains single statement. +single-line-class-stmt=no + +# Allow the body of an if to be on the same line as the test if there is no +# else. +single-line-if-stmt=no + + +[IMPORTS] + +# List of modules that can be imported at any level, not just the top level +# one. +allow-any-import-level= + +# Allow wildcard imports from modules that define __all__. +allow-wildcard-with-all=no + + +[LOGGING] + +# The type of string formatting that logging methods do. `old` means using % +# formatting, `new` is for `{}` formatting. +logging-format-style=old + + + +[MISCELLANEOUS] + +# List of note tags to take in consideration, separated by a comma. +notes=FIXME,TODO,NOTE + + + +[REPORTS] + +# Tells whether to display a full report or only the messages. +reports=yes + +# Activate the evaluation score. +score=yes + + +[SIMILARITIES] + +# Minimum lines number of a similarity. +min-similarity-lines=4 + + +[STRING] + +# This flag controls whether inconsistent-quotes generates a warning when the +# character used as a quote delimiter is used inconsistently within a module. +check-quote-consistency=yes + + +[TYPECHECK] + +# Tells whether to warn about missing members when the owner of the attribute +# is inferred to be None. +ignore-none=no + + +[VARIABLES] + +# List of strings which can identify a callback function by name. A callback +# name must start or end with one of those strings. +callbacks=clbk,callback + + + + +# Disable: R1735 (use-dict-literal) @@ -0,0 +1,24 @@ +Copyright (c) 2022, Matthias Baumgartner +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + * Neither the name tagit nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL MATTHIAS BAUMGARTNER BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. @@ -0,0 +1,57 @@ + +tagit - the BSFS frontend +========================= + + +### Developer tools setup + +#### Test coverage (coverage) + +Resources: +* https://coverage.readthedocs.io/en/6.5.0/index.html +* https://nedbatchelder.com/blog/200710/flaws_in_coverage_measurement.html + +Commands: +$ pip install coverage +$ coverage run ; coverage html ; xdg-open .htmlcov/index.html + + + +#### Static code analysis (pylint) + +Resources: +* https://github.com/PyCQA/pylint +* https://pylint.org/ +* https://pylint.pycqa.org/en/latest/user_guide/messages/messages_overview.html#messages-overview + +Commands: +$ pip install pylint +$ pylint tagit + + + +#### Type analysis (mypy) + +Resources: +* https://github.com/python/mypy +* https://mypy.readthedocs.io/en/stable/ + +Commands: +$ pip install mypy +$ mypy + + + +#### Documentation (sphinx) + +Resources: +* +* + +Commands: +$ pip install ... +$ + + + + diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..f6a7a61 --- /dev/null +++ b/setup.py @@ -0,0 +1,20 @@ + +from setuptools import setup +import os + +setup( + name='tagit', + version='0.0.1', + author='Matthias Baumgartner', + author_email='dev@igsor.net', + description='A frontend to the Black Star File System.', + long_description=open(os.path.join(os.path.dirname(__file__), 'README')).read(), + license='BSD', + license_files=('LICENSE', ), + url='https://www.igsor.net/projects/blackstar/tagit/', + download_url='https://pip.igsor.net', + packages=('tagit', ), + install_requires=('kivy', ), + python_requires=">=3.7", +) + diff --git a/tagit.toml b/tagit.toml new file mode 100644 index 0000000..8412da7 --- /dev/null +++ b/tagit.toml @@ -0,0 +1,11 @@ +[project] +name = "tagit" +description = "A frontend to the Black Star File System." +version = "0.0.1" +license = {text = "BSD 3-Clause License"} +authors = [{name='Matthias Baumgartner', email="dev@igsor.net"}] +dependencies = [ + "kivy", +] +requires-python = ">=3.7" + diff --git a/tagit/__init__.py b/tagit/__init__.py new file mode 100644 index 0000000..7197091 --- /dev/null +++ b/tagit/__init__.py @@ -0,0 +1,18 @@ +""" + +Part of the tagit module. +A copy of the license is provided with the project. +Author: Matthias Baumgartner, 2022 +""" +# imports +import collections +import typing + +# constants +T_VERSION_INFO = collections.namedtuple('T_VERSION_INFO', ('major', 'minor', 'micro')) +version_info = T_VERSION_INFO(0, 0, 1) + +# exports +__all__: typing.Sequence[str] = [] + +## EOF ## |