From ca26ca36207d0c86ad932030928abcf46908cd44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?U=C4=9Fur=20=C3=96zy=C4=B1lmazel?= Date: Mon, 7 Oct 2019 14:54:39 +0300 Subject: [PATCH] Add python package scaffold --- .bumpversion.cfg | 8 +++++++ LICENCE | 21 ++++++++++++++++++ README.md | 42 ++++++++++++++++++++++++++++++++++++ Rakefile | 39 +++++++++++++++++++++++++++++++++ djaa_list_filter/__init__.py | 1 + setup.py | 37 +++++++++++++++++++++++++++++++ 6 files changed, 148 insertions(+) create mode 100644 .bumpversion.cfg create mode 100644 LICENCE create mode 100644 README.md create mode 100644 Rakefile create mode 100644 djaa_list_filter/__init__.py create mode 100644 setup.py diff --git a/.bumpversion.cfg b/.bumpversion.cfg new file mode 100644 index 0000000..5c4f958 --- /dev/null +++ b/.bumpversion.cfg @@ -0,0 +1,8 @@ +[bumpversion] +current_version = 0.1.0 +commit = True + +[bumpversion:file:setup.py] + +[bumpversion:file:djaa_list_filter/__init__.py] + diff --git a/LICENCE b/LICENCE new file mode 100644 index 0000000..481a1f1 --- /dev/null +++ b/LICENCE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2019 Demirören Teknoloji + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..248ae6d --- /dev/null +++ b/README.md @@ -0,0 +1,42 @@ +![Python](https://img.shields.io/badge/python-3.7.3-green.svg) +[![PyPI version](https://badge.fury.io/py/django-admin-autocomplete-list-filter.svg)](https://badge.fury.io/py/django-admin-autocomplete-list-filter) + +# django-admin-autocomplete-list-filter + +Ajax autocomplete list filter for Django admin. Uses built-in shipped Django’s +widgets. + +## Installation and Usage + +@wip + +## License + +This project is licensed under MIT + +--- + +## Contributer(s) + +* [Can Adıyaman](https://github.com/canadiyaman) - Creator, maintainer +* [Uğur "vigo" Özyılmazel](https://github.com/vigo) - Maintainer + +--- + +## Contribute + +All PR’s are welcome! + +1. `fork` (https://github.com/demiroren-teknoloji/django-admin-autocomplete-list-filter/fork) +1. Create your `branch` (`git checkout -b my-features`) +1. `commit` yours (`git commit -am 'added killer options'`) +1. `push` your `branch` (`git push origin my-features`) +1. Than create a new **Pull Request**! + +--- + +## Change Log + +**2019-10-07** + +- Init repo... diff --git a/Rakefile b/Rakefile new file mode 100644 index 0000000..6d64f08 --- /dev/null +++ b/Rakefile @@ -0,0 +1,39 @@ +task :default => [:install] + +desc "Remove/Delete build..." +task :clean do + rm_rf %w(build dist) + rm_rf Dir.glob("*.egg-info") + puts "Build files are removed..." +end + +desc "Install package for local development purpose" +task :install => [:build] do + system "pip install -e ." +end + +desc "Build package" +task :build => [:clean] do + system "python setup.py sdist bdist_wheel" +end + +namespace :upload do + desc "Upload package to main distro (release)" + task :main => [:build] do + puts "Uploading package to MAIN distro..." + system "twine upload --repository pypi dist/*" + end + desc "Upload package to test distro" + task :test => [:build] do + puts "Uploading package to TEST distro..." + system "twine upload --repository testpypi dist/*" + end +end + +AVAILABLE_REVISIONS = ["major", "minor", "patch"] +desc "Bump version" +task :bump, [:revision] do |t, args| + args.with_defaults(revision: "patch") + abort "Please provide valid revision: #{AVAILABLE_REVISIONS.join(',')}" unless AVAILABLE_REVISIONS.include?(args.revision) + system "bumpversion #{args.revision}" +end diff --git a/djaa_list_filter/__init__.py b/djaa_list_filter/__init__.py new file mode 100644 index 0000000..b794fd4 --- /dev/null +++ b/djaa_list_filter/__init__.py @@ -0,0 +1 @@ +__version__ = '0.1.0' diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..957fc46 --- /dev/null +++ b/setup.py @@ -0,0 +1,37 @@ +import os + +from setuptools import find_packages, setup + +CURRENT_WORKING_DIRECTORY = os.path.abspath(os.path.dirname(__file__)) + +with open(os.path.join(CURRENT_WORKING_DIRECTORY, 'README.md')) as fp: + README = fp.read() + +setup( + name='django-admin-autocomplete-list-filter', + version='0.1.0', + description='Ajax autocomplete list filter for Django admin', + long_description=README, + long_description_content_type='text/markdown', + url='https://github.com/demiroren-teknoloji/django-admin-autocomplete-list-filter', + author='Uğur Özyılmazel', + author_email='ugur.ozyilmazel@demirorenteknoloji.com', + license='MIT', + python_requires='>=3.0', + packages=find_packages(), + classifiers=[ + 'Development Status :: 4 - Beta', + 'Environment :: Web Environment', + 'Framework :: Django', + 'Framework :: Django :: 2.2.4', + 'Intended Audience :: Developers', + 'License :: OSI Approved :: MIT License', + 'Operating System :: OS Independent', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3 :: Only', + 'Topic :: Internet :: WWW/HTTP', + 'Topic :: Internet :: WWW/HTTP :: Dynamic Content', + ], + include_package_data=True, +)