Skip to content

Commit

Permalink
Merge branch 'didix21:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredliw committed Oct 17, 2021
2 parents 518c0b5 + c7c119c commit e70c8c6
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 20 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Python application

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.6
uses: actions/setup-python@v2
with:
python-version: 3.6
- name: Install dependencies
run: pip install coverage
- name: Test unittest
run: |
coverage run -m unittest discover
coverage xml
- name: "Upload coverage to Codecov"
uses: codecov/codecov-action@v2
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -229,5 +229,7 @@ tags
# Ignore all local history of files
.history

# End of https://www.gitignore.io/api/vim,python,pycharm+all,visualstudiocode
# Mac
.DS_Store

# End of https://www.gitignore.io/api/vim,python,pycharm+all,visualstudiocode
18 changes: 0 additions & 18 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,7 +1,7 @@
# mdutils
[![Build Status](https://travis-ci.org/didix21/mdutils.svg?branch=master)](https://travis-ci.org/didix21/mdutils)
[![Documentation Status](https://readthedocs.org/projects/mdutils/badge/?version=latest)](http://mdutils.readthedocs.io/en/latest/?badge=latest)
[![Coverage Status](https://coveralls.io/repos/github/didix21/mdutils/badge.svg?branch=master)](https://coveralls.io/github/didix21/mdutils?branch=master)
[![codecov](https://codecov.io/gh/didix21/mdutils/branch/master/graph/badge.svg?token=0DN72Z1B6V)](https://codecov.io/gh/didix21/mdutils)

Table of Contents
=================
Expand Down
6 changes: 6 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
coverage:
status:
project:
default:
target: 80% # the required coverage value
threshold: 1%
6 changes: 6 additions & 0 deletions mdutils/mdutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,12 @@ def create_md_file(self):
)
return md_file

def get_md_text(self) -> str:
"""Instead of writing the markdown text into a file it returns it as a string.
:return: return a string with the markdown text."""
return self.title + self.table_of_contents + self.file_data_text + self.reference.get_references_as_markdown()

def read_md_file(self, file_name):
"""Reads a Markdown file and save it to global class `file_data_text`.
Expand Down

0 comments on commit e70c8c6

Please sign in to comment.