Skip to content

Commit

Permalink
0.1.1 branch (#63)
Browse files Browse the repository at this point in the history
* update requirements/deps management
* Adds pre-commit config
* Fix linting issues
* update version
* make library compatible to windows

The `Path` class does use OS-dependent directory separators, so `mylab.unl` becomes `\mylab.unl` on Windows and results in an error.
Using `.as_posix()` forces `/` as a separator and fixes that issue.

Co-authored-by: Martin Plattner <[email protected]>
  • Loading branch information
ttafsir and mplattner authored Jan 5, 2022
1 parent b178eae commit 3efc377
Show file tree
Hide file tree
Showing 36 changed files with 623 additions and 1,345 deletions.
46 changes: 0 additions & 46 deletions .github/workflows/ci.yml

This file was deleted.

31 changes: 31 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
name: Lint
on: push
jobs:
build:
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
python-version: [3.8, 3.9]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements*.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-dev.txt
pip install pre-commit
- name: Run pre-commit checks
run: |
SKIP=no-commit-to-branch pre-commit run --all-files
23 changes: 23 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.4.0
hooks:
- id: check-added-large-files
- id: check-merge-conflict
- id: check-symlinks
- id: detect-private-key
- id: end-of-file-fixer
- id: no-commit-to-branch
args: [--branch, develop, --branch, master, --branch, main]
- id: trailing-whitespace
- repo: https://github.com/psf/black
rev: 20.8b1
hooks:
- id: black
language_version: python3
- repo: https://github.com/PyCQA/flake8
rev: 3.9.1
hooks:
- id: flake8
1 change: 0 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,4 +103,3 @@ export EVE_NG_USERNAME=admin
export EVE_NG_PASSWORD=eve
export EVE_NG_LAB_PATH='/datacenter/leaf_spine_lab.unl'
```

2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ evengsdk



Python SDK and command line utilities to work with the EVE-NG REST API
Python SDK and command line utilities to work with the EVE-NG REST API


* Free software: MIT license
Expand Down
61 changes: 26 additions & 35 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@
#
import os
import sys
sys.path.insert(0, os.path.abspath('..'))

import evengsdk
sys.path.insert(0, os.path.abspath(".."))

import evengsdk # noqa

# -- General configuration ---------------------------------------------

Expand All @@ -31,26 +32,22 @@

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.viewcode',
'sphinx_click'
]
extensions = ["sphinx.ext.autodoc", "sphinx.ext.viewcode", "sphinx_click"]

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
templates_path = ["_templates"]

# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
#
# source_suffix = ['.rst', '.md']
source_suffix = '.rst'
source_suffix = ".rst"

# The master toctree document.
master_doc = 'index'
master_doc = "index"

# General information about the project.
project = 'evengsdk'
project = "evengsdk"
copyright = "2021, Tafsir Thiam"
author = "Tafsir Thiam"

Expand All @@ -59,9 +56,9 @@
# the built documents.
#
# The short X.Y version.
version = '0.1.0' # evengsdk.__version__
version = "0.1.1" # evengsdk.__version__
# The full version, including alpha/beta/rc tags.
release = '0.1.0' # evengsdk.__version__
release = "0.1.1" # evengsdk.__version__

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand All @@ -73,10 +70,10 @@
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This patterns also effect to html_static_path and html_extra_path
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
pygments_style = "sphinx"

# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = False
Expand All @@ -87,7 +84,7 @@
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'sphinx_rtd_theme'
html_theme = "sphinx_rtd_theme"

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


# -- Options for HTMLHelp output ---------------------------------------

# Output file base name for HTML help builder.
htmlhelp_basename = 'evengsdkdoc'
htmlhelp_basename = "evengsdkdoc"


# -- Options for LaTeX output ------------------------------------------
Expand All @@ -113,15 +110,12 @@
# The paper size ('letterpaper' or 'a4paper').
#
# 'papersize': 'letterpaper',

# The font size ('10pt', '11pt' or '12pt').
#
# 'pointsize': '10pt',

# Additional stuff for the LaTeX preamble.
#
# 'preamble': '',

# Latex figure (float) alignment
#
# 'figure_align': 'htbp',
Expand All @@ -131,21 +125,15 @@
# (source start file, target name, title, author, documentclass
# [howto, manual, or own class]).
latex_documents = [
(master_doc, 'evengsdk.tex',
'evengsdk Documentation',
'Tafsir Thiam', 'manual'),
(master_doc, "evengsdk.tex", "evengsdk Documentation", "Tafsir Thiam", "manual"),
]


# -- Options for manual page output ------------------------------------

# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'evengsdk',
'evengsdk Documentation',
[author], 1)
]
man_pages = [(master_doc, "evengsdk", "evengsdk Documentation", [author], 1)]


# -- Options for Texinfo output ----------------------------------------
Expand All @@ -154,10 +142,13 @@
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'evengsdk',
'evengsdk Documentation',
author,
'evengsdk',
'One line description of project.',
'Miscellaneous'),
(
master_doc,
"evengsdk",
"evengsdk Documentation",
author,
"evengsdk",
"One line description of project.",
"Miscellaneous",
),
]
2 changes: 1 addition & 1 deletion docs/images/eve_cli.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 3efc377

Please sign in to comment.