khuyentran1401 / book-sample

Repository from Github https://github.comkhuyentran1401/book-sampleRepository from Github https://github.comkhuyentran1401/book-sample

Production Ready Data Science

Repository Structure

The sample chapter is written in Quarto (.qmd) format and is located in chapters/version_control.qmd.

Setting Up Your Environment

  1. Download and install Quarto from https://quarto.org/docs/get-started/.

  2. Clone the repository:

    # Fork the repository
    # 1. Go to https://github.com/khuyentran1401/book-sample
    # 2. Click the "Fork" button in the top-right corner
    # 3. Select your GitHub account as the destination
    
    # Clone the repository
    git clone https://github.com/your-username/book-sample.git
    cd book-sample
  3. Install uv by following the instructions here.

  4. Create and activate virtual environment with uv:

    uv venv
    
    # Activate the virtual environment
    source .venv/bin/activate  # On Unix/macOS
    # or
    .venv\Scripts\activate  # On Windows
  5. Install dependencies:

    uv sync

Contributing to the Book

To contribute to the book, you can follow the steps below:

  1. Set up the environment by following the Setting Up Your Environment section.

  2. Edit the chapter in chapters/version_control.qmd using your favorite text editor. Please refer to the Quarto Markdown Basics Guide to learn how to write Quarto markdown.

  3. Preview the book in your browser:

    cd chapters
    quarto preview --no-navigate

    The sample chapter will be available at http://localhost:6289/version_control.html.

  4. Render the sample chapter to other formats:

    • To PDF:
    quarto render version_control.qmd --to pdf
    • To docx:
    quarto render version_control.qmd --to docx

    The rendered PDF and docx will be available in the _book directory.

  5. Stage, commit, and push your changes:

    # Stage all changes
    git add .
    
    # Or stage specific files
    git add path/to/file
    
    # Commit your changes with a descriptive message
    git commit -m "Your commit message"
    
    # Push your changes to the remote repository
    git push origin main
  6. View this guide to create a pull request.

About