-
Notifications
You must be signed in to change notification settings - Fork 27
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 #4 from HLasse/pypi_integration
add pypi integration to spacy version
- Loading branch information
Showing
24 changed files
with
520 additions
and
7 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,14 @@ | ||
--- | ||
name: "\U0001F6A8 Submit a Bug Report" | ||
about: Use this template if you came across a bug or unexpected behaviour differing from the docs. | ||
labels: bug | ||
--- | ||
|
||
## How to reproduce the behaviour | ||
<!-- Include a code example or the steps that led to the problem. Please try to be as specific as possible. --> | ||
|
||
## Your Environment | ||
<!-- Include details of your environment. To get the version of textdescriptives you can get use `python -c "import textdescriptives as td; print(td.__version__)"`.--> | ||
* textdescriptives Version Used: | ||
* Operating System: | ||
* Python Version Used: |
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,10 @@ | ||
--- | ||
name: "\U0001F4DA Submit a Documentation Report" | ||
about: Did you spot a mistake in the docs, is anything unclear or do you have a | ||
suggestion? | ||
labels: documentation | ||
--- | ||
<!-- Describe the problem or suggestion here. If you've found a mistake and you know the answer, feel free to submit a pull request --> | ||
|
||
## Which page or section is this issue related to? | ||
<!-- Please include the URL and/or source. --> |
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,7 @@ | ||
--- | ||
name: "🚀 Submit a Feature request" | ||
about: Use this template if you want a feature added which is currently not present | ||
labels: enhancement | ||
--- | ||
|
||
<!-- Describe your desired feature and why it is important. If possible state what you can and are willing to do to help with it --> |
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,11 @@ | ||
blank_issues_enabled: true | ||
contact_links: | ||
- name: 🗯 Discussions forum | ||
url: https://HLasse/textdescriptives/discussions | ||
about: Usage questions, general discussion and anything else that isn't a bug report or a feature request. | ||
- name: 📖 TextDescriptives usage guides & package references | ||
url: https://HLasse.github.io/textdescriptives/ | ||
about: Everything you need to know about textdescriptives and how to use it. | ||
- name: 🛠 Submit a pull request | ||
url: https://github.com/HLasse/textdescriptives/pulls | ||
about: Did you spot a mistake and know how to fix it? Feel free to submit a PR and contribute! |
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,29 @@ | ||
|
||
name: Documentation | ||
on: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@master | ||
with: | ||
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
pip install sphinx furo sphinx-copybutton sphinxext-opengraph | ||
- name: Build and Commit | ||
uses: sphinx-notes/pages@master | ||
with: | ||
documentation_path: docs | ||
install_requirements: "true" | ||
- name: Push changes | ||
uses: ad-m/github-push-action@master | ||
with: | ||
github_token: ${{ secrets.SPHINX_DOCUMENTATION }} | ||
branch: gh-pages |
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 @@ | ||
|
||
name: Publish to PyPI | ||
on: | ||
push: | ||
branches: [ main ] | ||
|
||
jobs: | ||
pytest: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python 3.9 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.9 | ||
- name: Install pypa/build | ||
run: >- | ||
python -m | ||
pip install | ||
build | ||
--user | ||
- name: Build a binary wheel and a source tarball | ||
run: >- | ||
python -m | ||
build | ||
--sdist | ||
--wheel | ||
--outdir dist/ | ||
. | ||
- name: Publish distribution 📦 to PyPI | ||
uses: pypa/gh-action-pypi-publish@master | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_API_TOKEN }} | ||
skip_existing: true |
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,47 @@ | ||
|
||
name: CI Pytest | ||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
pytest: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- uses: actions/checkout@v2 | ||
- name: Set up Python 3.9 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.9 | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install flake8 pytest pytest-cov | ||
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | ||
- name: Run and write pytest | ||
run: | | ||
python ./dev/pytest-coverage/run_coverage.py | ||
- name: Pytest coverage comment | ||
id: coverage-comment | ||
uses: MishaKav/[email protected] | ||
with: | ||
pytest-coverage-path: ./dev/pytest-coverage/pytest-coverage.txt | ||
|
||
- name: Check the output coverage | ||
run: | | ||
echo "Coverage Report - ${{ steps.coverage-comment.outputs.coverage }}" | ||
echo "Coverage Color - ${{ steps.coverage-comment.outputs.color }}" | ||
- name: Create the Badge | ||
uses: schneegans/[email protected] | ||
with: | ||
auth: ${{ secrets.PYTEST_COVERAGE_COMMENT }} | ||
gistID: af8637d94475ea8bcb6b6a03c4fbcd3e | ||
filename: badge-dacy-pytest-coverage.json | ||
label: Coverage | ||
message: ${{ steps.coverage-comment.outputs.coverage }} | ||
color: ${{ steps.coverage-comment.outputs.color }} | ||
namedLogo: python |
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,26 @@ | ||
name: Pytest (MacOS Catalina) | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
pytest: | ||
runs-on: macos-10.15 | ||
steps: | ||
|
||
- uses: actions/checkout@v2 | ||
- name: Set up Python 3.9 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.9 | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install flake8 pytest pytest-cov | ||
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | ||
- name: Run and write pytest | ||
run: | | ||
python ./dev/pytest-coverage/run_coverage.py |
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,28 @@ | ||
# This is a basic workflow to help you get started with Actions | ||
|
||
name: Pytest (Windows) | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
pytest: | ||
runs-on: windows-latest | ||
steps: | ||
|
||
- uses: actions/checkout@v2 | ||
- name: Set up Python 3.9 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.9 | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install flake8 pytest pytest-cov | ||
pip install -r requirements.txt | ||
- name: Run and write pytest | ||
run: | | ||
python ./dev/pytest-coverage/run_coverage.py |
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
Empty file.
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 @@ | ||
[run] | ||
omit = | ||
textdescriptives/tests/* |
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,36 @@ | ||
""" | ||
A script for running path | ||
""" | ||
import os | ||
import subprocess | ||
from pathlib import Path | ||
|
||
|
||
import subprocess | ||
|
||
test_failed = False | ||
try: | ||
grepOut = subprocess.check_output( | ||
"pytest --cov=textdescriptives --cov-config=dev/pytest-coverage/.coveragerc --cov-report term-missing", | ||
shell=True, | ||
) | ||
output = grepOut.decode("utf-8") | ||
except subprocess.CalledProcessError as grepexc: | ||
output = grepexc.output.decode("utf-8") | ||
test_failed = True | ||
print("error code", grepexc.returncode, "\n\n --------- \n", output) | ||
|
||
|
||
save_path = os.path.join("dev", "pytest-coverage") | ||
Path(save_path).mkdir(parents=True, exist_ok=True) | ||
|
||
save_path = os.path.join(save_path, "pytest-coverage.txt") | ||
|
||
if os.path.exists(save_path): | ||
os.remove(save_path) | ||
with open(save_path, "w") as f: | ||
f.write(output) | ||
|
||
|
||
if test_failed is True: | ||
raise ValueError("Tests did not pass") |
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,20 @@ | ||
# Minimal makefile for Sphinx documentation | ||
# | ||
|
||
# You can set these variables from the command line, and also | ||
# from the environment for the first two. | ||
SPHINXOPTS ?= | ||
SPHINXBUILD ?= sphinx-build | ||
SOURCEDIR = . | ||
BUILDDIR = _build | ||
|
||
# Put it first so that "make" without argument is like "make help". | ||
help: | ||
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | ||
|
||
.PHONY: help Makefile | ||
|
||
# Catch-all target: route all unknown targets to Sphinx using the new | ||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). | ||
%: Makefile | ||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.