Skip to content

Commit

Permalink
Merge pull request #16 from MartinBernstorff/dev/15/require_status_ch…
Browse files Browse the repository at this point in the history
…ecks_to_pass

dev: require status checks to pass
  • Loading branch information
MartinBernstorff authored Feb 3, 2024
2 parents 305a61e + 7288958 commit 0aac44e
Show file tree
Hide file tree
Showing 12 changed files with 17 additions and 99 deletions.
3 changes: 1 addition & 2 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
"ms-python.python",
"ms-python.vscode-pylance",
"GitHub.vscode-pull-request-github",
"ms-vscode.makefile-tools",
"github.vscode-github-actions",
"SeeLog.python-init-generator",
"MichaelCurrin.auto-commit-msg",
Expand All @@ -31,7 +30,7 @@
"features": {
"ghcr.io/devcontainers/features/github-cli:1": {}
},
"postStartCommand": "make install && gt user pager --disable"
"postStartCommand": "gt user pager --disable"
// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
Expand Down
36 changes: 0 additions & 36 deletions .github/archived_flows/documentation.yml

This file was deleted.

47 changes: 0 additions & 47 deletions .github/archived_flows/release.yml

This file was deleted.

3 changes: 3 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,8 @@ jobs:
cacheFrom: ghcr.io/martinbernstorff/memorymarker-devcontainer-devcontainer:latest
push: filter
refFilterForPush: refs/heads/main
env: |
OMNIVORE_API_KEY=${{ secrets.OMNIVORE_API_KEY }}
OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY }}
runCmd:
make validate_ci
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ COPY pyproject.toml ./
RUN --mount=type=cache,target=/root/.cache/pip make install

COPY . /app
RUN pip install -e .
RUN rm -rf build
RUN rm -rf cache
RUN pip install .[tests]
6 changes: 2 additions & 4 deletions memorymarker/data_access/highlight_providers/hydrator/main.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import re
from dataclasses import dataclass
from typing import Callable, Mapping, Sequence
from typing import Callable, Sequence
from urllib.request import urlopen

import requests
from bs4 import BeautifulSoup, NavigableString, Tag
from iterpy._iter import Iter
from joblib import Memory

from memorymarker.data_access.highlight_providers.base import (
Expand Down Expand Up @@ -103,7 +101,7 @@ def hydrate_highlights(
uri=highlight.uri,
title=highlight.title,
context=context,
),
), # type: ignore
)

return hydrated_highlights
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from bs4 import BeautifulSoup

from memorymarker.data_access.hydrator.main import ContextParser
from memorymarker.data_access.highlight_providers.hydrator.main import ContextParser


def test_context_parser():
Expand Down
2 changes: 1 addition & 1 deletion memorymarker/data_access/highlight_providers/hypothesis.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from dotenv import load_dotenv
from pydantic import BaseModel

from memorymarker.data_access.highlight_sources.base import (
from memorymarker.data_access.highlight_providers.base import (
OrphanHighlight,
)

Expand Down
2 changes: 1 addition & 1 deletion memorymarker/domain/highlights_to_questions.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from langchain.schema import HumanMessage, SystemMessage

import memorymarker.data_access.fileio as fileio
from memorymarker.data_access.highlight_sources.base import HydratedHighlight
from memorymarker.data_access.highlight_providers.base import HydratedHighlight
from memorymarker.domain.prompts_from_string import llmresult_to_qas

load_dotenv()
Expand Down
2 changes: 1 addition & 1 deletion memorymarker/domain/test_highlights_to_questions.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import pytest

import memorymarker.domain.highlights_to_questions as h2q
from memorymarker.data_access.highlight_sources.base import HydratedHighlight
from memorymarker.data_access.highlight_providers.base import HydratedHighlight


# create a pytest fixture for the model
Expand Down
6 changes: 3 additions & 3 deletions memorymarker/presentation/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
import pytz
from bs4 import BeautifulSoup

from memorymarker.data_access.highlight_sources.base import HydratedHighlight
from memorymarker.data_access.highlight_sources.hypothesis import (
from memorymarker.data_access.highlight_providers.base import HydratedHighlight
from memorymarker.data_access.highlight_providers.hydrator.main import HighlightHydrator
from memorymarker.data_access.highlight_providers.hypothesis import (
HypothesisHighlightGetter,
)
from memorymarker.data_access.hydrator.main import HighlightHydrator
from memorymarker.data_access.persist_questions.markdown import write_qa_prompt_to_md
from memorymarker.domain.highlights_to_questions import (
highlights_to_questions,
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,12 @@ dependencies = [
"omnivoreql",
"pydantic",
"langchain==0.0.300",
"openai",
"openai==0.28.0",
"python-dotenv",
"pytz",
"joblib",
"beautifulsoup4",
"iterpy",
]
[project.license]
file = "LICENSE"
Expand Down

0 comments on commit 0aac44e

Please sign in to comment.