Skip to main content

convention based repo clone, open, etc

Project description

reponow package

Features:

  • A library that allows you to parse repo locations and map them to a consistent location on disk.
  • Several commands to help clone and/or open a repo, via its repo location only:
wcl https://github.com/g0t4/dotfiles
opener https://github.com/g0t4/dotfiles

This package is from a learning exercise for my course at Pluralsight: TODO link coming soon: Python: Functions and Modules

Install

pipx install reponow
wcl ...
opener ...

Build

Setup .venv w/ dependencies

# use uv for dependencies
uv sync

# OR, use venv/pip manually
python3 -m venv .venv
source .venv/bin/activate
# source .venv/bin/activate.fish  # if using fish shell
pip3 install .

Run commands

# always make sure your venv is activated
source .venv/bin/activate[.fish]

# run commands "standalone"
uv pip install --editable .
# --editable allows you to change the code, w/o re-installing it
wcl ...
opener ...

# cloner, pick one:
python3 reponow/wcl.py
python3 -m reponow.wcl
python3 -m reponow # thanks to __main__.py

# opener, pick one:
python3 reponow/opener.py
python3 -m reponow.opener

Test wcl

FYI I have automated unit tests in the real wcl.py I use, in my dotfiles repo: https://github.com/g0t4/dotfiles/blob/master/zsh/compat_fish/pythons/wcl.tests.py

# AND, I have a few examples in test_cases.sh:
./test_cases.sh > expected_test_cases_output
git diff # see if any changes to versioned output file (checked in copy is correct per my wesdemos user)

# double check expected matches what's in test_cases.sh
icdiff test_cases.sh expected_test_cases_output
# then look for commmented out paths to line up (obviously not the full script)

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

reponow-0.0.1.tar.gz (22.7 kB view details)

Uploaded Source

Built Distribution

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

reponow-0.0.1-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file reponow-0.0.1.tar.gz.

File metadata

  • Download URL: reponow-0.0.1.tar.gz
  • Upload date:
  • Size: 22.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.8

File hashes

Hashes for reponow-0.0.1.tar.gz
Algorithm Hash digest
SHA256 37aaf0a55d6afc3bf6edda4c6a1bc63bdae73f9ff786ada2470f232a30b6487d
MD5 e2b137e7acb4bb7d93a6ae0e3b6c1d0a
BLAKE2b-256 4dbc3831c2fcc15d068a0bfe88777b459d3c95e2ba93c500251db392aef27ba2

See more details on using hashes here.

File details

Details for the file reponow-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: reponow-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 6.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.8

File hashes

Hashes for reponow-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 978a1190258d3e7a073faf3c38b25055adfa5b7e31d7b31a10099ee5613a2235
MD5 97c09000a31e395541c3907932c16d3f
BLAKE2b-256 0aca5f859f112577251be9d01f74185cda51e76a34e3a305434702307de8bce6

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