Skip to content

Commit 4eaa382

Browse files
authored
Merge pull request #100 from devopshq/github-actions
GitHub actions
2 parents b10b49e + 7c3c703 commit 4eaa382

File tree

12 files changed

+759
-524
lines changed

12 files changed

+759
-524
lines changed

.github/workflows/release.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# This workflow will upload a Python Package using Twine when a release is created
2+
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
3+
4+
name: Upload Python Package
5+
6+
on:
7+
release:
8+
types: [published]
9+
10+
permissions:
11+
contents: read
12+
13+
jobs:
14+
deploy:
15+
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- uses: actions/checkout@v3
20+
- name: Set up Python
21+
uses: actions/setup-python@v3
22+
with:
23+
python-version: '3.7'
24+
- name: Install dependencies
25+
run: |
26+
python -m pip install --upgrade pip
27+
pip install build
28+
- name: Build package
29+
run: python -m build
30+
- name: Publish package
31+
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
32+
with:
33+
user: __token__
34+
password: ${{ secrets.PYPI_API_TOKEN }}

.github/workflows/tests.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Tests
2+
3+
on:
4+
- push
5+
6+
jobs:
7+
tests:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v3
11+
- name: Set up Python
12+
uses: actions/setup-python@v3
13+
with:
14+
python-version: '3.7'
15+
- name: Tests
16+
run: |
17+
python ./setup.py test

.pre-commit-config.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
repos:
2+
- repo: https://github.com/humitos/mirrors-autoflake
3+
rev: v1.1
4+
hooks:
5+
- id: autoflake
6+
args: ['-i', '--remove-all-unused-imports']
7+
- repo: https://github.com/psf/black
8+
rev: 22.3.0
9+
hooks:
10+
- id: black
11+
language_version: python3
12+
- repo: https://github.com/asottile/blacken-docs
13+
rev: v1.12.1
14+
hooks:
15+
- id: blacken-docs
16+
additional_dependencies: [black]
17+
- repo: https://github.com/asottile/reorder_python_imports
18+
rev: v3.0.1
19+
hooks:
20+
- id: reorder-python-imports

.travis.yml

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

docs/conf.py

Lines changed: 30 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -5,31 +5,29 @@
55
# This file does only contain a selection of the most common options. For a
66
# full list see the documentation:
77
# http://www.sphinx-doc.org/en/master/config
8-
98
# -- Path setup --------------------------------------------------------------
10-
119
# If extensions (or modules to document with autodoc) are in another directory,
1210
# add these directories to sys.path here. If the directory is relative to the
1311
# documentation root, use os.path.abspath to make it absolute, like shown here.
1412
#
1513
import os
1614
import sys
1715

18-
sys.path.insert(0, os.path.abspath('..'))
16+
sys.path.insert(0, os.path.abspath(".."))
1917

2018

2119
# -- Project information -----------------------------------------------------
2220

23-
project = 'TFS'
24-
copyright = '2018, DevOpsHQ (devopshq)'
25-
author = 'Alexey Burov (allburov)'
21+
project = "TFS"
22+
copyright = "2018, DevOpsHQ (devopshq)"
23+
author = "Alexey Burov (allburov)"
2624

2725
# The short X.Y version
28-
version = ''
26+
version = ""
2927
# The full version, including alpha/beta/rc tags
30-
release = ''
28+
release = ""
3129

32-
highlight_language = 'python3'
30+
highlight_language = "python3"
3331

3432

3533
# -- General configuration ---------------------------------------------------
@@ -41,24 +39,21 @@
4139
# Add any Sphinx extension module names here, as strings. They can be
4240
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
4341
# ones.
44-
extensions = [
45-
'sphinx.ext.autodoc',
46-
'sphinx.ext.viewcode',
47-
'sphinx.ext.intersphinx']
42+
extensions = ["sphinx.ext.autodoc", "sphinx.ext.viewcode", "sphinx.ext.intersphinx"]
4843

49-
autodoc_default_flags = ['members', 'undoc-members', 'show-inheritance']
44+
autodoc_default_flags = ["members", "undoc-members", "show-inheritance"]
5045

5146
# Add any paths that contain templates here, relative to this directory.
52-
templates_path = ['_templates']
47+
templates_path = ["_templates"]
5348

5449
# The suffix(es) of source filenames.
5550
# You can specify multiple suffix as a list of string:
5651
#
5752
# source_suffix = ['.rst', '.md']
58-
source_suffix = '.rst'
53+
source_suffix = ".rst"
5954

6055
# The master toctree document.
61-
master_doc = 'index'
56+
master_doc = "index"
6257

6358
# The language for content autogenerated by Sphinx. Refer to documentation
6459
# for a list of supported languages.
@@ -70,18 +65,18 @@
7065
# List of patterns, relative to source directory, that match files and
7166
# directories to ignore when looking for source files.
7267
# This pattern also affects html_static_path and html_extra_path .
73-
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
68+
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
7469

7570
# The name of the Pygments (syntax highlighting) style to use.
76-
pygments_style = 'sphinx'
71+
pygments_style = "sphinx"
7772

7873

7974
# -- Options for HTML output -------------------------------------------------
8075

8176
# The theme to use for HTML and HTML Help pages. See the documentation for
8277
# a list of builtin themes.
8378
#
84-
html_theme = 'alabaster'
79+
html_theme = "alabaster"
8580

8681
# Theme options are theme-specific and customize the look and feel of a theme
8782
# further. For a list of options available for each theme, see the
@@ -92,7 +87,7 @@
9287
# Add any paths that contain custom static files (such as style sheets) here,
9388
# relative to this directory. They are copied after the builtin static files,
9489
# so a file named "default.css" will overwrite the builtin "default.css".
95-
html_static_path = ['_static']
90+
html_static_path = ["_static"]
9691

9792
# Custom sidebar templates, must be a dictionary that maps document names
9893
# to template names.
@@ -102,15 +97,13 @@
10297
# default: ``['localtoc.html', 'relations.html', 'sourcelink.html',
10398
# 'searchbox.html']``.
10499
#
105-
html_sidebars = {
106-
"**": ["about.html", "navigation.html", "searchbox.html"]
107-
}
100+
html_sidebars = {"**": ["about.html", "navigation.html", "searchbox.html"]}
108101

109102

110103
# -- Options for HTMLHelp output ---------------------------------------------
111104

112105
# Output file base name for HTML help builder.
113-
htmlhelp_basename = 'TFSdoc'
106+
htmlhelp_basename = "TFSdoc"
114107

115108

116109
# -- Options for LaTeX output ------------------------------------------------
@@ -119,15 +112,12 @@
119112
# The paper size ('letterpaper' or 'a4paper').
120113
#
121114
# 'papersize': 'letterpaper',
122-
123115
# The font size ('10pt', '11pt' or '12pt').
124116
#
125117
# 'pointsize': '10pt',
126-
127118
# Additional stuff for the LaTeX preamble.
128119
#
129120
# 'preamble': '',
130-
131121
# Latex figure (float) alignment
132122
#
133123
# 'figure_align': 'htbp',
@@ -137,19 +127,15 @@
137127
# (source start file, target name, title,
138128
# author, documentclass [howto, manual, or own class]).
139129
latex_documents = [
140-
(master_doc, 'TFS.tex', 'TFS Documentation',
141-
'Alexey Burov (allburov)', 'manual'),
130+
(master_doc, "TFS.tex", "TFS Documentation", "Alexey Burov (allburov)", "manual"),
142131
]
143132

144133

145134
# -- Options for manual page output ------------------------------------------
146135

147136
# One entry per manual page. List of tuples
148137
# (source start file, name, description, authors, manual section).
149-
man_pages = [
150-
(master_doc, 'tfs', 'TFS Documentation',
151-
[author], 1)
152-
]
138+
man_pages = [(master_doc, "tfs", "TFS Documentation", [author], 1)]
153139

154140

155141
# -- Options for Texinfo output ----------------------------------------------
@@ -158,7 +144,13 @@
158144
# (source start file, target name, title, author,
159145
# dir menu entry, description, category)
160146
texinfo_documents = [
161-
(master_doc, 'TFS', 'TFS Documentation',
162-
author, 'TFS', 'One line description of project.',
163-
'Miscellaneous'),
164-
]
147+
(
148+
master_doc,
149+
"TFS",
150+
"TFS Documentation",
151+
author,
152+
"TFS",
153+
"One line description of project.",
154+
"Miscellaneous",
155+
),
156+
]

requirements-travis.txt

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

0 commit comments

Comments
 (0)