Skip to content

Commit

Permalink
Squashed 'stac-spec/' content from commit ebd1675
Browse files Browse the repository at this point in the history
git-subtree-dir: stac-spec
git-subtree-split: ebd1675
  • Loading branch information
duckontheweb committed Apr 20, 2021
0 parents commit b544f2d
Show file tree
Hide file tree
Showing 46 changed files with 5,405 additions and 0 deletions.
53 changes: 53 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
version: 2
jobs:
test_examples:
working_directory: ~/stac
docker:
- image: circleci/node:12
steps:
- checkout
- run:
name: install
command: npm install
- run:
name: validate
command: npm run check-examples
test_docs:
working_directory: ~/stac
docker:
- image: circleci/node:12
steps:
- checkout
- run:
name: install
command: npm install
- run:
name: validate
command: npm run check-markdown
publish_schemas:
working_directory: ~/stac
docker:
- image: circleci/node:12
steps:
- checkout
- run:
name: install
command: npm install
- add_ssh_keys:
fingerprints:
- "9b:0a:88:ff:12:d1:29:9a:ff:bb:72:ab:7d:81:df:59"
- run:
name: publish
command: npm run publish-schemas -- $CIRCLE_TAG
workflows:
version: 2
ci:
jobs:
- test_examples
- test_docs
- publish_schemas:
filters:
tags:
only: /^v.*/
branches:
ignore: /^((?!dev).)*$/
40 changes: 40 additions & 0 deletions .circleci/publish-schemas.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
const klaw = require('klaw-sync');
const path = require('path');
const fs = require('fs');
const ghpages = require('gh-pages');

function filterFn (item) {
const basename = path.basename(item.path);
return basename === '.' || basename === 'node_modules' || basename[0] !== '.';
}

let args = process.argv.slice(2);
let tag = 'dev';
if (args.length && args[0].trim().length > 0) {
tag = args[0];
}

var folder = '.';
var jsonSchemaFolderPattern = path.sep + 'json-schema' + path.sep;
for (let file of klaw(folder, {filter: filterFn})) {
if (file.path.includes(jsonSchemaFolderPattern) && path.extname(file.path) === '.json') {
let source = file.path;
let target = 'schemas' + path.sep + tag + path.sep + path.relative(folder, file.path);
fs.mkdirSync(path.dirname(target), { recursive: true });
fs.copyFileSync(source, target);
console.log(target);
}
}

ghpages.publish('schemas/' + tag, {
src: '**',
dest: tag,
message: 'Publish JSON Schemas [ci skip]',
user: {
name: 'STAC CI',
email: '[email protected]'
}
}, error => {
console.error(error ? error : 'Deployed to gh-pages');
process.exit(error ? 1 : 0);
});
46 changes: 46 additions & 0 deletions .circleci/rc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
plugins:
# Check links
- validate-links
# Apply some recommended defaults for consistency
- remark-preset-lint-consistent
- remark-preset-lint-recommended
# No HTML for security - can't activate yet due to STAC logo in README.md
# - lint-no-html
# General formatting
# - - remark-lint-emphasis-marker
# - '*'
- remark-lint-hard-break-spaces
- remark-lint-blockquote-indentation
- remark-lint-no-consecutive-blank-lines
# Detect overly long lines - be liberal for now and don't restrict to 80 yet
# - - remark-lint-maximum-line-length
# - 150
# Code
- remark-lint-fenced-code-flag
- remark-lint-fenced-code-marker
- remark-lint-no-shell-dollars
- - remark-lint-code-block-style
- 'fenced'
# Headings
- remark-lint-heading-increment
- remark-lint-no-duplicate-headings
- remark-lint-no-multiple-toplevel-headings
- remark-lint-no-heading-punctuation
- - remark-lint-maximum-heading-length
- 70
- - remark-lint-heading-style
- atx
# Lists
- remark-lint-list-item-bullet-indent
- remark-lint-ordered-list-marker-style
- remark-lint-ordered-list-marker-value
- remark-lint-checkbox-character-style
# - - remark-lint-unordered-list-marker-style
# - '-'
- - remark-lint-list-item-indent
- space
# Tables
- remark-lint-table-pipes
# - remark-lint-table-pipe-alignment # Wait for https://github.com/remarkjs/remark-lint/issues/226
# Urls
- remark-lint-no-literal-urls
14 changes: 14 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
**Related Issue(s):** #


**Proposed Changes:**

1.
2.

**PR Checklist:**

- [ ] This PR is made against the dev branch (all proposed changes except releases should be against dev, not master).
- [ ] This PR has **no** breaking changes.
- [ ] I have added my changes to the [CHANGELOG](https://github.com/radiantearth/stac-spec/blob/dev/CHANGELOG.md) **or** a CHANGELOG entry is not required.
- [ ] This PR affects the [STAC API spec](https://github.com/radiantearth/stac-api-spec), and I have opened issue/PR #XXX to track the change.
69 changes: 69 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/
package-lock.json

# Typescript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env

# next.js build output
.next

# IntelliJ IDEA files
.idea/
*.iml

# Folder created when CI puhlishes JSON Schemas
schemas/
1 change: 1 addition & 0 deletions .remarkignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/CHANGELOG.md
Loading

0 comments on commit b544f2d

Please sign in to comment.