-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from JordanWelsman/develop
WIP: Develop new features
- Loading branch information
Showing
15 changed files
with
116 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Python | ||
.venv/ | ||
|
||
# Package | ||
test.py | ||
|
||
# Setuptools | ||
build/ | ||
dist/ | ||
jutl.egg-info/ | ||
**/__pycache__/ |
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Import hello_world.py from /utilities/ so hello_world() is | ||
# usable at 'from jutils import utilities' level. | ||
from .hello_world import hello_world |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
def hello_world(name: str = None) -> str: | ||
""" | ||
Greet the user. | ||
Returns "Hello, 'user!'" where 'user' is 'name' if passed, | ||
or "Hello, World!" if 'name' is not passed. | ||
Parameters: | ||
name (str): The user's name | ||
Returns: | ||
str: A greeting for the user | ||
""" | ||
if name: | ||
return(f"Hello, {name}!") | ||
else: | ||
return(f"Hello, World!") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
# Module imports | ||
from setuptools import setup | ||
|
||
# Arguments | ||
git_name = "jutils" | ||
pypi_name = "jutl" | ||
version = "0.0.1" | ||
python_version = ">=3.10" | ||
|
||
# Long description from README.md | ||
with open("README.md", "r") as fh: | ||
long_description = fh.read() | ||
|
||
# jutils package data | ||
jutils_package_data = [ | ||
'averages/*', | ||
'calculators/*', | ||
'converters/*', | ||
'cryptography/*', | ||
'formatting/*', | ||
'language/*', | ||
'logic/*', | ||
'pipelining/*', | ||
'sorters/*', | ||
'timers/*', | ||
'utilities' | ||
] | ||
|
||
# Run setup function | ||
setup( | ||
name=pypi_name, | ||
version=version, | ||
description='A Python package of useful tools and utilities.', | ||
license='MIT', | ||
long_description=long_description, | ||
long_description_content_type='text/markdown', | ||
author='Jordan Welsman', | ||
author_email='[email protected]', | ||
url='https://pypi.org/project/'+pypi_name+"/", | ||
download_url='https://github.com/JordanWelsman/jutils/tags', | ||
package_data={'jutils': jutils_package_data}, | ||
python_requires=python_version, | ||
# jutils package information | ||
classifiers=[ | ||
'Development Status :: 2 - Pre-Alpha', | ||
'Intended Audience :: Developers', | ||
'Intended Audience :: Education', | ||
'License :: OSI Approved :: MIT License', | ||
'Topic :: Education', | ||
'Topic :: Scientific/Engineering', | ||
'Topic :: Scientific/Engineering :: Mathematics', | ||
'Topic :: Security', | ||
'Topic :: Security :: Cryptography', | ||
'Topic :: Software Development', | ||
'Topic :: Software Development :: Libraries', | ||
'Topic :: Software Development :: Libraries :: Python Modules', | ||
'Topic :: Utilities', | ||
'Programming Language :: Python :: 3', | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11" | ||
], | ||
keywords='python, averages, calculators, converters, cryptography, formatting, language, logic, pipelining, sorters, timers, utilities' | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/sh | ||
|
||
# jutils Unbuild Script | ||
# To be used to delete the directories & files created by `python setup.py bdist_wheel`. | ||
|
||
# Author : Jordan Welsman | ||
# Copyright : Jordan Welsman | ||
|
||
echo "You are about to delete files & folders from jutils." | ||
echo "These files are crucial to the ability to install and import jutils." | ||
read -p "Do you want to continue? [Y/n]: " | ||
|
||
if [[ $REPLY =~ ^[Yy]$ ]] | ||
then | ||
rm -rf build # remove build directory if exists | ||
rm -rf dist # remove distribution directory if exists | ||
rm -rf jutl.egg-info # remove egg info directory if exists | ||
find . -name __pycache__ -type d -print0|xargs -0 rm -r -- # remove all pycache directories | ||
echo "Project successfully unbuilt." | ||
else | ||
echo "Operation aborted." | ||
fi |