Skip to content

Commit

Permalink
Merge pull request #362 from Future-House/september-2024-release
Browse files Browse the repository at this point in the history
September 2024 release
  • Loading branch information
whitead committed Sep 11, 2024
2 parents eced4f3 + 153d64a commit 45b206d
Show file tree
Hide file tree
Showing 69 changed files with 21,375 additions and 4,875 deletions.
18 changes: 6 additions & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,19 @@ name: publish

on:
release:
types:
- created
types: [created]
workflow_dispatch:

jobs:
publish:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.11
cache: pip
- run: pip install .[dev]
- name: Set up uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- run: uv sync
- name: Build a binary wheel and a source tarball
run: |
python -m build --sdist --wheel --outdir dist/ .
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
run: uv run python -m build --sdist --wheel --outdir dist/ .
- uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
51 changes: 39 additions & 12 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,54 @@ on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
test:
pre-commit:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request' # pre-commit-ci/lite-action only runs here
strategy:
matrix:
python-version: ["3.11"]

python-version: [3.12] # Our min and max supported Python versions
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
- run: pip install .[dev]
- name: Check pre-commit
run: pre-commit run --all-files || ( git status --short ; git diff ; exit 1 )
- name: Run Test
- uses: pre-commit/[email protected]
- uses: pre-commit-ci/[email protected]
if: always()
lint:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.11] # Our min supported Python version
steps:
- uses: actions/checkout@v4
- name: Set up uv
run: |-
curl -LsSf https://astral.sh/uv/install.sh | sh
uv python pin ${{ matrix.python-version }}
- run: uv sync --python-preference=only-managed
- run: uv run refurb paperqa tests
- run: uv run pylint paperqa
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.12] # Our min and max supported Python versions
steps:
- uses: actions/checkout@v4
- name: Set up uv
run: |-
curl -LsSf https://astral.sh/uv/install.sh | sh
uv python pin ${{ matrix.python-version }}
- run: uv sync --python-preference=only-managed
- uses: google-github-actions/auth@v2
with:
credentials_json: ${{ secrets.GOOGLE_CREDENTIALS }}
- run: uv run pytest -n auto
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
run: pytest
SEMANTIC_SCHOLAR_API_KEY: ${{ secrets.SEMANTIC_SCHOLAR_API_KEY }}
CROSSREF_API_KEY: ${{ secrets.CROSSREF_API_KEY }}
186 changes: 176 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,138 @@
# Swap
[._]*.s[a-v][a-z]
!*.svg # comment out if you don't need vector files
[._]*.sw[a-p]
[._]s[a-rt-v][a-z]
[._]ss[a-gi-z]
[._]sw[a-p]

# Session
Session.vim
Sessionx.vim

# Temporary
.netrwhist
*~
# Auto-generated tag files
tags
# Persistent undo
[._]*.un~
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf

# AWS User-specific
.idea/**/aws.xml

# Generated files
.idea/**/contentModel.xml

# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml

# Gradle
.idea/**/gradle.xml
.idea/**/libraries

# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/artifacts
# .idea/compiler.xml
# .idea/jarRepositories.xml
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr

# CMake
cmake-build-*/

# Mongo Explorer plugin
.idea/**/mongoSettings.xml

# File-based project format
*.iws

# IntelliJ
out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Cursive Clojure plugin
.idea/replstate.xml

# SonarLint plugin
.idea/sonarlint/

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

# Editor-based Rest Client
.idea/httpRequests

# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
!.vscode/*.code-snippets
.vscode

# Local History for Visual Studio Code
.history/

# Built Visual Studio Code Extensions
*.vsix
# General
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon[\r]

# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand All @@ -20,7 +155,6 @@ parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
Expand Down Expand Up @@ -50,6 +184,7 @@ coverage.xml
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
Expand All @@ -72,6 +207,7 @@ instance/
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
Expand All @@ -82,7 +218,9 @@ profile_default/
ipython_config.py

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

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

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/latest/usage/project/#working-with-version-control
.pdm.toml
.pdm-python
.pdm-build/

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/

# Celery stuff
Expand Down Expand Up @@ -128,12 +283,23 @@ dmypy.json
# Pyre type checker
.pyre/

# testing files generated
*.txt.json
# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
.idea/

*.ipynb
env
# Version files made by setuptools_scm
**/version.py

# Matching pyproject.toml
paperqa/version.py
tests/example*
# Tests
tests/*txt
tests/*html
tests/test_index/*
8 changes: 8 additions & 0 deletions .mailmap
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Andrew White <[email protected]> <[email protected]>
James Braza <[email protected]> <[email protected]>
Geemi Wellawatte <[email protected]> <[email protected]>
Geemi Wellawatte <[email protected]> <[email protected]>
Michael Skarlinski <[email protected]> mskarlin <[email protected]>
Odhran O'Donoghue <[email protected]> odhran-o-d <[email protected]>
Odhran O'Donoghue <[email protected]> <[email protected]>
Samantha Cox <[email protected]> <[email protected]>
Loading

0 comments on commit 45b206d

Please sign in to comment.