Skip to content

Commit

Permalink
Add pypi essentials
Browse files Browse the repository at this point in the history
  • Loading branch information
airallergy committed Jun 23, 2020
1 parent 55a4452 commit 4174f87
Show file tree
Hide file tree
Showing 8 changed files with 209 additions and 16 deletions.
109 changes: 106 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,107 @@
.DS_Store
__pycache__
.vscode
*.ipynb

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# pyenv
.python-version

# celery beat schedule file
celerybeat-schedule

# SageMath parsed files
*.sage.py

# dotenv
.env

# virtualenv
.venv
venv/
ENV/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/

# IDE settings
.vscode/
8 changes: 8 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
=======
History
=======

0.1.0 (2020-06-23)
------------------

* First release on PyPI.
3 changes: 2 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2020 Cheng Cui
Copyright (c) 2020, Cheng Cui

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 All @@ -19,3 +19,4 @@ 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.

8 changes: 8 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
=======
ZotUtil
=======

A Python Module of Zotero Utilities.


* Free software: MIT license
26 changes: 26 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
[bumpversion]
current_version = 0.1.0
commit = True
tag = True

[bumpversion:file:setup.py]
search = version='{current_version}'
replace = version='{new_version}'

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

[bdist_wheel]
universal = 1

[flake8]
exclude = docs

[aliases]
# Define setup.py command aliases here
test = pytest

[tool:pytest]
collect_ignore = ['setup.py']

55 changes: 55 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
#!/usr/bin/env python

"""The setup script."""

from setuptools import setup, find_packages

with open("README.rst") as readme_file:
readme = readme_file.read()

with open("HISTORY.rst") as history_file:
history = history_file.read()

requirements = [
"pyzotero",
]

setup_requirements = [
"pytest-runner",
]

test_requirements = [
"pytest>=3",
]

setup(
author="Cheng Cui",
author_email="cheng.cui.95@gmail.com",
python_requires=">=3.6",
classifiers=[
"Development Status :: 2 - Pre-Alpha",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
],
description="A Python Module of Zotero Utilities.",
install_requires=requirements,
license="MIT license",
long_description=readme + "\n\n" + history,
include_package_data=True,
keywords="zotutil",
name="zotutil",
packages=find_packages(include=["zotutil", "zotutil.*"]),
setup_requires=setup_requirements,
test_suite="tests",
tests_require=test_requirements,
url="https://github.com/airallergy/zotutil",
version="0.1.0",
zip_safe=False,
)
15 changes: 4 additions & 11 deletions zotutil/__init__.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
"""
Variable Naming Rules
---------------------
Pattern:
path : file path as a `pathlib.Path` object.
directory : folder path as a `pathlib.Path` object.
item : uncertain file or folder path as a `pathlib.Path` object.
"""Top-level package for ZotUtil."""

Exception :
`path` or `directory` in function arguments can be a `str` object as well.
"""
__author__ = """Cheng Cui"""
__email__ = "cheng.cui.95@gmail.com"
__version__ = "0.1.0"
1 change: 0 additions & 1 deletion zotutil/zot.py
Original file line number Diff line number Diff line change
Expand Up @@ -508,4 +508,3 @@ def restore_unlinked_files(

# Remove the empty directories
remove_empty_directories(self._attachment_root_directory)

0 comments on commit 4174f87

Please sign in to comment.