setting up a new code project

[[writing-data]]

short version of set up for Good Research Code Handbook

Setting up the repository and file structure

in anaconda navigator (or from the command line), create a new conda environment for the project.

initialize git repo (where <URL> is the URL of the already-created github repo)

git init
remote add origin <URL>

create environment file
conda env export > environment.yml

load from environment file
conda env create --name <name> --file environment.yml

to make my preferred file structure
mkdir docs notebooks results src

configure .gitignore

*.egg -info
*data
*__pycache__
notebooks/*

Additional files for .gitignore convention in this stackexchange

setting up src to be a package

1. create setup.py in root

from setuptools import find_packages, setup

setup(
	name='src',
	packages=find_packages(),
)

2. create __init__.py in src (empty)

3. in the command line, do

pip install -e .

And you can now import src to import all the python things

Mentions

File
initializing a weights and biases project
network manifolds