From 28f9b7e861549818ff01dd58827f5fca88758832 Mon Sep 17 00:00:00 2001 From: chrisbeardy <20585410+chrisbeardy@users.noreply.github.com> Date: Wed, 27 Mar 2024 09:10:38 +0000 Subject: [PATCH] ready for 3.4.0 release (#379) * changes for 3.4.0 * added new read the docs v2 file * docs update * Update CHANGELOG.md --------- --- .readthedocs.yaml | 21 +++++++++++++++++++++ CHANGELOG.md | 2 +- CONTRIBUTING.md | 16 ++++++++++------ README.md | 25 ++++++++----------------- doc/conf.py | 2 +- doc/installation.md | 2 ++ pyads/__init__.py | 2 +- pyproject.toml | 2 +- tox.ini | 2 +- 9 files changed, 46 insertions(+), 28 deletions(-) create mode 100644 .readthedocs.yaml diff --git a/.readthedocs.yaml b/.readthedocs.yaml new file mode 100644 index 00000000..d78192ee --- /dev/null +++ b/.readthedocs.yaml @@ -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 \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 8d1b5aa9..9f524ae8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 013d2f5e..d4b80157 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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 @@ -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 @@ -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 diff --git a/README.md b/README.md index 78e93f33..43a1ef44 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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 @@ -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). diff --git a/doc/conf.py b/doc/conf.py index 867b2343..b8430e7d 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -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 diff --git a/doc/installation.md b/doc/installation.md index 8ccdac8e..32f13ae4 100644 --- a/doc/installation.md +++ b/doc/installation.md @@ -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 diff --git a/pyads/__init__.py b/pyads/__init__.py index 2b06055f..4db8e5e2 100644 --- a/pyads/__init__.py +++ b/pyads/__init__.py @@ -118,4 +118,4 @@ from .symbol import AdsSymbol -__version__ = '3.3.9' +__version__ = '3.4.0' diff --git a/pyproject.toml b/pyproject.toml index e98f5aea..0da0448f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.black] line-length = 88 -target-version = ['py36', 'py37', 'py38'] +target-version = ['py37', 'py38', 'py39', 'py310'] include = '\.pyi?$' exclude = ''' diff --git a/tox.ini b/tox.ini index fcdee63a..10b9d6e2 100644 --- a/tox.ini +++ b/tox.ini @@ -4,7 +4,7 @@ # and then run "tox" from this directory. [tox] -envlist = py37, py38, py39 +envlist = py37, py38, py39, py310 [testenv] commands = discover