Skip to content

Commit b3f4d6b

Browse files
authored
Merge pull request #24 from Bernardo-MG/develop
Develop
2 parents ceb0763 + e2fb8c8 commit b3f4d6b

12 files changed

Lines changed: 118 additions & 97 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Deployment
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
deploy_docs:
10+
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Check-out
15+
uses: actions/checkout@v2
16+
- name: Set up Python
17+
uses: actions/setup-python@v2
18+
with:
19+
python-version: 3.9
20+
- name: Install dependencies
21+
run: |
22+
python -m pip install --upgrade pip
23+
pip install flake8 pytest
24+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
25+
- name: Build distribution
26+
run: python setup.py sdist bdist_wheel
27+
- name: Deploy
28+
run: twine upload -r pypi dist/*
29+
env:
30+
TWINE_USERNAME: ${{ secrets.DEPLOY_USER }}
31+
TWINE_PASSWORD: ${{ secrets.DEPLOY_PASSWORD }}

.github/workflows/deploy_docs.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Doc deployment
2+
3+
on:
4+
push:
5+
branches:
6+
- develop
7+
- master
8+
9+
jobs:
10+
deploy_docs:
11+
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Extract branch name
16+
shell: bash
17+
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
18+
id: extract_branch
19+
- name: Check-out
20+
uses: actions/checkout@v2
21+
- name: Set up Python
22+
uses: actions/setup-python@v2
23+
with:
24+
python-version: 3.9
25+
- name: Install dependencies
26+
run: |
27+
python -m pip install --upgrade pip
28+
pip install flake8 pytest
29+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
30+
- name: Install sshpass
31+
run: sudo apt-get install sshpass
32+
- name: Tests docs
33+
run: python setup.py test -p docs
34+
- name: Build docs
35+
run: python setup.py build_docs
36+
- name: Deploy development docs
37+
if: steps.extract_branch.outputs.branch == 'develop'
38+
run: |
39+
cd ./build/sphinx/html
40+
sshpass -p "${{ secrets.DEPLOY_DOCS_DEVELOP_PASSWORD }}" scp -o 'StrictHostKeyChecking no' -P "${{ secrets.DEPLOY_DOCS_PORT }}" -r ./* "${{ secrets.DEPLOY_DOCS_DEVELOP_USER }}@${{ secrets.DEPLOY_DOCS_HOST }}:${{ secrets.DEPLOY_DOCS_DEVELOP_PATH }}";
41+
- name: Deploy release docs
42+
if: steps.extract_branch.outputs.branch == 'master'
43+
run: |
44+
cd ./build/sphinx/html
45+
sshpass -p "${{ secrets.DEPLOY_DOCS_PASSWORD }}" scp -o 'StrictHostKeyChecking no' -P "${{ secrets.DEPLOY_DOCS_PORT }}" -r ./* "${{ secrets.DEPLOY_DOCS_USER }}@${{ secrets.DEPLOY_DOCS_HOST }}:${{ secrets.DEPLOY_DOCS_PATH }}";

.github/workflows/testing.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Testing and validation
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
test:
7+
8+
runs-on: ubuntu-latest
9+
strategy:
10+
matrix:
11+
python-version: [3.6, 3.7, 3.8, 3.9]
12+
13+
steps:
14+
- name: Check-out
15+
uses: actions/checkout@v2
16+
- name: Set up Python ${{ matrix.python-version }}
17+
uses: actions/setup-python@v2
18+
with:
19+
python-version: ${{ matrix.python-version }}
20+
- name: Install dependencies
21+
run: |
22+
python -m pip install --upgrade pip
23+
pip install flake8 pytest
24+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
25+
- name: Run all tests
26+
run: python setup.py test -p py${{ matrix.python-version }}

.travis.yml

Lines changed: 0 additions & 42 deletions
This file was deleted.

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2016-2018 Bernardo Martínez Garrido
3+
Copyright (c) 2016-2021 Bernardo Martínez Garrido
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

dice_notation/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
Dice Notation Tools for Python
44
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
55
Dice notation tools
6-
:copyright: (c) 2016-2018 by Bernardo Martínez Garrido
6+
:copyright: (c) 2016-2021 by Bernardo Martínez Garrido
77
:license: MIT, see LICENSE for more details.
88
"""
99

10-
__version__ = '1.1.1'
10+
__version__ = '1.2.0'
1111
__license__ = 'MIT'

docs/source/conf.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,8 @@
105105
'years': '2016-%s' % datetime.datetime.now().year,
106106
'scm_name': 'Github',
107107
'scm_url': 'https://github.com/Bernardo-MG/dice-notation-python',
108-
'ci_name': 'Travis',
109-
'ci_url': 'https://travis-ci.org/Bernardo-MG/dice-notation-python',
108+
'ci_name': 'Github',
109+
'ci_url': 'https://github.com/Bernardo-MG/dice-notation-python/actions',
110110
'issues_name': 'Github',
111111
'issues_url': 'https://github.com/Bernardo-MG/dice-notation-python/issues',
112112
'releases_repos': [
@@ -120,8 +120,7 @@
120120
('Grammar', './docs/grammar.html'),
121121
('Notation', './docs/notation.html'),
122122
('Parser', './docs/parser.html')]),
123-
('Info and Reports', [('Reports', './reports.html'),
124-
('Code docs', './code/index.html')])],
123+
('Info and Reports', [('Code docs', './code/index.html')])],
125124
}
126125

127126
# Output file base name for HTML help builder.

docs/source/index.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ Features
2222

2323
acquire
2424
usage
25-
reports
2625
code/index
2726
docs/dice
2827
docs/grammar

docs/source/reports.rst

Lines changed: 0 additions & 26 deletions
This file was deleted.

requirements.txt

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
# Installation and deployment
2-
setuptools==46.1.1
3-
twine==3.1.1
2+
setuptools==54.2.0
3+
wheel==0.36.2
4+
twine==3.4.1
45
bernardomg.tox-test-command==1.1.6
56
bernardomg.version-extractor==1.0.3
67

78
# Testing
8-
tox==3.14.5
9+
tox==3.23.0
910

1011
# Documentation
11-
Sphinx==2.4.4
12-
sphinx-docs-theme==1.0.3
13-
Pygments==2.6.1
12+
Sphinx==3.5.3
13+
sphinx-docs-theme==1.0.7
14+
Pygments==2.8.1
1415

1516
# Parsing
1617
antlr4-python3-runtime==4.7.2

0 commit comments

Comments
 (0)