From 9df5410b897f413135e3aacff6191286e0b32e7e Mon Sep 17 00:00:00 2001 From: Dawson R <105720-ddaws@users.noreply.gitlab.com> Date: Tue, 10 Sep 2024 13:00:25 +0800 Subject: [PATCH] Renamed CONTRIBUTING to DEVELOPING --- CONTRIBUTING.md => DEVELOPING.md | 24 +++++++++++------------ README.md | 33 ++++++++------------------------ 2 files changed, 20 insertions(+), 37 deletions(-) rename CONTRIBUTING.md => DEVELOPING.md (79%) diff --git a/CONTRIBUTING.md b/DEVELOPING.md similarity index 79% rename from CONTRIBUTING.md rename to DEVELOPING.md index 302fab1..b5eed6e 100644 --- a/CONTRIBUTING.md +++ b/DEVELOPING.md @@ -8,15 +8,15 @@ This project uses [Poetry](https://python-poetry.org/) for dependency management 1. Install Poetry if you haven't already: - ```bash - curl -sSL https://install.python-poetry.org | python3 - - ``` +```bash +curl -sSL https://install.python-poetry.org | python3 - +``` 2. Install the project dependencies: - ```bash - poetry install - ``` +```bash +poetry install +``` ## Building the Package @@ -34,14 +34,14 @@ To publish the package to PyPI, follow these steps: 1. Ensure you have a valid PyPI account and have configured your credentials using Poetry: - ```bash - poetry config pypi-token.pypi - ``` +```bash +poetry config pypi-token.pypi +``` 2. Publish the package: - ```bash - poetry publish - ``` +```bash +poetry publish --build +``` This will upload the package to PyPI, making it available for others to install. diff --git a/README.md b/README.md index 3ec382b..180004c 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,13 @@ Click support for Pendulum date, time, interval and duration types to allow developers to easily parse strings as parameters to Python click CLIs. -## Example: `pendulum.DateTime` +```bash +pip install click-pendulum +``` + +## Examples + +### `pendulum.DateTime` You can accept a Pendulum DateTime as a parameter to your click CLI @@ -30,7 +36,7 @@ $ python examples/datetime_with_custom_format.py --date=2016-01-01 The date : 2016-01-01 00:00:00+00:00 ``` -## Example: `pendulum.Duration` +### `pendulum.Duration` You can accept a Pendulum Duration as a parameter to your click CLI @@ -56,29 +62,6 @@ $ python examples/duration_parser.py --duration="2d5h" Duration: 2 days 5 hours ``` -```bash -pip install click-pendulum -``` - -## Development - -### Building and packaging - -```bash -poetry build -``` - -### Testing the compiled wheel - -```bash -# Create a virtual environment for testing -python -m .venv/test -source .venv/test/bin/activate - -# Confirm importing and exporting is correct -python -c 'import click_pendulum as cd; print(dir(cd))' -``` - ## Authors - Dawson Reid (@ddaws)