Skip to content

Commit 45b206d

Browse files
authored
Merge pull request #362 from Future-House/september-2024-release
September 2024 release
2 parents eced4f3 + 153d64a commit 45b206d

Some content is hidden

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

69 files changed

+21375
-4875
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,19 @@ name: publish
22

33
on:
44
release:
5-
types:
6-
- created
5+
types: [created]
76
workflow_dispatch:
87

98
jobs:
109
publish:
1110
runs-on: ubuntu-latest
12-
1311
steps:
1412
- uses: actions/checkout@v4
15-
- uses: actions/setup-python@v5
16-
with:
17-
python-version: 3.11
18-
cache: pip
19-
- run: pip install .[dev]
13+
- name: Set up uv
14+
run: curl -LsSf https://astral.sh/uv/install.sh | sh
15+
- run: uv sync
2016
- name: Build a binary wheel and a source tarball
21-
run: |
22-
python -m build --sdist --wheel --outdir dist/ .
23-
- name: Publish distribution 📦 to PyPI
24-
uses: pypa/gh-action-pypi-publish@release/v1
17+
run: uv run python -m build --sdist --wheel --outdir dist/ .
18+
- uses: pypa/gh-action-pypi-publish@release/v1
2519
with:
2620
password: ${{ secrets.PYPI_API_TOKEN }}

.github/workflows/tests.yml

Lines changed: 39 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,54 @@ on:
44
push:
55
branches: [main]
66
pull_request:
7-
branches: [main]
87

98
jobs:
10-
test:
9+
pre-commit:
1110
runs-on: ubuntu-latest
11+
if: github.event_name == 'pull_request' # pre-commit-ci/lite-action only runs here
1212
strategy:
1313
matrix:
14-
python-version: ["3.11"]
15-
14+
python-version: [3.12] # Our min and max supported Python versions
1615
steps:
1716
- uses: actions/checkout@v4
18-
- name: Set up Python ${{ matrix.python-version }}
19-
uses: actions/setup-python@v5
17+
- uses: actions/setup-python@v5
2018
with:
2119
python-version: ${{ matrix.python-version }}
22-
cache: pip
23-
- run: pip install .[dev]
24-
- name: Check pre-commit
25-
run: pre-commit run --all-files || ( git status --short ; git diff ; exit 1 )
26-
- name: Run Test
20+
- uses: pre-commit/[email protected]
21+
- uses: pre-commit-ci/[email protected]
22+
if: always()
23+
lint:
24+
runs-on: ubuntu-latest
25+
strategy:
26+
matrix:
27+
python-version: [3.11] # Our min supported Python version
28+
steps:
29+
- uses: actions/checkout@v4
30+
- name: Set up uv
31+
run: |-
32+
curl -LsSf https://astral.sh/uv/install.sh | sh
33+
uv python pin ${{ matrix.python-version }}
34+
- run: uv sync --python-preference=only-managed
35+
- run: uv run refurb paperqa tests
36+
- run: uv run pylint paperqa
37+
test:
38+
runs-on: ubuntu-latest
39+
strategy:
40+
matrix:
41+
python-version: [3.12] # Our min and max supported Python versions
42+
steps:
43+
- uses: actions/checkout@v4
44+
- name: Set up uv
45+
run: |-
46+
curl -LsSf https://astral.sh/uv/install.sh | sh
47+
uv python pin ${{ matrix.python-version }}
48+
- run: uv sync --python-preference=only-managed
49+
- uses: google-github-actions/auth@v2
50+
with:
51+
credentials_json: ${{ secrets.GOOGLE_CREDENTIALS }}
52+
- run: uv run pytest -n auto
2753
env:
2854
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
2955
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
30-
run: pytest
56+
SEMANTIC_SCHOLAR_API_KEY: ${{ secrets.SEMANTIC_SCHOLAR_API_KEY }}
57+
CROSSREF_API_KEY: ${{ secrets.CROSSREF_API_KEY }}

.gitignore

Lines changed: 176 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,138 @@
1+
# Swap
2+
[._]*.s[a-v][a-z]
3+
!*.svg # comment out if you don't need vector files
4+
[._]*.sw[a-p]
5+
[._]s[a-rt-v][a-z]
6+
[._]ss[a-gi-z]
7+
[._]sw[a-p]
8+
9+
# Session
10+
Session.vim
11+
Sessionx.vim
12+
13+
# Temporary
14+
.netrwhist
15+
*~
16+
# Auto-generated tag files
17+
tags
18+
# Persistent undo
19+
[._]*.un~
20+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
21+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
22+
23+
# User-specific stuff
24+
.idea/**/workspace.xml
25+
.idea/**/tasks.xml
26+
.idea/**/usage.statistics.xml
27+
.idea/**/dictionaries
28+
.idea/**/shelf
29+
30+
# AWS User-specific
31+
.idea/**/aws.xml
32+
33+
# Generated files
34+
.idea/**/contentModel.xml
35+
36+
# Sensitive or high-churn files
37+
.idea/**/dataSources/
38+
.idea/**/dataSources.ids
39+
.idea/**/dataSources.local.xml
40+
.idea/**/sqlDataSources.xml
41+
.idea/**/dynamic.xml
42+
.idea/**/uiDesigner.xml
43+
.idea/**/dbnavigator.xml
44+
45+
# Gradle
46+
.idea/**/gradle.xml
47+
.idea/**/libraries
48+
49+
# Gradle and Maven with auto-import
50+
# When using Gradle or Maven with auto-import, you should exclude module files,
51+
# since they will be recreated, and may cause churn. Uncomment if using
52+
# auto-import.
53+
# .idea/artifacts
54+
# .idea/compiler.xml
55+
# .idea/jarRepositories.xml
56+
# .idea/modules.xml
57+
# .idea/*.iml
58+
# .idea/modules
59+
# *.iml
60+
# *.ipr
61+
62+
# CMake
63+
cmake-build-*/
64+
65+
# Mongo Explorer plugin
66+
.idea/**/mongoSettings.xml
67+
68+
# File-based project format
69+
*.iws
70+
71+
# IntelliJ
72+
out/
73+
74+
# mpeltonen/sbt-idea plugin
75+
.idea_modules/
76+
77+
# JIRA plugin
78+
atlassian-ide-plugin.xml
79+
80+
# Cursive Clojure plugin
81+
.idea/replstate.xml
82+
83+
# SonarLint plugin
84+
.idea/sonarlint/
85+
86+
# Crashlytics plugin (for Android Studio and IntelliJ)
87+
com_crashlytics_export_strings.xml
88+
crashlytics.properties
89+
crashlytics-build.properties
90+
fabric.properties
91+
92+
# Editor-based Rest Client
93+
.idea/httpRequests
94+
95+
# Android studio 3.1+ serialized cache file
96+
.idea/caches/build_file_checksums.ser
97+
.vscode/*
98+
!.vscode/settings.json
99+
!.vscode/tasks.json
100+
!.vscode/launch.json
101+
!.vscode/extensions.json
102+
!.vscode/*.code-snippets
103+
.vscode
104+
105+
# Local History for Visual Studio Code
106+
.history/
107+
108+
# Built Visual Studio Code Extensions
109+
*.vsix
110+
# General
111+
.DS_Store
112+
.AppleDouble
113+
.LSOverride
114+
115+
# Icon must end with two \r
116+
Icon[\r]
117+
118+
# Thumbnails
119+
._*
120+
121+
# Files that might appear in the root of a volume
122+
.DocumentRevisions-V100
123+
.fseventsd
124+
.Spotlight-V100
125+
.TemporaryItems
126+
.Trashes
127+
.VolumeIcon.icns
128+
.com.apple.timemachine.donotpresent
129+
130+
# Directories potentially created on remote AFP share
131+
.AppleDB
132+
.AppleDesktop
133+
Network Trash Folder
134+
Temporary Items
135+
.apdisk
1136
# Byte-compiled / optimized / DLL files
2137
__pycache__/
3138
*.py[cod]
@@ -20,7 +155,6 @@ parts/
20155
sdist/
21156
var/
22157
wheels/
23-
pip-wheel-metadata/
24158
share/python-wheels/
25159
*.egg-info/
26160
.installed.cfg
@@ -50,6 +184,7 @@ coverage.xml
50184
*.py,cover
51185
.hypothesis/
52186
.pytest_cache/
187+
cover/
53188

54189
# Translations
55190
*.mo
@@ -72,6 +207,7 @@ instance/
72207
docs/_build/
73208

74209
# PyBuilder
210+
.pybuilder/
75211
target/
76212

77213
# Jupyter Notebook
@@ -82,7 +218,9 @@ profile_default/
82218
ipython_config.py
83219

84220
# pyenv
85-
.python-version
221+
# For a library or package, you might want to ignore these files since the code is
222+
# intended to run in multiple environments; otherwise, check them in:
223+
# .python-version
86224

87225
# pipenv
88226
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
@@ -91,7 +229,24 @@ ipython_config.py
91229
# install all needed dependencies.
92230
#Pipfile.lock
93231

94-
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
232+
# poetry
233+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
234+
# This is especially recommended for binary packages to ensure reproducibility, and is more
235+
# commonly ignored for libraries.
236+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
237+
#poetry.lock
238+
239+
# pdm
240+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
241+
#pdm.lock
242+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
243+
# in version control.
244+
# https://pdm.fming.dev/latest/usage/project/#working-with-version-control
245+
.pdm.toml
246+
.pdm-python
247+
.pdm-build/
248+
249+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
95250
__pypackages__/
96251

97252
# Celery stuff
@@ -128,12 +283,23 @@ dmypy.json
128283
# Pyre type checker
129284
.pyre/
130285

131-
# testing files generated
132-
*.txt.json
286+
# pytype static type analyzer
287+
.pytype/
288+
289+
# Cython debug symbols
290+
cython_debug/
291+
292+
# PyCharm
293+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
294+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
295+
# and can be added to the global gitignore or merged into this file. For a more nuclear
296+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
297+
.idea/
133298

134-
*.ipynb
135-
env
299+
# Version files made by setuptools_scm
300+
**/version.py
136301

137-
# Matching pyproject.toml
138-
paperqa/version.py
139-
tests/example*
302+
# Tests
303+
tests/*txt
304+
tests/*html
305+
tests/test_index/*

.mailmap

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
2+
3+
4+
5+
Michael Skarlinski <[email protected]> mskarlin <[email protected]>
6+
Odhran O'Donoghue <[email protected]> odhran-o-d <[email protected]>
7+
8+

0 commit comments

Comments
 (0)