Skip to content

Commit

Permalink
README and repo layout
Browse files Browse the repository at this point in the history
  • Loading branch information
ross-spencer committed Aug 6, 2024
1 parent beb2dc0 commit 1b1745f
Show file tree
Hide file tree
Showing 9 changed files with 186 additions and 2 deletions.
9 changes: 9 additions & 0 deletions .codespellrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[codespell]
skip =
*.po,
*.ts,
tests/*
count =
quiet-level = 3
ignore-words-list =
cips
16 changes: 16 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# EditorConfig: https://EditorConfig.org. Provides sensible defaults for
# non vscode editors.

# top-most EditorConfig file
root = true

# Every file.
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true

indent_style = space
indent_size = 4

trim_trailing_whitespace = true
14 changes: 14 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: pre-commit

on:
pull_request:
push:
branches: [main]

jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: pre-commit/[email protected]
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.DS_Store
.docusaurus
build/
client/
node_modules/
package-lock.json
12 changes: 12 additions & 0 deletions .markdownlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

---
default: true

# Exceptions, example given, MD045
# MD045: false # allow image with no tag

# In-line HTML.
MD033: false
MD013:
line_length: 80
tables: false
19 changes: 19 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-yaml
- id: check-json
- id: check-toml
- id: end-of-file-fixer
exclude: ".svg"
- id: trailing-whitespace
- id: check-case-conflict
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.35.0
hooks:
- id: markdownlint
- repo: https://github.com/codespell-project/codespell
rev: v2.2.4
hooks:
- id: codespell
44 changes: 44 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"editor.insertSpaces": true,
"editor.tabSize": 4,
"editor.rulers": [
79
],
"editor.detectIndentation": false,
"files.trimTrailingWhitespace": true,
"files.insertFinalNewline": true,
"python.linting.mypyEnabled": false,
"python.linting.flake8Enabled": true,
"python.linting.pylintEnabled": true,
"python.linting.lintOnSave": true,
"git.inputValidationSubjectLength": 50,
"git.inputValidationLength": 72,
"[git-commit]": {
"editor.rulers": [
50,
72
]
},
"[markdown]": {
"editor.rulers": [80]
},
"files.eol": "\n",
"cSpell.words": [
"Arkly",
"Bagit",
"Cardano",
"CBOR",
"datapoints",
"disincentivizing",
"Minswap",
"permissionless",
"permissionlessly",
"POSIX",
"preprod",
"recordkeeping",
"Wingriders",
"bytearray",
"timeframe",
"pubkey"
]
}
15 changes: 15 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
.DEFAULT_GOAL := help

.PHONY: clean package package-deps package-source package-upload package-wheel tar-source

all-checks: ## Run all pre-commit checks
pre-commit run --all-files

spell: ## Run pre-commit spelling check
pre-commit run codespell --all-files

markdown: ## Run pre-commit makdown-lint
pre-commit run markdownlint --all-files

help: ## Print this help message
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
53 changes: 51 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,51 @@
# price-feeds
active Orcfax price-feeds
# Price Feeds

Describes active Orcfax feeds for Orcfax publishing and monitoring.

## Status

The document and repository are proposed standards for the Orcfax network for
the V1 rollout. We reserve the right to change the status and its content as our
network and client needs are better understood.

## Schema

<!--markdown-lint:disable-->

* **pair**: pair as described in-code, e.g. for the slug needed to trigger validation
* **label**: presentation label, e.g. for Orcfax explorer
* **interval**: heartbeat, in seconds, integer
* **deviation**: percentage deviation to monitor, integer, ex. `1` == `1%`
* **source**: ( `cex` | `dex` )
* **calculation**: ( `median` | `weighted mean` )
* **status**: (`sponsored` | `subsidized` | `showcase`)
* **type**: (`CER` ) `CER` == `currencyExchangeRate`

<!--markdown-lint:enable-->

Order of keys does not matter to JSON parsers, but it might provide important
visual cues to reviewers to maintain some consistency of ordering in this
document.

### Example

```json
{
"pair": "BASE-QUOTE",
"label": "BASE-QUOTE",
"interval": 3600,
"deviation": 2,
"source": "dex",
"calculation": "weighted mean",
"status": "showcase",
"type": "CER"
},
```

## Versioning

Calver is proposed. Changes should be made to the document locally. The metadata
should be updated with the anticipated calver number (`YYYY.MM.DD.NUMBER`) where
NUMBER represents the number of the release on a given day, e.g. if a feed is
updated twice in one day, the number will be `0002`. A tag should be created
and pushed for the version as part of publishing.

0 comments on commit 1b1745f

Please sign in to comment.