Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pdm-project/pdm-autoexport
A PDM plugin to sync the exported files with the project file
https://github.com/pdm-project/pdm-autoexport
pdm
Last synced: 2 months ago
JSON representation
A PDM plugin to sync the exported files with the project file
- Host: GitHub
- URL: https://github.com/pdm-project/pdm-autoexport
- Owner: pdm-project
- License: mit
- Created: 2022-07-26T08:44:44.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-10-12T09:07:06.000Z (9 months ago)
- Last Synced: 2024-03-24T10:16:05.682Z (3 months ago)
- Topics: pdm
- Language: Python
- Homepage: https://pypi.org/project/pdm-autoexport
- Size: 28.3 KB
- Stars: 11
- Watchers: 4
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: changelogithub.config.json
- License: LICENSE
Lists
- awesome-pdm - pdm-autoexport - A PDM plugin to sync the exported files with the project file (Plugins)
README
# pdm-autoexport
![Github Actions](https://github.com/frostming/pdm-autoexport/workflows/Tests/badge.svg)
[![PyPI](https://img.shields.io/pypi/v/pdm-autoexport?logo=python&logoColor=%23cccccc)](https://pypi.org/project/pdm-autoexport)
[![pdm-managed](https://img.shields.io/badge/pdm-managed-blueviolet)](https://pdm.fming.dev)A PDM plugin to sync the exported files with the project file.
## Installation
Install the plugin with PDM CLI:
```bash
pdm plugin add pdm-autoexport
```Or using `pipx inject`:
```bash
pipx inject pdm pdm-autoexport
```## Usage
Configure the requirement mapping in `pyproject.toml`:
```toml
[[tool.pdm.autoexport]]
filename = "requirements/prod.txt"
groups = ["default"][[tool.pdm.autoexport]]
filename = "setup.py"
format = "setuppy"
```Then the requirement files will be synced every time when the lock file is updated.
## Configuration
The configuration is an array of table `[[tool.pdm.autoexport]]` where each item may contain the following keys:
- `filename` (required): The path to the exported file.
- `groups` (optional, default: `["default"]`): The groups of optional dependencies or dev dependency groups of PDM to sync with.
- `format` (optional, default: `"requirements"`): The format of the exported file, same as the `--format` option to the `pdm export` command.
Only `requirements` and `setuppy` are supported.
- `without-hashes` (optional, default: `false`): Whether to remove the hashes from the exported file. Only applicable to `requirements` format.