Skip to content

[UPDATE] Version bump for next release #71

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Sep 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions .stickler.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ addons:
# GitHub project metadata
project:
name: reactive-firewall/python-repo
version: 1.1.0
version: 1.1.5
description: Python Repo Template
# Commands to prepare for build_command
# ** likely specific to your build **
Expand Down
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@ This repo is basically my template for new repos/projects

# CI Template:

By default this template will assume that the Travis CI Service and Circle-CI Service are used for CI/CD
By default this template will assume that the GHA Service and Circle-CI Service are used for CI/CD

# Status

### master:
[![status](https://travis-ci.org/reactive-firewall/python-repo.svg?branch=master)](https://travis-ci.org/reactive-firewall/python-repo)
[![CI](https://github.com/reactive-firewall/python-repo/actions/workflows/Tests.yml/badge.svg?branch=master)](https://github.com/reactive-firewall/python-repo/actions/workflows/Tests.yml)
[![CircleCI](https://circleci.com/gh/reactive-firewall/python-repo/tree/master.svg?style=svg)](https://circleci.com/gh/reactive-firewall/python-repo/tree/master)
[![status](https://travis-ci.org/reactive-firewall/python-repo.svg?branch=master)](https://travis-ci.org/reactive-firewall/python-repo)
[![Appveyor](https://ci.appveyor.com/api/projects/status/6gggp1wpbnnjokm4/branch/master?svg=true)](https://ci.appveyor.com/project/reactive-firewall/python-repo/branch/master)
[![Python 3](https://pyup.io/repos/github/reactive-firewall/python-repo/python-3-shield.svg)](https://pyup.io/repos/github/reactive-firewall/PiAP-python-tools/)
[![Updates](https://pyup.io/repos/github/reactive-firewall/python-repo/shield.svg)](https://pyup.io/repos/github/reactive-firewall/python-repo/)
Expand All @@ -24,8 +25,9 @@ By default this template will assume that the Travis CI Service and Circle-CI Se
![commits-since](https://img.shields.io/github/commits-since/reactive-firewall/python-repo/stable.svg?maxAge=9000)

### Stable:
[![status](https://travis-ci.org/reactive-firewall/python-repo.svg?branch=stable)](https://travis-ci.org/reactive-firewall/python-repo)
[![CI](https://github.com/reactive-firewall/python-repo/actions/workflows/Tests.yml/badge.svg?branch=stable&event=pull_request)](https://github.com/reactive-firewall/python-repo/actions/workflows/Tests.yml)
[![CircleCI](https://circleci.com/gh/reactive-firewall/python-repo/tree/stable.svg?style=svg)](https://circleci.com/gh/reactive-firewall/python-repo/tree/stable)
[![status](https://travis-ci.org/reactive-firewall/python-repo.svg?branch=stable)](https://travis-ci.org/reactive-firewall/python-repo)
[![Appveyor](https://ci.appveyor.com/api/projects/status/6gggp1wpbnnjokm4/branch/stable?svg=true)](https://ci.appveyor.com/project/reactive-firewall/python-repo/branch/stable)
[![code coverage](https://codecov.io/gh/reactive-firewall/python-repo/branch/stable/graph/badge.svg)](https://codecov.io/gh/reactive-firewall/python-repo/branch/stable/)
[![code coverage](https://codecov.io/gh/reactive-firewall/python-repo/branch/stable/graph/badge.svg)](https://codecov.io/gh/reactive-firewall/python-repo/branch/stable/)
Expand Down Expand Up @@ -71,7 +73,7 @@ make clean ; # cleans up for next test
# Next steps:

Like automation? Then integrate away, this template can take it!
(hint: @travis-ci, @houndci-bot, @pyup-bot, @stickler-ci, @circleci, @codecov-io, @lemurheavy, @coverallsapp, @codeclimate)
(hint: @coderabbitai, @travis-ci, @houndci-bot, @pyup-bot, @circleci, @codecov-io, @lemurheavy, @coverallsapp, @codeclimate)

Not in a rush? Then be sure to edit the badges in the README.
(hint: `sed -e 's/python-repo/MY-NEW-REPO' ./README.md`)
Expand Down
4 changes: 2 additions & 2 deletions pythonrepo/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
"""This is pythonrepo module Template."""


__version__ = """1.1.4"""
"""This is version 1.1.4 of pythonrepo Template"""
__version__ = """1.1.5"""
"""This is version 1.1.5 of pythonrepo Template"""


try:
Expand Down
98 changes: 73 additions & 25 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,30 +1,45 @@
[metadata]
name = pythonrepo
version = 1.1.4
version = 1.1.5
author = Mr. Walls
author-email = [email protected]
summary = python-repo template
description = file: README.md
home-page = https://github.com/reactive-firewall/python-repo
download-url = https://github.com/reactive-firewall/python-repo.git
license = file: LICENSE.md
author_email = [email protected]
description = python-repo template
long_description = file:README.md
long_description_content_type = text/markdown
url = https://github.com/reactive-firewall/python-repo
download_url = https://github.com/reactive-firewall/python-repo.git
classifiers =
Development Status :: 4 - Beta
Operating System :: POSIX :: Linux
Programming Language :: Python
Programming Language :: Python :: 3
Programming Language :: Python :: 3.12
Programming Language :: Python :: 3.11
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.5
Programming Language :: Python :: 3.4
Programming Language :: Python :: 3.3
Programming Language :: Python :: 2.7
Topic :: Security
Development Status :: 4 - Beta
Operating System :: MacOS :: MacOS X
Operating System :: POSIX :: Linux
Programming Language :: Python
Programming Language :: Python :: 3
Programming Language :: Python :: 3.14
Programming Language :: Python :: 3.13
Programming Language :: Python :: 3.12
Programming Language :: Python :: 3.11
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.5
Programming Language :: Python :: 3.4
Programming Language :: Python :: 3.3
Programming Language :: Python :: 2.7
Topic :: Software Development :: Libraries :: Python Modules
Topic :: Security
license = MIT
license_files =
LICENSE[.md]*

platform = any
project_urls =
Bug Tracker = https://github.com/reactive-firewall/python-repo/issues
License = https://github.com/reactive-firewall/python-repo/LICENSE.md

[bdist_rpm]
url = https://github.com/reactive-firewall/python-repo.git

[bdist_wheel]
universal=1
Expand All @@ -33,9 +48,42 @@ universal=1
packages = pythonrepo

[options]
zip_safe = true
py_modules = pythonrepo
test_suite = tests
python_requires = >=2.7, !=3.0.*, !=3.1.*, !=3.2.* !=3.15.*
setup_requires =
setuptools>=45.0.0
wheel>=0.37.0
build>=1.1.1

packages = find:


[options.packages.find]
where =
pythonrepo/
tests/
*.py
include =
pythonrepo
exclude =
docs
tests
docs
tests

[options.extras_require]
testing =
# upstream
pytest >= 7
pytest-checkdocs >= 2.4
pytest-flake8
coverage >= 6.3
pytest-cov >= 4.0.0; \
# coverage seems to make PyPy extremely slow
python_implementation != "PyPy"
pytest-enabler >= 1.0.1
# local
flake8 >= 5.0
virtualenv >= 15.0.1
wheel >= 0.37.0
pip >= 21.0
127 changes: 107 additions & 20 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# Python Repo Template
# ..................................
# Copyright (c) 2017-2020, Kendrick Walls
# Copyright (c) 2017-2024, Kendrick Walls
# ..................................
# Licensed under MIT (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -17,46 +17,133 @@
# See the License for the specific language governing permissions and
# limitations under the License.

"""Sets up the package.

Minimal Acceptance Testing:

Testcase 0: Just setup test fixtures by importing pythonrepo.

>>> import pythonrepo
>>>
>>> pythonrepo.__package__ is not None
True
>>>

"""

try:
import os
import warnings
warnings.simplefilter("default") # Change the filter in this process
os.environ["PYTHONWARNINGS"] = "default" # Also affect subprocesses
from setuptools import setup
from setuptools import find_packages
with warnings.catch_warnings():
warnings.simplefilter("ignore")
try:
from setuptools.config import read_configuration
except Exception:
from setuptools.config.setupcfg import read_configuration
except Exception:
raise ImportError("""Not Implemented.""")
raise NotImplementedError("""[CWE-440] Not Implemented.""")


def readFile(filename):
"""Helper Function to read files"""
"""Will attempt to read the file at with the given filename or path.

Used as a helper function to read files and return strings with the content.

Testing:

First setup test fixtures by importing pythonrepo.

>>> import pythonrepo
>>>

Testcase 0: Should have Function readFile() WHEN loading setup.py.

>>> pythonrepo.readFile is not None
True
>>> type(pythonrepo.readFile) is type(1)
False
>>>

"""
theResult = None
if filename in ("""README.md""", """LICENSE.md"""):
try:
with open(str("""./{}""").format(str(filename))) as file:
theResult = file.read()
except Exception:
theResult = str(
"""See https://github.com/reactive-firewall/python-repo/{}"""
).format(filename)
return theResult
try:
if str("""E.md""") not in filename:
raise NotImplementedError("""[CWE-440] Not Implemented.""")
with open(str("""./{}""").format(str(filename))) as f:
theResult = f.read()
except Exception:
theResult = str(
"""See https://github.com/reactive-firewall/python-repo/{}"""
).format(filename)
return str(theResult)


try:
with open("""./requirements.txt""") as f:
requirements = f.read().splitlines()
with open("""./requirements.txt""") as rfile:
requirements = rfile.read().splitlines()
except Exception:
requirements = None


conf_dict = None


with warnings.catch_warnings():
warnings.simplefilter("ignore")
conf_dict = read_configuration("""setup.cfg""", ignore_option_errors=True)


readme = readFile("""README.md""")
"""The multi-line description and/or summary of this program."""

SLA = readFile("""LICENSE.md""")
"""The "Software License Agreement" of this program."""

try:
class_tags = [
str("""Development Status :: 4 - Beta"""),
str("""Environment :: Console"""),
str("""Intended Audience :: Developers"""),
str("""Operating System :: MacOS :: MacOS X"""),
str("""Operating System :: POSIX :: Linux"""),
str("""License :: OSI Approved :: MIT License"""),
str("""Programming Language :: Python :: 3"""),
str("""Programming Language :: Python :: 3 :: Only"""),
str("""Programming Language :: Python :: 3.14"""),
str("""Programming Language :: Python :: 3.13"""),
str("""Programming Language :: Python :: 3.12"""),
str("""Programming Language :: Python :: 3.11"""),
str("""Programming Language :: Python :: 3.10"""),
str("""Programming Language :: Python :: 3.9"""),
str("""Programming Language :: Python :: 3.8"""),
str("""Programming Language :: Python :: 3.7"""),
str("""Programming Language :: Python :: 3.6"""),
str("""Programming Language :: Python :: 3.5"""),
str("""Programming Language :: Python :: 3.4"""),
str("""Programming Language :: Python :: 2.7"""),
str("""Topic :: Software Development :: Libraries :: Python Modules""")
]
except Exception:
class_tags = str("""Development Status :: 4 - Beta""")

setup(
name="""pythonrepo""",
version="""1.1.4""",
description="""Python Repo""",
name=conf_dict["""metadata"""]["""name"""],
version=conf_dict["""metadata"""]["""version"""],
description=conf_dict["""metadata"""]["""description"""],
long_description=readme,
long_description_content_type="""text/markdown""",
zip_safe=True,
include_package_data=True,
install_requires=requirements,
author="""reactive-firewall""",
author_email="""[email protected]""",
url="""https://github.com/reactive-firewall/python-repo.git""",
author=conf_dict["""metadata"""]["""author"""],
author_email=conf_dict["""metadata"""]["""author_email"""],
classifiers=class_tags,
url=conf_dict["""metadata"""]["""url"""],
download_url=conf_dict["""metadata"""]["""download_url"""],
license=SLA,
packages=find_packages(exclude=("""tests""", """docs""")),
)
Loading