Skip to main content

Fetch and manage Quarto paper repositories

Project description

Quarto Fetch

Python 3.12+ License: MIT

A command-line tool for managing multiple Quarto paper repositories in a research project. It automatically fetches, updates, and organizes Quarto paper repositories while maintaining their build caches.

Features

  • ๐Ÿ“ฆ Manage multiple Quarto paper repositories in a single project
  • ๐Ÿ”„ Automatically fetch and update papers from Git repositories
  • ๐Ÿ—๏ธ Support for both manuscript and default Quarto project types
  • โ„๏ธ Smart handling of Quarto freeze directories
  • ๐Ÿ“‹ Detailed logging with progress tracking
  • โšก Efficient updates by tracking commit hashes
  • ๐Ÿ›ก๏ธ Built-in validation and error handling

Installation

We recommend using uv for installation. First, install uv if you haven't already:

curl -LsSf https://astral.sh/uv/install.sh | sh

Quick Run (Recommended)

Use uvx to run quartofetch directly without installation:

uvx quartofetch

Permanent Installation

If you prefer to install the tool permanently:

uv tool install quartofetch

Development Installation

For development work:

git clone https://github.com/MitchellAcoustics/quartofetch
cd quartofetch
uv sync

Quick Start

  1. Create a configuration file research/_paper_sources.yml:
papers:
  - repo_url: "https://github.com/username/paper1"
    target_folder: "paper1"
    branch: "main"  # optional

  - repo_url: "https://github.com/username/paper2"
    target_folder: "paper2"
    commit: "abc123"  # optional, pin to specific commit
  1. Run the fetcher:
# Using uvx (recommended)
uvx quartofetch

# Or with specific options
uvx quartofetch --config path/to/config.yml --force --log-level DEBUG

# If permanently installed
quartofetch --config path/to/config.yml

Project Structure

The tool expects and creates the following directory structure:

your-research-project/
โ”œโ”€โ”€ research/
โ”‚   โ”œโ”€โ”€ _paper_sources.yml
โ”‚   โ””โ”€โ”€ papers/
โ”‚       โ”œโ”€โ”€ paper1/
โ”‚       โ”‚   โ”œโ”€โ”€ _quarto.yml
โ”‚       โ”‚   โ”œโ”€โ”€ paper.qmd
โ”‚       โ”‚   โ””โ”€โ”€ ...
โ”‚       โ””โ”€โ”€ paper2/
โ”‚           โ”œโ”€โ”€ _quarto.yml
โ”‚           โ”œโ”€โ”€ manuscript.qmd
โ”‚           โ””โ”€โ”€ ...
โ””โ”€โ”€ _freeze/
    โ””โ”€โ”€ research/
        โ””โ”€โ”€ papers/
            โ”œโ”€โ”€ paper1/
            โ”‚   โ””โ”€โ”€ ...
            โ””โ”€โ”€ paper2/
                โ””โ”€โ”€ ...

Configuration

Paper Sources (_paper_sources.yml)

Field Description Required
repo_url Git repository URL Yes
target_folder Local folder name Yes
branch Git branch to use No
commit Specific commit hash No

Command Line Options

Option Description Default
--config Path to configuration file research/_paper_sources.yml
--force Force update all papers False
--log-level Set logging level SUCCESS
--debug Enable debug logging False
--log-file Path to log file None

Error Handling

The tool includes comprehensive error handling for:

  • Git operation failures
  • Network timeouts
  • Authentication issues
  • Invalid configurations
  • File system operations

Development

Requirements

  • Python 3.12+
  • Git

Testing

# Install development dependencies
uv sync # or pip install ".[dev]"

# Run tests
pytest

Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

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

quartofetch-0.1.1.tar.gz (19.1 kB view details)

Uploaded Source

Built Distribution

quartofetch-0.1.1-py3-none-any.whl (13.3 kB view details)

Uploaded Python 3

File details

Details for the file quartofetch-0.1.1.tar.gz.

File metadata

  • Download URL: quartofetch-0.1.1.tar.gz
  • Upload date:
  • Size: 19.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for quartofetch-0.1.1.tar.gz
Algorithm Hash digest
SHA256 a5a694575670fcc1808e878449e87705a1fcbdf518f652c92da911764e69ac72
MD5 9b0161278b2378fbef9a316f647155dd
BLAKE2b-256 d7026b00df27d7f00416a0efd9c55c9db4b603d6a5095f5ce1f81f9498774cb0

See more details on using hashes here.

Provenance

The following attestation bundles were made for quartofetch-0.1.1.tar.gz:

Publisher: publish.yml on MitchellAcoustics/quartofetch

Attestations:

File details

Details for the file quartofetch-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: quartofetch-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 13.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for quartofetch-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 77cde3ff5273175468de1c4ecb78e672eb8667790114d0f95e0c213564d1c4a3
MD5 02b711d272211ba89c11a25e1379cd20
BLAKE2b-256 9a915d6902d254e0966484fc13e40adb045edbb46bb4f4407a27cbb28a69d561

See more details on using hashes here.

Provenance

The following attestation bundles were made for quartofetch-0.1.1-py3-none-any.whl:

Publisher: publish.yml on MitchellAcoustics/quartofetch

Attestations:

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page