From 4cc4038b9665330026ee61168fa0b98788c96c86 Mon Sep 17 00:00:00 2001 From: Will Roper Date: Sat, 25 May 2024 11:51:35 +0100 Subject: [PATCH 1/5] More README.md updates --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5c4b993..aaa8e55 100644 --- a/README.md +++ b/README.md @@ -64,8 +64,9 @@ dir-wand simple_example_{num}/ --root /where/to/put/copies/ --num 0-2 --x 1-3 -- Here we've passed the filepath to the template directory (which can be an absolute or relative path), an optional root for the copies (if not given the copies will be made in the directory the command was run in) and a set of key-value pairs for each placeholder (of the form --key value). These values can be: -- The definition of an inclusive range using 2 dashes (e.g. `--num 0-2` will replace `num` values of 0, 1, and 2). +- The definition of an inclusive range using 2 dashes (e.g. `--num 0-2` will replace `num` with values of 0, 1, and 2). - A list of values using 1 dash (e.g. `-flag 0 1 0` will replace `flag` with 0, 1, and 0). +- The path to a file containing a list of strings (Coming soon...). NOTE: The number of values for each placeholder must be the same. If not, WAND will raise an error. From b3df3981f801f565b6e76eee3b1f19790d4ccb62 Mon Sep 17 00:00:00 2001 From: wjr21 Date: Sat, 25 May 2024 12:03:56 +0100 Subject: [PATCH 2/5] Added deploy action --- .github/workflows/deploy.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..8bb9d44 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,35 @@ +name: Publish Python Package + +on: + push: + tags: + - 'v*.*.*' # Matches version tags like v1.0.0, v2.1.3, etc. + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Check out the repository + uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.8' + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install build setuptools-scm + + - name: Build the package + run: python -m build + + - name: Publish to PyPI + env: + TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} + TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + run: | + pip install twine + twine upload dist/* From 7b317fc8e6d84ae887300c1fbbcf51813111e370 Mon Sep 17 00:00:00 2001 From: wjr21 Date: Sat, 25 May 2024 12:30:38 +0100 Subject: [PATCH 3/5] Updated pyproject --- pyproject.toml | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 9dc3707..def7c66 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,18 +4,41 @@ name = "dir-wand" # Dynamic version numbers from git dynamic = ["version"] -description = "A CLI tool that automates the creation of directory structures from templates and populates placeholder variables." - +description = "A CLI tool for making many directories from a template automagically." authors = [ { name = "Will Roper", email = "w.roper@sussex.ac.uk" } ] +readme = "README.md" +license = { file = "LICENSE" } # Minimum Python version requires-python = ">=3.8" -license = { text = "GNU" } +# No dependencies to run dependencies = [] +classifiers = [ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "Intended Audience :: End Users/Desktop", + "Intended Audience :: Science/Research", + "License :: OSI Approved :: GNU General Public License (GPL)", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Operating System :: OS Independent", + "Topic :: Software Development :: Build Tools", + "Topic :: Utilities" +] + +[project.urls] +"Homepage" = "https://github.com/WillJRoper/dir-wand" +"Source" = "https://github.com/WillJRoper/dir-wand" +"Tracker" = "https://github.com/WillJRoper/dir-wand/issues" + # Optional dependencies for specific use cases [project.optional-dependencies] # Development From 37578d9b3e5796d24cfb5c217b40229de306eb42 Mon Sep 17 00:00:00 2001 From: wjr21 Date: Sat, 25 May 2024 12:31:17 +0100 Subject: [PATCH 4/5] Updated installation guide --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5c4b993..e5d0a7e 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ WAND is a Python CLI tool for creating a large number of directories from a sing To install WAND simply run ``` sh -pip install . +pip install dir-wand ``` in the root directory of WAND. This will install the `dir-wand` CLI. From 374a651c2d91a1d8a29de50e4d60624e37cf4156 Mon Sep 17 00:00:00 2001 From: Will Roper Date: Sat, 25 May 2024 12:38:30 +0100 Subject: [PATCH 5/5] Added PyPi badge --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index e2481e1..569e5fa 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,7 @@ [![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit) [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff) [![License: GPLv3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) +[![PyPI version](https://badge.fury.io/py/dir-wand.svg)](https://badge.fury.io/py/dir-wand) WAND is a Python CLI tool for creating a large number of directories from a single template and executing commands globally throughout every directory.