Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ready for 3.4.0 release #379

Merged
merged 6 commits into from
Mar 27, 2024
Merged
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
21 changes: 21 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Read the Docs configuration file for Sphinx projects
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the OS, Python version and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.10"

# Build documentation in the "docs/" directory with Sphinx
sphinx:
configuration: doc/conf.py

# declare the Python requirements required to build your documentation
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
python:
install:
- requirements: requirements.txt
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## 3.3.10 [unreleased]
## 3.4.0

### Added
* [#293](https://github.com/stlehmann/pyads/pull/2939) Support WSTRINGS in structures
Expand Down
16 changes: 10 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,26 @@ Please follow these guidelines for contributing. Pull requests are welcome.

- Create a new [github issue](https://github.com/stlehmann/pyads/issues) for bugs
or features. Search the ticket system first, to avoid filing a duplicate.
- Ensure code follows the [syntax and conventions](#Syntax-and-conventions).
- Ensure code follows the [Syntax and conventions](#Syntax-and-conventions).
- Code must pass tests. See [Testing](#Testing) for information on how to run and
write unit tests.
- Commit messages should be informative.
- Use the [Pull request process](#Pull-request-process).
- Address only one issue per PR. If you want to make additional fixes e.g. on import statements, style or documentation
which are not directly related to your issue please create an additional PR that addresses these small fixes.

## Pull request process:
## Pull request process

- Fork us on [github](https://github.com/stlehmann/pyads).
- Clone your repository.
- Create a feature branch for your issue.
- Keep PRs small (if possible), this makes reviews easier and your PR can be merged faster.
- Apply your changes:
- Add them, and then commit them to your branch.
- Run the tests until they pass.
- When you feel you are finished, rebase your commits to ensure a simple
and informative commit log.
- Add an entry to the [Changelog](https://github.com/stlehmann/pyads/blob/master/CHANGELOG.md).
- Create a pull request on github from your forked repository.

## Syntax and conventions
Expand Down Expand Up @@ -64,13 +69,12 @@ for available environments.
Tests are written using [unittest](https://docs.python.org/3/library/unittest.html)
and can be individually run for each environment with the python built in library.

### Travis-CI
### CI

When creating a pull request (PR) on [Github], [Travis] will automatically run
When creating a pull request (PR) on [Github], Github CI will automatically run
the unit tests with the code in the PR and report back.

[Github]: https://github.com/stlehmann/pyads/pulls
[Travis]: https://travis-ci.org/stlehmann/pyads

### Testing issues on Windows

Expand Down Expand Up @@ -107,7 +111,7 @@ With the subsystem installed, open a Linux shell in your clone directory and run
1. `sudo apt install python3 python3-pip`
1. `cd adslib && make && sudo make install && cd ..`
1. `python3 -m pip install tox`
1. `python3 -m tox -e py36` (Ubuntu 18.04 comes with Python 3.6, 20.04 with Python 3.8)
1. `python3 -m tox -e py38` (Ubuntu 20.04 with Python 3.8)

## Documentation contributions

Expand Down
25 changes: 8 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ pyads - Python package
[![Downloads](https://pepy.tech/badge/pyads/week)](https://pepy.tech/project/pyads)

This is a python wrapper for TwinCATs ADS library. It provides python functions
for communicating with TwinCAT devices. *pyads* uses the C API provided by *TcAdsDll.dll* on Windows *adslib.so* on Linux. The documentation for the ADS API is available on [infosys.beckhoff.com](http://infosys.beckhoff.com/english.php?content=../content/1033/tcadsdll2/html/tcadsdll_api_overview.htm&id=20557).
for communicating with TwinCAT devices. *pyads* uses the C API provided by *TcAdsDll.dll* on Windows *adslib.so* on Linux. The documentation for the ADS API is available on [infosys.beckhoff.com](https://infosys.beckhoff.com/content/1033/tc3_adsdll2/index.html?id=4279787267115190858).

Documentation: http://pyads.readthedocs.io/en/latest/index.html

Expand Down Expand Up @@ -42,12 +42,12 @@ python setup.py install

## Features

* connect to a remote TwinCAT device like a plc or a PC with TwinCAT
* create routes on Linux devices and on remote plcs
* supports TwinCAT 2 and TwinCAT 3
* read and write values by name or address
* read and write DUTs (structures) from the plc
* notification callbacks
- connect to a remote TwinCAT device like a plc or a PC with TwinCAT
- create routes on Linux devices and on remote plcs
- supports TwinCAT 2 and TwinCAT 3
- read and write values by name or address
- read and write DUTs (structures) from the plc
- notification callbacks

## Basic usage

Expand All @@ -68,15 +68,6 @@ plc.write_by_name("GVL.int_val", i)
plc.close()
```

[0]: https://infosys.beckhoff.de/english.php?content=../content/1033/TcSystemManager/Basics/TcSysMgr_AddRouteDialog.htm&id=

## Contributing guidelines

Contributions are very much welcome. pyads is under active development. However it is a side-project of mine so please have some
patience when creating issues or PRs. Here are some main guidelines which I ask you to follow along:

* Create PRs based on the [master](https://github.com/stlehmann/pyads) branch.
* Add an entry to the [Changelog](https://github.com/stlehmann/pyads/blob/master/CHANGELOG.md).
* Keep PRs small (if possible), this makes reviews easier and your PR can be merged faster.
* Address only one issue per PR. If you want to make additional fixes e.g. on import statements, style or documentation
which are not directly related to your issue please create an additional PR that adresses these small fixes.
Contributions are very much welcome. pyads is under development. However it is a side-project so please have some patience when creating issues or PRs. Please also follow the [Contributing Guidelines](https://github.com/stlehmann/pyads/blob/master/CONTRIBUTING.md).
2 changes: 1 addition & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@

# General information about the project.
project = 'pyads'
copyright = '2015, Stefan Lehmann'
copyright = '2024, Stefan Lehmann'
author = 'Stefan Lehmann'

# The version info for the project you're documenting, acts as replacement for
Expand Down
2 changes: 2 additions & 0 deletions doc/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ cd pyads
python setup.py install
```

Note: pyads only supports python 3.6 and above.

## Installation on Linux

For Linux *pyads* uses the ADS library *adslib.so* which needs to be compiled
Expand Down
2 changes: 1 addition & 1 deletion pyads/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,4 +118,4 @@

from .symbol import AdsSymbol

__version__ = '3.3.9'
__version__ = '3.4.0'
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.black]
line-length = 88
target-version = ['py36', 'py37', 'py38']
target-version = ['py37', 'py38', 'py39', 'py310']
include = '\.pyi?$'
exclude = '''

Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# and then run "tox" from this directory.

[tox]
envlist = py37, py38, py39
envlist = py37, py38, py39, py310

[testenv]
commands = discover
Expand Down
Loading