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

[WIP] Version 2 #246

Merged
merged 37 commits into from
May 22, 2024
Merged

[WIP] Version 2 #246

merged 37 commits into from
May 22, 2024

Conversation

pjbull
Copy link
Member

@pjbull pjbull commented Mar 20, 2021

We've seen a lot of potential features for this where we need to handle forking paths gracefully. By default cookiecutter can't do this (see cookiecutter/cookiecutter#848). It's been years, so we can't reasonably expect this to change upstream...

This implements a monkey-patching workaround to enable this behavior. It introduces a couple of major changes, so here are my recommendations.

Here are the big differences for a user:

  • we now need to run ccds <path to repo> instead of cookiecutter <path to repo>
  • the options and their defaults are changing
  • as a consequence of supporting more environments/dependency managers at setup time, we stop supporting them at execution time. this means that teams will have to pick one of each and stick to it across developers. I think this is pretty widespread already. (i.e. make create_environment will only support one of the options rather than multiple like it does now)

Beta Testing v2

V2 is available to beta testers! Expect some bugs and changes as you go. If you encounter issues, you can file an issue and use the v2-bug label.

To beta test v2, you can install the ccds package with pip:

  • pip install git+https://github.com/drivendata/cookiecutter-data-science@v2

And then to make a new project with the v2 template, you can run:

  • ccds https://github.com/drivendata/cookiecutter-data-science.git --checkout v2

Note: because this is a separate package, you should be able to run it alongside your normal cookiecutter installation as well and still use v1 when you choose to. Also, always answer "yes" to re-cloning the project so that you get the latest and so v1 continues to work as well.

High-level feedback on choices and design is welcome!

Tracking issues for release

Done:


Remaining items

Cookiecutter default structure

Cookiecutter options

Infrastructure

Fixes

Docs


Under consideration

Scoped out

* WIP - New version with cleaner options

* Fix find-replace error (#177)

* Remove unnecessary .gitkeep

* Remove unused tox.ini

* Split reqs into dev/non-dev

* Add basic packages support

* Add tests for testing environment creation and requirements

* Set up CI with Azure Pipelines (#194)

* Change archived asciinema example (#163)

* Change archived asciinema example

* Update README.md

Fix Asciinema powerline error

* Update docs to show updated asciinema example

* Added source and destination to Make data target (#169)

* Fix broken Airflow link (#182)

* Fixed: Typo in Makefile (#184)

Fixed typo in Makefile, section "Set up python interpreter environment": intalled --> installed

* Set up CI with Azure Pipelines

[skip ci]

* Update azure-pipelines.yml for Azure Pipelines

* Update azure-pipelines.yml for Azure Pipelines

* Update azure-pipelines.yml for Azure Pipelines

* str paths for windows support

* handle multiple data providers (#199)

* Add missing env directory bin/activate path

* Remove version from PYTHON_INTERPRETER command

* Search for virtualenvwrapper.sh path if executable not found

* Try chardet for character encoding detection

* Specify python and virtualenv binaries for virtualenvwrapper

* Add shebang to virtualenvwrapper.sh

* Diagnostic

* Try virtualenvwrapper-win

* Set encoding if detected None

* Fixes to Mac and Windows tests on Azure pipelines (#217)

* Temporarily comment out py36

* Update azure-pipelines.yml

* Fix tests on Windows and Mac (#1)

* Temporarily remove py37

* Update virtualenv_harness.sh

* put py37 back in

* Set encoding to utf-8

* Comment out rmvirtualenv

* Update test_creation.py

* Update virtualenv_harness.sh

* Add --show-capture

* Update azure-pipelines.yml

* Update azure-pipelines.yml

* Update test_creation.py

* Update virtualenv_harness.sh

* Update virtualenv_harness.sh

* Update virtualenv_harness.sh

* Update virtualenv_harness.sh

* Update Makefile

* Update virtualenv_harness.sh

* Update cookiecutter.json

* Update cookiecutter.json

* Update virtualenv_harness.sh

* Update Makefile

* Update Makefile

* Update Makefile

* Update virtualenv_harness.sh

* Update virtualenv_harness.sh

* Update virtualenv_harness.sh

* Update virtualenv_harness.sh

* Update virtualenv_harness.sh

* Update virtualenv_harness.sh

* Update virtualenv_harness.sh

* Update virtualenv_harness.sh

* Update Makefile

* Update Makefile

* Update Makefile

* Update Makefile

* Update virtualenv_harness.sh

* Update virtualenv_harness.sh

* Update virtualenv_harness.sh

* Update Makefile

* Update Makefile

* Update virtualenv_harness.sh

* Update Makefile

* Update virtualenv_harness.sh

* Update virtualenv_harness.sh

* Update test_creation.py

* Update azure-pipelines.yml

* Update virtualenv_harness.sh

* Update virtualenv_harness.sh

* Update virtualenv_harness.sh

* Update virtualenv_harness.sh

* Update cookiecutter.json

* Update conda_harness.sh

* Update conda_harness.sh

* Update conda_harness.sh

Co-authored-by: Eric Jalbert <ericmjalbert@users.noreply.github.com>
Co-authored-by: Jonathan Raviotta <jraviotta@users.noreply.github.com>
Co-authored-by: Wes Roach <wesr000@gmail.com>
Co-authored-by: Christopher Geis <16896724+geisch@users.noreply.github.com>
Co-authored-by: Peter Bull <pjbull@gmail.com>
Co-authored-by: Ian Preston <17241371+ianepreston@users.noreply.github.com>
Co-authored-by: Jay Qi <jayqi@users.noreply.github.com>
Co-authored-by: inchiosa <4316698+inchiosa@users.noreply.github.com>

* More graceful deprecation

* Make tests pass locally

* test version match installed version

* Remove unused imports

* Unremove used import

* Move to GH Actions

* Fix typo

* Test non-windows

* Add netlify configs

* Update suggestion to keep using deprecated cookiecutter template (#231)

* Add mkdocs requirements file to docs directory

* Try setting python version in runtime txt for netlify

* Trigger build

* Python 3.8 netlify

* Python 3.6 netlify

* Do not specify python runtime for netlify

* Use 3.7

This reverts commit 898d7d3.

Co-authored-by: James Myatt <james@jamesmyatt.co.uk>
Co-authored-by: drivendata <info@drivendata.org>
Co-authored-by: Eric Jalbert <ericmjalbert@users.noreply.github.com>
Co-authored-by: Jonathan Raviotta <jraviotta@users.noreply.github.com>
Co-authored-by: Wes Roach <wesr000@gmail.com>
Co-authored-by: Christopher Geis <16896724+geisch@users.noreply.github.com>
Co-authored-by: Ian Preston <17241371+ianepreston@users.noreply.github.com>
Co-authored-by: Jay Qi <jayqi@users.noreply.github.com>
Co-authored-by: inchiosa <4316698+inchiosa@users.noreply.github.com>
Co-authored-by: Robert Gibboni <robert@drivendata.org>
@shortcipher3
Copy link

Is this active? It looks like there hasn't been any changes for a while, but I would love to know when it is expected to be released.

@pjbull
Copy link
Member Author

pjbull commented Jun 24, 2022

@shortcipher3 Yes, we're hoping to finish the work-in-progress here this summer. Thanks!

pjbull and others added 6 commits August 2, 2022 15:33
* format config files

* make format

* update readme

* no license, py version, update lint format commands

* revert accidental lic removal

Co-authored-by: Peter Bull <pjbull@gmail.com>
@raphaelreimann
Copy link

raphaelreimann commented Oct 4, 2022

Hey, any updates on when this will be released? :)

@pjbull
Copy link
Member Author

pjbull commented Oct 5, 2022

Thanks for the interest @raphaelreimann, work is progressing. Please see the updated beta testing v2 section at the start of this thread. It would be great to get feedback from interested folks that start using the latest version!

AllenDowney and others added 11 commits October 13, 2022 15:40
* make gsutil rsync recursive

* reformatted with black

* add threaded flag for gsutil rsync
* Escape single quotes in sphinx conf. Fixes #142

* Use pyproject.toml package metadata. Fix quote escaping. Fixes #248

* Remove unnecessary pep8 configuration

* Update gitignores

* Use pyproject.toml for package metadata

* Update README for v2

* Add Python 3.11 and 3.12 to CI

* Remove unneeded requirements file reference

* Docs updates

* Update linting and tests

* Fix lint

* Missed one

* Split out code quality job

* Hold on 3.12 for now

* Fix wrong conda environment command

* Fix option name

* Change back and remove python spec since it should already be in environment.yml

* Change hyperlinks to https that support it

* Update joblib link. Supersedes #251

* Remove Python 3.12 for now

* Pin Python version in project package metadata

* Use compatible release operator

---------

Co-authored-by: Jay Qi <jayqi@users.noreply.github.com>
* Add windows to CI

* Try different shebang per actions/runner-images#7253 (comment)

* Revert "Try different shebang per actions/runner-images#7253 (comment)"

This reverts commit 4a8f093.

* Try setting PATH

* Reduce matrix for testing

* Set default shell to bash

* Fix wrong syntax

* Explicitly set bash path in test

* Fix syntax error

* Fix mistake

* Try installing GNU make instead of using available mingw32-make

* Undo explicit bash executable

* Set conda executable

* Fix black

* Add conda directory to system paths

* Clearer phony declaration

* Add diagnostic printing

* More printing

* Check which make

* Try adding Git bin directory to path

* Explicit bash shell

* Try adding explicit PATH

* Try making path style consistent

* Explicit conda executable

* try using which

* Try Scripts directory for adding to PATH

* Try removing unnecessary conda stuff

* Separate check step

* Install from conda-forge

* Missing colon

* Try setup miniconda to see if it's faster

* Change default shell

* Use conda environment

* Skip which conda

* Add to path anyways

* Try micromamba

* Use mamba as conda executable

* Fix typo

* micromamba shell hook

* Missing quote

* Full micromamba path; add caching

* Try path instead

* Remove backslash

* Use mambaforge instead of micromamba

* Add conda to PATH

* Use conda activate

* Try permissions hack

* Remove unneeded packages

* Use different repo name per config

* Cleanup

* Fallbacks

* Fix backwards check

* Print test durations

* Try conda and defaults again

* Don't change shell

* Normal shell

* Clean up

* More cleanup

* More cleanup

---------

Co-authored-by: Jay Qi <jayqi@users.noreply.github.com>
@chrisjkuch chrisjkuch added this to the v2 milestone Oct 9, 2023
chrisjkuch and others added 5 commits October 13, 2023 09:25
* Make skeleton code optional

* Updates to skeleton code

* make lint pass

* add --profile black to isort command for black compatibility

* add --profile black to generated Makefile

* remove setup.py from linting/formatting;

* fix code scaffold tests; revert adding isort to project makefile

---------

Co-authored-by: Peter Bull <pjbull@gmail.com>
)

* create alternative mkdocs docs path and add option to use sphinx, mkdocs, or none

* add tests that docs folder looks correct

* add author if provided to mkdocs config

* fix yml typo

* make mkdocs default, do not remove sphinx yet

* reconfigure tests to cycle through all possible values for fields that are nominally independent

* change formatting

* cast docs paths to strings to satisfy shutil move in python 3.8

* remove sphinx

* remove docs folder tree; make docs removal generic
* Create new screencast automatically on docs build

* dev reqs

* Remove tree from replay

* Update docs/scripts/generate-termynal.py

Co-authored-by: Chris Kucharczyk <chris@drivendata.org>

* Update docs/scripts/generate-termynal.py

Co-authored-by: Chris Kucharczyk <chris@drivendata.org>

* Apply suggestions from code review

Co-authored-by: Chris Kucharczyk <chris@drivendata.org>

* Apply suggestions from code review

Co-authored-by: Chris Kucharczyk <chris@drivendata.org>

---------

Co-authored-by: Chris Kucharczyk <chris@drivendata.org>
* update python script and variable reference so help printing works on all platforms

* add blank make command testing output of available commands

* add test for makefile help text
* update docs to material theme

* update style and logo

* rearrange and update content

* docs/requirements.txt

* update workflow to skip if docs-only change, remove netlify config
chrisjkuch and others added 7 commits January 16, 2024 15:52
* change site structure to use multiple pages

* add navigation.instant

* remove padding override

* remove toc.follow

* revert content change
* add python 3.12 vm env to test suite and update pyproject.toml classifiers to indicate support

* Bump actions versions

* Swap out fake/abandoned jupyter metapackage for jupyterlab and notebook

* Try conda-forge

---------

Co-authored-by: Jay Qi <jayqi@users.noreply.github.com>
* update opinions

* fix dag link

* typos and formatting

* Update docs/docs/opinions.md

Co-authored-by: Jay Qi <2721979+jayqi@users.noreply.github.com>

* Update docs/docs/opinions.md

Co-authored-by: Jay Qi <2721979+jayqi@users.noreply.github.com>

* Update docs/docs/opinions.md

Co-authored-by: Jay Qi <2721979+jayqi@users.noreply.github.com>

* Update docs/docs/opinions.md

Co-authored-by: Jay Qi <2721979+jayqi@users.noreply.github.com>

* Update docs/docs/opinions.md

Co-authored-by: Jay Qi <2721979+jayqi@users.noreply.github.com>

* Update docs/docs/opinions.md

Co-authored-by: Jay Qi <2721979+jayqi@users.noreply.github.com>

* Update docs/docs/opinions.md

Co-authored-by: Jay Qi <2721979+jayqi@users.noreply.github.com>

* Update docs/docs/opinions.md

Co-authored-by: Jay Qi <2721979+jayqi@users.noreply.github.com>

* try rewrite of dag section

* formatting nits and adding subtitles

* Update docs/docs/opinions.md

Co-authored-by: Jay Qi <2721979+jayqi@users.noreply.github.com>

* Update docs/docs/opinions.md

Co-authored-by: Jay Qi <2721979+jayqi@users.noreply.github.com>

* Update docs/docs/opinions.md

Co-authored-by: Jay Qi <2721979+jayqi@users.noreply.github.com>

* Update docs/docs/opinions.md

Co-authored-by: Jay Qi <2721979+jayqi@users.noreply.github.com>

* Update docs/docs/opinions.md

Co-authored-by: Jay Qi <2721979+jayqi@users.noreply.github.com>

* Update docs/docs/opinions.md

Co-authored-by: Jay Qi <2721979+jayqi@users.noreply.github.com>

* Update docs/docs/opinions.md

Co-authored-by: Jay Qi <2721979+jayqi@users.noreply.github.com>

* Update docs/docs/opinions.md

Co-authored-by: Jay Qi <2721979+jayqi@users.noreply.github.com>

* Update docs/docs/opinions.md

Co-authored-by: Jay Qi <2721979+jayqi@users.noreply.github.com>

* fix link to contributing page

---------

Co-authored-by: Jay Qi <2721979+jayqi@users.noreply.github.com>
* Badge on docs updates

* default to CCDS template

* Style updates

* darken links a bit

* block quotes

* formatting and bare ccds

* Apply suggestions from code review

Co-authored-by: Chris Kucharczyk <chris@drivendata.org>

---------

Co-authored-by: Chris Kucharczyk <chris@drivendata.org>
* tweak code block formatting and color correctness

* update note infobox styles
@jayqi jayqi self-assigned this Apr 1, 2024
pjbull and others added 6 commits April 1, 2024 16:36
* Add commandline options table

* wack isort ordering

* Make sections

* Format
Co-authored-by: Jay Qi <jayqi@users.noreply.github.com>
* Fix typo

* Add instructions for Make on Windows

* Fix typo

* Copy edits

* Add note about help

* Consistent code formatting

---------

Co-authored-by: Jay Qi <jayqi@users.noreply.github.com>
* WIP

* Remove setuptools, add tqdm

* Lint

* Don't need setuptools or wheel

* Add comment fences

* Can't believe E266 is a thing

* Whitespace

* Add linting to tests

* Remove template from project linting and formatting

* Reorganize boilerplate modules

* Get rid of editable check

* Actually run linting

* Actually test linting

* Update verify_files test

* Update verify_folders

* Remove duplicate file

* Fix lint

---------

Co-authored-by: Jay Qi <jayqi@users.noreply.github.com>
* Review comments

* 3.8 minimum

* macos-13

* try setting up conda

* don't use imported variable

* Update docs/docs/opinions.md

Co-authored-by: Chris Kucharczyk <chris@drivendata.org>

---------

Co-authored-by: Chris Kucharczyk <chris@drivendata.org>
@pjbull pjbull merged commit 1a3d8a6 into master May 22, 2024
5 of 20 checks passed
@pjbull pjbull deleted the v2 branch May 22, 2024 16:53
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

9 participants