Skip to content

Commit 3fd3264

Browse files
committed
Initial commit
0 parents  commit 3fd3264

51 files changed

Lines changed: 100179 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/ci.yml‎

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: ["3.10", "3.11", "3.12", "3.13"]
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Set up Python ${{ matrix.python-version }}
20+
uses: actions/setup-python@v5
21+
with:
22+
python-version: ${{ matrix.python-version }}
23+
24+
- name: Cache pip packages
25+
uses: actions/cache@v4
26+
with:
27+
path: ~/.cache/pip
28+
key: ${{ runner.os }}-pip-${{ hashFiles('pyproject.toml') }}
29+
restore-keys: |
30+
${{ runner.os }}-pip-
31+
32+
- name: Cache spaCy model
33+
id: cache-spacy-model
34+
uses: actions/cache@v4
35+
with:
36+
path: $HOME/spacy_data
37+
key: ${{ runner.os }}-spacy-en_core_web_sm-3.5.0
38+
restore-keys: |
39+
${{ runner.os }}-spacy-
40+
41+
- name: Install dependencies
42+
run: |
43+
python -m pip install --upgrade pip
44+
pip install --prefer-binary -e ".[dev]"
45+
46+
- name: Download spaCy model
47+
if: steps.cache-spacy-model.outputs.cache-hit != 'true'
48+
run: |
49+
python -m spacy download en_core_web_sm
50+
mkdir -p $HOME/spacy_data
51+
python -c "import spacy; nlp = spacy.load('en_core_web_sm'); nlp.to_disk('$HOME/spacy_data/en_core_web_sm')"
52+
53+
- name: Link cached spaCy model
54+
if: steps.cache-spacy-model.outputs.cache-hit == 'true'
55+
run: |
56+
python -m spacy link $HOME/spacy_data/en_core_web_sm en_core_web_sm
57+
58+
- name: Run Black check
59+
run: |
60+
black --check --diff triplet_extract/ tests/ examples/
61+
62+
- name: Run ruff check
63+
run: |
64+
ruff check triplet_extract/ tests/ examples/
65+
66+
- name: Run tests
67+
run: |
68+
pytest tests/ -v

‎.gitignore‎

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# Python
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
*.so
6+
.Python
7+
build/
8+
develop-eggs/
9+
dist/
10+
downloads/
11+
eggs/
12+
.eggs/
13+
lib/
14+
lib64/
15+
parts/
16+
sdist/
17+
var/
18+
wheels/
19+
pip-wheel-metadata/
20+
share/python-wheels/
21+
*.egg-info/
22+
.installed.cfg
23+
*.egg
24+
MANIFEST
25+
26+
# PyInstaller
27+
*.manifest
28+
*.spec
29+
30+
# Unit test / coverage
31+
htmlcov/
32+
.tox/
33+
.nox/
34+
.coverage
35+
.coverage.*
36+
.cache
37+
nosetests.xml
38+
coverage.xml
39+
*.cover
40+
*.py,cover
41+
.hypothesis/
42+
.pytest_cache/
43+
.ruff_cache/
44+
45+
# Jupyter Notebook
46+
.ipynb_checkpoints
47+
48+
# pyenv
49+
.python-version
50+
51+
# IDEs
52+
.idea/
53+
.vscode/
54+
*.swp
55+
*.swo
56+
*~
57+
58+
# OS
59+
.DS_Store
60+
Thumbs.db
61+
62+
# Claude
63+
.claude
64+
65+
# Environment variables (credentials)
66+
.env
67+
publish.sh
68+
69+
# Virtual environments
70+
.venv/
71+
venv/
72+
ENV/
73+
env/
74+
75+
# Dependency lockfiles (library, not application)
76+
uv.lock
77+
78+
# Stanford CoreNLP source (for reference only)
79+
CoreNLP/
80+
81+
# Development benchmarks (experimental scripts and results)
82+
benchmark-dev/

0 commit comments

Comments
 (0)