Updates due to Tildegit move

This commit is contained in:
~lucidiot 2022-08-05 00:46:30 +02:00
parent 4438f17e94
commit e3a89613e1
Signed by: lucidiot
GPG Key ID: 3358C1CA6906FB8D
10 changed files with 136 additions and 116 deletions

112
.drone.yml Normal file
View File

@ -0,0 +1,112 @@
---
kind: pipeline
type: docker
name: default
steps:
- name: pre-commit
image: python:3-alpine
commands:
- apk add --no-cache git gcc musl-dev
- pip install .[dev]
- pre-commit run -a
- name: test-py36
image: python:3.6-alpine
commands:
- pip install .[dev]
- coverage run setup.py test
- coverage report
- name: test-py37
image: python:3.7-alpine
commands:
- pip install .[dev]
- coverage run setup.py test
- coverage report
- name: test-py38
image: python:3.8-alpine
commands:
- pip install .[dev]
- coverage run setup.py test
- coverage report
- name: test-py39
image: python:3.9-alpine
commands:
- pip install .[dev]
- coverage run setup.py test
- coverage report
- name: test-py310
image: python:3.10-alpine
commands:
- pip install .[dev]
- coverage run setup.py test
- coverage report
- name: testpypi
image: python:3.10-alpine
commands:
- pip install .[dev] twine setuptools wheel
- |
echo "[distutils]
index-servers = testpypi
[testpypi]
repository=https://test.pypi.org/legacy/
username=$$PYPI_DEPLOY_USERNAME
password=$$PYPI_DEPLOY_PASSWORD" > ~/.pypirc
- python setup.py sdist bdist_wheel
- twine upload dist/* -r testpypi
when:
event:
- promote
repo:
- lucidiot/pylspci
depends_on:
- pre-commit
- test-py36
- test-py37
- test-py38
- test-py39
- test-py310
environment:
PYPI_DEPLOY_USERNAME:
from_secret: pypi_username
PYPI_DEPLOY_PASSWORD:
from_secret: pypi_password
- name: pypi
image: python:3.10-alpine
commands:
- pip install .[dev] twine setuptools wheel
- |
echo "[distutils]
index-servers = pypi
[pypi]
repository=https://upload.pypi.org/legacy/
username=$$PYPI_DEPLOY_USERNAME
password=$$PYPI_DEPLOY_PASSWORD" > ~/.pypirc
- python setup.py sdist bdist_wheel
- twine upload dist/* -r pypi
when:
event:
- promote
repo:
- lucidiot/pylspci
branch:
- master
depends_on:
- testpypi
environment:
PYPI_DEPLOY_USERNAME:
from_secret: pypi_username
PYPI_DEPLOY_PASSWORD:
from_secret: pypi_password

View File

@ -1,90 +0,0 @@
image: python:3.9
stages:
- test
- deploy
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
cache:
paths:
- .cache/pip
- venv/
before_script:
- pip install virtualenv
- virtualenv venv
- source venv/bin/activate
- pip install .[dev]
tests:
stage: test
coverage: '/TOTAL[\s\d]+\s(\d+%)/'
script:
- coverage run setup.py test
- coverage report
- codecov
pre-commit:
stage: test
script:
- pre-commit run -a
deploy-pypi:
stage: deploy
when: manual
only:
- master@Lucidiot/pylspci
environment:
name: pypi
url: https://pypi.org/project/pylspci
script:
- pip install twine setuptools wheel
- echo "[distutils]" > ~/.pypirc
- echo "index-servers =" >> ~/.pypirc
- echo " pypi" >> ~/.pypirc
- echo "[pypi]" >> ~/.pypirc
- echo "repository=https://upload.pypi.org/legacy/" >> ~/.pypirc
- echo "username=$PYPI_DEPLOY_USERNAME" >> ~/.pypirc
- echo "password=$PYPI_DEPLOY_PASSWORD" >> ~/.pypirc
- python setup.py sdist bdist_wheel
- twine upload dist/* -r pypi
deploy-testpypi:
stage: deploy
when: manual
only:
- branches@Lucidiot/pylspci
environment:
name: testpypi
url: https://test.pypi.org/project/pylspci
script:
- pip install twine setuptools wheel
- echo "[distutils]" > ~/.pypirc
- echo "index-servers =" >> ~/.pypirc
- echo " testpypi" >> ~/.pypirc
- echo "[testpypi]" >> ~/.pypirc
- echo "repository=https://test.pypi.org/legacy/" >> ~/.pypirc
- echo "username=$PYPI_DEPLOY_USERNAME" >> ~/.pypirc
- echo "password=$PYPI_DEPLOY_PASSWORD" >> ~/.pypirc
- python setup.py sdist bdist_wheel
- twine upload dist/* -r testpypi
pages:
stage: deploy
when: manual
needs:
- pre-commit
only:
- master@Lucidiot/pylspci
artifacts:
paths:
- public
script:
- cd docs
- make html
- mv _build/html ../public

View File

@ -5,4 +5,4 @@ A Python parser for the ``lspci`` command from the pciutils_ package.
`Browse documentation`_
.. _pciutils: http://mj.ucw.cz/sw/pciutils/
.. _Browse documentation: https://lucidiot.gitlab.io/pylspci/
.. _Browse documentation: https://lucidiot.tildepages.org/pylspci/

View File

@ -21,7 +21,7 @@ sys.path.insert(0, os.path.abspath('..'))
# -- Project information -----------------------------------------------------
project = 'pylspci'
copyright = '2019, Lucidiot and contributors'
copyright = '2022, Lucidiot and contributors'
author = 'Lucidiot and contributors'
# The short X.Y version
@ -62,7 +62,7 @@ master_doc = 'index'
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None
language = 'en'
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.

View File

@ -6,8 +6,8 @@ Contributions to the project are greatly appreciated.
Bugs and suggestions
--------------------
You may `submit an issue`_ to GitLab to warn of any bugs, ask for new features,
or ask any questions that are not answered in this documentation.
You may `submit an issue`_ to the Gitea repository to warn of any bugs, ask for
new features, or ask any questions that are not answered in this documentation.
When reporting a bug, do not forget to put in your version of Python and your
version of *pylspci*. This will greatly help when troubleshooting, as most
@ -22,7 +22,7 @@ Setup
You will need a virtual envionment to work properly. `virtualenvwrapper`_ is
recommended::
git clone https://gitlab.com/Lucidiot/pylspci
git clone https://tildegit.org/lucidiot/pylspci.git
cd pylspci
mkvirtualenv -a . pylspci
pip install -e .[dev]
@ -44,8 +44,8 @@ Tests coverage
I aim for 100% coverage on all of my Python packages whenever I add unit
tests to them; this package is no exception. CI checks use the `coverage`_
Python package and `codecov`_ to check for test coverage. To get test coverage
data locally, run::
Python package to get coverage statistics.
To get test coverage data locally, run::
coverage run setup.py test
@ -60,7 +60,7 @@ offline using your favorite web browser and shows line by line coverage::
If you are having issues reaching 100% coverage, try to still add some tests,
and mention your issues when creating a pull request to the
`GitLab repository`_.
`Gitea repository`_.
Linting
^^^^^^^
@ -82,13 +82,12 @@ Documentation
The documentation you are reading is generated by the `Sphinx`_ tool.
The text files that hold the documentation's contents are written in
`reStructuredText`_ and are available under the ``/docs`` folder of the
`GitLab repository`_.
`Gitea repository`_.
They are also subject to linting using the ``doc8`` tool.
.. _submit an issue: https://gitlab.com/Lucidiot/pylspci/issues/new
.. _submit an issue: https://tildegit.org/lucidiot/pylspci/issues/new
.. _virtualenvwrapper: https://virtualenvwrapper.readthedocs.io
.. _coverage: https://coverage.readthedocs.io/
.. _codecov: https://codecov.io/gl/Lucidiot/pylspci
.. _GitLab repository: https://gitlab.com/Lucidiot/pylspci
.. _Gitea repository: https://tildegit.org/lucidiot/pylspci
.. _Sphinx: http://www.sphinx-doc.org/
.. _reStructuredText: http://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html

View File

@ -18,14 +18,11 @@ Python lspci parser
.. image:: https://img.shields.io/pypi/status/pylspci.svg
:target: https://pypi.org/project/pylspci
.. image:: https://gitlab.com/Lucidiot/pylspci/badges/master/pipeline.svg
:target: https://gitlab.com/Lucidiot/pylspci/pipelines
.. image:: https://drone.tildegit.org/api/badges/lucidiot/pylspci/status.svg
:target: https://drone.tildegit.org/api/badges/lucidiot/pylspci/status.svg
.. image:: https://codecov.io/gl/Lucidiot/pylspci/branch/master/graph/badge.svg
:target: https://codecov.io/gl/Lucidiot/pylspci
.. image:: https://img.shields.io/badge/badge%20count-8-brightgreen.svg
:target: https://gitlab.com/Lucidiot/pylspci
.. image:: https://img.shields.io/badge/badge%20count-7-brightgreen.svg
:target: https://tildegit.org/lucidiot/pylspci
A Python parser for the ``lspci`` command from the pciutils_ package.

View File

@ -8,7 +8,7 @@ from pylspci.parsers.base import Parser
UNKNOWN_FIELD_WARNING = (
'Unsupported device field {!r} with value {!r}\n'
'Please report this, along with the output of `lspci -mmnnvvvk`, at '
'https://gitlab.com/Lucidiot/pylspci/issues'
'https://tildegit.org/lucidiot/pylspci/issues/new'
)

View File

@ -87,7 +87,7 @@ class TestVerboseParser(TestCase):
msg="Unsupported device field 'NewField' with value 'Value'\n"
"Please report this, along with the output of"
"`lspci -mmnnvvvk`, at "
"https://gitlab.com/Lucidiot/pylspci/issues"):
"https://tildegit.org/lucidiot/pylspci/issues/new"):
devices: List[Device] = \
self.parser.parse(SAMPLE_DEVICE + 'NewField\tValue')

View File

@ -1,5 +1,4 @@
doc8>=0.8.0
Sphinx>=1.8.1
coverage>=4.5
codecov>=2.0
pre-commit>=2.9.2

View File

@ -42,7 +42,7 @@ setup(
long_description=open('README.rst').read(),
long_description_content_type='text/x-rst',
keywords="lspci parser",
url="https://gitlab.com/Lucidiot/pylspci",
url="https://tildegit.org/lucidiot/pylspci",
classifiers=[
"Development Status :: 4 - Beta",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
@ -54,13 +54,16 @@ setup(
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Topic :: Software Development :: Libraries",
"Topic :: System :: Hardware",
"Topic :: Utilities",
"Typing :: Typed",
],
project_urls={
"Source Code": "https://gitlab.com/Lucidiot/pylspci",
"GitHub Mirror": "https://github.com/Lucidiot/pylspci",
"Homepage": "https://tildegit.org/lucidiot/pylspci",
"Changelog": "https://tildegit.org/lucidiot/pylspci/releases",
"Documentation": "https://lucidiot.tildepages.org/pylspci/",
"Issue tracker": "https://tildegit.org/lucidiot/pylspci/issues",
}
)