From d24d6efd919f48127e81222f2b3fbfce7ee20293 Mon Sep 17 00:00:00 2001 From: Nicholas Bollweg Date: Sun, 10 Nov 2024 12:56:30 -0600 Subject: [PATCH 1/4] fix dupe rtd --- docs/.readthedocs.yaml | 8 +++++--- docs/.readthedocs.yml | 14 -------------- 2 files changed, 5 insertions(+), 17 deletions(-) delete mode 100644 docs/.readthedocs.yml diff --git a/docs/.readthedocs.yaml b/docs/.readthedocs.yaml index 8ce7a39..e4a9280 100644 --- a/docs/.readthedocs.yaml +++ b/docs/.readthedocs.yaml @@ -7,6 +7,8 @@ build: python: mambaforge-23.11 commands: - mamba install -c conda-forge -c nodefaults pixi==0.35.0 - - pixi r build - - pixi r docs-sphinx - - pixi r -v docs-rtd + - pixi run build-yarn + - pixi run build + - pixi run dist + - pixi run docs-sphinx + - pixi run docs-rtd diff --git a/docs/.readthedocs.yml b/docs/.readthedocs.yml deleted file mode 100644 index e4a9280..0000000 --- a/docs/.readthedocs.yml +++ /dev/null @@ -1,14 +0,0 @@ -version: 2 - -build: - os: ubuntu-lts-latest - tools: - # `mambaforge-latest` will now start failing: we just need a working `mamba` - python: mambaforge-23.11 - commands: - - mamba install -c conda-forge -c nodefaults pixi==0.35.0 - - pixi run build-yarn - - pixi run build - - pixi run dist - - pixi run docs-sphinx - - pixi run docs-rtd From eaa1256c362670ad6be107ae49c0ea91d6cafc34 Mon Sep 17 00:00:00 2001 From: Nicholas Bollweg Date: Sun, 10 Nov 2024 13:05:08 -0600 Subject: [PATCH 2/4] fix branding typos --- README.md | 7 +++++-- docs/use/script.md | 7 +++++-- js/demo/index.html | 4 ++-- js/src/index.ts | 8 ++++---- src/urljsf/constants.py | 2 +- 5 files changed, 17 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 208482f..8744a94 100644 --- a/README.md +++ b/README.md @@ -97,7 +97,7 @@ A very simple, but limited, usage is an `.html` file that links to `urljsf` and `bootstrap` resources on the internet. ```html - - + ``` This technique has _many_ limitations, and is **not recommended**. diff --git a/docs/use/script.md b/docs/use/script.md index 957d56b..ffdf5d5 100644 --- a/docs/use/script.md +++ b/docs/use/script.md @@ -3,13 +3,16 @@ Include `urljsf` as a `script` tag: ```html - + ``` ... and one or more additional `script` tags that define forms: ```html - diff --git a/js/src/index.ts b/js/src/index.ts index 44d8fda..61571fa 100644 --- a/js/src/index.ts +++ b/js/src/index.ts @@ -1,16 +1,16 @@ // Copyright (C) urljsf contributors. // Distributed under the terms of the Modified BSD License. -export const MIME_FRAGMENT = 'application/vnd.deathbeds.prjsf.v0+'; +export const MIME_FRAGMENT = 'application/vnd.deathbeds.urljsf.v0+'; export const SELECTOR = `script[type^="${MIME_FRAGMENT}"]`; export async function main() { - const urjsfScripts = [...document.querySelectorAll(SELECTOR)] as HTMLScriptElement[]; + const urljsfScripts = [...document.querySelectorAll(SELECTOR)] as HTMLScriptElement[]; /* istanbul ignore else */ - if (urjsfScripts.length) { + if (urljsfScripts.length) { const { makeOneForm } = await import('./components/form.js'); - urjsfScripts.forEach(makeOneForm); + urljsfScripts.forEach(makeOneForm); } } diff --git a/src/urljsf/constants.py b/src/urljsf/constants.py index 8de95ee..bef0083 100644 --- a/src/urljsf/constants.py +++ b/src/urljsf/constants.py @@ -20,7 +20,7 @@ STATIC = HERE / "_static" SCHEMA_VERSION = "v0" -MIME_PREFIX = f"application/vnd.deathbeds.prjsf.{SCHEMA_VERSION}" +MIME_PREFIX = f"application/vnd.deathbeds.urljsf.{SCHEMA_VERSION}" EXTENSION_FORMAT: dict[str, FileFormat] = { From f08209b16a54ae55284635c0834ed58845c88b68 Mon Sep 17 00:00:00 2001 From: Nicholas Bollweg Date: Sun, 10 Nov 2024 13:16:56 -0600 Subject: [PATCH 3/4] fix schema dupe --- pixi.toml | 4 +--- pyproject.toml | 4 ---- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/pixi.toml b/pixi.toml index 9d09845..4e47516 100644 --- a/pixi.toml +++ b/pixi.toml @@ -87,9 +87,7 @@ prettier-- = '''yarn prettier "{docs,tests,src,js,.github}/**/*.{md,json,yml,yaml,css,ts,tsx,ts,mjs}"''' markdownlint-- = 'yarn markdownlint-cli2 "*.md" "{docs,tests,src,js,.github}/**/*.md"' py-static-- = """rm -rf src/urljsf/_static/ - && cp -r js/dist/urljsf src/urljsf/_static/urljsf - && cp -r js/schema src/urljsf/_static/schema - && rm -rf src/urljsf/_static/urljsf/demo/ src/urljsf/_static/schema/*.toml""" + && cp -r js/dist/urljsf src/urljsf/_static/urljsf""" platform-- = '''mkdir -p build && python -c 'import platform; u = platform.uname(); print(f"{u.system}-{u.machine}".lower())' > build/platform.txt''' diff --git a/pyproject.toml b/pyproject.toml index f3e7bc4..07b5427 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -47,10 +47,6 @@ Source = "https://github.com/deathbeds/urljsf" [tool.flit.sdist] include = ["LICENSE"] -# check-wheel-contents ######################################################### -[tool.check-wheel-contents] -ignore = ["W002"] - # coverage ##################################################################### [tool.coverage.run] disable_warnings = [ From f4467895a456ce44be6086423b44d15f1eeb4e17 Mon Sep 17 00:00:00 2001 From: Nicholas Bollweg Date: Sun, 10 Nov 2024 13:29:16 -0600 Subject: [PATCH 4/4] fix schema location in dist --- pixi.toml | 26 ++++++++++++++++++-------- src/urljsf/schema.py | 2 +- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/pixi.toml b/pixi.toml index 4e47516..d6783db 100644 --- a/pixi.toml +++ b/pixi.toml @@ -91,14 +91,19 @@ py-static-- = """rm -rf src/urljsf/_static/ platform-- = '''mkdir -p build && python -c 'import platform; u = platform.uname(); print(f"{u.system}-{u.machine}".lower())' > build/platform.txt''' -pip-- = """python -m pip install - -vv - --no-deps - --no-build-isolation - --disable-pip-version-check - --ignore-installed""" -pip-e-- = """pixi r pip-- -e .""" -pip-whl-- = """pixi r pip-- urljsf --find-links=dist --no-index""" +pip-- = """rm -rf build/pip-freeze/$PIXI_ENVIORNMENT_NAME.txt + && python -m pip install + -vv + --no-deps + --no-build-isolation + --disable-pip-version-check + --ignore-installed""" +pip-check-- = """python -m pip check + && mkdir -p build/pip-freeze + && python -m pip list --format=freeze + > build/pip-freeze/$PIXI_ENVIRONMENT_NAME""" +pip-e-- = """pixi r pip-- -e . && pixi r pip-check--""" +pip-whl-- = """pixi r pip-- urljsf --find-links=dist --no-index && pixi r pip-check--""" schema-vars-- = '''echo PROPS_TS=$PIXI_PROJECT_ROOT/js/src/_props.ts PROPS_JSON=$PIXI_PROJECT_ROOT/js/schema/v0/props.schema.json @@ -129,27 +134,32 @@ outputs = ["node_modules/.yarn-state.yml"] description = "- install the editable python package for development" cmd = "pixi r -e dev pip-e--" inputs = ["pyproject.toml"] +outputs = ["build/pip-freeze/dev.txt"] [feature.tasks-lint.tasks.lint-pip] description = "- install the editable python package for linting" cmd = "pixi r -e lint pip-e--" inputs = ["pyproject.toml"] +outputs = ["build/pip-freeze/lint.txt"] [feature.tasks-test.tasks.test-pip] description = "- install the built python package for testing" cmd = "pixi r -e test pip-whl--" inputs = ["dist/*.whl"] +outputs = ["build/pip-freeze/test.txt"] [feature.tasks-test-min.tasks.test-min-pip] description = "- install the built python package for testing (oldest)" cmd = "pixi r -e test-min pip-whl--" inputs = ["dist/*.whl"] +outputs = ["build/pip-freeze/test-min.txt"] [feature.tasks-docs.tasks.docs-pip] description = "- install the built python package for docs" cmd = "pixi r -e docs pip-whl--" inputs = ["dist/*.whl"] depends-on = ["dist-pypi"] +outputs = ["build/pip-freeze/docs.txt"] # build ######################################################################## [feature.tasks-build.tasks.build-demo] diff --git a/src/urljsf/schema.py b/src/urljsf/schema.py index c543f72..2d5e4fb 100644 --- a/src/urljsf/schema.py +++ b/src/urljsf/schema.py @@ -13,7 +13,7 @@ HERE = Path(__file__).parent STATIC = HERE / "_static" -SCHEMA = STATIC / "schema" +SCHEMA = STATIC / "urljsf/schema" CURRENT_SCHEMA = SCHEMA / SCHEMA_VERSION FORM_SCHEMA = CURRENT_SCHEMA / "form.schema.json"