Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
fametrano committed Jan 1, 2023
1 parent 985d2eb commit cf280e0
Show file tree
Hide file tree
Showing 7 changed files with 48 additions and 14 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/markdown-links.yml
@@ -0,0 +1,13 @@
name: Markdown - Check links

on: [push, pull_request]

jobs:
check-markdown-links:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Check Markdown links
uses: gaurav-nelson/github-action-markdown-link-check@v1
15 changes: 15 additions & 0 deletions .github/workflows/markdown-lint.yml
@@ -0,0 +1,15 @@
name: Markdown - Check linted code

on: [push, pull_request]

jobs:
check-linted-code:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Run Markdown Lint
uses: actionshub/markdownlint@main
with:
filesToIgnoreRegex: "node_modules\\/.*"
@@ -1,4 +1,4 @@
name: Check linted code
name: Python - Check linted code

on:
push:
Expand Down
@@ -1,4 +1,4 @@
name: Check PR using Sourcery
name: Python - Check PR using Sourcery

on:
pull_request:
Expand Down
15 changes: 8 additions & 7 deletions CONTRIBUTING.md
Expand Up @@ -51,13 +51,14 @@ easily once you're finished with coding or, even better, automatically
taken care of while coding if you configure your development environment.
Type definition improves code readability and helps in spotting bugs.

Moreover, [unit tests](https://github.com/pytest-dev/pytest/) must pass at any time with 100% [coverage](https://coverage.readthedocs.io/) of both the
library and the test suite.

These requirements are easily checked (and partially fixed) if you test
the impact of your contribution with [tox](https://tox.wiki/).

Finally, even when it comes to mark-down (*.md files),
Moreover,
the [pytest](https://pytest.org) unit tests
must pass at any time with
100% [coverage](https://coverage.readthedocs.io/)
of both the library and the test suite.
See [Tests, code coverage, and profiling](./tests/README.md).

Finally, even when it comes to mark-down (i.e., *.md files),
please use [markdownlint](https://github.com/DavidAnson/markdownlint).

\[To do: document how to do it in VS Code\]
Expand Down
4 changes: 4 additions & 0 deletions README.md
Expand Up @@ -41,11 +41,13 @@ Included features are:
- modulo algebra functions (gcd, inverse, legendre symbol, square root)
- octets / integer / point / var_int / var_bytes helper functions
- elliptic curve class

- fast algebra implemented using Jacobian coordinates
- double scalar multiplication (Straus's algorithm, also known as
Shamir's trick)
- multi scalar multiplication (Bos-coster's algorithm)
- point simmetry solution: odd/even, low/high, and quadratic residue

- elliptic curves: SEC 1 v1 and v2, NIST, Brainpool, and
low cardinality test curves
- ECDSA signature with (transaction) DER encoding
Expand All @@ -55,9 +57,11 @@ Included features are:
- EC Schnorr signature (according to
[BIP340](https://github.com/bitcoin/bips/blob/master/bip-0340.mediawiki)
bitcoin standardization)

- batch validation
- threshold signature (see test-suite)
- MuSig multi-signature (see test-suite)

- Borromean ring signature
- [RFC 6979](https://tools.ietf.org/html/rfc6979:) to make signature
schemes deterministic
Expand Down
11 changes: 6 additions & 5 deletions tests/README.md
@@ -1,13 +1,12 @@
# Tests, code coverage, and profiling

## Required packages

btclib has no required packages, but btclib tests do:
consider installing the required packages in a dedicated virtual environment.
## Install required packages

python -m pip install -r requirements-dev.txt

## Test
Consider installing the required packages in a dedicated virtual environment.

## Test and code coverage

Test execution is distributed across multiple cores,
with the default number of cores being eight:
Expand All @@ -31,6 +30,8 @@ Finally, the fastest test execution can be accomplished running pytest only

pytest

## Profiling

Profiling can be obtained with:

python -m cProfile -s time setup.py test
Expand Down

0 comments on commit cf280e0

Please sign in to comment.