biosimulations / biosimulations-bigg

Command-line program and scheduled GitHub action for publishing the BiGG model repository to BioSimulations
https://docs.biosimulations.org/repositories/bigg
MIT License
1 stars 0 forks source link

Change intermediate data files to output relative rather than absolute paths #12

Closed bilalshaikh42 closed 2 years ago

bilalshaikh42 commented 2 years ago

When running the package with the command biosimulations-bigg publish --update-simulation-runs --update-combine-archives , I get the following error suggesting a filepath is hardocded somewhere

Traceback (most recent call last):
  File "/home/bilal/env/python/biosimbigg/bin/biosimulations-bigg", line 33, in <module>
    sys.exit(load_entry_point('biosimulations-bigg', 'console_scripts', 'biosimulations-bigg')())
  File "/home/bilal/Projects/work/biosimulations-bigg/biosimulations_bigg/__main__.py", line 290, in main
    app.run()
  File "/home/bilal/env/python/biosimbigg/lib/python3.8/site-packages/cement/core/foundation.py", line 916, in run
    return_val = self.controller._dispatch()
  File "/home/bilal/env/python/biosimbigg/lib/python3.8/site-packages/cement/ext/ext_argparse.py", line 810, in _dispatch
    return func()
  File "/home/bilal/Projects/work/biosimulations-bigg/biosimulations_bigg/__main__.py", line 119, in _default
    import_models(config)
  File "/home/bilal/Projects/work/biosimulations-bigg/biosimulations_bigg/core.py", line 628, in import_models
    build_combine_archive_for_model(model_filename, project_filename, extra_contents=extra_contents)
  File "/home/bilal/Projects/work/biosimulations-bigg/biosimulations_bigg/core.py", line 403, in build_combine_archive_for_model
    shutil.copyfile(local_path, os.path.join(archive_dirname, extra_content.location))
  File "/usr/lib/python3.8/shutil.py", line 264, in copyfile
    with open(src, 'rb') as fsrc, open(dst, 'wb') as fdst:
FileNotFoundError: [Errno 2] No such file or directory: '/home/jonrkarr/Documents/biosimulations-bigg/biosimulations_bigg/./source/thumbnails/PMC3032673/PMC3032673/1752-0509-5-8-2.jpg'
jonrkarr commented 2 years ago

Run without --update-combine-archives. The archives can be submitted to runBioSimulations without rebuilding them.

Full paths have been unintentionally saved into intermediate output files rather than relative paths.

jonrkarr commented 2 years ago

Done