diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json deleted file mode 100644 index bbc4498..0000000 --- a/.devcontainer/devcontainer.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "hostRequirements": { - "cpus": 4, - "memory": "16gb", - "storage": "32gb" - }, - "name": "Python Development Container", - "image": "mcr.microsoft.com/devcontainers/base:ubuntu", - "features": { - "ghcr.io/devcontainers/features/python": { - "version": "3.10" - } - }, - "postCreateCommand": "bash .github/setup.sh" -} diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index 3f16191..9a845fb 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -2,7 +2,7 @@ name: "\U0001F41B Bug Report" description: Submit a bug report to help us improve title: "[BUG]: " projects: - - "project-name" + - "document-to-markdown" labels: - bug body: @@ -10,7 +10,7 @@ body: attributes: value: | Thanks for taking the time to fill out this bug report! - Please make sure you have searched for a similar [issue](https://github.com/mozilla-ai/project-name/issues) before submitting a new one. + Please make sure you have searched for a similar [issue](https://github.com/mozilla-ai/document-to-markdown/issues) before submitting a new one. - type: textarea id: description @@ -62,7 +62,7 @@ body: description: Please share your system info with us. placeholder: | - OS: [e.g., macOS Sonoma] - - Project-name version: [e.g. commit SHA] + - document-to-markdown version: [e.g. commit SHA] validations: required: true diff --git a/.github/ISSUE_TEMPLATE/feature_request.yaml b/.github/ISSUE_TEMPLATE/feature_request.yaml index dc7fff3..c03a9cf 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yaml +++ b/.github/ISSUE_TEMPLATE/feature_request.yaml @@ -2,7 +2,7 @@ name: "\U0001F680 Feature Request" description: Suggest an idea for this project title: "[FEATURE]: " projects: - - "Project-name" + - "document-to-markdown" labels: - enhancement body: @@ -10,7 +10,7 @@ body: attributes: value: | Thanks for taking the time to fill out this form! - Please make sure you have searched for a similar [issue](https://github.com/mozilla-ai/project-name/issues) before submitting a new one. + Please make sure you have searched for a similar [issue](https://github.com/mozilla-ai/document-to-markdown/issues) before submitting a new one. - type: textarea id: motivation @@ -40,7 +40,7 @@ body: label: Contribution description: | Is there any way that you could help, e.g. by submitting a PR? - Make sure to read the [contribution guidelines](https://github.com/mozilla-ai/project-name/blob/main/CONTRIBUTING.md). + Make sure to read the [contribution guidelines](https://github.com/mozilla-ai/document-to-markdown/blob/main/CONTRIBUTING.md). placeholder: | I could help by... validations: diff --git a/.github/setup.sh b/.github/setup.sh deleted file mode 100644 index cc9a868..0000000 --- a/.github/setup.sh +++ /dev/null @@ -1,3 +0,0 @@ -python -m pip install torch --index-url https://download.pytorch.org/whl/cpu -python -m pip install -e . -python -m pip install --upgrade streamlit diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 1846056..a0b3150 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -6,12 +6,10 @@ on: paths: - mkdocs.yml - 'docs/**' - - 'src/**' pull_request: paths: - mkdocs.yml - 'docs/**' - - 'src/**' workflow_dispatch: jobs: diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml deleted file mode 100644 index be086f3..0000000 --- a/.github/workflows/lint.yaml +++ /dev/null @@ -1,32 +0,0 @@ -name: Lint - -on: - push: - branches: [main] - pull_request: - workflow_dispatch: - -jobs: - run-linter: - timeout-minutes: 30 - runs-on: ubuntu-latest - - steps: - - name: Check out the repository - uses: actions/checkout@v4 - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: '3.10' - - - name: Install pre-commit - run: pip install pre-commit - - - uses: actions/cache@v4 - with: - path: ~/.cache/pre-commit/ - key: pre-commit-4|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }} - - - name: pre-commit - run: pre-commit run --all-files diff --git a/.github/workflows/package.yaml b/.github/workflows/package.yaml deleted file mode 100644 index 06b4976..0000000 --- a/.github/workflows/package.yaml +++ /dev/null @@ -1,39 +0,0 @@ -name: Create and publish a Docker image - -on: - push: - branches: - - 'main' - tags: - - 'v*' - workflow_dispatch: - -jobs: - build-and-push-image: - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Log in to DockerHub - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Extract metadata (tags, labels) for Docker - id: meta - uses: docker/metadata-action@v5 - with: - images: mzdotai/blueprint - flavor: | - latest=auto - - - name: Build and push Docker image - id: push - uses: docker/build-push-action@v6 - with: - context: . - push: true - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml deleted file mode 100644 index f1fb9a8..0000000 --- a/.github/workflows/release.yaml +++ /dev/null @@ -1,39 +0,0 @@ -name: Release - -on: - release: - types: [published] - workflow_dispatch: - -jobs: - release: - environment: pypi - permissions: - contents: read - id-token: write - runs-on: ubuntu-latest - steps: - - name: Check out the repository - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: '3.10' - - - name: Upgrade pip - run: | - pip install --upgrade pip - pip --version - - - name: Install - run: python -m pip install build setuptools - - - name: Build package - run: python -m build - - - name: Upload package - if: github.event_name == 'release' - uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml deleted file mode 100644 index b7c77c0..0000000 --- a/.github/workflows/tests.yaml +++ /dev/null @@ -1,34 +0,0 @@ -name: Tests - -on: - push: - branches: [main] - paths: - - 'src/**' - - 'tests/**' - pull_request: - paths: - - 'src/**' - - 'tests/**' - workflow_dispatch: - -jobs: - run-tests: - timeout-minutes: 30 - runs-on: ubuntu-latest - - steps: - - name: Check out the repository - uses: actions/checkout@v4 - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: '3.10' - cache: "pip" - - - name: Install - run: pip install -e '.[tests]' - - - name: Run tests - run: pytest -v tests diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml deleted file mode 100644 index 1350c8a..0000000 --- a/.pre-commit-config.yaml +++ /dev/null @@ -1,27 +0,0 @@ -repos: - - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v5.0.0 - hooks: - - id: check-added-large-files - - id: check-case-conflict - - id: check-json - - id: check-merge-conflict - args: ['--assume-in-merge'] - - id: check-toml - - id: check-yaml - - id: end-of-file-fixer - - id: mixed-line-ending - args: ['--fix=lf'] - - id: sort-simple-yaml - - id: trailing-whitespace - - repo: https://github.com/astral-sh/ruff-pre-commit - rev: 'v0.7.3' - hooks: - - id: ruff - args: [--fix, --exit-non-zero-on-fix] - - id: ruff-format - - repo: https://github.com/codespell-project/codespell - rev: v2.3.0 - hooks: - - id: codespell - exclude: CODE_OF_CONDUCT.md diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 587e5d8..0000000 --- a/Dockerfile +++ /dev/null @@ -1,21 +0,0 @@ -FROM python:3.10-slim - -RUN pip3 install --no-cache-dir --upgrade pip -RUN apt-get update && apt-get install -y \ - build-essential \ - software-properties-common \ - git - - -COPY . /home/appuser/blueprint -WORKDIR /home/appuser/blueprint - -RUN pip3 install /home/appuser/blueprint - -RUN groupadd --gid 1000 appuser \ - && useradd --uid 1000 --gid 1000 -ms /bin/bash appuser - -USER appuser - -EXPOSE 8501 -ENTRYPOINT ["./demo/run.sh"] diff --git a/README.md b/README.md index f5561f8..2ee6b79 100644 --- a/README.md +++ b/README.md @@ -15,13 +15,11 @@ ![Python](https://img.shields.io/badge/Python-3.10%2B-blue) [![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](LICENSE) [![](https://dcbadge.limes.pink/api/server/YuMNeuKStr?style=flat)](https://discord.gg/YuMNeuKStr)
-[![Docs](https://github.com/mozilla-ai/blueprint-template/actions/workflows/docs.yaml/badge.svg)](https://github.com/mozilla-ai/blueprint-template/actions/workflows/docs.yaml/) -[![Tests](https://github.com/mozilla-ai/blueprint-template/actions/workflows/tests.yaml/badge.svg)](https://github.com/mozilla-ai/blueprint-template/actions/workflows/tests.yaml/) -[![Ruff](https://github.com/mozilla-ai/blueprint-template/actions/workflows/lint.yaml/badge.svg?label=Ruff)](https://github.com/mozilla-ai/blueprint-template/actions/workflows/lint.yaml/) +[![Docs](https://github.com/mozilla-ai/document-to-markdown/actions/workflows/docs.yaml/badge.svg)](https://github.com/mozilla-ai/document-to-markdown/actions/workflows/docs.yaml/) -[Blueprints Hub](https://developer-hub.mozilla.ai/) -| [Documentation](https://mozilla-ai.github.io/Blueprint-template/) -| [Getting Started](https://mozilla-ai.github.io/Blueprint-template/getting-started) +[Blueprints Hub](https://blueprints.mozilla.ai/) +| [Documentation](https://mozilla-ai.github.io/document-to-markdown/) +| [Getting Started](https://mozilla-ai.github.io/document-to-markdown/getting-started) | [Contributing](CONTRIBUTING.md) diff --git a/demo/run.sh b/demo/run.sh deleted file mode 100755 index bad3e42..0000000 --- a/demo/run.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash - -# Adapted from https://docs.streamlit.io/deploy/tutorials/kubernetes - -APP_PID= -stopRunningProcess() { - # Based on https://linuxconfig.org/how-to-propagate-a-signal-to-child-processes-from-a-bash-script - if test ! "${APP_PID}" = '' && ps -p ${APP_PID} > /dev/null ; then - > /proc/1/fd/1 echo "Stopping ${COMMAND_PATH} which is running with process ID ${APP_PID}" - - kill -TERM ${APP_PID} - > /proc/1/fd/1 echo "Waiting for ${COMMAND_PATH} to process SIGTERM signal" - - wait ${APP_PID} - > /proc/1/fd/1 echo "All processes have stopped running" - else - > /proc/1/fd/1 echo "${COMMAND_PATH} was not started when the signal was sent or it has already been stopped" - fi -} - -trap stopRunningProcess EXIT TERM - -streamlit run ${HOME}/document-to-podcast/demo/app.py & -APP_ID=${!} - -wait ${APP_ID} diff --git a/docs/api.md b/docs/api.md deleted file mode 100644 index 104ec01..0000000 --- a/docs/api.md +++ /dev/null @@ -1,3 +0,0 @@ -# API Reference - -"::: blueprint.hello" diff --git a/docs/future-features-contributions.md b/docs/future-features-contributions.md index e8ae92d..71c79f4 100644 --- a/docs/future-features-contributions.md +++ b/docs/future-features-contributions.md @@ -7,18 +7,18 @@ This Blueprint is an evolving project designed to grow with the help of the open ## 🌟 **How You Can Contribute** ### 🛠️ **Enhance the Blueprint** -- Check the [Issues](https://github.com/mozilla-ai/blueprint-template/issues) page to see if there are feature requests you'd like to implement -- Refer to our [Contribution Guide](https://github.com/mozilla-ai/blueprint-template/blob/main/CONTRIBUTING.md) for more details on contributions +- Check the [Issues](https://github.com/mozilla-ai/document-to-markdown/issues) page to see if there are feature requests you'd like to implement +- Refer to our [Contribution Guide](https://github.com/mozilla-ai/document-to-markdown/blob/main/CONTRIBUTING.md) for more details on contributions ### 🎨 **Extensibility Ideas** This Blueprint is designed to be a foundation you can build upon. By extending its capabilities, you can open the door to new applications, improve user experience, and adapt the Blueprint to address other use cases. Here are a few ideas for how you can expand its potential: -We’d love to see how you can enhance this Blueprint! If you create improvements or extend its capabilities, consider contributing them back to the project so others in the community can benefit from your work. Check out our [Contributions Guide](https://github.com/mozilla-ai/blueprint-template/blob/main/CONTRIBUTING.md) to get started! +We’d love to see how you can enhance this Blueprint! If you create improvements or extend its capabilities, consider contributing them back to the project so others in the community can benefit from your work. Check out our [Contributions Guide](https://github.com/mozilla-ai/document-to-markdown/blob/main/CONTRIBUTING.md) to get started! ### 💡 **Share Your Ideas** -Got an idea for how this Blueprint could be improved? You can share your suggestions through [GitHub Discussions](https://github.com/mozilla-ai/blueprint-template/discussions). +Got an idea for how this Blueprint could be improved? You can share your suggestions through [GitHub Discussions](https://github.com/mozilla-ai/document-to-markdown/discussions). ### 🌍 **Build New Blueprints** This project is part of a larger initiative to create a collection of reusable starter code solutions that use open-source AI tools. If you’re inspired to create your own Blueprint, you can use the [Blueprint-template](https://github.com/new?template_name=Blueprint-template&template_owner=mozilla-ai) to get started. diff --git a/docs/index.md b/docs/index.md index bd849ae..8399e06 100644 --- a/docs/index.md +++ b/docs/index.md @@ -19,7 +19,6 @@ These docs are your companion to mastering this Blueprint. ### 🔍 **Understand the System** #### _Dive deeper into how the Blueprint works:_ - **[Step-by-Step Guide](step-by-step-guide.md):** A detailed breakdown of the system’s design and workflow. -- **[API Reference](api.md):** Explore the technical details of the core modules. ### 🎨 **Make It Yours** #### _Customize the Blueprint to fit your needs:_ diff --git a/mkdocs.yml b/mkdocs.yml index 0c4ca6c..0a0617a 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,13 +1,12 @@ site_name: Guidance Docs -repo_url: https://github.com/mozilla-ai/blueprint-template -repo_name: blueprint-template +repo_url: https://github.com/mozilla-ai/document-to-markdown +repo_name: document-to-markdown nav: - Home: index.md - Getting Started: getting-started.md - Step-by-Step Guide: step-by-step-guide.md - Customization Guide: customization.md - - API Reference: api.md - Future Features & Contributions: future-features-contributions.md theme: diff --git a/pyproject.toml b/pyproject.toml index 84d8720..6c7a977 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,15 +3,12 @@ requires = ["setuptools>=48", "setuptools_scm[toml]>=6.3.1"] build-backend = "setuptools.build_meta" [project] -name = "blueprint" +name = "document-to-markdown" readme = "README.md" license = {text = "Apache-2.0"} requires-python = ">=3.10" dynamic = ["version"] -dependencies = [ - "loguru", - "streamlit", -] +dependencies = [] [project.optional-dependencies] docs = [ @@ -20,19 +17,14 @@ docs = [ "mkdocstrings-python", ] -tests = [ - "pytest>=8,<9", - "pytest-sugar>=0.9.6", -] [project.urls] -Documentation = "https://mozilla-ai.github.io/Blueprint-template/" -Issues = "https://github.com/mozilla-ai/Blueprint-template/issues" -Source = "https://github.com/mozilla-ai/Blueprint-template" +Documentation = "https://mozilla-ai.github.io/document-to-markdown/" +Issues = "https://github.com/mozilla-ai/document-to-markdown/issues" +Source = "https://github.com/mozilla-ai/document-to-markdown" [tool.setuptools.packages.find] exclude = ["tests", "tests.*"] -where = ["src"] namespaces = false [tool.setuptools_scm] diff --git a/src/blueprint/__init__.py b/src/blueprint/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/src/blueprint/hello.py b/src/blueprint/hello.py deleted file mode 100644 index 19c2c7f..0000000 --- a/src/blueprint/hello.py +++ /dev/null @@ -1,8 +0,0 @@ -def hello() -> str: - """ - Greets the world - - Returns: - str: "Hello, world!" - """ - return "Hello, world!" diff --git a/tests/unit/test_hello.py b/tests/unit/test_hello.py deleted file mode 100644 index 7987ae0..0000000 --- a/tests/unit/test_hello.py +++ /dev/null @@ -1,5 +0,0 @@ -from blueprint.hello import hello - - -def test_hello(): - assert hello() == "Hello, world!"