forked from release-depot/bugjira
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bare bones files for packaging and testing the new library.
- Loading branch information
Showing
14 changed files
with
201 additions
and
1 deletion.
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,54 @@ | ||
name: run tests | ||
on: | ||
push: | ||
pull_request: | ||
branches: [ main ] | ||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python: ['3.7', '3.8', '3.9', '3.10', '3.11'] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python }} | ||
- name: Install Tox and any other packages | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install tox tox-gh-actions | ||
- name: Run Tox | ||
# Run tox using the version of Python in `PATH` | ||
run: tox -epy | ||
flake8: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.11 | ||
- name: Install Tox and any other packages | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install tox tox-gh-actions | ||
- name: Lint with flake8 | ||
run: tox -eflake8 | ||
twine: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.11 | ||
- name: Install Tox and any other packages | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install tox tox-gh-actions | ||
- name: Run twine-check | ||
run: tox -etwine |
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,10 @@ | ||
[[source]] | ||
url = "https://pypi.org/simple" | ||
verify_ssl = true | ||
name = "pypi" | ||
|
||
[packages] | ||
bugjira = {path = ".",editable = true} | ||
|
||
[dev-packages] | ||
bugjira = {path = ".",extras = ["devbase","test","docs","dist"],editable = 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,2 @@ | ||
# Bugjira | ||
Bugjira is an abstraction layer library for interacting with either bugzilla or JIRA through the use of their respective python libraries. |
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,2 @@ | ||
-i https://pypi.python.org/simple | ||
-e .[devbase,dist] |
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 @@ | ||
[build-system] | ||
requires = [ | ||
"setuptools>=61.0", | ||
"wheel", | ||
"setuptools_scm[toml]>=6.2" | ||
] | ||
build-backend = "setuptools.build_meta" |
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,2 @@ | ||
-i https://pypi.python.org/simple | ||
-e . |
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,52 @@ | ||
[metadata] | ||
name = bugjira | ||
author = Steve Linabery | ||
author_email = [email protected] | ||
description = API abstraction library for bugzilla and jira APIs | ||
long_description = file: README.md | ||
long_description_content_type = text/markdown | ||
url = https://github.com/release-depot/bugjira | ||
project_urls = | ||
Bug Tracker = https://github.com/release-depot/bugjira/issues | ||
license = MIT | ||
license_files = LICENSE | ||
classifiers = | ||
Development Status :: 3 - Alpha | ||
Environment :: Web Environment | ||
Intended Audience :: Developers | ||
License :: OSI Approved :: MIT License | ||
Programming Language :: Python :: 3 | ||
Operating System :: OS Independent | ||
|
||
[options] | ||
package_dir = | ||
= src | ||
packages = find: | ||
python_requires = >=3.7 | ||
install_requires = | ||
|
||
[options.extras_require] | ||
devbase = | ||
tox | ||
|
||
test = | ||
flake8 | ||
pytest | ||
pytest-cov | ||
|
||
docs = | ||
sphinx==4.3.1 | ||
sphinx-autobuild==2021.3.14 | ||
sphinx-rtd-theme==0.5.2 | ||
myst-parser==0.15.2 | ||
|
||
dist = | ||
build | ||
setuptools_scm | ||
twine | ||
|
||
[options.packages.find] | ||
where = src | ||
|
||
[flake8] | ||
exclude = docs |
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 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
|
||
"""The setup script.""" | ||
|
||
import os | ||
|
||
from setuptools import setup | ||
|
||
|
||
def check_if_scm(): | ||
if os.environ.get('SCM_NO_LOCAL_SCHEME'): | ||
return "no-local-version" | ||
else: | ||
return "node-and-date" | ||
|
||
|
||
setup( | ||
use_scm_version={'local_scheme': check_if_scm()} | ||
) |
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,2 @@ | ||
-i https://pypi.python.org/simple | ||
-e .[devbase,test] |
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 @@ | ||
def test_pytest(): | ||
# no-op test to show that pytest can run in the tox environment | ||
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,11 @@ | ||
# FIXME: Delete this line and uncomment the following lines after the first tag is pushed | ||
#the_dir=$1 | ||
#: ${the_dir:=.} | ||
#cd $the_dir | ||
#pwd | ||
## We run the script twice. First time it to create the base file: | ||
#curl -s "https://raw.githubusercontent.com/release-depot/change/latest/change" | | ||
#sh -s -- init | ||
## Second time is to populate it with tag data: | ||
#curl -s "https://raw.githubusercontent.com/release-depot/change/latest/change" | | ||
#sh -s -- |
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 @@ | ||
[tox] | ||
envlist = | ||
py{37,38,39,310,311} | ||
flake8 | ||
|
||
[testenv] | ||
passenv=HOME | ||
sitepackages = False | ||
deps = -r{toxinidir}/requirements.txt | ||
-r{toxinidir}/test-requirements.txt | ||
-r{toxinidir}/dist-requirements.txt | ||
commands = | ||
pytest --cov-report=term-missing --cov=src tests | ||
|
||
[testenv:flake8] | ||
passenv=HOME | ||
sitepackages = False | ||
commands = | ||
flake8 --ignore=E501,W504 setup.py src tests | ||
|
||
[testenv:build] | ||
passenv = | ||
SCM_NO_LOCAL_SCHEME | ||
allowlist_externals = | ||
/bin/bash | ||
commands = | ||
/bin/bash tooling/build_changelog | ||
python -m build | ||
|
||
[testenv:twine] | ||
allowlist_externals = /bin/bash | ||
commands = | ||
/bin/bash tooling/build_changelog | ||
python -m build | ||
twine check --strict dist/* |