Skip to main content

No project description provided

Project description

path-reducer

path-reducer is a Python package that simplifies a list of directions by removing opposite directions that cancel each other out.

Installation

Package is published on PyPI, you can install it using pip:

pip install path-reducer

Usage

from path_reducer import PathReducer

# Create a PathReducer instance
path_reducer = PathReducer()

# Example usage
directions = ["NORTH", "SOUTH", "SOUTH", "EAST", "WEST", "NORTH", "WEST"]
optimized_directions = path_reducer.reduce_path(directions)
print(optimized_directions)  # Output: ["WEST"]

Local development

Project is set up using Poetry, to run it locally follow these steps:

  1. Clone this repository to your local machine:

    git clone https://github.com/augustinasn/path-reducer.git
    
  2. Navigate to the project directory:

    cd path-reducer
    
  3. Install Poetry (if you haven't already):

    pip install poetry
    
  4. Use Poetry to install the project's dependencies:

    poetry install
    
  5. Activate the Poetry virtual environment:

    poetry shell
    
  6. Tests are included in the tests directory. You can run the tests using the following command:

    python test.py
    

License

This project is licensed under the MIT License - see the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

path_reducer-1.0.0.tar.gz (2.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

path_reducer-1.0.0-py3-none-any.whl (3.3 kB view details)

Uploaded Python 3

File details

Details for the file path_reducer-1.0.0.tar.gz.

File metadata

  • Download URL: path_reducer-1.0.0.tar.gz
  • Upload date:
  • Size: 2.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.1

File hashes

Hashes for path_reducer-1.0.0.tar.gz
Algorithm Hash digest
SHA256 876e811679a5618bfb1b673f345dc5b5b9a2565097190fa0e823489283534014
MD5 02b94a1396ebbbb507dae829abfdc7d0
BLAKE2b-256 3341333502e4359138b127c051a12d50e89779ae3cac8483b9ce0c15f44506cb

See more details on using hashes here.

File details

Details for the file path_reducer-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: path_reducer-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 3.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.1

File hashes

Hashes for path_reducer-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f9eca52f88ac7e822cb8b721e4f07dfd4e49130c96bc8b78a15c45ea7eb487ba
MD5 f379ec14e7dc55c7ebc00b765c8893af
BLAKE2b-256 d34f6dbc11ae4168080b4649ce2d0f5ab30f953124d7850e99dd0522e7b23036

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page