diff --git a/404.html b/404.html deleted file mode 100644 index 71ffb89..0000000 --- a/404.html +++ /dev/null @@ -1,168 +0,0 @@ - - - - - - - - - - - Cookiecutter Data Science - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - -
-
-

404

-

Page not found

-

Home

-
-
- - -
- - - - - - - - - - - - - - - - diff --git a/__init__.py b/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/__init__.pyc b/__init__.pyc deleted file mode 100644 index 0946874..0000000 Binary files a/__init__.pyc and /dev/null differ diff --git a/base.html b/base.html deleted file mode 100644 index 1d2601b..0000000 --- a/base.html +++ /dev/null @@ -1,130 +0,0 @@ - - - - - - - {% if page_description %} - {% endif %} {% if site_author %} - {% endif %} {% if canonical_url %} - {% endif %} {% if favicon %} - {% else %} - {% endif %} - - {% if page_title %}{{ page_title }} - {% endif %}{{ site_name }} - - - - - - - - - {%- for path in extra_css %} - - - {%- endfor %} - - - - - - - - {% if google_analytics %} - - {% endif %} - - - - - {% include "nav.html" %} - -
- {% block content %} -
{% include "toc.html" %}
-
{% include "content.html" %}
- {% endblock %} -
- - - - - - - - - - - {%- for path in extra_javascript %} - - {%- endfor %} - - - - - - -{% if current_page and current_page.is_homepage %} - -{% endif %} diff --git a/content.html b/content.html deleted file mode 100644 index a372658..0000000 --- a/content.html +++ /dev/null @@ -1,9 +0,0 @@ -{% if meta.source %} - -{% endif %} - -{{ content }} diff --git a/css/base.css b/css/base.css index 1c7e0c2..eb8e296 100644 --- a/css/base.css +++ b/css/base.css @@ -9,6 +9,11 @@ h1[id]:before, h2[id]:before, h3[id]:before, h4[id]:before, h5[id]:before, h6[id height: 75px; } +p > img { + max-width: 100%; + height: auto; +} + ul.nav li.first-level { font-weight: bold; } diff --git a/fonts/fontawesome-webfont.eot b/fonts/fontawesome-webfont.eot old mode 100755 new mode 100644 diff --git a/fonts/fontawesome-webfont.svg b/fonts/fontawesome-webfont.svg old mode 100755 new mode 100644 diff --git a/fonts/fontawesome-webfont.ttf b/fonts/fontawesome-webfont.ttf old mode 100755 new mode 100644 diff --git a/fonts/fontawesome-webfont.woff b/fonts/fontawesome-webfont.woff old mode 100755 new mode 100644 diff --git a/index.html b/index.html index 6a741b2..0b380f0 100644 --- a/index.html +++ b/index.html @@ -5,13 +5,13 @@ - - + + - Cookiecutter Data Science + Home - Cookiecutter Data Science - + @@ -38,23 +38,6 @@ - - @@ -64,7 +47,6 @@ @@ -108,52 +82,31 @@
@@ -240,6 +193,7 @@ ├── requirements.txt <- The requirements file for reproducing the analysis environment, e.g. │ generated with `pip freeze > requirements.txt` │ +├── setup.py <- Make this project pip installable with `pip install -e` ├── src <- Source code for use in this project. │   ├── __init__.py <- Makes src a Python module │ │ @@ -273,25 +227,17 @@

Follow a naming convention that shows the owner and the order the analysis was done in. We use the format <step>-<ghuser>-<description>.ipynb (e.g., 0.3-bull-visualize-distributions.ipynb).

  • -

    Refactor the good parts. Don't write code to do the same task in multiple notebooks. If it's a data preprocessing task, put it in the pipeline at src/data/make_dataset.py and load data from data/interim. If it's useful utility code, refactor it to src and import it into notebooks with a cell like the following. If updating the system path is icky to you, we'd recommend making a Python package (there is a cookiecutter for that as well) and installing that as an editable package with pip install -e.

    +

    Refactor the good parts. Don't write code to do the same task in multiple notebooks. If it's a data preprocessing task, put it in the pipeline at src/data/make_dataset.py and load data from data/interim. If it's useful utility code, refactor it to src.

  • -
    # Load the "autoreload" extension
    +

    Now by default we turn the project into a Python package (see the setup.py file). You can import your code and use it in notebooks with a cell like the following:

    +
    # OPTIONAL: Load the "autoreload" extension so that code can change
     %load_ext autoreload
     
    -# always reload modules marked with "%aimport"
    -%autoreload 1
    +# OPTIONAL: always reload modules so that as you change code in src, it gets loaded
    +%autoreload 2
     
    -import os
    -import sys
    -
    -# add the 'src' directory as one where we can import modules
    -src_dir = os.path.join(os.getcwd(), os.pardir, 'src')
    -sys.path.append(src_dir)
    -
    -# import my method from the source code
    -%aimport preprocess.build_features
    -from preprocess.build_features import remove_invalid_data
    +from src.data import make_dataset
     

    Analysis is a DAG

    @@ -334,6 +280,18 @@ database_url = os.environ.get("DATABASE_URL") other_variable = os.environ.get("OTHER_VARIABLE")
    +

    AWS CLI configuration

    +

    When using Amazon S3 to store data, a simple method of managing AWS access is to set your access keys to environment variables. However, managing mutiple sets of keys on a single machine (e.g. when working on multiple projects) it is best to use a credentials file, typically located in ~/.aws/credentials. A typical file might look like:

    +
    [default]
    +aws_access_key_id=myaccesskey
    +aws_secret_access_key=mysecretkey
    +
    +[another_project]
    +aws_access_key_id=myprojectaccesskey
    +aws_secret_access_key=myprojectsecretkey
    +
    + +

    You can add the profile name when initialising a project; assuming no applicable environment variables are set, the profile credentials will be used be default.

    Be conservative in changing the default folder structure

    To keep this structure broadly applicable for many different kinds of projects, we think the best approach is to be liberal in changing the folders around for your project, but be conservative in changing the default structure for all projects.

    We've created a folder-layout label specifically for issues proposing to add, subtract, rename, or move folders around. More generally, we've also created a needs-discussion label for issues that should have some careful discussion and broad support before being implemented.

    @@ -369,6 +327,8 @@ other_variable = os.environ.get("OTHER_VARIABLE") + +