Skip to content

Commit

Permalink
Merge branch 'main' into run_command
Browse files Browse the repository at this point in the history
  • Loading branch information
WillJRoper authored May 25, 2024
2 parents 3850476 + 374a651 commit 140f5a6
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 5 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -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/*
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -12,7 +13,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.
Expand Down Expand Up @@ -64,8 +65,9 @@ dir-wand --template simple_example_{num}/ --root /where/to/put/copies/ --num 0-2

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 current working directory) 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.

Expand Down
29 changes: 26 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "[email protected]" }
]
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
Expand Down

0 comments on commit 140f5a6

Please sign in to comment.