Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editable installation does not include the OED spec #152

Open
carlfischerjba opened this issue Oct 28, 2024 · 0 comments
Open

Editable installation does not include the OED spec #152

carlfischerjba opened this issue Oct 28, 2024 · 0 comments
Assignees

Comments

@carlfischerjba
Copy link

Issue Description

When installing ods-tools with pip install --editable .[extra] the OED spec json file is not installed. This causes the command ods_tools check to fail:

$ ods_tools check --location oed_location_1000.csv 
Traceback (most recent call last):
  File "/home/carl/venvs/myvenv/bin/ods_tools", line 33, in <module>
    sys.exit(load_entry_point('ods-tools', 'console_scripts', 'ods_tools')())
  File "/home/carl/repos/ODS_Tools/ods_tools/main.py", line 206, in main
    command_action[kwargs.pop('command')](** kwargs)
  File "/home/carl/repos/ODS_Tools/ods_tools/main.py", line 53, in check
    oed_exposure = get_oed_exposure(**extract_exposure_args(kwargs))
  File "/home/carl/repos/ODS_Tools/ods_tools/main.py", line 33, in get_oed_exposure
    return OedExposure(**kwargs)
  File "/home/carl/repos/ODS_Tools/ods_tools/oed/exposure.py", line 72, in __init__
    self.oed_schema = OedSchema.from_oed_schema_info(oed_schema_info)
  File "/home/carl/repos/ODS_Tools/ods_tools/oed/oed_schema.py", line 77, in from_oed_schema_info
    return cls.from_json(cls.DEFAULT_ODS_SCHEMA_PATH)
  File "/home/carl/repos/ODS_Tools/ods_tools/oed/oed_schema.py", line 91, in from_json
    with open(oed_json) as f:
FileNotFoundError: [Errno 2] No such file or directory: '/home/carl/repos/ODS_Tools/ods_tools/data/OpenExposureData_Spec.json'

This is particularly awkward because #151 requires us to use an editable install in order to get other files.

Steps to Reproduce (Bugs only)

Version / Environment information

  • ods-tools 3.2.7

Example data / logs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: On Hold
Development

No branches or pull requests

2 participants