LSSTDESC / start_paper

Make a folder containing everything you need to start writing an LSST DESC paper or Note
BSD 3-Clause "New" or "Revised" License
11 stars 4 forks source link

Should cookiecutter increment serial_number? #30

Closed kadrlica closed 7 years ago

kadrlica commented 7 years ago

If I already have a folder named 0000-paper_title then it seems like cookiecutter should detect this an increment the serial number, i.e., download my new paper to 0001-paper_title. Currently, if I trying to just hit return through everything I get:

Error: "0000-paper_title" directory already exists
jonathansick commented 7 years ago

There are two parts to this:

  1. Getting this type of logic into cookiecutter problably requires us to write a front-end that wraps cookiecutter and injects additional values into the Jinja2 template environment. Something like: http://cookiecutter.readthedocs.io/en/latest/advanced/injecting_content.html
  2. If the numbers are global across DESC (I think they are), then you'll want to have a centralized server tell clients like cookiecutter what the next available serial number is. In LSST DM we'll be using DocHub's API for this (eventually).
kadrlica commented 7 years ago

Since we have moved away from cookiecutter, I think this issue can be closed in accord with #65.