mrwilson / adr-viewer

Generate easy-to-read web pages for your Architecture Decision Records
MIT License
160 stars 27 forks source link

fix(package): include index html #3

Closed galuszkak closed 5 years ago

galuszkak commented 5 years ago

Reason for this change is this:

https://stackoverflow.com/a/11848281/161281

Do not use both include_package_data and package_data in setup.py.
include_package_data will nullify the package_data information.

Now, orginal package throws error (version 1.1.0):

Traceback (most recent call last):
  File "/Users/galuszkak/.virtualenvs/architecture-decision-record-msS_HC_8/bin/adr-viewer", line 10, in <module>
    sys.exit(main())
  File "/Users/galuszkak/.virtualenvs/architecture-decision-record-msS_HC_8/lib/python3.7/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/Users/galuszkak/.virtualenvs/architecture-decision-record-msS_HC_8/lib/python3.7/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/Users/galuszkak/.virtualenvs/architecture-decision-record-msS_HC_8/lib/python3.7/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/galuszkak/.virtualenvs/architecture-decision-record-msS_HC_8/lib/python3.7/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/Users/galuszkak/.virtualenvs/architecture-decision-record-msS_HC_8/lib/python3.7/site-packages/adr_viewer/__init__.py", line 100, in main
    content = generate_content(adr_path)
  File "/Users/galuszkak/.virtualenvs/architecture-decision-record-msS_HC_8/lib/python3.7/site-packages/adr_viewer/__init__.py", line 92, in generate_content
    return render_html(config)
  File "/Users/galuszkak/.virtualenvs/architecture-decision-record-msS_HC_8/lib/python3.7/site-packages/adr_viewer/__init__.py", line 57, in render_html
    template = env.get_template('index.html')
  File "/Users/galuszkak/.virtualenvs/architecture-decision-record-msS_HC_8/lib/python3.7/site-packages/jinja2/environment.py", line 830, in get_template
    return self._load_template(name, self.make_globals(globals))
  File "/Users/galuszkak/.virtualenvs/architecture-decision-record-msS_HC_8/lib/python3.7/site-packages/jinja2/environment.py", line 804, in _load_template
    template = self.loader.load(self, name, globals)
  File "/Users/galuszkak/.virtualenvs/architecture-decision-record-msS_HC_8/lib/python3.7/site-packages/jinja2/loaders.py", line 113, in load
    source, filename, uptodate = self.get_source(environment, name)
  File "/Users/galuszkak/.virtualenvs/architecture-decision-record-msS_HC_8/lib/python3.7/site-packages/jinja2/loaders.py", line 235, in get_source
    raise TemplateNotFound(template)
jinja2.exceptions.TemplateNotFound: index.html
galuszkak commented 5 years ago

@mrwilson I would be grateful for merging this and releasing a new package with version 1.1.1.

mrwilson commented 5 years ago

I will deploy this to PyPI tonight.

mrwilson commented 5 years ago

Done.

galuszkak commented 5 years ago

@mrwilson thanks for release, now it actually works 👍