Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
143 commits
Select commit Hold shift + click to select a range
f9f94b8
fixed parsing reaction conditions without parentheses (#842)
blakewatson Dec 30, 2025
28da537
Fix spell data regressions and omissions (#844)
eepMoody Jan 1, 2026
5b09d94
Convert distance fields to integer (#845)
eepMoody Jan 1, 2026
6b69faa
fixed bugs in srd-2024 CreatureAction data (closes #847) (#849)
calumbell Jan 4, 2026
8ae4a3b
fixed markdown errors in Creature spellcasting traits/actions (#855)
calumbell Jan 8, 2026
9013dc4
updated srd-2014 dragon breath weapon recharge data (closes #848) (#853)
calumbell Jan 8, 2026
90ecff3
removed prepended asterisks from toh/tdcs FeatBenefit 'desc' fields (…
calumbell Jan 8, 2026
3cc5267
fixed bugs in srd-2024 spell markdown (closes #857)
calumbell Jan 12, 2026
a558d7a
updated monster conversion script to scrap input md for bonus actions…
calumbell Jan 13, 2026
dc66a72
added missing srd-2024 creature reactions
calumbell Jan 13, 2026
242dad3
removed Mithral and Adamantine Hide Armor from srd-2014 dataset (clos…
calumbell Jan 14, 2026
00937ec
bugfix: added missing dash to bfrd mechanist starting equipment markdown
calumbell Jan 17, 2026
65ea3b3
added 2024 champion subclass data to ClassFeatureItem.json
calumbell Feb 2, 2026
9cf57c6
added srd-2024 College of Lore data to ClassFeatureItem.json
calumbell Feb 3, 2026
309f882
replaced casting_times of 'bonus_action' w/ 'bonus-action' as per mod…
calumbell Feb 8, 2026
838aa2a
wrote exclude_fields_mixin (and mvd mixins to own dir)
calumbell Feb 10, 2026
e344cc3
added ExcludeFieldsMixin to model viewsets
calumbell Feb 11, 2026
e80320d
added missing srd-2024 dragon attack data to CreatureAttackAction
calumbell Feb 12, 2026
881fb5b
removed /manifest from url, updated test cases to reflect rmvl
calumbell Feb 13, 2026
44b86a5
rmv'd ManifestViewSet
calumbell Feb 13, 2026
ae6b2b7
removed ManifestSerializer
calumbell Feb 13, 2026
4420840
removed Manifest model
calumbell Feb 13, 2026
ad9d362
rmv'd manifest from v1 API schema
calumbell Feb 13, 2026
3eb0d7e
removed /version endpoint
calumbell Feb 14, 2026
3848d84
Adding CrossReference model
augustjohnson Feb 14, 2026
548d5ed
Adding in some crossreference utilities.
augustjohnson Feb 15, 2026
ee55963
Move logic into scripts/crossreference folder exclusively. Adding app…
augustjohnson Feb 15, 2026
c60d703
Enhance CrossReference model by adding document field for denormaliza…
augustjohnson Feb 15, 2026
5e7766d
Add CrossReference.json file for SRD 2024 with comprehensive cross-re…
augustjohnson Feb 15, 2026
a3bcac8
Refactor cross-reference terminology for consistency across the codeb…
augustjohnson Feb 15, 2026
c2a0dcc
Implement crossreference handling in GameContentSerializer and add te…
augustjohnson Feb 15, 2026
af7f6f9
Add source URL handling and crossreference methods to models and seri…
augustjohnson Feb 20, 2026
dc27054
Refactor URL generation for cross-references in API
augustjohnson Feb 20, 2026
402f79f
Update .gitignore to include new report files
augustjohnson Feb 20, 2026
8b50e9a
Refactor URL handling and enhance cross-reference functionality
augustjohnson Feb 20, 2026
6aefd7d
Update CrossReference.json for SRD 2024 with new entries and primary …
augustjohnson Feb 20, 2026
d97c0de
Update CrossReference.json and core.py for SRD 2024 enhancements
augustjohnson Feb 20, 2026
d163be3
Merge pull request #859 from calumbell/857/srd-2024-spell-bugfixes
augustjohnson Feb 21, 2026
8e31d0d
Merge pull request #860 from calumbell/850/srd-2024-missing-reactions…
augustjohnson Feb 21, 2026
bc8b479
Merge pull request #861 from calumbell/829/rmv-hide-mithral-adamantine
augustjohnson Feb 21, 2026
53126d2
Enhance GameContentSerializer to manage crossreferences for root and …
augustjohnson Feb 21, 2026
afa33a7
Merge pull request #863 from calumbell/bugfix/bf-mechanist-missing-li…
augustjohnson Feb 21, 2026
763907e
Merge pull request #868 from calumbell/867/missing-srd-2024-champion-…
augustjohnson Feb 21, 2026
c155dec
Merge pull request #870 from calumbell/869/srd-2024-spell-casting-tim…
augustjohnson Feb 21, 2026
1c161dc
Add is_crossreference_source method to models and update GameContentS…
augustjohnson Feb 21, 2026
7e247c4
Merge pull request #872 from calumbell/871/excludes-mixin
augustjohnson Feb 21, 2026
5c5a88c
Refactor GameContentSerializer to improve handling of crossreferences…
augustjohnson Feb 21, 2026
b732ef4
Merge pull request #874 from calumbell/873/missing-dragon-attack-data
augustjohnson Feb 21, 2026
125aabb
Adjusted crossreference source handling in core.py and document.py
augustjohnson Feb 21, 2026
f329ccd
Merge pull request #875 from calumbell/733/rmv-manifest-endpoint
augustjohnson Feb 21, 2026
f059ce6
Update CrossReference model documentation and related comments for cl…
augustjohnson Feb 21, 2026
50daacf
Add OpenAPI schema for crossreferences in GameContentSerializer
augustjohnson Feb 21, 2026
6a5243f
Refactor crossreference handling in HasDescription and GameContentSer…
augustjohnson Feb 21, 2026
c6e761a
crossreferences were being returned on everything. Filtering down to …
augustjohnson Feb 21, 2026
9a59979
Updating tests based on manual review of all responses.
augustjohnson Feb 21, 2026
f508dcf
Reports should not have been checked in.
augustjohnson Feb 21, 2026
bb0b961
Enhance blacklist loading in core.py to resolve relative paths agains…
augustjohnson Feb 21, 2026
a2c55eb
added character creation rules from srd-2024 (#878)
calumbell Feb 21, 2026
88b3997
Implement deterministic key generation for CrossReference model and u…
augustjohnson Feb 21, 2026
c3007e9
Add handling for ambiguous reference names in crossreference matching
augustjohnson Feb 21, 2026
89c6ab3
Blacklisting abilities for crossref match for now.
augustjohnson Feb 21, 2026
26904e2
Deduplicate crossreferences before creation to prevent duplicate keys…
augustjohnson Feb 21, 2026
af01969
Adding in 2014 crossreference.
augustjohnson Feb 21, 2026
52e9079
Add new crossreferences for spellcasting and range items in SRD 2014
augustjohnson Feb 21, 2026
8731a7e
Fixing tests and slight adjustments to export.
augustjohnson Feb 21, 2026
329e838
Refactor crossreference handling in models and serializers. Just "To"…
augustjohnson Feb 22, 2026
2864cbf
Remove "from" crossreferences from various approved JSON response fil…
augustjohnson Feb 22, 2026
87f5e53
Added filter on monsters for environments (#884)
stevennoto Feb 26, 2026
a5d9e95
Removed item/magicitem lookup.
augustjohnson Feb 26, 2026
1c1df97
rewrote crossreferences.
augustjohnson Feb 28, 2026
6727f23
Regenned Crossreferences with new logic.
augustjohnson Feb 28, 2026
e01f681
Updated item viewset registration with a basename and added extra kwa…
augustjohnson Feb 28, 2026
188f792
Limiting crossreferences to only those within the tests.
augustjohnson Mar 4, 2026
170ceb2
fixed typo in srd-2024 Adult Green Dragon spellcasting action (#891)
calumbell Apr 5, 2026
189d3b2
[BUGFIX] Fixed data errors on `/v2/rulesets/srd_combat-sequence` (#893)
calumbell Apr 5, 2026
ee91aee
added missing ClassFeatureItem for Fighter two extra attacks action (…
calumbell Apr 5, 2026
7a15f4c
removed server/vector_index.pkl from repo (#883)
calumbell Apr 5, 2026
f8df1fd
removed leading slashes on Image file_urls (#886)
calumbell Apr 5, 2026
cccaf78
[CI/CD] Upgrade Github Action versions to Node 24 compatable versions…
calumbell Apr 5, 2026
a0194df
Feature: split V2 Item model into Item and MagicItem models (#889)
calumbell Apr 5, 2026
e74da6b
[BUGFIX] `GameContentSerializer` now inherits from `ModelSerializer` …
calumbell Apr 5, 2026
849abf6
Bugfix: seperated mixed up V1/V2 endpoints (#890)
calumbell Apr 5, 2026
cbfdb60
[BUGFIX] Fixed EagerLoadingMixin early return error (#898)
calumbell Apr 5, 2026
80fc3a2
Bump django from 5.2.1 to 5.2.12 (#904)
dependabot[bot] Apr 6, 2026
45d4a9e
Bump requests from 2.32.3 to 2.33.0 (#905)
dependabot[bot] Apr 10, 2026
e498bf9
Bump urllib3 from 2.4.0 to 2.6.3 (#906)
dependabot[bot] Apr 10, 2026
bf01719
Bump django from 5.2.12 to 5.2.13 (#908)
dependabot[bot] Apr 10, 2026
31aa4ea
fixed bug in srd-2014 skeleton resistances/immunities (#907)
calumbell Apr 12, 2026
205152b
fixed markdown bugs in srd-2014 brass dragons (#912)
calumbell Apr 12, 2026
158f358
updated srd-2024 goliath giant ancestry markdown: added missing list …
calumbell Apr 12, 2026
68ae9cb
consolidated CRs into single 'challenge_rating' field (#910)
calumbell Apr 12, 2026
24ea5fa
Update with v2 info
eepMoody Apr 18, 2026
5e95dc4
updated ExcludeFieldsMixin to support excluding nested fields
calumbell May 12, 2026
241b2aa
updated EagerLoadingMixin to work correctly with new nested excludes
calumbell May 12, 2026
30200fc
improved comments on mixins
calumbell May 13, 2026
e220493
Bump pytest from 8.3.5 to 9.0.3 (#913)
dependabot[bot] May 13, 2026
c44bf04
Bump django from 5.2.13 to 5.2.14 (#916)
dependabot[bot] May 13, 2026
f2adf49
Bump urllib3 from 2.4.0 to 2.7.0 (#917)
dependabot[bot] May 13, 2026
88497b1
fixed search bug (non-existant extra fields)
calumbell May 19, 2026
c5ef25d
Merge pull request #924 from calumbell/922/search-500s
augustjohnson May 19, 2026
34680e1
Draft pyproject with a few improvements over pipfile.
augustjohnson May 19, 2026
4a53ed7
Added (aspirational) version.
augustjohnson May 19, 2026
c4680ba
Checking in lockfile.
augustjohnson May 19, 2026
04e1827
Fixing env issues.
augustjohnson May 19, 2026
5164000
Adjusting secret key settings to work better for devs.
augustjohnson May 19, 2026
71ac4d3
Removing .env, to avoid confusion.
augustjohnson May 19, 2026
5065d79
Removing deprecated files.
augustjohnson May 19, 2026
31d88a1
Keeping on 3.11 for now.
augustjohnson May 19, 2026
7d43894
Updating readme with uv switchover.
augustjohnson May 19, 2026
2ac942b
Fixing PR validation to switch over.
augustjohnson May 19, 2026
54c604e
Fixing based on a failed cache pruning.
augustjohnson May 19, 2026
0eac2c0
Two step build.
augustjohnson May 19, 2026
34d0666
Adjust models to support more strict types.
augustjohnson May 19, 2026
faa478f
Fixing spells
augustjohnson May 19, 2026
a49c378
Merge branch 'staging' into 570-feature-consider-adding-description-k…
augustjohnson May 19, 2026
f263940
Fixing conflicting migration heads.
augustjohnson May 19, 2026
8598ea5
Pulling it up to date.
augustjohnson May 19, 2026
5d18bf0
Merge pull request #876 from open5e/570-feature-consider-adding-descr…
augustjohnson May 20, 2026
a248077
Merge pull request #919 from calumbell/918/nested-exclude-query-param
augustjohnson May 20, 2026
c4eeac3
Made cache clear dependent on the other workflow. (#929)
augustjohnson May 21, 2026
709f81c
fixed bugs in srd-2014 mastiff statblock
calumbell May 25, 2026
2e4fa8f
updated tests to reflect updated data returned by API
calumbell May 25, 2026
7ff7782
Merge pull request #935 from calumbell/933/mastiff-errors
augustjohnson May 25, 2026
af68c2a
718 technical debt align model field names and serializer names (#932)
augustjohnson May 25, 2026
5a9ee6d
Bump idna from 3.10 to 3.15 (#928)
dependabot[bot] May 28, 2026
f447b5f
Merge staging and resolve Pipfile.lock conflict
augustjohnson May 31, 2026
023f7fd
Fixing agents.md as well.
augustjohnson May 31, 2026
f15c64b
Merge pull request #931 from open5e/925-switch-package-management-to-uv
augustjohnson May 31, 2026
978808a
937 bug creature data mismatches in srd52 (#942)
augustjohnson Jun 1, 2026
ec570dc
Removing extra word. (#944)
augustjohnson Jun 1, 2026
e385c36
938 bug spell data mismatches in srd52 (#943)
augustjohnson Jun 1, 2026
b1a3d29
Merge branch 'staging' into 869-bug-choices-parameter-for-textfields-…
augustjohnson Jun 3, 2026
0716124
fix: renumber migration 0075 to 0080 to follow staging chain
augustjohnson Jun 3, 2026
b667a99
fix: correct casting_time values for find-familiar and forbiddance
augustjohnson Jun 3, 2026
74f5b43
Merge pull request #930 from open5e/869-bug-choices-parameter-for-tex…
augustjohnson Jun 3, 2026
5bbfcda
[BUGFIX] Creature model now inherits from HasDescription (#949)
calumbell Jun 5, 2026
b858b5a
926 migrate beta deploy to use ghcr instead of docker hub 2 (#945)
augustjohnson Jun 6, 2026
d1809ce
Merge branch 'main' into staging
eepMoody Jun 6, 2026
131ffeb
hotfix: build and deploy workflow
eepMoody Jun 6, 2026
6d66c46
hotfix: docker config path issue
eepMoody Jun 6, 2026
570f755
hotfix: update Dockerfile and workflows to unblock process
eepMoody Jun 6, 2026
471a3f9
hotfix: issue with shared item view
eepMoody Jun 6, 2026
210bfe8
fix values erroneously changed during merge
eepMoody Jun 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
.git
__pycache__
*.pyc
*.pyo
.venv
.env
*.sqlite3
.github
.gitignore
README.md
CONTRIBUTING.md
CODE_OF_CONDUCT.md
LICENSE
*.md
.pytest_cache
.ruff_cache
node_modules
6 changes: 0 additions & 6 deletions .env

This file was deleted.

5 changes: 5 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
OPEN5E_DEBUG=True
SECRET_KEY=replace-me-with-a-random-secret-key
SERVER_NAME=localhost
CERTFILE=selfsigned.crt
KEYFILE=selfsigned.key
30 changes: 24 additions & 6 deletions .github/workflows/build_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,49 @@ on:
branches:
- staging
- main
paths-ignore:
- 'README.md'
- 'docs/**'
- 'scripts/**'
- '.github/ISSUE_TEMPLATE/**'

concurrency:
group: deploy-${{ github.ref_name }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Login to Docker Hub
if: github.ref == 'refs/heads/main'
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set Docker image tag
run: |
- name: Login to GHCR
if: github.ref == 'refs/heads/staging'
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set image tags
run: |
echo "GITHUB_REF = $GITHUB_REF" > version.py
echo "GITHUB_SHA = $GITHUB_SHA" >> version.py

if [[ $GITHUB_REF == refs/heads/main ]]; then
echo "DOCKER_IMAGE_TAG=latest" >> $GITHUB_ENV
echo "IMAGE_TAGS=eepmoody/open5e-api:latest" >> $GITHUB_ENV
elif [[ $GITHUB_REF == refs/heads/staging ]]; then
echo "DOCKER_IMAGE_TAG=staging" >> $GITHUB_ENV
echo "IMAGE_TAGS=ghcr.io/open5e/open5e-api:beta" >> $GITHUB_ENV
fi
- name: Build and push
uses: docker/build-push-action@v7
with:
push: true
tags: eepmoody/open5e-api:${{ env.DOCKER_IMAGE_TAG }}
tags: ${{ env.IMAGE_TAGS }}

deploy:
runs-on: ubuntu-latest
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/clear_cache.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
name: Clear Cloudflare Cache After Deployments

on:
push:
workflow_run:
workflows: ["Build and deploy"]
types:
- completed
branches:
- main
- staging
Expand Down
28 changes: 16 additions & 12 deletions .github/workflows/pr_validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +12,32 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
python-version: '3.11'
cache: pipenv
- name: Install Pipenv
run: curl https://raw.githubusercontent.com/pypa/pipenv/master/get-pipenv.py | python
- name: Install Dependencies
run: pipenv install --dev
enable-cache: true
prune-cache: false
- name: Install Python
run: uv python install 3.11
- name: Install dependencies
run: uv sync
- name: Check migrations are up to date
run: uv run python manage.py makemigrations --check --dry-run
- name: Run migrations
run: pipenv run python manage.py quicksetup --noindex
run: uv run python manage.py quicksetup --noindex
- name: Run Tests
run: |
pipenv run python manage.py runserver 0.0.0.0:8000 &
uv run python manage.py runserver 0.0.0.0:8000 &
sleep 5 &&
pipenv run pytest
uv run pytest
- name: Validate Data
run: |
pipenv run python ./scripts/data_test.py --dir ./data/v2 &
pipenv run python ./manage.py
uv run python ./scripts/data_test.py --dir ./data/v2 &
uv run python ./manage.py
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Sanitize branch name
run: echo "BRANCH_NAME=$(echo ${GITHUB_REF##*/} | tr '/' '-')" >> $GITHUB_ENV
- name: Build Docker image
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Environment and configuration files
.env
local.env
*.local
.python-version
Expand Down Expand Up @@ -36,3 +37,5 @@ server/vector_index.pkl

# Temporary files for magic items update
temp_magic_items/
references_report.json
sources_report.json
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
This is a project that encodes 5th Edition Dungeons and Dragons rules into an API.

To ingest data, it is best to run `manage.py quicksetup` from within the pipenv environment. You can check the readme.md for additional instructions about using this repo.
To ingest data, it is best to run `uv run python manage.py quicksetup` from the project root. You can check the readme.md for additional instructions about using this repo.

Before calling a task finished, always run scripts like `quicksetup` and tests, plus any other reasonable checks, to ensure that data can correctly be ingested and your changes work.

Expand Down
41 changes: 28 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,35 @@
FROM python:3.11-slim
FROM ghcr.io/astral-sh/uv:python3.11-bookworm-slim AS builder

RUN mkdir -p /opt/services/open5e-api
WORKDIR /opt/services/open5e-api
# copy our project code

# install our dependencies
RUN pip install pipenv gunicorn
COPY . /opt/services/open5e-api
ENV UV_LINK_MODE=copy \
UV_PYTHON_DOWNLOADS=never \
UV_COMPILE_BYTECODE=1

RUN pipenv install
COPY pyproject.toml uv.lock ./
RUN uv sync --frozen --no-dev --no-install-project

# migrate the db, load content, and index it
RUN pipenv run python manage.py quicksetup
COPY . .
RUN uv run python manage.py quicksetup
RUN uv run python -m gunicorn --version

# remove .env file (set your env vars via docker-compose.yml or your hosting provider)
RUN rm .env
FROM python:3.11-slim-bookworm

#run gunicorn.
CMD ["pipenv", "run", "gunicorn","-b", ":8888", "server.wsgi:application"]
WORKDIR /opt/services/open5e-api

COPY --from=builder /opt/services/open5e-api/.venv ./.venv
COPY --from=builder /opt/services/open5e-api/server ./server
COPY --from=builder /opt/services/open5e-api/api ./api
COPY --from=builder /opt/services/open5e-api/api_v2 ./api_v2
COPY --from=builder /opt/services/open5e-api/search ./search
COPY --from=builder /opt/services/open5e-api/templates ./templates
COPY --from=builder /opt/services/open5e-api/staticfiles ./staticfiles
COPY --from=builder /opt/services/open5e-api/db.sqlite3 ./db.sqlite3
COPY --from=builder /opt/services/open5e-api/manage.py ./manage.py
COPY --from=builder /opt/services/open5e-api/newrelic.ini ./newrelic.ini

ENV PATH="/opt/services/open5e-api/.venv/bin:$PATH"

RUN python -m gunicorn --version

CMD ["python", "-m", "gunicorn", "-b", ":8888", "server.wsgi:application"]
27 changes: 0 additions & 27 deletions Pipfile

This file was deleted.

Loading
Loading