Skip to content

Commit

Permalink
feat: Load external (#51)
Browse files Browse the repository at this point in the history
* Add load external feature.
* Removed travis build and added github actions.
* Uses safe load for yaml
  • Loading branch information
SlashGordon committed Nov 26, 2020
1 parent 207bd06 commit 8c9cdb1
Show file tree
Hide file tree
Showing 14 changed files with 297 additions and 147 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: CI

on:
push:
branches:
- '*' # matches every branch that doesn't contain a '/'
- '*/*' # matches every branch containing a single '/'
- '**' # matches every branch
- '!master' # excludes master

jobs:
# Test
test:
runs-on: ubuntu-latest
strategy:
matrix:
python: [3.8]

steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python }}
- name: Install dependencies
run: pip install tox
- name: Run tests
run: tox
- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action@v1.5
if: always()
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
files: test-results/**/*.xml
47 changes: 47 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Pull Request

on:
pull_request:
branches: [master]
jobs:
# Test
test:
runs-on: ubuntu-latest
strategy:
matrix:
python: [3.8]

steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python }}
- name: Install dependencies
run: pip install tox
- name: Run tests
run: |
tox
- name: Coveralls
uses: AndreMiras/coveralls-python-action@develop
with:
parallel: true
debug: true
- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action@v1.5
if: always()
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
files: test-results/**/*.xml
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
coveralls_finish:
needs: test
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: AndreMiras/coveralls-python-action@develop
with:
parallel-finished: true
debug: true
48 changes: 48 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Release Build

on:
push:
branches:
- master
jobs:
release:
if: "!contains(github.event.commits[0].message, '[skip ci]')"
runs-on: ubuntu-latest
strategy:
matrix:
python: [3.8]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python }}
- name: Install dependencies
run: pip install tox
- name: Run tests
run: |
tox
- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action@v1.5
if: always()
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
files: test-results/**/*.xml
- name: Coveralls
uses: AndreMiras/coveralls-python-action@develop
with:
parallel: true
debug: true
- name: Python Semantic Release
uses: relekang/python-semantic-release@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
pypi_token: ${{ secrets.PYPI_TOKEN_PP }}
coveralls_finish:
needs: release
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: AndreMiras/coveralls-python-action@develop
with:
parallel-finished: true
debug: true
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ src/pytickersymbols/data/stocks.json
.theia/*
stockswithmetadata.yaml
tools/src/pytickersymbols/data/stocks.json
test-results/test.xml
20 changes: 0 additions & 20 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Build Status](https://travis-ci.org/portfolioplus/pytickersymbols.svg?branch=master)](https://travis-ci.org/portfolioplus/pytickersymbols)
![Release Build](https://github.com/portfolioplus/pytickersymbols/workflows/Release%20Build/badge.svg)
![PyPI - Downloads](https://img.shields.io/pypi/dm/pytickersymbols?style=plastic)
[![Coverage Status](https://coveralls.io/repos/github/portfolioplus/pytickersymbols/badge.svg?branch=master)](https://coveralls.io/github/portfolioplus/pytickersymbols?branch=master)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/3a4c80c87cd041129cae251d6acb39c7)](https://www.codacy.com/app/SlashGordon/pytickersymbols?utm_source=github.com&utm_medium=referral&utm_content=portfolioplus/pytickersymbols&utm_campaign=Badge_Grade)
Expand Down
3 changes: 0 additions & 3 deletions requirements-meta.txt

This file was deleted.

7 changes: 7 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[semantic_release]
version_variable=src/pytickersymbols/__init__.py:__version__
branch=master
commit_version_number = True
commit_subject = release {version} [skip ci]
commit_message =
commit_author = release-bot <release@travis>
10 changes: 8 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,25 @@
Use of this source code is governed by an MIT-style license that
can be found in the LICENSE file.
"""
import re
from setuptools import setup, find_packages

EXCLUDE_FROM_PACKAGES = ['test', 'test.*', 'test*']

VERSION = '1.1.15'
VERSION = '0.0.0'

with open("README.md", "r") as fh:
long_description = fh.read()

INSTALL_REQUIRES = (
['wheel==0.35.1']
['wheel==0.35.1', 'PyYAML==5.3.1']
)

with open('src/pytickersymbols/__init__.py', 'r') as fd:
VERSION = re.search(
r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE
).group(1)

setup(
name="pytickersymbols",
version=VERSION,
Expand Down

0 comments on commit 8c9cdb1

Please sign in to comment.