Skip to content

Commit

Permalink
Version 2 (#246)
Browse files Browse the repository at this point in the history
* [WIP] New version with cleaner options (#162)

* 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>

* docs: add dev-requirements, remove tox.ini (#254)

* Formatting

* Docs and test cleanup

* 3.10 specificaiton

* Passing tests and lint

* testing improvements and hooks refactor

* Lint, format, license (#247)

* 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>

* Updating the Makefile

* Removing deprecation message from v2

* update pip, reqs, test CI commands

* Update docs build

* Revert netlify changes

* Use default netlify build runtime

* make gsutil rsync recursive (#297)

* make gsutil rsync recursive

* reformatted with black

* add threaded flag for gsutil rsync

* V2 bug fixes, modernization, house-keeping, and README update (#313)

* 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 (#319)

* 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>

* Optionally remove boilerplate in initial setup (#286)

* 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>

* Replace sphinx with mkdocs as default docs option, add none option (#295)

* 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 (#339)

* 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 Makefile help command to work on all platforms (#335)

* 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 (#341)

* 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

* write to tempfile instead of hardcoded dir to prevent unintended persistent files from mkdocs-gen-files

* Update docs to use multiple pages (#344)

* change site structure to use multiple pages

* add navigation.instant

* remove padding override

* remove toc.follow

* revert content change

* Add workflows for Python 3.12 (#329)

* 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 (#345)

* 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 + docs updates (#348)

* 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>

* Minor CSS Tweaks (#349)

* tweak code block formatting and color correctness

* update note infobox styles

* Add commandline options table (#350)

* Add commandline options table

* wack isort ordering

* Make sections

* Format

* Use shutil.copytree instead of distutils (#353)

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

* Add documentation about Make on Windows (#355)

* 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>

* V2 Modernize boilerplate (#354)

* 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>

* Updates from review of V2 docs (#362)

* 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>

---------

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>
Co-authored-by: Phil <4689707+tgrrr@users.noreply.github.com>
Co-authored-by: Tammy Glazer <47676359+tamara-glazer@users.noreply.github.com>
Co-authored-by: AllenDowney <downey@allendowney.com>
Co-authored-by: Kristian Bodolai <69843715+KBodolai@users.noreply.github.com>
Co-authored-by: Jay Qi <2721979+jayqi@users.noreply.github.com>
Co-authored-by: Chris Kucharczyk <chris@drivendata.org>
  • Loading branch information
17 people committed May 22, 2024
1 parent e395cbf commit 1a3d8a6
Show file tree
Hide file tree
Showing 82 changed files with 3,266 additions and 1,307 deletions.
117 changes: 117 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@

name: tests

on:
push:
branches: [master, v2]
paths-ignore: "docs/**"
pull_request:
branches: [master, v2]
paths-ignore: "docs/**"
schedule:
# Run every Sunday
- cron: "0 0 * * 0"
workflow_dispatch:

jobs:
code-quality:
name: Code Quality
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
cache: "pip"
cache-dependency-path: |
pyproject.toml
dev-requirements.txt
- name: Install dependencies
run: |
python -m pip install --upgrade pip
make requirements
- name: Lint
run: |
make lint
tests:
name: Tests (${{ matrix.os }}, Python ${{ matrix.python-version }})
needs: code-quality
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.8, 3.9, "3.10", "3.11", "3.12"]
defaults:
run:
shell: bash

steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
cache: "pip"
cache-dependency-path: |
pyproject.toml
dev-requirements.txt
- name: Set up Miniconda
uses: conda-incubator/setup-miniconda@v3
with:
auto-activate-base: true
activate-environment: ""

- name: Cache conda packages
uses: actions/cache@v4
env:
# Increase this value to reset cache explicitly
CACHE_NUMBER: 0
with:
path: ~/conda_pkgs_dir
key:
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{
hashFiles('ccds/hook_utils/dependencies.py') }}

- name: Setup for Windows
if: ${{ matrix.os == 'windows-latest' }}
run: |
# Install GNU make
choco install --verbose make
# Add conda binaries directory to PATH so that conda is accessible
echo "${CONDA}\Scripts" >> $GITHUB_PATH
# Set bash executable explicitly since Make may pick wrong shell
echo "BASH_EXECUTABLE=$(which bash)" >> "$GITHUB_ENV"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
make requirements
- name: Check dependencies
run: |
if [[ -z "${BASH_EXECUTABLE}" ]]; then
bash --version
else
echo $BASH_EXECUTABLE
$BASH_EXECUTABLE --version
fi
which make
make --version
which conda
conda --version
which pipenv
pipenv --version
which virtualenv
virtualenv --version
- name: Run tests
run: |
make test
178 changes: 173 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,177 @@
# generated docs items
docs/site/
docs/docs/_partials/termynal.md
docs/docs/_partials/*/*.html

# OSX Junk
# test cache
manual_test/

# other local dev info
.vscode/

# Mac OS-specific storage files
.DS_Store

# test cache
.cache/*
tests/__pycache__/*
*.pytest_cache/
# vim
*.swp
*.swo

## https://github.com/github/gitignore/blob/4488915eec0b3a45b5c63ead28f286819c0917de/Python.gitignore

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/#use-with-ide
.pdm.toml

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
66 changes: 66 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
.PHONY: _prep create_environment requirements format lint docs docs-serve test \
test-fastest test-debug-fastest _clean_manual_test manual-test manual-test-debug

## GLOBALS

PROJECT_NAME = cookiecutter-data-science
PYTHON_VERSION = 3.10
PYTHON_INTERPRETER = python


### UTILITIES
_prep:
rm -f **/*/.DS_store


### DEV COMMANDS

## Set up python interpreter environment
create_environment:
conda create --name $(PROJECT_NAME) python=$(PYTHON_VERSION) -y
@echo ">>> conda env created. Activate with:\nconda activate $(PROJECT_NAME)"

## Install Python Dependencies
requirements:
$(PYTHON_INTERPRETER) -m pip install -r dev-requirements.txt

## Format the code using isort and black
format:
isort --profile black ccds hooks tests docs/scripts
black ccds hooks tests docs/scripts

lint:
flake8 ccds hooks tests docs/scripts
isort --check --profile black ccds hooks tests docs/scripts
black --check ccds hooks tests docs/scripts


### DOCS

docs:
cd docs && mkdocs build

docs-serve:
cd docs && mkdocs serve

### TESTS

test: _prep
pytest -vvv --durations=0

test-fastest: _prep
pytest -vvv -FFF

test-debug-last:
pytest --lf --pdb

_clean_manual_test:
rm -rf manual_test

manual-test: _prep _clean_manual_test
mkdir -p manual_test
cd manual_test && python -m ccds ..

manual-test-debug: _prep _clean_manual_test
mkdir -p manual_test
cd manual_test && python -m pdb ../ccds/__main__.py ..
Loading

0 comments on commit 1a3d8a6

Please sign in to comment.