geopython / pycsw

pycsw is an OGC CSW server implementation written in Python. pycsw fully implements the OpenGIS Catalogue Service Implementation Specification [Catalogue Service for the Web]. Initial development started in 2010 (more formally announced in 2011). The project is certified OGC Compliant, and is an OGC Reference Implementation. pycsw allows for the publishing and discovery of geospatial metadata via numerous APIs (CSW 2/CSW 3, OpenSearch, OAI-PMH, SRU). Existing repositories of geospatial metadata can also be exposed, providing a standards-based metadata and catalogue component of spatial data infrastructures. pycsw is Open Source, released under an MIT license, and runs on all major platforms (Windows, Linux, Mac OS X). Please read the docs at https://pycsw.org/docs for more information.
https://pycsw.org
MIT License
206 stars 155 forks source link

Undeclared Jinja2 dependency #1030

Open craigds opened 2 weeks ago

craigds commented 2 weeks ago

Description

pycsw depends on jinja2 for some reason, and this isn't declared in requirements.txt

Environment

Steps to Reproduce

>>> from pycsw import server
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/cdestigter/code/pycsw/pycsw/server.py", line 48, in <module>
    from pycsw.ogc.api.util import yaml_load
  File "/Users/cdestigter/code/pycsw/pycsw/ogc/api/util.py", line 45, in <module>
    from jinja2 import Environment, FileSystemLoader
ModuleNotFoundError: No module named 'jinja2'
kalxas commented 2 weeks ago

Jinja is pulled in by https://github.com/geopython/pycsw/blob/master/requirements-standalone.txt

craigds commented 2 weeks ago

hm, confusing; I hadn't considered looking in a nonstandard location for this (and, grepping didn't find it)

I suppose that's fine except that things pycsw actually imports directly should probably be mentioned explicitly there, rather than pulled in as a side-effect of some other dependency

craigds commented 2 weeks ago

changed my PR to pull it in explicitly in requirements-standalone.txt. thanks