-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from skalenetwork/develop
Beta release 23/09/19
- Loading branch information
Showing
30 changed files
with
505 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[flake8] | ||
max-line-length = 100 | ||
exclude = .git,__pycache__,docs/source/conf.py,old,build,dist,venv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
language: python | ||
python: | ||
- '3.6' | ||
cache: pip | ||
install: | ||
- pip install -r requirements.txt | ||
- pip install -r requirements-dev.txt | ||
before_script: | ||
- "flake8 ." | ||
jobs: | ||
include: | ||
#- stage: test | ||
- stage: deploy | ||
if: branch IN (develop, beta, stable, master) | ||
script: | ||
- VERSION=$(BRANCH=$TRAVIS_BRANCH bash ./scripts/calculate_version.sh) | ||
- echo "Version $VERSION" | ||
- bash ./scripts/build.sh $VERSION $TRAVIS_BRANCH | ||
- export OS=`uname -s`-`uname -m` | ||
- export EXECUTABLE_NAME=skale-$VERSION-$OS | ||
before_deploy: | ||
# Set up git user name and tag this commit | ||
- ( | ||
test ! $TRAVIS_TAG && | ||
git config --local user.name "skale-travis" && | ||
git config --local user.email "$GITHUB_EMAIL" && | ||
export TRAVIS_TAG=$VERSION && | ||
git tag "$TRAVIS_TAG" && | ||
git push https://[email protected]/$TRAVIS_REPO_SLUG.git $TRAVIS_TAG | ||
) || true | ||
deploy: | ||
- provider: releases | ||
api_key: "$GITHUB_OAUTH_TOKEN" | ||
skip_cleanup: true | ||
file: | ||
- dist/$EXECUTABLE_NAME | ||
on: | ||
repo: skalenetwork/skaled | ||
branch: stable | ||
- provider: releases | ||
api_key: "$GITHUB_OAUTH_TOKEN" | ||
skip_cleanup: true | ||
prerelease: true | ||
file: | ||
- dist/$EXECUTABLE_NAME | ||
on: | ||
repo: $TRAVIS_REPO_SLUG | ||
branch: | ||
- master | ||
- develop | ||
- beta | ||
- provider: script | ||
skip_cleanup: true | ||
script: bash $TRAVIS_BUILD_DIR/scripts/upload_to_do.sh | ||
on: | ||
repo: $TRAVIS_REPO_SLUG | ||
branch: | ||
- master | ||
- stable | ||
- develop | ||
- beta |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
__version__ = '0.2.0' | ||
__version__ = '0.3.0' | ||
|
||
if __name__ == "__main__": | ||
print(__version__) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import click | ||
from core.helper import login_required, get | ||
from core.print_formatters import print_metrics | ||
|
||
|
||
@click.group() | ||
def metrics_cli(): | ||
pass | ||
|
||
|
||
@metrics_cli.group('metrics', help="Node metrics commands") | ||
def metrics(): | ||
pass | ||
|
||
|
||
@metrics.command(help="List of bounties and metrics for the first year") | ||
@login_required | ||
def first(): | ||
print('Please wait - collecting metrics from blockchain...') | ||
bounty_list = get('first-bounties') | ||
if not bounty_list: | ||
print('No bounties found') | ||
return | ||
print_metrics(bounty_list) | ||
|
||
|
||
@metrics.command(help="List of bounties and metrics for the last year") | ||
@login_required | ||
def last(): | ||
print('Please wait - collecting metrics from blockchain...') | ||
bounty_list = get('last-bounties') | ||
if not bounty_list: | ||
print('No bounties found') | ||
return | ||
print_metrics(bounty_list) |
Oops, something went wrong.