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

Initial support for multi file apps #146

Merged
merged 6 commits into from Oct 27, 2016
Merged

Conversation

jamesls
Copy link
Member

@jamesls jamesls commented Oct 25, 2016

There's been several approaches proposed:

  1. Support either 'app.py' or an app/ directory.
  2. Recursively find all python modules/packages (similar to what
    find_packages(.) does.
  3. Have some type of manifest file that includes/excludes files.
  4. Include a hard coded directory if it exists.

This commit implements option 4, which I think has a good balance
of control vs. ease of use:

  • If you want something included in the deployment package, put it
    in this directory. This works whether it's a python file or not.
  • If you don't something included in your deployment package, don't
    include it in chalicelib/.

cc @kyleknap @JordonPhillips

There's been several approaches proposed:

1. Support either 'app.py' *or* an ``app/`` directory.
2. Recursively find all python modules/packages (similar to what
   ``find_packages(.)`` does.
3. Have some type of manifest file that includes/excludes files.
4. Include a hard coded directory if it exists.

This commit implements option 4, which I think has a good balance
of control vs. ease of use:

* If you want something included in the deployment package, put it
  in this directory.  This works whether it's a python file or not.
* If you don't something included in your deployment package, don't
  include it in ``chalicelib/``.
There's no reason to be using exec, and in fact breaks
a few edge cases, notably the absense of `__file__`, which is
more relevent given multi file app support.
The root cause is that sphinx replaces docutils directives
with its own version, but doc8 doesn't know about sphinx
directives.  I think the better long term fix is going to be
either use sphinx directly to verify docs, or to load the
sphinx directives in doc8.

Either way, I don't think this should be a hard bocker.
@jamesls
Copy link
Member Author

jamesls commented Oct 27, 2016

Docs/tests updated. I haven't any feedback on this PR nor on the original issue, so let's try this approach out for now. I imagine we may need to iterate on this, so I'd like to get this initial version available for people to try out.

@nkconnor
Copy link

nkconnor commented Mar 6, 2019

I don't see any info on this in the README

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

Successfully merging this pull request may close these issues.

None yet

3 participants