mirror of
https://github.com/daylinmorgan/viv.git
synced 2025-02-20 06:25:50 -06:00
Compare commits
4 commits
0e12692b71
...
e26922b808
Author | SHA1 | Date | |
---|---|---|---|
e26922b808 | |||
478c8da422 | |||
dafa099e4a | |||
10e668b2d9 |
10 changed files with 100 additions and 50 deletions
3
.github/workflows/docs.yml
vendored
3
.github/workflows/docs.yml
vendored
|
@ -2,9 +2,10 @@ name: GitHub Pages
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
tags: ["v*.*"]
|
tags: [ "v*.*" ]
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
|
|
29
.github/workflows/pypi.yml
vendored
Normal file
29
.github/workflows/pypi.yml
vendored
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
name: Build and Publish to PyPI
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-n-publish:
|
||||||
|
name: Build and publish Python 🐍 distributions 📦 to PyPI
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- name: Set up Python 3.9
|
||||||
|
uses: actions/setup-python@v3
|
||||||
|
with:
|
||||||
|
python-version: "3.9"
|
||||||
|
- name: Install pypa/build
|
||||||
|
run: >-
|
||||||
|
python -m pip install build --user
|
||||||
|
- name: Build a binary wheel and a source tarball
|
||||||
|
run: >-
|
||||||
|
python -m build --sdist --wheel --outdir dist/ .
|
||||||
|
- name: Publish a Python distribution to PyPI
|
||||||
|
uses: pypa/gh-action-pypi-publish@release/v1
|
||||||
|
with:
|
||||||
|
password: ${{ secrets.PYPI_API_TOKEN }}
|
29
.github/workflows/release.yml
vendored
Normal file
29
.github/workflows/release.yml
vendored
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
name: 🚀 Release
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- 'v*.*.*'
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-n-publish:
|
||||||
|
uses: ./.github/workflows/pypi.yml
|
||||||
|
|
||||||
|
create-release:
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ github.token }}
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: update latest tag
|
||||||
|
uses: richardsimko/update-tag@v1
|
||||||
|
with:
|
||||||
|
tag_name: latest
|
||||||
|
|
||||||
|
- name: Generate New Release
|
||||||
|
run: |
|
||||||
|
gh release create ${{ github.ref }}
|
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -172,5 +172,6 @@ poetry.toml
|
||||||
.task.mk
|
.task.mk
|
||||||
# copy of README.md
|
# copy of README.md
|
||||||
docs/index.md
|
docs/index.md
|
||||||
|
docs/cli.md
|
||||||
docs/viv.py
|
docs/viv.py
|
||||||
docs/svgs
|
docs/svgs
|
||||||
|
|
3
Makefile
3
Makefile
|
@ -35,7 +35,8 @@ docs/viv.py: src/viv/viv.py
|
||||||
cp $< $@
|
cp $< $@
|
||||||
|
|
||||||
docs/index.md: README.md
|
docs/index.md: README.md
|
||||||
cp $< $@
|
printf -- '---\nhide: [navigation]\n---\n\n' > $@
|
||||||
|
cat $< >> $@
|
||||||
|
|
||||||
examples/black: .FORCE
|
examples/black: .FORCE
|
||||||
rm -f $@
|
rm -f $@
|
||||||
|
|
21
README.md
21
README.md
|
@ -1,3 +1,13 @@
|
||||||
|
<!-- badges -->
|
||||||
|
[![Stargazers][stars-shield]][stars-url]
|
||||||
|
[![Issues][issues-shield]][issues-url]
|
||||||
|
[![MIT License][license-shield]][license-url]
|
||||||
|
[![PYPI][pypi-shield]][pypi-url]
|
||||||
|
[](https://github.com/astral-sh/ruff)
|
||||||
|
[](https://github.com/psf/black)
|
||||||
|
[](https://pre-commit.com)
|
||||||
|
<!--[![Conda][conda-shield]][conda-url]-->
|
||||||
|
|
||||||
<div align="center">
|
<div align="center">
|
||||||
<a href="https://github.com/daylinmorgan/viv">
|
<a href="https://github.com/daylinmorgan/viv">
|
||||||
<img src="https://raw.githubusercontent.com/daylinmorgan/viv/main/assets/logo.svg" alt="Logo" width=500 >
|
<img src="https://raw.githubusercontent.com/daylinmorgan/viv/main/assets/logo.svg" alt="Logo" width=500 >
|
||||||
|
@ -123,3 +133,14 @@ python3 <(curl -fsSL viv.dayl.in/viv.py) shim black -o ./black --standalone --fr
|
||||||
|
|
||||||
|
|
||||||
[^1]: You do need to have `pip` but surely you have `pip` already.
|
[^1]: You do need to have `pip` but surely you have `pip` already.
|
||||||
|
|
||||||
|
<!-- [conda-shield]: https://img.shields.io/conda/vn/conda-forge/viv-->
|
||||||
|
<!-- [conda-url]: https://anaconda.org/conda-forge/viv -->
|
||||||
|
[pypi-shield]: https://img.shields.io/pypi/v/viv
|
||||||
|
[pypi-url]: https://pypi.org/project/viv
|
||||||
|
[stars-shield]: https://img.shields.io/github/stars/daylinmorgan/viv.svg
|
||||||
|
[stars-url]: https://github.com/daylinmorgan/viv/stargazers
|
||||||
|
[issues-shield]: https://img.shields.io/github/issues/daylinmorgan/viv.svg
|
||||||
|
[issues-url]: https://github.com/daylinmorgan/viv/issues
|
||||||
|
[license-shield]: https://img.shields.io/github/license/daylinmorgan/viv.svg
|
||||||
|
[license-url]: https://github.com/daylinmorgan/viv/blob/main/LICENSE
|
||||||
|
|
43
docs/cli.md
43
docs/cli.md
|
@ -1,43 +0,0 @@
|
||||||
|
|
||||||
# cli
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
## list
|
|
||||||

|
|
||||||
|
|
||||||
## exe
|
|
||||||

|
|
||||||
|
|
||||||
## manage
|
|
||||||

|
|
||||||
|
|
||||||
### manage update
|
|
||||||

|
|
||||||
|
|
||||||
### manage purge
|
|
||||||

|
|
||||||
|
|
||||||
### manage show
|
|
||||||

|
|
||||||
|
|
||||||
### manage install
|
|
||||||

|
|
||||||
|
|
||||||
## freeze
|
|
||||||

|
|
||||||
|
|
||||||
## shim
|
|
||||||

|
|
||||||
|
|
||||||
## run
|
|
||||||

|
|
||||||
|
|
||||||
## cache
|
|
||||||

|
|
||||||
|
|
||||||
### cache info
|
|
||||||

|
|
||||||
|
|
||||||
### cache remove
|
|
||||||

|
|
|
@ -4,12 +4,18 @@ repo_url: https://github.com/daylinmorgan/viv
|
||||||
edit_uri: edit/main/docs/
|
edit_uri: edit/main/docs/
|
||||||
repo_name: daylinmorgan/viv
|
repo_name: daylinmorgan/viv
|
||||||
|
|
||||||
|
nav:
|
||||||
|
- home: index.md
|
||||||
|
- cli: cli.md
|
||||||
|
|
||||||
theme:
|
theme:
|
||||||
name: material
|
name: material
|
||||||
logo: https://raw.githubusercontent.com/daylinmorgan/viv/main/assets/logo.svg
|
logo: https://raw.githubusercontent.com/daylinmorgan/viv/main/assets/logo.svg
|
||||||
favicon: https://raw.githubusercontent.com/daylinmorgan/viv/main/assets/logo.svg
|
favicon: https://raw.githubusercontent.com/daylinmorgan/viv/main/assets/logo.svg
|
||||||
features:
|
features:
|
||||||
|
- navigation.tabs
|
||||||
- navigation.indexes
|
- navigation.indexes
|
||||||
|
|
||||||
palette:
|
palette:
|
||||||
# Palette toggle for dark mode
|
# Palette toggle for dark mode
|
||||||
- scheme: slate
|
- scheme: slate
|
||||||
|
@ -27,4 +33,3 @@ theme:
|
||||||
|
|
||||||
markdown_extensions:
|
markdown_extensions:
|
||||||
- footnotes
|
- footnotes
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,11 @@ CLI_DOC_PATH = DOCS_PATH / "cli.md"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
cli_doc = """
|
cli_doc = """\
|
||||||
|
---
|
||||||
|
hide: [navigation]
|
||||||
|
---
|
||||||
|
|
||||||
# cli
|
# cli
|
||||||
|
|
||||||

|

|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env -S python3 -S
|
||||||
"""viv isn't venv!
|
"""viv isn't venv!
|
||||||
|
|
||||||
viv -h
|
viv -h
|
||||||
|
@ -52,7 +52,7 @@ from typing import (
|
||||||
Union,
|
Union,
|
||||||
)
|
)
|
||||||
|
|
||||||
__version__ = "23.8b2-2-g2adcd6f-dev"
|
__version__ = "23.8b2-6-gdafa099-dev"
|
||||||
|
|
||||||
|
|
||||||
class Spinner:
|
class Spinner:
|
||||||
|
@ -994,7 +994,9 @@ class ViVenv:
|
||||||
return len([f for f in self.meta.files if Path(f).is_file()]) == 0
|
return len([f for f in self.meta.files if Path(f).is_file()]) == 0
|
||||||
|
|
||||||
def get_size(self) -> None:
|
def get_size(self) -> None:
|
||||||
size = float(sum(p.stat().st_size for p in Path(self.path).rglob("*")))
|
size = float(
|
||||||
|
sum(p.stat().st_size for p in Path(self.path).rglob("*") if p.is_file())
|
||||||
|
)
|
||||||
for unit in ("B", "K", "M", "G", "T"):
|
for unit in ("B", "K", "M", "G", "T"):
|
||||||
if size < 1024:
|
if size < 1024:
|
||||||
break
|
break
|
||||||
|
|
Loading…
Add table
Reference in a new issue