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)

pytest for pathz

# run one time:
pytest

# watch for changes, and re-run tests:
ptw
ptw pathz # subset

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_sohail-0.0.1.tar.gz (26.8 kB view details)

Uploaded Source

Built Distribution

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

reponow_sohail-0.0.1-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: reponow_sohail-0.0.1.tar.gz
  • Upload date:
  • Size: 26.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for reponow_sohail-0.0.1.tar.gz
Algorithm Hash digest
SHA256 8b14a81652e2cc432271ba777867402dfee7590af6542e7aad20010adb5521e3
MD5 af480a1542c162bec1b76cf7b410e498
BLAKE2b-256 ba1e97d0c3795e5e242d1f4f28d496290496785fc3d3c28557a1362814d4e9ad

See more details on using hashes here.

File details

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

File metadata

  • Download URL: reponow_sohail-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for reponow_sohail-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5f0b054e4623e09d3aede4b731851b99be84f9eaa799a1b2193ec088ef152e2e
MD5 63cc32318bf79232e65e4b23e7cfbc93
BLAKE2b-256 694416141218fc65e7a011c4eff9a39d2b7f11bc45ab949ae65f9d3996c190a8

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