Scaffolding tools for creating and maintaining projects based on Twitter Open Source standards and best practices. The project has 3 parts -
- Cookiecutter template to generate Twitter OSS policy files e.g. LICENSE, CONTRIBUTING, etc.
- Script to add License headers to all source files in a project
- Lint a repository for common missing files (repolinter)
A cookiecutter template to generate necessary files for a Twitter Open Source project.
Install cookiecutter
command line: pip install cookiecutter
pip
is the package manager for Python.
Note: cookiecutter
can be installed with both pip
and pip3
.
Run cookiecutter against this repository.
cookiecutter https://github.com/twitter/repo-scaffolding
or
cookiecutter gh:twitter/repo-scaffolding
or
You can also run it locally after cloning this repository:
cookiecutter /path/to/directory/
See documentation for more usage instructions.
See cookiecutter.json for all the variables required as input. Here is the list of places they are used
author_full_name
: 1 time inREADME.md
in theAuthors
section.author_email
: 1 time inREADME.md
in theAuthors
sectionproject_slug
: 1 time inREADME.md
and also for the name of the parent directorygithub_repo_url
: 2 times inREADME.md
and 4 times inCONTRIBUTING.md
for the GitHub repo linksshort_description
: 1 time inREADME.md
project_homepage
: 1 time inREADME.md
documentation_homepage
: 1 time inREADME.md
mailing_list
: 1 time inREADME.md
release_year
: 1 time inLICENSE
and 1 time inREADME.md
- Make sure to update the
TODO
sections inREADME.md
andCONTRIBUTING.md
after generating the files
A script to add license headers to all the source files of a project. It is designed to be safe, so do not worry and try it out!
pip install git+git://github.com/twitter/repo-scaffolding
Or clone the repository and run
python setup.py install
$ add_license_headers <path_to_source_dir>
Lint all the necessary files in the project. - Project Homepage
- To run against a directory, use
npx repolinter /my/code/dir
- To run against a git repository, use the --git option:
npx repolinter --git https://my.git.code/awesome
- Note, if you are running a version of npm < 5.2.0, run
npm install npx
first.
- TwitterOSS <opensource [at] twitter [dot] com>
Follow @TwitterOSS on Twitter for updates.