leaving out all other arg properties besides "type" to save space
"landcover_snapshot_csv": {
"type": "csv",
"structure": {
"columns": {
| """ | |
| Script to wrap multi-line text blocks in dictionaries. | |
| Made this for InVEST model ARGS_SPECs "about" properties since I'm | |
| moving things around and it's tedious to wrap them all by hand. | |
| This could be generalized to any multi-line text block or an entire file. | |
| """ | |
| import ast | |
| import importlib | |
| import textwrap |
| from natcap.invest import carbon | |
| def format_spec(name, spec): | |
| """Format an arg spec or subsection of an arg spec into text. | |
| Works for the entire args spec, or any nested dictionary within it (individual args or parts of args). | |
| This way, the generated content can be combined into the existing user's guide | |
| at whatever level makes sense for each situation. |
| import numpy | |
| import multiprocessing | |
| array_in = numpy.empty(1, dtype='datetime64,f4') | |
| print(array_in.dtype['f0'].metadata) # prints None | |
| # if you use queue.Queue instead, this doesn't happen | |
| q = multiprocessing.Queue() | |
| q.put(array_in) |
| #!/bin/bash | |
| # Setup for a new EC2 instance for testing Dockstore | |
| # Install Dockstore (from https://staging.dockstore.org/quick-start)--------------------------------------------------------- | |
| # Install Java 11: | |
| sudo apt-get update | |
| sudo apt install -y openjdk-11-jdk | |
| #Install the dockstore command-line program and add it to the path. |