Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelSasser committed Jan 23, 2021
1 parent 2ba8b03 commit ef020cc
Show file tree
Hide file tree
Showing 53 changed files with 67 additions and 162 deletions.
9 changes: 4 additions & 5 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
name: Bug report about: Create a report to help us improve title: ''
labels: ''
assignees: ''

Expand Down Expand Up @@ -32,8 +30,9 @@ The complete traceback here.
A clear and concise description of what you expected to happen.

**Desktop (please complete the following information):**
- OS: [e.g. Windows 10 x64 Workstation Build: 19042.746 (20H2)]
- Version of ds2000 [e.g. 0.1.0]

- OS: [e.g. Windows 10 x64 Workstation Build: 19042.746 (20H2)]
- Version of ds2000 [e.g. 0.1.0]

**Additional context**
Add any other context about the problem here.
10 changes: 3 additions & 7 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,18 @@
---
name: Feature request
about: Suggest an idea for this project
title: "[FEATURE]"
name: Feature request about: Suggest an idea for this project title: "[FEATURE]"
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always
frustrated when [...]
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features
you've considered.
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
64 changes: 25 additions & 39 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,14 @@

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making
participation in our project and our community a harassment-free experience for everyone, regardless of age, body size,
disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education,
socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:
Examples of behavior that contributes to creating a positive environment include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
Expand All @@ -22,53 +19,42 @@ include:

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take
appropriate and fair corrective action in response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits,
issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any
contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the
project or its community. Examples of representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed representative at an online or offline
event. Representation of a project may be further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at [email protected]. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at
[email protected]. All complaints will be reviewed and investigated and will result in a response that is deemed
necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to
the reporter of an incident. Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent
repercussions as determined by other members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available
at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

[homepage]: https://www.contributor-covenant.org

Expand Down
24 changes: 10 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@

# ds2000 - The Python Library for Rigol DS2000 Oscilloscopes

ds2000 is a Python package for Rigol DS2000(A) Series Oscilloscopes.
Without touching any SCPI command, you will be able to use any function of
your oscilloscope with an python interface. It wraps every command and puts it
in an logical high level interface for you.
ds2000 is a Python package for Rigol DS2000(A) Series Oscilloscopes. Without touching any SCPI command, you will be able
to use any function of your oscilloscope with an python interface. It wraps every command and puts it in an logical high
level interface for you.

It uses the "[python-vxi11](https://github.com/python-ivi/python-vxi11)"
package to communicate with your Oscilloscope.
Expand All @@ -17,29 +16,26 @@ package to communicate with your Oscilloscope.
## Development

ds2000 is under development. You can try it out, but it might not be ready or
stable. Most features are not implemented yet and untested.
ds2000 is under development. You can try it out, but it might not be ready or stable. Most features are not implemented
yet and untested.

[Check out current development status](https://github.com/MichaelSasser/ds2000/projects/2)

## Semantic Versioning

This repository uses [SemVer](https://semver.org/) for its release
cycle.
This repository uses [SemVer](https://semver.org/) for its release cycle.

## Branching Model

This repository uses the
[git-flow](https://danielkummer.github.io/git-flow-cheatsheet/index.html)
branching model by [Vincent Driessen](https://nvie.com/about/).
It has two branches with infinite lifetime:
branching model by [Vincent Driessen](https://nvie.com/about/). It has two branches with infinite lifetime:

* [master](https://github.com/MichaelSasser/ds2000/tree/master)
* [develop](https://github.com/MichaelSasser/ds2000/tree/develop)

The master branch gets updated on every release. The develop branch is the
merging branch.
The master branch gets updated on every release. The develop branch is the merging branch.

## License
Copyright &copy; 2020-2021 Michael Sasser <[email protected]>.
Released under the GPLv3 license.

Copyright &copy; 2020-2021 Michael Sasser <[email protected]>. Released under the GPLv3 license.
5 changes: 0 additions & 5 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@
import os
import sys

import sphinx_rtd_theme


# sys.path.insert(0, os.path.abspath('.'))
sys.path.insert(0, os.path.abspath("../"))
sys.path.insert(0, os.path.abspath("../.."))
Expand All @@ -32,7 +29,6 @@
# The full version, including alpha/beta/rc tags
release = "0.1.0"


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

# Add any Sphinx extension module names here, as strings. They can be
Expand All @@ -52,7 +48,6 @@
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = []


# -- Options for HTML output -------------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
Expand Down
6 changes: 3 additions & 3 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.. ds2000 documentation master file, created by
sphinx-quickstart on Fri Dec 6 03:52:33 2019.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
sphinx-quickstart on Fri Dec 6 03:52:33 2019.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.

Welcome to ds2000's documentation!
==================================
Expand Down
2 changes: 0 additions & 2 deletions ds2000/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
from .visa.driver import VISADriver
from .waveform import Waveform


Available_Drivers: List[VISADriver] = [VISADriver.DEBUG_DRIVER]

# TODO: Remove NotImplementedError
Expand Down Expand Up @@ -66,7 +65,6 @@
__author__ = "Michael Sasser"
__email__ = "[email protected]"


DEBUGGING: bool = False


Expand Down
2 changes: 0 additions & 2 deletions ds2000/__version__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,9 @@

from pkg_resources import get_distribution


__author__: str = "Michael Sasser"
__email__: str = "[email protected]"


__version__ = get_distribution("ds2000").version

# vim: set ft=python :
1 change: 0 additions & 1 deletion ds2000/acquire.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
from .errors import DS2000Error
from .errors import DS2000StateError


__author__ = "Michael Sasser"
__email__ = "[email protected]"

Expand Down
9 changes: 4 additions & 5 deletions ds2000/channel.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
from .math.format import Prefixed
from .math.format import get_prefix


__author__: str = "Michael Sasser"
__email__: str = "[email protected]"

Expand Down Expand Up @@ -1048,8 +1047,8 @@ def get_fine_adjust(self) -> bool:
Enable or disable the fine adjustment function of the vertical scale
of CH1 or CH2.
Query the current status of the fine adjustment function of the vertical
scale of CH1 or CH2.
Query the current status of the fine adjustment function of the
vertical scale of CH1 or CH2.
**Parameter**
Expand Down Expand Up @@ -1086,8 +1085,8 @@ def set_fine_adjust(self, enabled: bool = False) -> None:
Enable or disable the fine adjustment function of the vertical scale
of CH1 or CH2.
Query the current status of the fine adjustment function of the vertical
scale of CH1 or CH2.
Query the current status of the fine adjustment function of the
vertical scale of CH1 or CH2.
**Parameter**
Expand Down
9 changes: 4 additions & 5 deletions ds2000/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from logging import debug
from logging import error

#!/usr/bin/env python
# !/usr/bin/env python
# ds2000 - The Python Library for Rigol DS2000 Oscilloscopes
# Copyright (C) 2018-2021 Michael Sasser <[email protected]>
#
Expand All @@ -27,7 +27,6 @@
from .math.format import get_prefix
from .visa.driver import VISABase


__author__ = "Michael Sasser"
__email__ = "[email protected]"

Expand Down Expand Up @@ -128,11 +127,11 @@ def check_input(
if (mini is not None) and (maxi is not None) and not (mini <= arg <= maxi):
raise ValueError(
f'The argument "{arg_name}" needs to be in between '
f"{get_prefix(mini).formatted+unit if unit else mini}"
f"{get_prefix(mini).formatted + unit if unit else mini}"
f" and "
f"{get_prefix(maxi).formatted+unit if unit else maxi}."
f"{get_prefix(maxi).formatted + unit if unit else maxi}."
f" You entered "
f"{get_prefix(arg).formatted+unit if unit else arg}"
f"{get_prefix(arg).formatted + unit if unit else arg}"
f"{'. ' if ext_range_err else '.'}"
f"{ext_range_err if ext_range_err else ''}"
)
Expand Down
17 changes: 9 additions & 8 deletions ds2000/display.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
from .common import check_input
from .errors import DS2000Error


__author__ = "Michael Sasser"
__email__ = "[email protected]"

Expand Down Expand Up @@ -405,9 +404,10 @@ def get_persistence_time(self) -> float:
observe glitch that changes relatively slowly or glitch with low
occurrence probability.
**INFinite**: in this mode, the oscilloscope displays the newly acquired
waveform without clearing the waveform formerly acquired. Enable to
measure noise and jitter as well as capture incidental events.
**INFinite**: in this mode, the oscilloscope displays the newly
acquired waveform without clearing the waveform formerly acquired.
Enable to measure noise and jitter as well as capture incidental
events.
**Return Format**
Expand Down Expand Up @@ -714,11 +714,12 @@ def data(self) -> bytearray: # Screenshot bitmap raw data stream
**Example**
1. Make sure that the buffer is large enough to receive the data stream,
otherwise the program might be abnormal when reading the data stream.
1. Make sure that the buffer is large enough to receive the data
stream, otherwise the program might be abnormal when reading the
data stream.
2. The returned data stream contains TMC data header and you need to
remove the data header to make the data stream a standard bitmap data
stream.
remove the data header to make the data stream a standard bitmap
data stream.
3. When the data size is larger than 1 M and the communication speed of
the interface is not fast enough, you need to set an appropriate
timeout time
Expand Down
2 changes: 0 additions & 2 deletions ds2000/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,11 @@
from .__version__ import __version__
from .visa.driver import VISADriver


__author__ = "Michael Sasser"
__email__ = "[email protected]"


class Error(Exception):

"""Base class for exceptions in this module."""


Expand Down
Loading

0 comments on commit ef020cc

Please sign in to comment.