From 52ebcceb220edb8e314098099b75b7548f5b7c4a Mon Sep 17 00:00:00 2001 From: Vladimir Kalnitsky Date: Mon, 11 Nov 2024 18:31:13 +0400 Subject: [PATCH] Move python impl to `python/` --- .github/workflows/links.yaml | 12 ++++++++++++ .github/workflows/test.yaml | 6 +++--- README.md | 2 +- python/{metaprompt => }/.gitignore | 0 python/{metaprompt => }/examples/__init__.py | 0 python/{metaprompt => }/examples/poem.py | 0 python/{metaprompt => }/main.py | 0 python/{metaprompt => }/pyproject.toml | 0 python/{metaprompt => }/pytest.ini | 0 python/{metaprompt => }/requirements.txt | 0 python/{metaprompt => }/setup.cfg | 0 python/{metaprompt => }/setup.py | 0 python/{metaprompt => }/src/__init__.py | 0 python/{metaprompt => }/src/config.py | 0 python/{metaprompt => }/src/env.py | 0 python/{metaprompt => }/src/eval.py | 0 python/{metaprompt => }/src/metaprompt.py | 0 python/{metaprompt => }/src/parse_metaprompt.py | 0 python/{metaprompt => }/src/parser/MetaPrompt.interp | 0 python/{metaprompt => }/src/parser/MetaPrompt.tokens | 0 .../src/parser/MetaPromptLexer.interp | 0 .../{metaprompt => }/src/parser/MetaPromptLexer.py | 0 .../src/parser/MetaPromptLexer.tokens | 0 .../src/parser/MetaPromptListener.py | 0 .../{metaprompt => }/src/parser/MetaPromptParser.py | 0 .../{metaprompt => }/src/parser/MetaPromptVisitor.py | 0 python/{metaprompt => }/src/parser/__init__.py | 0 python/{metaprompt => }/src/provider.py | 0 python/{metaprompt => }/src/provider_config.py | 0 python/{metaprompt => }/src/providers/openai.py | 0 python/{metaprompt => }/src/runtime.py | 0 python/{metaprompt => }/tasks.py | 0 python/{metaprompt => }/tests/test_parser.py | 0 33 files changed, 16 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/links.yaml rename python/{metaprompt => }/.gitignore (100%) rename python/{metaprompt => }/examples/__init__.py (100%) rename python/{metaprompt => }/examples/poem.py (100%) rename python/{metaprompt => }/main.py (100%) rename python/{metaprompt => }/pyproject.toml (100%) rename python/{metaprompt => }/pytest.ini (100%) rename python/{metaprompt => }/requirements.txt (100%) rename python/{metaprompt => }/setup.cfg (100%) rename python/{metaprompt => }/setup.py (100%) rename python/{metaprompt => }/src/__init__.py (100%) rename python/{metaprompt => }/src/config.py (100%) rename python/{metaprompt => }/src/env.py (100%) rename python/{metaprompt => }/src/eval.py (100%) rename python/{metaprompt => }/src/metaprompt.py (100%) rename python/{metaprompt => }/src/parse_metaprompt.py (100%) rename python/{metaprompt => }/src/parser/MetaPrompt.interp (100%) rename python/{metaprompt => }/src/parser/MetaPrompt.tokens (100%) rename python/{metaprompt => }/src/parser/MetaPromptLexer.interp (100%) rename python/{metaprompt => }/src/parser/MetaPromptLexer.py (100%) rename python/{metaprompt => }/src/parser/MetaPromptLexer.tokens (100%) rename python/{metaprompt => }/src/parser/MetaPromptListener.py (100%) rename python/{metaprompt => }/src/parser/MetaPromptParser.py (100%) rename python/{metaprompt => }/src/parser/MetaPromptVisitor.py (100%) rename python/{metaprompt => }/src/parser/__init__.py (100%) rename python/{metaprompt => }/src/provider.py (100%) rename python/{metaprompt => }/src/provider_config.py (100%) rename python/{metaprompt => }/src/providers/openai.py (100%) rename python/{metaprompt => }/src/runtime.py (100%) rename python/{metaprompt => }/tasks.py (100%) rename python/{metaprompt => }/tests/test_parser.py (100%) diff --git a/.github/workflows/links.yaml b/.github/workflows/links.yaml new file mode 100644 index 0000000..f3c7511 --- /dev/null +++ b/.github/workflows/links.yaml @@ -0,0 +1,12 @@ +name: Check Markdown links + +on: push + +jobs: + markdown-link-check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - uses: gaurav-nelson/github-action-markdown-link-check@v1 + with: + use-verbose-mode: 'yes' diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index ddb3c40..202b423 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -24,12 +24,12 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install -r python/metaprompt/requirements.txt # If you have a requirements file + pip install -r python/requirements.txt # If you have a requirements file pip install pytest - name: Run tests - working-directory: python/metaprompt + working-directory: python/ env: - PYTHONPATH: "${{ github.workspace }}/python/metaprompt/src" + PYTHONPATH: "${{ github.workspace }}/python/src" run: | pytest diff --git a/README.md b/README.md index 791ef6d..296824f 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ any other output] ``` -See [`python/metaprompt/examples/`](./python/metaprompt/examples/) for more. +See [`python/metaprompt/examples/`](./python/examples/) for more. ## Project status diff --git a/python/metaprompt/.gitignore b/python/.gitignore similarity index 100% rename from python/metaprompt/.gitignore rename to python/.gitignore diff --git a/python/metaprompt/examples/__init__.py b/python/examples/__init__.py similarity index 100% rename from python/metaprompt/examples/__init__.py rename to python/examples/__init__.py diff --git a/python/metaprompt/examples/poem.py b/python/examples/poem.py similarity index 100% rename from python/metaprompt/examples/poem.py rename to python/examples/poem.py diff --git a/python/metaprompt/main.py b/python/main.py similarity index 100% rename from python/metaprompt/main.py rename to python/main.py diff --git a/python/metaprompt/pyproject.toml b/python/pyproject.toml similarity index 100% rename from python/metaprompt/pyproject.toml rename to python/pyproject.toml diff --git a/python/metaprompt/pytest.ini b/python/pytest.ini similarity index 100% rename from python/metaprompt/pytest.ini rename to python/pytest.ini diff --git a/python/metaprompt/requirements.txt b/python/requirements.txt similarity index 100% rename from python/metaprompt/requirements.txt rename to python/requirements.txt diff --git a/python/metaprompt/setup.cfg b/python/setup.cfg similarity index 100% rename from python/metaprompt/setup.cfg rename to python/setup.cfg diff --git a/python/metaprompt/setup.py b/python/setup.py similarity index 100% rename from python/metaprompt/setup.py rename to python/setup.py diff --git a/python/metaprompt/src/__init__.py b/python/src/__init__.py similarity index 100% rename from python/metaprompt/src/__init__.py rename to python/src/__init__.py diff --git a/python/metaprompt/src/config.py b/python/src/config.py similarity index 100% rename from python/metaprompt/src/config.py rename to python/src/config.py diff --git a/python/metaprompt/src/env.py b/python/src/env.py similarity index 100% rename from python/metaprompt/src/env.py rename to python/src/env.py diff --git a/python/metaprompt/src/eval.py b/python/src/eval.py similarity index 100% rename from python/metaprompt/src/eval.py rename to python/src/eval.py diff --git a/python/metaprompt/src/metaprompt.py b/python/src/metaprompt.py similarity index 100% rename from python/metaprompt/src/metaprompt.py rename to python/src/metaprompt.py diff --git a/python/metaprompt/src/parse_metaprompt.py b/python/src/parse_metaprompt.py similarity index 100% rename from python/metaprompt/src/parse_metaprompt.py rename to python/src/parse_metaprompt.py diff --git a/python/metaprompt/src/parser/MetaPrompt.interp b/python/src/parser/MetaPrompt.interp similarity index 100% rename from python/metaprompt/src/parser/MetaPrompt.interp rename to python/src/parser/MetaPrompt.interp diff --git a/python/metaprompt/src/parser/MetaPrompt.tokens b/python/src/parser/MetaPrompt.tokens similarity index 100% rename from python/metaprompt/src/parser/MetaPrompt.tokens rename to python/src/parser/MetaPrompt.tokens diff --git a/python/metaprompt/src/parser/MetaPromptLexer.interp b/python/src/parser/MetaPromptLexer.interp similarity index 100% rename from python/metaprompt/src/parser/MetaPromptLexer.interp rename to python/src/parser/MetaPromptLexer.interp diff --git a/python/metaprompt/src/parser/MetaPromptLexer.py b/python/src/parser/MetaPromptLexer.py similarity index 100% rename from python/metaprompt/src/parser/MetaPromptLexer.py rename to python/src/parser/MetaPromptLexer.py diff --git a/python/metaprompt/src/parser/MetaPromptLexer.tokens b/python/src/parser/MetaPromptLexer.tokens similarity index 100% rename from python/metaprompt/src/parser/MetaPromptLexer.tokens rename to python/src/parser/MetaPromptLexer.tokens diff --git a/python/metaprompt/src/parser/MetaPromptListener.py b/python/src/parser/MetaPromptListener.py similarity index 100% rename from python/metaprompt/src/parser/MetaPromptListener.py rename to python/src/parser/MetaPromptListener.py diff --git a/python/metaprompt/src/parser/MetaPromptParser.py b/python/src/parser/MetaPromptParser.py similarity index 100% rename from python/metaprompt/src/parser/MetaPromptParser.py rename to python/src/parser/MetaPromptParser.py diff --git a/python/metaprompt/src/parser/MetaPromptVisitor.py b/python/src/parser/MetaPromptVisitor.py similarity index 100% rename from python/metaprompt/src/parser/MetaPromptVisitor.py rename to python/src/parser/MetaPromptVisitor.py diff --git a/python/metaprompt/src/parser/__init__.py b/python/src/parser/__init__.py similarity index 100% rename from python/metaprompt/src/parser/__init__.py rename to python/src/parser/__init__.py diff --git a/python/metaprompt/src/provider.py b/python/src/provider.py similarity index 100% rename from python/metaprompt/src/provider.py rename to python/src/provider.py diff --git a/python/metaprompt/src/provider_config.py b/python/src/provider_config.py similarity index 100% rename from python/metaprompt/src/provider_config.py rename to python/src/provider_config.py diff --git a/python/metaprompt/src/providers/openai.py b/python/src/providers/openai.py similarity index 100% rename from python/metaprompt/src/providers/openai.py rename to python/src/providers/openai.py diff --git a/python/metaprompt/src/runtime.py b/python/src/runtime.py similarity index 100% rename from python/metaprompt/src/runtime.py rename to python/src/runtime.py diff --git a/python/metaprompt/tasks.py b/python/tasks.py similarity index 100% rename from python/metaprompt/tasks.py rename to python/tasks.py diff --git a/python/metaprompt/tests/test_parser.py b/python/tests/test_parser.py similarity index 100% rename from python/metaprompt/tests/test_parser.py rename to python/tests/test_parser.py