diff --git a/.gitignore b/.gitignore index 2377f5e..358537f 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ dist/ venv/ venv-numismatic/ data/ +docs/build diff --git a/AUTHORS.rst b/AUTHORS.rst new file mode 100644 index 0000000..7d39258 --- /dev/null +++ b/AUTHORS.rst @@ -0,0 +1,3 @@ +Credits +======= +`` Numismatic`` is written and maintained by `Tobias Brandt` and `Barry Steyn `_. \ No newline at end of file diff --git a/CHANGELOG.rst b/CHANGELOG.rst new file mode 100644 index 0000000..a5693d9 --- /dev/null +++ b/CHANGELOG.rst @@ -0,0 +1,2 @@ +Changelog +========= diff --git a/CODE_OF_CONDUCT.rst b/CODE_OF_CONDUCT.rst new file mode 100644 index 0000000..aa4d3e8 --- /dev/null +++ b/CODE_OF_CONDUCT.rst @@ -0,0 +1,55 @@ +Contributor Covenant Code of Conduct +==================================== + +Our Pledge +---------- + +In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to make participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. + +Our Standards +------------- + +Examples of behavior that contributes to creating a positive environment include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a professional setting + +Our Responsibilities +-------------------- + +Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. + +Scope +----- + +This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. +Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. +Representation of a project may be further defined and clarified by project maintainers. + +Enforcement +----------- + +Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team over GitHub. +All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. +The project team is obligated to maintain confidentiality with regard to the reporter of an incident. +Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. + +Attribution +----------- + +This Code of Conduct is adapted from the `Contributor Covenant `_, version 1.4, available at http://contributor-covenant.org/version/1/4. \ No newline at end of file diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst new file mode 100644 index 0000000..d6730fd --- /dev/null +++ b/CONTRIBUTING.rst @@ -0,0 +1,156 @@ +How To Contribute +================= + +First off, thank you for considering contributing to ``Numismatic``! +It's people like *you* who make it is such a great tool for everyone. + +This document is mainly to help you to get started by codifying tribal knowledge and expectations and make it more accessible to everyone. +But don't be afraid to open half-finished PRs and ask questions if something is unclear! + +Workflow +-------- + +- No contribution is too small! + Please submit as many fixes for typos and grammar bloopers as you can! +- Try to limit each pull request to *one* change only. +- *Always* add tests and docs for your code. + This is a hard rule; patches with missing tests or documentation can't be merged. +- Make sure your changes pass our CI_. + You won't get any feedback until it's green unless you ask for it. +- Once you've addressed review feedback, make sure to bump the pull request with a short note, so we know you're done. +- Don’t break `backward compatibility`_. + + +Code +---- + +- Obey `PEP 8`_ and `PEP 257`_. + We use the ``"""``\ -on-separate-lines style for docstrings: + + .. code-block:: python + + def func(x): + """ + Do something. + + :param str x: A very important parameter. + + :rtype: str + """ +- If you add or change public APIs, tag the docstring using ``.. versionadded:: 16.0.0 WHAT`` or ``.. versionchanged:: 16.2.0 WHAT``. +- Prefer double quotes (``"``) over single quotes (``'``) unless the string contains double quotes itself. + + +Tests +----- + +- Write your asserts as ``expected == actual`` to line them up nicely: + + .. code-block:: python + + x = f() + + assert 42 == x.some_attribute + assert "foo" == x._a_private_attribute + +- To run the test suite, all you need is a recent tox_. + It will ensure the test suite runs with all dependencies against all Python versions just as it will on Travis CI. + If you lack some Python versions, you can can always limit the environments like ``tox -e py27,py35`` (in that case you may want to look into pyenv_, which makes it very easy to install many different Python versions in parallel). +- Write `good test docstrings`_. +- To ensure new features work well with the rest of the system, they should be also added to our `Hypothesis`_ testing strategy which you find in ``tests/util.py``. + + +Documentation +------------- + +- Use `semantic newlines`_ in reStructuredText_ files (files ending in ``.rst``): + + .. code-block:: rst + + This is a sentence. + This is another sentence. + +- If you start a new section, add two blank lines before and one blank line after the header except if two headers follow immediately after each other: + + .. code-block:: rst + + Last line of previous section. + + + Header of New Top Section + ------------------------- + + Header of New Section + ^^^^^^^^^^^^^^^^^^^^^ + + First line of new section. +- If you add a new feature, demonstrate its awesomeness in the `examples page`_! + + +Changelog +^^^^^^^^^ + +If your change is noteworthy, there needs to be a changelog entry, so our users can learn about it! + +To avoid merge conflicts, we use the towncrier_ package to manage our changelog. +``towncrier`` uses independent files for each pull request -- so called *news fragments* -- instead of one monolithic changelog file. +On release those news fragments are compiled into our ``CHANGELOG.rst``. + +You don't need to install ``towncrier`` yourself, you just have to abide to a few simple rules: + +- For each pull request, add a new file into ``changelog.d`` with a filename adhering to the ``pr#.(change|deprecation|breaking).rst`` schema: + For example ``changelog.d/42.change.rst`` for a non-breaking change, that is proposed in pull request number 42. +- As with other docs, please use `semantic newlines`_ within news fragments. +- Wrap symbols like modules, functions, or classes into double backticks so they are rendered in a monospaced font. +- If you mention functions or other callables, add parantheses at the end of their names: ``attr.func()`` or ``attr.Class.method()``. + This makes the changelog a lot more readable. +- Prefer simple past or constructions with "now". + For example: + + + Added ``attr.validators.func()``. + + ``attr.func()`` now doesn't crash the Large Hadron Collider anymore. +- If you want to reference multiple issues, copy the news fragment to another filename. + ``towncrier`` will merge all news fragments with identical contents into one entry with multiple links to the respective pull requests. + +Example entries: + + .. code-block:: rst + + Added ``attr.validators.func()``. + The feature really *is* awesome. + +or: + + .. code-block:: rst + + ``attr.func()`` now doesn't crash the Large Hadron Collider anymore. + The bug really *was* nasty. + +---- + +``tox -e changelog`` will render the current changelog to the terminal if you have any doubts. + + +Local Development Environment +----------------------------- + + + +Governance +---------- + +``Numismatic`` is maintained by `team of volunteers`_ that is always open for new members that share our vision of a fast, lean, and magic-free library that empowers programmers to write better code with less effort. +If you'd like to join, just get a pull request merged and ask to be added in the very same pull request! + +**The simple rule is that everyone is welcome to review/merge pull requests of others but nobody is allowed to merge their own code.** + +`Hynek Schlawack`_ acts reluctantly as the BDFL_ and has the final say over design decisions. + + +**** + +Please note that this project is released with a Contributor `Code of Conduct`_. +By participating in this project you agree to abide by its terms. +Please report any harm to `Hynek Schlawack`_ in any way you find appropriate. + +Thank you for considering contributing to ``Numismatic``! diff --git a/LICENSE.txt b/LICENSE similarity index 94% rename from LICENSE.txt rename to LICENSE index 0408dc7..e5031ca 100644 --- a/LICENSE.txt +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2017 Tobias Brandt +Copyright (c) 2017 Tobias Brandt & Barry Steyn Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +SOFTWARE. \ No newline at end of file diff --git a/PULL_REQUEST_TEMPLATE.md b/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..34c468e --- /dev/null +++ b/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,12 @@ +# Pull Request Check List + +This is just a reminder about the most common mistakes. Please make sure that you tick all *appropriate* boxes. But please read our [contribution guide](http://www.attrs.org/en/latest/contributing.html) at least once, it will save you unnecessary review cycles! + +- [ ] Added **tests** for changed code. +- [ ] New features have been added to our [Hypothesis testing strategy](https://github.com/python-attrs/attrs/blob/master/tests/utils.py). +- [ ] Updated **documentation** for changed code. +- [ ] Documentation in `.rst` files is written using [semantic newlines](http://rhodesmill.org/brandon/2012/one-sentence-per-line/). +- [ ] Changed/added classes/methods/functions have appropriate `versionadded`, `versionchanged`, or `deprecated` [directives](http://www.sphinx-doc.org/en/stable/markup/para.html#directive-versionadded). +- [ ] Changes (and possible deprecations) have news fragments in [`changelog.d`](https://github.com/python-attrs/attrs/blob/master/changelog.d). + +If you have *any* questions to *any* of the points above, just **submit and ask**! This checklist is here to *help* you, not to deter you from contributing! diff --git a/docs/Makefile b/docs/Makefile new file mode 100644 index 0000000..2d25397 --- /dev/null +++ b/docs/Makefile @@ -0,0 +1,20 @@ +# Minimal makefile for Sphinx documentation +# + +# You can set these variables from the command line. +SPHINXOPTS = +SPHINXBUILD = sphinx-build +SPHINXPROJ = Numismatic +SOURCEDIR = source +BUILDDIR = build + +# Put it first so that "make" without argument is like "make help". +help: + @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + +.PHONY: help Makefile + +# Catch-all target: route all unknown targets to Sphinx using the new +# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). +%: Makefile + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) \ No newline at end of file diff --git a/docs/datafeeds/cryptocompare_api.json b/docs/datafeeds/cryptocompare_api.json deleted file mode 100644 index 848f420..0000000 --- a/docs/datafeeds/cryptocompare_api.json +++ /dev/null @@ -1,1032 +0,0 @@ -{ - "Called": "/", - "Message": "Min API Options, works with all symbols, for more options see https://www.cryptocompare.com/api/. If you are requesting signed messages (&signed=true), the public key for the signature verification is: a0f4f688350018ad1b9785991c0bde5f704b005dc79972b114dbed4a615a983710bfc647ebe5a320daa28771dce6a2d104f5efa2e4a85ba3760b76d46f8571ca", - "AvailableCalls": { - "Price": { - "Single": { - "Simple": "https://min-api.cryptocompare.com/data/price?fsym=BTC&tsyms=USD,EUR", - "Info": { - "Description": "Get the current price of any cryptocurrency in any other currency that you need.If the crypto does not trade directly into the toSymbol requested, BTC will be used for conversion.If the oposite pair trades we invert it (eg.: BTC-XMR)", - "Parameters": [ - { - "name": "tryConversion", - "type": "bool", - "required": false, - "defaultVal": true, - "info": "If set to false, it will try to get values without using any conversion at all" - }, - { - "name": "fsym", - "type": "string", - "required": true, - "minLen": 1, - "maxLen": 10, - "transform": "Uppercase", - "extraValidation": "KeyInGlobalInfo" - }, - { - "name": "tsyms", - "type": "string", - "required": true, - "minLen": 1, - "maxLen": 100, - "transform": "Uppercase", - "eliminateDuplicates": true, - "extraValidation": "KeysInTradePairsOrConversionSymbolTradePairs", - "baseKey": "fsym" - }, - { - "name": "e", - "type": "string", - "required": false, - "defaultVal": "CCCAGG", - "minLen": 2, - "maxLen": 30, - "extraValidation": "MarketInPairsMarketList" - }, - { - "name": "extraParams", - "type": "string", - "required": false, - "defaultVal": "NotAvailable", - "minLen": 1, - "maxLen": 50 - }, - { - "name": "sign", - "type": "bool", - "required": false, - "defaultVal": false, - "info": "If set to true, the server will sign the requests." - } - ], - "Examples": [ - "https://min-api.cryptocompare.com/data/price?fsym=ETH&tsyms=BTC,USD,EUR", - "https://min-api.cryptocompare.com/data/price?fsym=ETH&tsyms=BTC,USD,EUR&extraParams=your_app_name", - "https://min-api.cryptocompare.com/data/price?fsym=BTC&tsyms=XMR,ETH,ZEC&extraParams=your_app_name", - "https://min-api.cryptocompare.com/data/price?fsym=ETH&tsyms=XMR,REP,ZEC&extraParams=your_app_name", - "https://min-api.cryptocompare.com/data/price?fsym=BTC&tsyms=USD,EUR&e=Coinbase&extraParams=your_app_name" - ], - "CacheDuration": "10 seconds" - } - }, - "Multi": { - "Simple": "https://min-api.cryptocompare.com/data/pricemulti?fsyms=BTC,ETH&tsyms=USD,EUR", - "Info": { - "Description": "Same as single API path but with multiple from symbols.", - "Parameters": [ - { - "name": "tryConversion", - "type": "bool", - "required": false, - "defaultVal": true, - "info": "If set to false, it will try to get values without using any conversion at all" - }, - { - "name": "fsyms", - "type": "string", - "required": true, - "minLen": 1, - "maxLen": 300, - "transform": "Uppercase", - "eliminateDuplicates": true, - "extraValidation": "KeysInGlobalInfo" - }, - { - "name": "tsyms", - "type": "string", - "required": true, - "minLen": 1, - "maxLen": 100, - "transform": "Uppercase", - "eliminateDuplicates": true, - "extraValidation": "KeysInAtLeastOneTradePairOrConversionSymbolTradePairs", - "baseKey": "fsyms" - }, - { - "name": "e", - "type": "string", - "required": false, - "defaultVal": "CCCAGG", - "minLen": 2, - "maxLen": 30, - "extraValidation": "MarketInPairsMarketList" - }, - { - "name": "extraParams", - "type": "string", - "required": false, - "defaultVal": "NotAvailable", - "minLen": 1, - "maxLen": 50 - }, - { - "name": "sign", - "type": "bool", - "required": false, - "defaultVal": false, - "info": "If set to true, the server will sign the requests." - } - ], - "Examples": [ - "https://min-api.cryptocompare.com/data/pricemulti?fsyms=ETH,DASH&tsyms=BTC,USD,EUR", - "https://min-api.cryptocompare.com/data/pricemulti?fsyms=ETH,DASH&tsyms=BTC,USD,EUR&extraParams=your_app_name", - "https://min-api.cryptocompare.com/data/pricemulti?fsyms=REP,BTC&tsyms=USD,XMR&extraParams=your_app_name", - "https://min-api.cryptocompare.com/data/pricemulti?fsyms=BTC,ETH&tsyms=USD&e=Coinbase&extraParams=your_app_name" - ], - "CacheDuration": "10 seconds" - } - }, - "PriceHistorical": { - "Simple": "https://min-api.cryptocompare.com/data/pricehistorical?fsym=BTC&tsyms=USD,EUR", - "Info": { - "Description": "Get the price of any cryptocurrency in any other currency that you need at a given timestamp.The price comes from the daily info - so it would be the price at the end of the day GMT based on the requested TS.If the crypto does not trade directly into the toSymbol requested, BTC will be used for conversion.Tries to get direct trading pair data, if there is none or it is more than 10 days before the ts requested, it uses BTC conversion.If the oposite pair trades we invert it (eg.: BTC-XMR)The calculation types are: Close - a Close of the day close price,MidHighLow - the average between the 24 H high and low.VolFVolT - the total volume to / the total volume from", - "Parameters": [ - { - "name": "tryConversion", - "type": "bool", - "required": false, - "defaultVal": true, - "info": "If set to false, it will try to get values without using any conversion at all" - }, - { - "name": "fsym", - "type": "string", - "required": true, - "minLen": 1, - "maxLen": 10, - "transform": "Uppercase", - "extraValidation": "KeyInGlobalInfo" - }, - { - "name": "tsyms", - "type": "string", - "required": true, - "minLen": 1, - "maxLen": 30, - "transform": "Uppercase", - "eliminateDuplicates": true, - "extraValidation": "KeysInTradePairsOrConversionSymbolTradePairs", - "baseKey": "fsym" - }, - { - "name": "ts", - "type": "timestamp", - "required": false, - "extraValidation": "roundDownTs", - "secondsInUnit": 86400, - "cacheLength": 3600, - "unit": "day" - }, - { - "name": "e", - "type": "string", - "required": false, - "defaultVal": "CCCAGG", - "minLen": 2, - "maxLen": 30, - "extraValidation": "MarketInPairsMarketList" - }, - { - "name": "extraParams", - "type": "string", - "required": false, - "defaultVal": "NotAvailable", - "minLen": 1, - "maxLen": 50 - }, - { - "name": "calculationType", - "type": "string", - "required": false, - "defaultVal": "Close", - "minLen": 2, - "maxLen": 30, - "extraValidation": "PriceHistoricalCalculationType" - }, - { - "name": "sign", - "type": "bool", - "required": false, - "defaultVal": false, - "info": "If set to true, the server will sign the requests." - } - ], - "Examples": [ - "https://min-api.cryptocompare.com/data/pricehistorical?fsym=BTC&tsyms=USD,EUR&ts=1452680400", - "https://min-api.cryptocompare.com/data/pricehistorical?fsym=ETH&tsyms=BTC,USD,EUR&ts=1452680400&extraParams=your_app_name", - "https://min-api.cryptocompare.com/data/pricehistorical?fsym=DASH&tsyms=ZEC&extraParams=your_app_name", - "https://min-api.cryptocompare.com/data/pricehistorical?fsym=XMR&tsyms=ZEC,EUR&ts=1452680400&extraParams=your_app_name", - "https://min-api.cryptocompare.com/data/pricehistorical?fsym=BTC&tsyms=USD,EUR&e=Coinbase&ts=1452680400&extraParams=your_app_name" - ], - "CacheDuration": "3600 seconds" - } - }, - "MultiFull": { - "Simple": "https://min-api.cryptocompare.com/data/pricemultifull?fsyms=BTC&tsyms=USD,EUR", - "Info": { - "Description": "Get all the current trading info (price, vol, open, high, low etc) of any list of cryptocurrencies in any other currency that you need.If the crypto does not trade directly into the toSymbol requested, BTC will be used for conversion. This API also returns Display values for all the fields.If the oposite pair trades we invert it (eg.: BTC-XMR)", - "Parameters": [ - { - "name": "tryConversion", - "type": "bool", - "required": false, - "defaultVal": true, - "info": "If set to false, it will try to get values without using any conversion at all" - }, - { - "name": "fsyms", - "type": "string", - "required": true, - "minLen": 1, - "maxLen": 300, - "transform": "Uppercase", - "eliminateDuplicates": true, - "extraValidation": "KeysInGlobalInfo" - }, - { - "name": "tsyms", - "type": "string", - "required": true, - "minLen": 1, - "maxLen": 100, - "transform": "Uppercase", - "eliminateDuplicates": true, - "extraValidation": "KeysInAtLeastOneTradePairOrConversionSymbolTradePairs", - "baseKey": "fsyms" - }, - { - "name": "e", - "type": "string", - "required": false, - "defaultVal": "CCCAGG", - "minLen": 2, - "maxLen": 30, - "extraValidation": "MarketInPairsMarketList" - }, - { - "name": "extraParams", - "type": "string", - "required": false, - "defaultVal": "NotAvailable", - "minLen": 1, - "maxLen": 50 - }, - { - "name": "sign", - "type": "bool", - "required": false, - "defaultVal": false, - "info": "If set to true, the server will sign the requests." - } - ], - "Examples": [ - "https://min-api.cryptocompare.com/data/pricemultifull?fsyms=ETH,DASH&tsyms=BTC,USD,EUR", - "https://min-api.cryptocompare.com/data/pricemultifull?fsyms=ETH,DASH&tsyms=BTC,USD,EUR&extraParams=your_app_name", - "https://min-api.cryptocompare.com/data/pricemultifull?fsyms=REP,BTC&tsyms=USD,XMR&extraParams=your_app_name", - "https://min-api.cryptocompare.com/data/pricemultifull?fsyms=BTC,ETH&tsyms=USD&e=Coinbase&extraParams=your_app_name" - ], - "CacheDuration": "10 seconds" - } - }, - "GenerateAvg": { - "Simple": "https://min-api.cryptocompare.com/data/generateAvg?fsym=BTC&tsym=USD&markets=Coinbase,Kraken,Bitstamp,Bitfinex", - "Info": { - "Description": "Compute the current trading info (price, vol, open, high, low etc) of the requested pair as a volume weighted average based on the markets requested.", - "Parameters": [ - { - "name": "tryConversion", - "type": "bool", - "required": false, - "defaultVal": true, - "info": "If set to false, it will try to get values without using any conversion at all" - }, - { - "name": "fsym", - "type": "string", - "required": true, - "minLen": 1, - "maxLen": 10, - "transform": "Uppercase", - "extraValidation": "KeyInGlobalInfo" - }, - { - "name": "tsym", - "type": "string", - "required": true, - "minLen": 1, - "maxLen": 10, - "transform": "Uppercase", - "extraValidation": "KeyInTradePairsOrConversionSymbolTradePairs", - "baseKey": "fsym" - }, - { - "name": "markets", - "type": "string", - "required": true, - "minLen": 2, - "maxLen": 150, - "extraValidation": "MarketsInPairMarketList" - }, - { - "name": "extraParams", - "type": "string", - "required": false, - "defaultVal": "NotAvailable", - "minLen": 1, - "maxLen": 50 - }, - { - "name": "sign", - "type": "bool", - "required": false, - "defaultVal": false, - "info": "If set to true, the server will sign the requests." - } - ], - "Examples": [ - "https://min-api.cryptocompare.com/data/generateAvg?fsym=BTC&tsym=USD&markets=Coinbase,Bitfinex", - "https://min-api.cryptocompare.com/data/generateAvg?fsym=ETH&tsym=BTC&markets=Poloniex,Kraken,Coinbase,HitBTC&extraParams=your_app_name", - "https://min-api.cryptocompare.com/data/generateAvg?fsym=ZEC&tsym=USD&markets=Poloniex,Bitfinex&extraParams=your_app_name" - ], - "CacheDuration": "10 seconds" - } - }, - "DayAvg": { - "Simple": "https://min-api.cryptocompare.com/data/dayAvg?fsym=BTC&tsym=USD&extraParams=your_app_name", - "Info": { - "Description": "Get day average price. The values are based on hourly vwap data and the average can be calculated in different waysIt uses BTC conversion if data is not available because the coin is not trading in the specified currency. If tryConversion is set to false it will give you the direct data. If no toTS is given it will automatically do the current day. Also for different timezones use the UTCHourDiff paramThe calculation types are: VWAP - a VWAP of the hourly close price,MidHighLow - the average between the 24 H high and low.VolFVolT - the total volume from / the total volume to (only avilable with tryConversion set to false so only for direct trades but the value should be the most accurate average day price) ", - "Parameters": [ - { - "name": "tryConversion", - "type": "bool", - "required": false, - "defaultVal": true, - "info": "If set to false, it will try to get values without using any conversion at all" - }, - { - "name": "fsym", - "type": "string", - "required": true, - "minLen": 1, - "maxLen": 10, - "transform": "Uppercase", - "extraValidation": "KeyInGlobalInfo" - }, - { - "name": "tsym", - "type": "string", - "required": true, - "minLen": 1, - "maxLen": 10, - "transform": "Uppercase", - "extraValidation": "KeyInTradePairsOrConversionSymbolTradePairs", - "baseKey": "fsym" - }, - { - "name": "e", - "type": "string", - "required": false, - "defaultVal": "CCCAGG", - "minLen": 2, - "maxLen": 30, - "extraValidation": "MarketInPairMarketList" - }, - { - "name": "avgType", - "type": "string", - "required": false, - "defaultVal": "HourVWAP", - "minLen": 2, - "maxLen": 30, - "extraValidation": "AverageType" - }, - { - "name": "UTCHourDiff", - "type": "int", - "required": false, - "defaultVal": 0, - "minValue": -12, - "maxValue": 14, - "info": "By deafult it does UTC, if you want a different time zone just pass the hour difference. For PST you would pass -8 for example." - }, - { - "name": "toTs", - "type": "timestamp", - "required": false, - "extraValidation": "DayAvgTimestampValidation", - "secondsInUnit": 3600, - "cacheLength": 610, - "maxUnits": 2000, - "unit": "hour" - }, - { - "name": "extraParams", - "type": "string", - "required": false, - "defaultVal": "NotAvailable", - "minLen": 1, - "maxLen": 50 - }, - { - "name": "sign", - "type": "bool", - "required": false, - "defaultVal": false, - "info": "If set to true, the server will sign the requests." - } - ], - "Examples": [ - "https://min-api.cryptocompare.com/data/dayAvg?fsym=BTC&tsym=USD&UTCHourDiff=-8&extraParams=your_app_name", - "https://min-api.cryptocompare.com/data/dayAvg?fsym=ETH&tsym=GBP&toTs=1487116800&extraParams=your_app_name", - "https://min-api.cryptocompare.com/data/dayAvg?fsym=ETH&tsym=GBP&toTs=1487116800&tryConversion=false&extraParams=your_app_name", - "https://min-api.cryptocompare.com/data/dayAvg?fsym=ETH&tsym=GBP&toTs=1487116800&avgType=MidHighLow&extraParams=your_app_name", - "https://min-api.cryptocompare.com/data/dayAvg?fsym=ETH&tsym=GBP&toTs=1487116800&avgType=MidHighLow&tryConversion=false&extraParams=your_app_name", - "https://min-api.cryptocompare.com/data/dayAvg?fsym=ETH&tsym=GBP&toTs=1487116800&avgType=VolFVolT&tryConversion=false&extraParams=your_app_name", - "https://min-api.cryptocompare.com/data/dayAvg?fsym=BTC&tsym=USD&toTs=1487116800&e=Bitfinex&extraParams=your_app_name" - ], - "CacheDuration": "610 seconds" - } - }, - "SubsWatchlist": { - "Simple": "https://min-api.cryptocompare.com/data/subsWatchlist?fsyms=BTC,ETH,XMR,MLN,DASH&tsym=USD&extraParams=your_app_name", - "Info": { - "Description": [ - "Get combinations of subs and pricing info in order to know what needs to be streamed and how to connect to the streamers.", - "The possible responses for Conversion are: not_needed, direct, invert, multiply, divide, invert_multiply, invert_divide ", - "For not_needed - it means you asked for one symbol to the same symbol. You should just use the value you have, no need for streaming or conversion.", - "For direct - SubBase + Market + ~ + CurrencyFrom + ~ + CurrencyTo ", - "For invert - 1 / SubBase + Market + ~ + CurrencyTo + ~ + CurrencyFrom ", - "For multiply - SubBase + Market + ~ + CurrencyFrom + ~ + ConversionSymbol * SubBase + Market + ~ + ConversionSymbol + ~ + CurrencyTo ", - "For divide - SubBase + Market + ~ + CurrencyFrom + ~ + ConversionSymbol / SubBase + Market + ~ + CurrencyTo + ~ + ConversionSymbol ", - "For invert_muliply - 1 / (SubBase + Market + ~ + CurrencyFrom + ~ + ConversionSymbol * SubBase + Market + ~ + ConversionSymbol + ~ + CurrencyTo) ", - "For invert_divide - SubBase + Market + ~ + ConversionSymbol + ~ + CurrencyTo / SubBase + Market + ~ + ConversionSymbol + ~ + CurrencyFrom " - ], - "Parameters": [ - { - "name": "fsyms", - "type": "string", - "required": true, - "minLen": 1, - "maxLen": 3000, - "transform": "Uppercase", - "eliminateDuplicates": true, - "extraValidation": "KeysInGlobalInfo" - }, - { - "name": "tsym", - "type": "string", - "required": true, - "minLen": 1, - "maxLen": 10, - "transform": "Uppercase", - "extraValidation": "KeysInAtLeastOneTradePairOrConversionSymbolTradePairs", - "baseKey": "fsyms" - }, - { - "name": "extraParams", - "type": "string", - "required": false, - "defaultVal": "NotAvailable", - "minLen": 1, - "maxLen": 50 - }, - { - "name": "sign", - "type": "bool", - "required": false, - "defaultVal": false, - "info": "If set to true, the server will sign the requests." - } - ], - "Examples": [ - "https://min-api.cryptocompare.com/data/subsWatchlist?fsyms=BTC,ETH,XMR,MLN,DASH&tsym=XMR", - "https://min-api.cryptocompare.com/data/subsWatchlist?fsyms=BTC,ETH,XMR,MLN,DASH,GBP&tsym=USD", - "https://min-api.cryptocompare.com/data/subsWatchlist?fsyms=BTC,ETH,XMR,MLN,DASH,USD&tsym=MLN" - ], - "CacheDuration": "60 seconds" - } - }, - "Subs": { - "Simple": "https://min-api.cryptocompare.com/data/subs?fsym=BTC&tsyms=USD", - "Info": { - "Description": "Get all the available streamer subscription channels for the requested pairs.", - "Parameters": [ - { - "name": "fsym", - "type": "string", - "required": true, - "minLen": 1, - "maxLen": 10, - "transform": "Uppercase", - "extraValidation": "KeyInGlobalInfoRoot" - }, - { - "name": "tsyms", - "type": "string", - "required": false, - "minLen": 1, - "maxLen": 100, - "defaultVal": "ALL_SYMBOLS", - "transform": "Uppercase", - "eliminateDuplicates": true, - "extraValidation": "KeysInAtLeastOneTradePairOrConversionSymbolTradePairs", - "baseKey": "fsym" - }, - { - "name": "extraParams", - "type": "string", - "required": false, - "defaultVal": "NotAvailable", - "minLen": 1, - "maxLen": 50 - }, - { - "name": "sign", - "type": "bool", - "required": false, - "defaultVal": false, - "info": "If set to true, the server will sign the requests. The default is not to sign the requests." - } - ], - "Examples": [ - "https://min-api.cryptocompare.com/data/subs?fsym=BTC", - "https://min-api.cryptocompare.com/data/subs?fsym=BTC&tsyms=USD,EUR,GBP", - "https://min-api.cryptocompare.com/data/subs?fsym=ETH&tsyms=BTC,EUR" - ], - "CacheDuration": "10 seconds" - } - }, - "TopExchanges": { - "Simple": "https://min-api.cryptocompare.com/data/top/exchanges?fsym=BTC&tsym=USD", - "Info": { - "Description": "Get top exchanges by volume for a currency pair. The number of exchanges you get is the minimum of the limit you set (default 5) and the total number of exchanges available", - "Parameters": [ - { - "name": "fsym", - "type": "string", - "required": true, - "minLen": 1, - "maxLen": 10, - "transform": "Uppercase", - "extraValidation": "KeyInGlobalInfoRoot" - }, - { - "name": "tsym", - "type": "string", - "required": true, - "minLen": 1, - "maxLen": 10, - "transform": "Uppercase", - "extraValidation": "KeyInTradePairsOrConversionSymbolTradePairs", - "baseKey": "fsym" - }, - { - "name": "limit", - "type": "int", - "required": false, - "defaultVal": 5, - "minValue": 1, - "maxValue": 50 - }, - { - "name": "extraParams", - "type": "string", - "required": false, - "defaultVal": "NotAvailable", - "minLen": 1, - "maxLen": 50 - }, - { - "name": "sign", - "type": "bool", - "required": false, - "defaultVal": false, - "info": "If set to true, the server will sign the requests." - } - ], - "Examples": [ - "https://min-api.cryptocompare.com/data/top/exchanges?fsym=ETH&tsym=USD", - "https://min-api.cryptocompare.com/data/top/exchanges?fsym=BTC&tsym=USD&limit=20", - "https://min-api.cryptocompare.com/data/top/exchanges?fsym=REP&tsym=ETH" - ], - "CacheDuration": "120 seconds" - } - }, - "TopVolumes": { - "Simple": "https://min-api.cryptocompare.com/data/top/volumes?tsym=BTC", - "Info": { - "Description": "Get top coins by volume for the to currency. It returns volume24hto and total supply (where available). The number of coins you get is the minimum of the limit you set (default 50) and the total number of coins available", - "Parameters": [ - { - "name": "tsym", - "type": "string", - "required": true, - "minLen": 1, - "maxLen": 10, - "transform": "Uppercase", - "extraValidation": "KeyInGlobalToPairs" - }, - { - "name": "limit", - "type": "int", - "required": false, - "defaultVal": 20, - "minValue": 1, - "maxValue": 1000 - }, - { - "name": "extraParams", - "type": "string", - "required": false, - "defaultVal": "NotAvailable", - "minLen": 1, - "maxLen": 50 - }, - { - "name": "sign", - "type": "bool", - "required": false, - "defaultVal": false, - "info": "If set to true, the server will sign the requests." - } - ], - "Examples": [ - "https://min-api.cryptocompare.com/data/top/volumes?tsym=ETH", - "https://min-api.cryptocompare.com/data/top/volumes?tsym=BTC&limit=100", - "https://min-api.cryptocompare.com/data/top/volumes?tsym=USD&limit=20" - ], - "CacheDuration": "120 seconds" - } - }, - "TopPairs": { - "Simple": "https://min-api.cryptocompare.com/data/top/pairs?fsym=BTC", - "Info": { - "Description": "Get top pairs by volume for a currency (always uses our aggregated data). The number of pairs you get is the minimum of the limit you set (default 5) and the total number of pairs available", - "Parameters": [ - { - "name": "fsym", - "type": "string", - "required": true, - "minLen": 1, - "maxLen": 10, - "transform": "Uppercase", - "extraValidation": "KeyInGlobalInfoRoot" - }, - { - "name": "tsym", - "type": "string", - "required": true, - "minLen": 1, - "maxLen": 10, - "transform": "Uppercase", - "extraValidation": "KeyInTradePairsOrConversionSymbolTradePairs", - "baseKey": "fsym" - }, - { - "name": "limit", - "type": "int", - "required": false, - "defaultVal": 5, - "minValue": 1, - "maxValue": 50 - }, - { - "name": "extraParams", - "type": "string", - "required": false, - "defaultVal": "NotAvailable", - "minLen": 1, - "maxLen": 50 - }, - { - "name": "sign", - "type": "bool", - "required": false, - "defaultVal": false, - "info": "If set to true, the server will sign the requests." - } - ], - "Examples": [ - "https://min-api.cryptocompare.com/data/top/pairs?fsym=ETH", - "https://min-api.cryptocompare.com/data/top/pairs?fsym=BTC&limit=20", - "https://min-api.cryptocompare.com/data/top/pairs?fsym=ZEC&limit=20" - ], - "CacheDuration": "120 seconds" - } - }, - "AllExchanges": { - "Simple": "https://min-api.cryptocompare.com/data/all/exchanges", - "Info": { - "Description": "Returns all the exchanges that CryptoCompare has integrated with.", - "Parameters": [ - { - "name": "extraParams", - "type": "string", - "required": false, - "defaultVal": "NotAvailable", - "minLen": 1, - "maxLen": 50 - }, - { - "name": "sign", - "type": "bool", - "required": false, - "defaultVal": false, - "info": "If set to true, the server will sign the requests." - } - ], - "Examples": [ - "https://min-api.cryptocompare.com/data/all/exchanges" - ], - "CacheDuration": "60 seconds" - } - }, - "HistoDay": { - "Simple": "https://min-api.cryptocompare.com/data/histoday?fsym=BTC&tsym=USD&limit=30&aggregate=1", - "Info": { - "Description": "Get open, high, low, close, volumefrom and volumeto from the daily historical data. The values are based on 00:00 GMT time.It uses BTC conversion if data is not available because the coin is not trading in the specified currency.", - "Parameters": [ - { - "name": "tryConversion", - "type": "bool", - "required": false, - "defaultVal": true, - "info": "If set to false, it will try to get values without using any conversion at all" - }, - { - "name": "fsym", - "type": "string", - "required": true, - "minLen": 1, - "maxLen": 10, - "transform": "Uppercase", - "extraValidation": "KeyInGlobalInfo" - }, - { - "name": "tsym", - "type": "string", - "required": true, - "minLen": 1, - "maxLen": 10, - "transform": "Uppercase", - "extraValidation": "KeyInTradePairsOrConversionSymbolTradePairs", - "baseKey": "fsym" - }, - { - "name": "e", - "type": "string", - "required": false, - "defaultVal": "CCCAGG", - "minLen": 2, - "maxLen": 30, - "extraValidation": "MarketInPairMarketList" - }, - { - "name": "aggregate", - "type": "int", - "required": false, - "defaultVal": 1, - "minValue": 1, - "maxValue": 30 - }, - { - "name": "limit", - "type": "int", - "required": false, - "defaultVal": 30, - "minValue": 1, - "maxValue": 2000 - }, - { - "name": "allData", - "type": "bool", - "required": false, - "defaultVal": false - }, - { - "name": "toTs", - "type": "timestamp", - "required": false, - "extraValidation": "toTimestampValidation", - "secondsInUnit": 86400, - "cacheLength": 610, - "maxUnits": 2000, - "unit": "day" - }, - { - "name": "extraParams", - "type": "string", - "required": false, - "defaultVal": "NotAvailable", - "minLen": 1, - "maxLen": 50 - }, - { - "name": "sign", - "type": "bool", - "required": false, - "defaultVal": false, - "info": "If set to true, the server will sign the requests." - } - ], - "Examples": [ - "https://min-api.cryptocompare.com/data/histoday?fsym=BTC&tsym=USD&limit=30&aggregate=3&e=CCCAGG", - "https://min-api.cryptocompare.com/data/histoday?fsym=ETH&tsym=USD&limit=30&aggregate=3&e=Kraken&extraParams=your_app_name", - "https://min-api.cryptocompare.com/data/histoday?fsym=ETH&tsym=BTC&limit=30&aggregate=1&toTs=1452680400&extraParams=your_app_name", - "https://min-api.cryptocompare.com/data/histoday?fsym=BTC&tsym=ETH&limit=30&aggregate=1&e=CCCAGG", - "https://min-api.cryptocompare.com/data/histoday?fsym=XRP&tsym=GBP&limit=30&aggregate=1&e=CCCAGG", - "https://min-api.cryptocompare.com/data/histoday?fsym=GBP&tsym=ETH&limit=30&aggregate=1&e=CCCAGG", - "https://min-api.cryptocompare.com/data/histoday?fsym=XRP&tsym=REP&limit=30&aggregate=1&e=CCCAGG", - "https://min-api.cryptocompare.com/data/histoday?fsym=USD&tsym=ICN&limit=30&aggregate=1&e=CCCAGG", - "https://min-api.cryptocompare.com/data/histoday?fsym=GBP&tsym=USD&limit=30&aggregate=1&e=CCCAGG" - ], - "CacheDuration": "610 seconds" - } - }, - "HistoHour": { - "Simple": "https://min-api.cryptocompare.com/data/histohour?fsym=BTC&tsym=USD&limit=24&aggregate=1", - "Info": { - "Description": "Get open, high, low, close, volumefrom and volumeto from the hourly historical data.It uses BTC conversion if data is not available because the coin is not trading in the specified currency.", - "Parameters": [ - { - "name": "tryConversion", - "type": "bool", - "required": false, - "defaultVal": true, - "info": "If set to false, it will try to get values without using any conversion at all" - }, - { - "name": "fsym", - "type": "string", - "required": true, - "minLen": 1, - "maxLen": 10, - "transform": "Uppercase", - "extraValidation": "KeyInGlobalInfo" - }, - { - "name": "tsym", - "type": "string", - "required": true, - "minLen": 1, - "maxLen": 10, - "transform": "Uppercase", - "extraValidation": "KeyInTradePairsOrConversionSymbolTradePairs", - "baseKey": "fsym" - }, - { - "name": "e", - "type": "string", - "required": false, - "defaultVal": "CCCAGG", - "minLen": 2, - "maxLen": 30, - "extraValidation": "MarketInPairMarketList" - }, - { - "name": "aggregate", - "type": "int", - "required": false, - "defaultVal": 1, - "minValue": 1, - "maxValue": 30 - }, - { - "name": "limit", - "type": "int", - "required": false, - "defaultVal": 168, - "minValue": 1, - "maxValue": 2000 - }, - { - "name": "toTs", - "type": "timestamp", - "required": false, - "extraValidation": "toTimestampValidation", - "secondsInUnit": 3600, - "cacheLength": 610, - "maxUnits": 2000, - "unit": "hour" - }, - { - "name": "extraParams", - "type": "string", - "required": false, - "defaultVal": "NotAvailable", - "minLen": 1, - "maxLen": 50 - }, - { - "name": "sign", - "type": "bool", - "required": false, - "defaultVal": false, - "info": "If set to true, the server will sign the requests." - } - ], - "Examples": [ - "https://min-api.cryptocompare.com/data/histohour?fsym=BTC&tsym=USD&limit=24&aggregate=3&e=CCCAGG", - "https://min-api.cryptocompare.com/data/histohour?fsym=ETH&tsym=USD&limit=24&aggregate=3&e=Kraken&extraParams=your_app_name", - "https://min-api.cryptocompare.com/data/histohour?fsym=ETH&tsym=BTC&limit=24&aggregate=1&toTs=1452680400&extraParams=your_app_name", - "https://min-api.cryptocompare.com/data/histohour?fsym=BTC&tsym=ETH&limit=30&aggregate=1&e=CCCAGG" - ], - "CacheDuration": "610 seconds" - } - }, - "HistoMinute": { - "Simple": "https://min-api.cryptocompare.com/data/histominute?fsym=BTC&tsym=USD&limit=60&aggregate=1", - "Info": { - "Description": "Get open, high, low, close, volumefrom and volumeto from the each minute historical data. This data is only stored for 7 days, if you need more,use the hourly or daily path. It uses BTC conversion if data is not available because the coin is not trading in the specified currency.", - "Parameters": [ - { - "name": "tryConversion", - "type": "bool", - "required": false, - "defaultVal": true, - "info": "If set to false, it will try to get values without using any conversion at all" - }, - { - "name": "fsym", - "type": "string", - "required": true, - "minLen": 1, - "maxLen": 10, - "transform": "Uppercase", - "extraValidation": "KeyInGlobalInfo" - }, - { - "name": "tsym", - "type": "string", - "required": true, - "minLen": 1, - "maxLen": 10, - "transform": "Uppercase", - "extraValidation": "KeyInTradePairsOrConversionSymbolTradePairs", - "baseKey": "fsym" - }, - { - "name": "e", - "type": "string", - "required": false, - "defaultVal": "CCCAGG", - "minLen": 2, - "maxLen": 30, - "extraValidation": "MarketInPairMarketList" - }, - { - "name": "aggregate", - "type": "int", - "required": false, - "defaultVal": 1, - "minValue": 1, - "maxValue": 30 - }, - { - "name": "limit", - "type": "int", - "required": false, - "defaultVal": 1440, - "minValue": 1, - "maxValue": 2000, - "info": "We only store minute data for 7 days, any info before that will be worng." - }, - { - "name": "toTs", - "type": "timestamp", - "required": false, - "extraValidation": "toTimestampValidationMinute", - "secondsInUnit": 60, - "cacheLength": 40, - "maxUnits": 2000, - "unit": "minute" - }, - { - "name": "extraParams", - "type": "string", - "required": false, - "defaultVal": "NotAvailable", - "minLen": 1, - "maxLen": 50 - }, - { - "name": "sign", - "type": "bool", - "required": false, - "defaultVal": false, - "info": "If set to true, the server will sign the requests." - } - ], - "Examples": [ - "https://min-api.cryptocompare.com/data/histominute?fsym=BTC&tsym=USD&limit=60&aggregate=3&e=CCCAGG", - "https://min-api.cryptocompare.com/data/histominute?fsym=ETH&tsym=USD&limit=60&aggregate=3&e=Kraken&extraParams=your_app_name", - "https://min-api.cryptocompare.com/data/histominute?fsym=ETH&tsym=BTC&limit=60&aggregate=1&toTs=1504637633&extraParams=your_app_name", - "https://min-api.cryptocompare.com/data/histominute?fsym=BTC&tsym=ETH&limit=30&aggregate=1&e=CCCAGG" - ], - "CacheDuration": "40 seconds" - } - } - } - } -} \ No newline at end of file diff --git a/docs/make.bat b/docs/make.bat new file mode 100644 index 0000000..5407c24 --- /dev/null +++ b/docs/make.bat @@ -0,0 +1,36 @@ +@ECHO OFF + +pushd %~dp0 + +REM Command file for Sphinx documentation + +if "%SPHINXBUILD%" == "" ( + set SPHINXBUILD=sphinx-build +) +set SOURCEDIR=source +set BUILDDIR=build +set SPHINXPROJ=Numismatic + +if "%1" == "" goto help + +%SPHINXBUILD% >NUL 2>NUL +if errorlevel 9009 ( + echo. + echo.The 'sphinx-build' command was not found. Make sure you have Sphinx + echo.installed, then set the SPHINXBUILD environment variable to point + echo.to the full path of the 'sphinx-build' executable. Alternatively you + echo.may add the Sphinx directory to PATH. + echo. + echo.If you don't have Sphinx installed, grab it from + echo.http://sphinx-doc.org/ + exit /b 1 +) + +%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% +goto end + +:help +%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% + +:end +popd diff --git a/docs/source/code-of-conduct.rst b/docs/source/code-of-conduct.rst new file mode 100644 index 0000000..2d70708 --- /dev/null +++ b/docs/source/code-of-conduct.rst @@ -0,0 +1 @@ +.. include:: ../../CODE_OF_CONDUCT.rst diff --git a/docs/source/command-line-options.rst b/docs/source/command-line-options.rst new file mode 100644 index 0000000..cdfa5d8 --- /dev/null +++ b/docs/source/command-line-options.rst @@ -0,0 +1,2 @@ +Command Line Options +==================== \ No newline at end of file diff --git a/docs/source/conf.py b/docs/source/conf.py new file mode 100644 index 0000000..610b6ad --- /dev/null +++ b/docs/source/conf.py @@ -0,0 +1,169 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +# +# Numismatic documentation build configuration file, created by +# sphinx-quickstart on Sat Dec 2 17:20:35 2017. +# +# This file is execfile()d with the current directory set to its +# containing dir. +# +# Note that not all possible configuration values are present in this +# autogenerated file. +# +# All configuration values have a default; values that are commented out +# serve to show the default. + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +# +# import os +# import sys +# sys.path.insert(0, os.path.abspath('.')) + + +# -- General configuration ------------------------------------------------ + +# If your documentation needs a minimal Sphinx version, state it here. +# +# needs_sphinx = '1.0' + +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom +# ones. +extensions = ['sphinx.ext.autodoc'] + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# The suffix(es) of source filenames. +# You can specify multiple suffix as a list of string: +# +# source_suffix = ['.rst', '.md'] +source_suffix = '.rst' + +# The master toctree document. +master_doc = 'index' + +# General information about the project. +project = 'Numismatic' +copyright = '2017, Tobias Brandt & Barry Steyn' +author = 'Tobias Brandt & Barry Steyn' + +# The version info for the project you're documenting, acts as replacement for +# |version| and |release|, also used in various other places throughout the +# built documents. +# +# The short X.Y version. +version = '0.2' +# The full version, including alpha/beta/rc tags. +release = '' + +# The language for content autogenerated by Sphinx. Refer to documentation +# for a list of supported languages. +# +# This is also used if you do content translation via gettext catalogs. +# Usually you set "language" from the command line for these cases. +language = None + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +# This patterns also effect to html_static_path and html_extra_path +exclude_patterns = [] + +# The name of the Pygments (syntax highlighting) style to use. +pygments_style = 'sphinx' + +# If true, `todo` and `todoList` produce output, else they produce nothing. +todo_include_todos = False + + +# -- Options for HTML output ---------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +# +html_theme = 'alabaster' + +# Theme options are theme-specific and customize the look and feel of a theme +# further. For a list of options available for each theme, see the +# documentation. +# +# html_theme_options = {} + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = ['_static'] + +# Custom sidebar templates, must be a dictionary that maps document names +# to template names. +# +# This is required for the alabaster theme +# refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars +html_sidebars = { + '**': [ + 'relations.html', # needs 'show_related': True theme option to display + 'searchbox.html', + ] +} + + +# -- Options for HTMLHelp output ------------------------------------------ + +# Output file base name for HTML help builder. +htmlhelp_basename = 'Numismaticdoc' + + +# -- Options for LaTeX output --------------------------------------------- + +latex_elements = { + # The paper size ('letterpaper' or 'a4paper'). + # + # 'papersize': 'letterpaper', + + # The font size ('10pt', '11pt' or '12pt'). + # + # 'pointsize': '10pt', + + # Additional stuff for the LaTeX preamble. + # + # 'preamble': '', + + # Latex figure (float) alignment + # + # 'figure_align': 'htbp', +} + +# Grouping the document tree into LaTeX files. List of tuples +# (source start file, target name, title, +# author, documentclass [howto, manual, or own class]). +latex_documents = [ + (master_doc, 'Numismatic.tex', 'Numismatic Documentation', + 'Tobias Brandt \\& Barry Steyn', 'manual'), +] + + +# -- Options for manual page output --------------------------------------- + +# One entry per manual page. List of tuples +# (source start file, name, description, authors, manual section). +man_pages = [ + (master_doc, 'numismatic', 'Numismatic Documentation', + [author], 1) +] + + +# -- Options for Texinfo output ------------------------------------------- + +# Grouping the document tree into Texinfo files. List of tuples +# (source start file, target name, title, author, +# dir menu entry, description, category) +texinfo_documents = [ + (master_doc, 'Numismatic', 'Numismatic Documentation', + author, 'Numismatic', 'One line description of project.', + 'Miscellaneous'), +] + + + diff --git a/docs/source/extending-numismatic.rst b/docs/source/extending-numismatic.rst new file mode 100644 index 0000000..932777a --- /dev/null +++ b/docs/source/extending-numismatic.rst @@ -0,0 +1,2 @@ +Extending Numismatic +==================== \ No newline at end of file diff --git a/docs/source/getting-help.rst b/docs/source/getting-help.rst new file mode 100644 index 0000000..cf9baea --- /dev/null +++ b/docs/source/getting-help.rst @@ -0,0 +1,2 @@ +Getting Help +============ \ No newline at end of file diff --git a/docs/source/how-to-contribute.rst b/docs/source/how-to-contribute.rst new file mode 100644 index 0000000..8cb3146 --- /dev/null +++ b/docs/source/how-to-contribute.rst @@ -0,0 +1 @@ +.. include:: ../../CONTRIBUTING.rst \ No newline at end of file diff --git a/docs/source/index.rst b/docs/source/index.rst new file mode 100644 index 0000000..00dc7e5 --- /dev/null +++ b/docs/source/index.rst @@ -0,0 +1,39 @@ +Numismatic +========== +Numismatic is tool for querying crypto coin exchanges on the command line. Numismatic +has the following design goals: + +1. **Extensible** +2. **Websocket first** (however rest is fully supported) +3. **Standardized outputs** +4. **Simple cli** + +Quick Start +----------- + +To get general command line help:: + + coin + +Project Information +------------------- + +.. toctree:: + :maxdepth: 1 + + License + Roadmap + Getting Help + How To Contribute + Contributor Covenant Code of Conduct + Changelog + +Documentation Contents +---------------------- + +.. toctree:: + :maxdepth: 2 + + Why Numismatic + Command Line Options + Extending Numismatic diff --git a/docs/source/license.rst b/docs/source/license.rst new file mode 100644 index 0000000..5029e0f --- /dev/null +++ b/docs/source/license.rst @@ -0,0 +1,7 @@ +License and Credits +=================== + +``Numismatic`` is licensed under the `MIT `_ license. +The full license text can be also found in the `source code repository `_. + +.. include:: ../../AUTHORS.rst \ No newline at end of file diff --git a/docs/source/roadmap.rst b/docs/source/roadmap.rst new file mode 100644 index 0000000..a84d273 --- /dev/null +++ b/docs/source/roadmap.rst @@ -0,0 +1,2 @@ +Roadmap +======= \ No newline at end of file diff --git a/docs/source/why-numismatic.rst b/docs/source/why-numismatic.rst new file mode 100644 index 0000000..94e6a56 --- /dev/null +++ b/docs/source/why-numismatic.rst @@ -0,0 +1,2 @@ +Why Numismatic +==============