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

Simplify adding extra files to watch during development #43

honzajavorek opened this Issue Dec 5, 2017 · 4 comments


None yet
2 participants

honzajavorek commented Dec 5, 2017

During development, Werkzeug's reloader watches just Python files and Jinja templates. Normally, this can be extended by the extra_files keyword argument:'', ..., extra_files=['woohoo.yml'])

Elsa doesn't support this:'', port=port, debug=True)

Following workaround works, but it would be nice if Elsa was able to propagate the option in some way, out of the box.

from flask import Flask as BaseFlask

class Flask(BaseFlask):
    def run(self, *args, **kwargs):
        kwargs.setdefault('extra_files', [])
        return super().run(*args, **kwargs)

app = Flask(__name__)

This comment has been minimized.


honzajavorek commented Dec 5, 2017

I'm not sending a PR for adding the argument, because I'm not sure where to add it (what would make sense the most) and I'm not sure having the argument there is something Elsa should actually support.

I'm playing with a thought that it could be actually smarter - e.g. reading and watching all files included to the package or something like that. I think feature like that would be a significant convenience and if it's way too greedy (reloading even on files not so important for the actual website rendering), it's probably no real issue.


This comment has been minimized.


hroncok commented Dec 5, 2017

Adding it without a workaround should be possible once #39 gets done (it's rotting there for quite a while, hopefully i can get to that next semester when i don't teach).

As for some smart handling, I will think about it. Thanks for the proposal.

@hroncok hroncok added the enhancement label Dec 5, 2017


This comment has been minimized.


honzajavorek commented Dec 5, 2017

This is how can be parsed:

from setuptools.command.egg_info import FileList

file_list = FileList()
with open('') as f:
    for line in f.readlines():


This comment has been minimized.


honzajavorek commented Aug 10, 2018

I'm not sure about anymore. Applications will use pipenv mostly, so there will be no package. And recently I got into situation with Sphinx when I dynamically created a file during build, the file was always automatically considered as modified, and caused an endless loop of reloading. Thus I think we should forget about any automagic and just let people to set it as they like.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment