pproj 0.2.26
A tool for managing python packages
License: MIT
Requires Python: >=3.11

# Pproj

[![PyPI](https://img.shields.io/pypi/v/pproj.svg)][pypi status]
[![Status](https://img.shields.io/pypi/status/pproj.svg)][pypi status]
[![Python Version](https://img.shields.io/pypi/pyversions/pproj)][pypi status]
[![License](https://img.shields.io/pypi/l/pproj)][license]

[![Read the documentation at https://pproj.readthedocs.io/](https://img.shields.io/readthedocs/pproj/latest.svg?label=Read%20the%20Docs)][read the docs]
[![Tests](https://github.com/j5pu/pproj/workflows/Tests/badge.svg)][tests]
[![Codecov](https://codecov.io/gh/j5pu/pproj/branch/main/graph/badge.svg)][codecov]

[pypi status]: https://pypi.org/project/pproj/

[read the docs]: https://pproj.readthedocs.io/

[tests]: https://github.com/j5pu/pproj/actions?workflow=Tests

[codecov]: https://app.codecov.io/gh/j5pu/pproj

## Features

### Automatic installation of packages

`PipMetaPathFinder` is a `sys.meta_path` finder that automatically installs packages when they are imported.

### Task dependencies
- `venv` runs `write` and `requirements`
- `build` runs  `venv`, `completions`, `docs` and `clean`.
- `tests` runs `build`, `ruff`, `pytest` and `tox`
- `publish` runs `tests`, `commit`, `tag`, `push`, `twine` and `clean`

### Completions

To install completions after a package is installed:
`proj completions [name]` or `completions [name]`

## Repos

To synchronize (push or pull) all repos under `~/Archive` and `$HOME` run: `repos --sync` or `proj repos --sync`

### pyproject.toml

#### Project

Project section information in `pyproject.toml` is automatically updated when `Project.write()` is called, is key is not in project. 
An empty `pyproject.toml` is needed.

#### Extras
To use all extras from pproj to your project, add the following to your `pyproject.toml`:

```toml
[project.optional-dependencies]
dev = [
    "pproj[all]",
]
```

### docs conf.py and requirements.txt

doc `conf.py`and `requirements.txt` are automatically updated when `Project.write()` is called.

### Makefile

```makefile
.PHONY: docs tests venv

brew:
	@proj $@ --command gh

browser:
	@$@

build:  # Build a project `venv`, `completions`, `docs` and `clean`.
	@$@

clean:
	@$@

commit: tests
	@$@

completions:
	@$@

coverage:
	@proj $@

docs:
	@$@

latest:
	@$@

next:
	@$@

pproj:
	@python3 -m pip install -q $@
    
publish:  # runs `tests`, `commit`, `tag`, `push`, `twine` and `clean`
	@$@

pyenv:
	@pyenv install 3.11
	@pyenv install 3.12-dev

pytest:
	@proj $@

requirements:
	@$@ --install

ruff:
	@proj $@

secrets:
	@$@

tests:  # runs `build`, `ruff`, `pytest` and `tox`
	@$@

tox:
	@proj $@

twine:
	@proj $@

venv:  # runs `write` and `requirements`
	@$@

.DEFAULT_GOAL := publish
```

## Installation

You can install _Pproj_ via [pip] from [PyPI]:

```console
$ pip install pproj
```

## Usage

Please see the [Command-line Reference] for details.

## License

Distributed under the terms of the [MIT license][license],
_pproj_ is free and open source software.

## Issues

If you encounter any problems,
please [file an issue] along with a detailed description.

## Credits

[@j5pu]: https://github.com/j5pu

[pypi]: https://pypi.org/

[file an issue]: https://github.com/j5pu/pproj/issues

[pip]: https://pip.pypa.io/

<!-- github-only -->

[license]: https://github.com/j5pu/pproj/blob/main/LICENSE

[command-line reference]: https://pproj.readthedocs.io/en/latest/usage.html