Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
build
dist
pyvcam.egg-info
__pycache__/
*.py[cod]
24 changes: 16 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# PyVCAM Wrapper

PyVCAM Wrapper is a Python3.X wrapper for the PVCAM SDK.
# PyVCAM Wrapper

> This fork is deprecated. Photometrics has since incorporated the live-mode
> queue fix from PR #45 while closing issue #35, so downstream users should
> install the maintained upstream package from PyPI instead of using this fork.

PyVCAM Wrapper is a Python3.X wrapper for the PVCAM SDK.

## Getting Started
Follow the instructions below to get PyVCAM up and running on your machine for development and testing.
Expand All @@ -14,10 +18,14 @@ Follow the instructions below to get PyVCAM up and running on your machine for d
* PyVCAM was developed and tested using Microsoft Windows 10/64-bit. The build package also supports Linux, but testing has been minimal.


### Installing
When you are ready to install the wrapper use your command prompt to navigate into the directory that contains
setup.py and run ```python setup.py install```

### Installing
Use the maintained upstream release from Photometrics instead of installing this
fork from source:

```bash
python -m pip install --upgrade PyVCAM
```


### How to use the wrapper
#### Create Camera Example
Expand Down Expand Up @@ -50,4 +58,4 @@ cam.speed_table_index = 0
cam.gain = 1
```

More information on how to use this wrapper and how it works can be found [here](https://github.com/Photometrics/PyVCAM/blob/master/docs/PyVCAM%20Wrapper.md).
More information on how to use this wrapper and how it works can be found [here](https://github.com/Photometrics/PyVCAM/blob/master/docs/PyVCAM%20Wrapper.md).
2 changes: 1 addition & 1 deletion docs/CheetSheet.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[[Installation]]
python setup.py install
python -m pip install --upgrade PyVCAM

[[Camera Class]]

Expand Down
6 changes: 5 additions & 1 deletion docs/PyVCAM Wrapper.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# PyVCAM Wrapper
# PyVCAM Wrapper

> This fork is deprecated. Photometrics has since incorporated the live-mode
> queue fix from PR #45 while closing issue #35, so downstream users should
> install the maintained upstream package from PyPI instead of using this fork.

- [PyVCAM Wrapper](#pyvcam-wrapper)
* [src](#src)
Expand Down
11 changes: 11 additions & 0 deletions src/pyvcam/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
"""Local fork deprecation notice for PyVCAM."""

from warnings import warn


warn(
"This fork of PyVCAM is deprecated. Install the maintained "
"Photometrics release from PyPI instead.",
DeprecationWarning,
stacklevel=2,
)
24 changes: 24 additions & 0 deletions tests/test_deprecated_fork.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import importlib
import pathlib
import sys
import unittest
import warnings


SRC_DIR = pathlib.Path(__file__).resolve().parents[1] / "src"


class DeprecatedForkTests(unittest.TestCase):
def test_import_warns_to_use_upstream_release(self):
sys.path.insert(0, str(SRC_DIR))
try:
sys.modules.pop("pyvcam", None)
with warnings.catch_warnings(record=True) as caught:
warnings.simplefilter("always")
importlib.import_module("pyvcam")
finally:
sys.modules.pop("pyvcam", None)
sys.path.remove(str(SRC_DIR))

self.assertGreater(len(caught), 0)
self.assertIn("Photometrics release from PyPI", str(caught[0].message))