Skip to content

Commit

Permalink
Merge pull request #1728 from open-contracting/profile-template3
Browse files Browse the repository at this point in the history
build: Upgrade code for latest ocdskit and ocdsextensionregistry
  • Loading branch information
jpmckinney authored Dec 15, 2024
2 parents 9342489 + 08c8ad0 commit d748a5d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,7 @@ jobs:
uses: open-contracting/.github/.github/workflows/lint.yml@main
permissions:
contents: write
secrets:
personal-access-token: ${{ secrets.PAT }}
with:
python-version: '3.10'
2 changes: 1 addition & 1 deletion common-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ myst-parser==0.18.1
# via -r common-requirements.in
ocds-babel==0.3.6
# via -r common-requirements.in
ocdsextensionregistry==0.6.1
ocdsextensionregistry==0.6.5
# via -r common-requirements.in
ocdsindex==0.2.0
# via -r common-requirements.in
Expand Down
10 changes: 5 additions & 5 deletions manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@

import click
import json_merge_patch
import jsonref
import lxml.etree
import lxml.html
import requests
from babel.messages.pofile import read_po
from docutils.utils import relative_path
from lxml import etree
from ocdsextensionregistry import get_versioned_release_schema
from ocdsextensionregistry.util import replace_refs
from ocdskit.schema import get_schema_fields

basedir = Path(__file__).resolve().parent
Expand All @@ -41,10 +41,10 @@ def custom_warning_formatter(message, category, filename, lineno, line=None):
warnings.formatwarning = custom_warning_formatter


def json_load(filename, library=json, **kwargs):
def json_load(filename):
"""Load JSON data from the given filename."""
with (schemadir / filename).open() as f:
return library.load(f, **kwargs)
return json.load(f)


def json_dump(filename, data):
Expand Down Expand Up @@ -209,14 +209,14 @@ def pre_commit():
}

release_schema = json_load("release-schema.json")
jsonref_release_schema = json_load("release-schema.json", jsonref, merge_props=True)
jsonref_release_schema = replace_refs(json_load("release-schema.json"), keep_defs=True)

counts = defaultdict(list)
nonstring = ("boolean", "integer", "number", "object")
for field in get_schema_fields(jsonref_release_schema):
name = field.path_components[-1]
# Skip definitions (output dereferenced properties only). Skip deprecated fields.
if field.definition_pointer_components or field.deprecated:
if field.definition or field.deprecated:
continue
multilingual = (
# If a field can be a non-string, it is not multilingual.
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Add your own requirements below.

ocdskit==1.1.3
ocdskit==1.3.0
sphinx-design==0.4.1
sphinxcontrib-opencontracting==0.0.8
sphinxcontrib-opendataservices-jsonschema==0.7.1
Expand Down

0 comments on commit d748a5d

Please sign in to comment.