Skip to content

Commit 235d27b

Browse files
authored
Merge pull request #181 from hackalog/minor_cleanups
Minor cleanups
2 parents 6c390a5 + c9daab8 commit 235d27b

5 files changed

Lines changed: 18 additions & 23 deletions

File tree

cookiecutter.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
"author_name": "Your name (or your organization/company/team)",
66
"description": "A short description of this project.",
77
"open_source_license": ["MIT", "BSD-2-Clause", "Proprietary"],
8-
"virtualenv": ["conda"],
9-
"python_version": ["latest", "3.8", "3.7", "3.6"],
8+
"python_version": ["3.7", "3.6", "latest", "3.8"],
109
"conda_path": "~/anaconda3/bin/conda"
1110
}

{{ cookiecutter.repo_name }}/.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,9 @@ target/
7575
# Jupyter NB Checkpoints
7676
.ipynb_checkpoints/
7777

78-
# exclude data from source control by default
78+
# exclude data and local config from source control by default
7979
/data/
80+
catalog/config.ini
8081

8182
# Mac OS-specific storage files
8283
.DS_Store

{{ cookiecutter.repo_name }}/.post-create-environment.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
NOTE: By default, raw data is installed and unpacked in the
44
`{{ cookiecutter.repo_name}}/data` directory. If you are working with big data (or
5-
have a small disk partition), it is HIGHLY recommended that you move
6-
this directory elsewhere; i.e. either move it and leave a symlink
7-
behind, or change its location by setting {{ cookiecutter.module_name }}.paths['data_path']
8-
accordingly.
5+
have a small disk partition), it is HIGHLY recommended that you point
6+
this directory elsewhere; i.e. by setting paths['data_path']. For example:
7+
>>> conda activate {{ cookiecutter.repo_name }}
8+
>>> python -c "import {{ cookiecutter.module_name }}; {{ cookiecutter.module_name }}.paths['data_path'] = '/path/to/big/data'"
99

1010
You have been warned.

{{ cookiecutter.repo_name }}/Makefile

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -108,25 +108,20 @@ debug:
108108
@echo "\n\n======================"
109109
@echo "\nPlease include the contents $(DEBUG_FILE) when submitting an issue or support request.\n"
110110
@echo "======================\n\n"
111-
@echo "\n======================\n">> $(DEBUG_FILE)
112-
@echo "Git status" >> $(DEBUG_FILE)
113-
@echo "\n======================\n">> $(DEBUG_FILE)
111+
@echo "##\n## Git status\n##\n" > $(DEBUG_FILE)
114112
git status >> $(DEBUG_FILE)
115-
@echo "\n======================\n" >> $(DEBUG_FILE)
113+
@echo "\n##\n## git log\n##\n" >> $(DEBUG_FILE)
116114
git log -8 --graph --oneline --decorate --all >> $(DEBUG_FILE)
117-
@echo "\n======================\n" >> $(DEBUG_FILE)
118-
@echo "\n======================\n" >> $(DEBUG_FILE)
119-
@echo "Github status" >> $(DEBUG_FILE)
120-
@echo "\n======================\n" >> $(DEBUG_FILE)
115+
@echo "\n##\n## Github remotes\n##\n" >> $(DEBUG_FILE)
121116
git remote -v >> $(DEBUG_FILE)
122-
@echo "\n======================\n" >> $(DEBUG_FILE)
117+
@echo "\n##\n## github SSH credentials\n##\n" >> $(DEBUG_FILE)
123118
ssh git@github.com 2>&1 | cat >> $(DEBUG_FILE)
124-
@echo "\n======================\n" >> $(DEBUG_FILE)
125-
@echo "\n======================\n" >> $(DEBUG_FILE)
126-
@echo "Environment status" >> $(DEBUG_FILE)
127-
@echo "\n======================\n" >> $(DEBUG_FILE)
119+
@echo "\n##\n## Conda config\n##\n" >> $(DEBUG_FILE)
120+
$(CONDA_EXE) config --get >> $(DEBUG_FILE)
121+
@echo "\n##\n## Conda info\n##\n" >> $(DEBUG_FILE)
122+
$(CONDA_EXE) info >> $(DEBUG_FILE)
123+
@echo "\n##\n## Conda list\n##\n" >> $(DEBUG_FILE)
128124
$(CONDA_EXE) list >> $(DEBUG_FILE)
129-
@echo "\n======================\n" >> $(DEBUG_FILE)
130125

131126
#################################################################################
132127
# PROJECT RULES #
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
ARCH := $(shell arch)
21
CONDA_EXE ?= {{ cookiecutter.conda_path }}
32
DEBUG_FILE := debug.txt
43
MODULE_NAME := {{ cookiecutter.module_name }}
54
TESTS_NO_CI = $(MODULE_NAME)/tests/no_ci
65
PROJECT_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
76
PROJECT_NAME := {{ cookiecutter.repo_name }}
87
PYTHON_INTERPRETER := python3
9-
VIRTUALENV := {{ cookiecutter.virtualenv }}
8+
ARCH := $(shell $(PYTHON_INTERPRETER) -c "import platform; print(platform.platform())")
9+
VIRTUALENV := conda

0 commit comments

Comments
 (0)