Package: pyscaffoldext-dsproject-vscode
pyscaffoldext-dsproject-vscodeThis extension is forked from the awesomePyScaffold DSProjectextension.This version of the extension extends the functionality by adding a scaffold component for using the VS Code container development integration.To benefit from this setup, you must use VS Code with Python and Remote - Containers extensions installed. Docker should also be installed on the host machine.UsageJust install this package withpip install pyscaffoldext-dsproject-vscodeand note thatputup -hshows a new option--dsproject-vscode.
Creating a data science project with VS Code container development integration is then as easy as:putup --dsproject-vscode my_ds_projectAfter the project is created, set the following softlinks from the project root:ln -s path.env .envIf you want to develop locally, create this softlink:ln -s .devcontainer/devcontainer.local.json .devcontainer/devcontainer.jsonAlternatively, if you want to develop using a remote docker server, use this:ln -s .devcontainer/devcontainer.remote.json .devcontainer/devcontainer.jsonIf you have an application that will run inside the dev container that requires a port, specify the list of ports under theforwardPortsattribute in the following files:.devcontainer/devcontainer.local.json
.devcontainer/devcontainer.remote.jsonRemote docker serverTo use a remote docker server, specify thedocker.hostattribute in the.vscode/settings.jsonfollowing the template in the file.Edit the value of theREMOTE_PATHattribute in the.envfile with the absolute path of the project in the remote server.pyscaffoldext-dsprojectPyScaffoldextension tailored forData Scienceprojects. This extension is inspired bycookiecutter-data-scienceand enhanced in many ways. The main differences are that itadvocates a proper Python package structure that can be shipped and distributed,uses acondaenvironment instead of somethingvirtualenv-based and is thus more suitable
for data science projects,more default configurations forSphinx,py.test,pre-commit, etc. to foster
clean coding and best practices.Also consider usingdvcto version control and share your data within your team.
Readthis blogpostto learn how to work with JupyterLab notebooks efficiently by using a
data science project structure like this.The final directory structure looks like:├── AUTHORS.rst             <- List of developers and maintainers.
├── CHANGELOG.rst           <- Changelog to keep track of new features and fixes.
├── LICENSE.txt             <- License as chosen on the command-line.
├── README.md               <- The top-level README for developers.
├── configs                 <- Directory for configurations of model & application.
├── data
│   ├── external            <- Data from third party sources.
│   ├── interim             <- Intermediate data that has been transformed.
│   ├── processed           <- The final, canonical data sets for modeling.
│   └── raw                 <- The original, immutable data dump.
├── docs                    <- Directory for Sphinx documentation in rst or md.
├── environment.yaml        <- The conda environment file for reproducibility.
├── models                  <- Trained and serialized models, model predictions,
│                              or model summaries.
├── notebooks               <- Jupyter notebooks. Naming convention is a number (for
│                              ordering), the creator's initials and a description,
│                              e.g. `1.0-fw-initial-data-exploration`.
├── references              <- Data dictionaries, manuals, and all other materials.
├── reports                 <- Generated analysis as HTML, PDF, LaTeX, etc.
│   └── figures             <- Generated plots and figures for reports.
├── scripts                 <- Analysis and production scripts which import the
│                              actual PYTHON_PKG, e.g. train_model.
├── setup.cfg               <- Declarative configuration of your project.
├── setup.py                <- Use `python setup.py develop` to install for development or
|                              or create a distribution with `python setup.py bdist_wheel`.
├── src
│   └── PYTHON_PKG          <- Actual Python package where the main functionality goes.
├── tests                   <- Unit tests which can be run with `py.test`.
├── .coveragerc             <- Configuration for coverage reports of unit tests.
├── .isort.cfg              <- Configuration for git hook that sorts imports.
└── .pre-commit-config.yaml <- Configuration of pre-commit git hooks.See a demonstration of the initial project structure underdsproject-demoand also check out
the the documentation ofPyScaffoldfor more information.UsageJust install this package withpip install pyscaffoldext-dsprojectand note thatputup -hshows a new option--dsproject.
Creating a data science project is then as easy as:putup --dsproject my_ds_projectNoteThis project has been set up using PyScaffold 3.2. For details and usage
information on PyScaffold seehttps://pyscaffold.org/.