Giter Club home page Giter Club logo

lsst-technote-bootstrap's Introduction

lsst-technote-bootstrap

lsst-technote-bootstrap is a template for LSST technical notes that are written in reStructuredText, generated with Sphinx, and deployed to the web with LSST the Docs.

To create an LSST technote, use the @sqrbot command on Slack: https://developer.lsst.io/docs/technotes.html#create-a-restructuredtext-technote.

For background on the DM technote platform, see SQR-000.

Running this cookiecutter for development

This cookiecutter project should only be invoked manually for development. To create and publish a technote, follow the instructions linked above.

The following instructions are for template developers.

1. Install cookiecutter

Install cookiecutter via:

pip install cookiecutter

2. Run cookiecutter

Start a new technote project in a convenient directory. Run this command (verbatim):

cookiecutter https://github.com/lsst-sqre/lsst-technote-bootstrap.git

(Alternatively you can git clone this repository and run cookiecutter directly on it: cookiecutter lsst-technote-bootstrap).

Answer the prompts, and you'll have a brand new technote project. The prompts are documented below.

Note: If you're running cookiecutter with Python 3, you might get a RuntimeError:

RuntimeError: Click will abort further execution because Python 3 was configured to use ASCII as encoding for the environment.  Either run this under Python 2 or consult http://click.pocoo.org/python3/ for mitigation steps.

See Cookiecutter and Python 3 for a solution.

Configuration prompts

This section describes the content expected by the prompts when running cookiecutter to create a new technote project.

  • first_author: The first author's name, formatted as "First Last". You can edit metadata.yaml to add additional authors.
  • series: The technote series, which can be
    • SQR for SQuaRE technical notes
    • DMTN for Data Management technical notes
    • SMTN for Simulations Group technical notes
  • serial_number: the serial number. Use three digits padded with zeros.
  • title: Title of the technote.
  • github_org: The GitHub organization where this technote resides, which can be
    • lsst-dm for the DM DMTN series
    • lsst-sqre for the SQuaRE SQR series
    • lsst-sims for the Simulations Group's SMTN series
  • github_namespace: This is the expected GitHub URL of the technote, minus the 'github.com/' prefix. For example, lsst-sqre/sqr-000.
  • docushare_url: The URL of the technote on Docushare, if the canonical version is stored there. If Docushare is not used, leave this field blank.
  • description: This should be a short, 1-2 sentence description of the technote. This description is placed just below the title in the README.
  • copyright_year: Should be the current year for new projects
  • copyright_holder: Should your institution (For example Association of Universities for Research in Astronomy, Inc. or University of Washington).

Note that errors when entering cookiecutter prompts can be easily fixed by editing the index.rst, README.rst and metadata.yaml files in the generated technote project.

Cookiecutter and Python 3

Depending on how your shell is set up, you may get this error when running cookiecutter under Python 3:

RuntimeError: Click will abort further execution because Python 3 was configured to use ASCII as encoding for the environment.  Either run this under Python 2 or consult http://click.pocoo.org/python3/ for mitigation steps.

To solve this, you need to set your shell's locale to use UTF-8. Type these lines into your shell:

export LC_ALL=en_US.utf-8
export LANG=en_US.utf-8

This will work on macOS. Linux distributions may be different (try C.UTF-8).

After the locale is set, re-try the cookiecutter command.


Copyright 2015-2018 Association of Universities for Research in Astronomy, Inc.

lsst-technote-bootstrap is open source (MIT license).

lsst-technote-bootstrap's People

Contributors

athornton avatar frossie avatar jonathansick avatar wmwv avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lsst-technote-bootstrap's Issues

Error message: 'dict object' has no attribute 'release_date'

@jonathansick I'm trying out your technote startup script, and hit the problem below. Any ideas what went wrong?

pjm@PPA-PC92478 > cookiecutter https://github.com/lsst-sqre/lsst-technote-bootstrap.git
Cloning into 'lsst-technote-bootstrap'...
remote: Counting objects: 119, done.
remote: Total 119 (delta 0), reused 0 (delta 0), pack-reused 119
Receiving objects: 100% (119/119), 31.73 KiB | 0 bytes/s, done.
Resolving deltas: 100% (62/62), done.
Checking connectivity... done.
first_author [First Last]: Phil Marshall
Select series:
1 - SQR
2 - DMTN
3 - SMTN
Choose from 1, 2, 3 [1]: 2
serial_number [000]: 037
title [Document Title]: DESC Notes: Guidelines for Authors
repo_name [dmtn-037]: descnotes-037
Select github_org:
1 - lsst-sqre
2 - lsst-dm
3 - lsst-sims
Choose from 1, 2, 3 [1]: 2
github_namespace [lsst-dm/descnotes-037]:
docushare_url []:
url [http://dmtn-037.lsst.io]:
description [A short description of this document]: A short description would go here.
copyright_year [2016]:
copyright_holder [AURA/LSST]: LSST DESC
Unable to create file 'metadata.yaml'
Error message: 'dict object' has no attribute 'release_date'
Context: {
"cookiecutter": {
"copyright_holder": "LSST DESC",
"copyright_year": "2016",
"description": "A short description would go here.",
"docushare_url": "",
"first_author": "Phil Marshall",
"github_namespace": "lsst-dm/descnotes-037",
"github_org": "lsst-dm",
"repo_name": "descnotes-037",
"serial_number": "037",
"series": "DMTN",
"title": "DESC Notes: Guidelines for Authors",
"url": "http://dmtn-037.lsst.io"
}
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.