Skip to content

Docs and Python package builds are not self-contained #585

@mfisher87

Description

@mfisher87

Can't build docs without running jlpm build at the repo root first (which requires a dev environment). The docs instructions are updated in #584 to reflect this. Can we make the docs environment self-contained by somehow configuring the Python packages' pyproject.toml to require the Javascript packages be built first?

Original bug report before fixing up #584


The Python API docs are not rendered, and a warning occurs in the logs. This is because jupytergis_lab is not installed. When adding jupytergis_lab to environment-docs.yml like so:

  - pip:
      # Install JupyterGIS so we can autodoc:
      - ../python/jupytergis_core
      - ../python/jupytergis_lab

The build fully fails with:

      INFO:hatch_jupyter_builder.utils:> /tmp/pip-build-env-ibp_gqrb/overlay/bin/jlpm run build:prod                                                                                           
      src/externalcommand.ts(4,8): error TS2307: Cannot find module '@jupytergis/schema' or its corresponding type declarations.                                                               
      src/factory.ts(7,8): error TS2307: Cannot find module '@jupytergis/schema' or its corresponding type declarations.                                                                       
      src/factory.ts(17,8): error TS2307: Cannot find module '@jupytergis/base' or its corresponding type declarations.                                                                        
      src/jgisplugin/modelfactory.ts(5,8): error TS2307: Cannot find module '@jupytergis/schema' or its corresponding type declarations.
      src/jgisplugin/plugins.ts(13,8): error TS2307: Cannot find module '@jupytergis/schema' or its corresponding type declarations.
      src/jgisplugin/plugins.ts(30,52): error TS2307: Cannot find module '@jupytergis/base' or its corresponding type declarations.
      src/jgisplugin/plugins.ts(56,12): error TS2339: Property 'jupytergisMaps' does not exist on type 'Window & typeof globalThis'.
      src/jgisplugin/plugins.ts(126,39): error TS2345: Argument of type 'unknown' is not assignable to parameter of type 'string'.
      src/jgisplugin/plugins.ts(127,47): error TS2345: Argument of type 'unknown' is not assignable to parameter of type 'string | undefined'.
      src/layerBrowserRegistry.ts(4,8): error TS2307: Cannot find module '@jupytergis/schema' or its corresponding type declarations.
      src/plugin.ts(1,33): error TS2307: Cannot find module '@jupytergis/base' or its corresponding type declarations.
      src/plugin.ts(14,8): error TS2307: Cannot find module '@jupytergis/schema' or its corresponding type declarations.
      src/plugin.ts(100,37): error TS7006: Parameter '_' implicitly has an 'any' type.
      src/plugin.ts(100,40): error TS7006: Parameter 'changed' implicitly has an 'any' type.
      src/schemaregistry.ts(1,48): error TS2307: Cannot find module '@jupytergis/schema' or its corresponding type declarations.
      src/schemaregistry.ts(2,24): error TS2307: Cannot find module '@jupytergis/schema/lib/_interface/forms.json' or its corresponding type declarations.

Fixing this should enable us to simplify the ReadTheDocs build (#441).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdocumentationImprovements or additions to documentationhackathonLet's hack on this together!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions