diff --git a/README.md b/README.md index e48634a..b57977a 100644 --- a/README.md +++ b/README.md @@ -15,21 +15,17 @@ The underlying base packet library used to generate the packets to be sent is th You can install this package from PyPI -Linux: +Install command assuming an active virtual environment: ```sh -python3 -m pip install cfdp-py +pip install cfdp-py ``` -Windows: - -```sh -py -m pip install cfdp-py -``` # Examples -You can find all examples [inside the documentation](https://cfdp-py.readthedocs.io/en/latest/examples.html) and the `examples` directory of this repository. +You can find all examples [inside the documentation](https://cfdp-py.readthedocs.io/en/latest/examples.html) +and the `examples` directory of this repository. # Tests @@ -75,3 +71,17 @@ You can run the doctests with ```sh make doctest ``` + +# Formatting and Linting + +Linting: + +```sh +ruff check . +``` + +Formatting: + +```sh +ruff format . +``` diff --git a/examples/cfdp-cli-udp/common.py b/examples/cfdp-cli-udp/common.py index 3fee243..9ade7c3 100644 --- a/examples/cfdp-cli-udp/common.py +++ b/examples/cfdp-cli-udp/common.py @@ -142,8 +142,7 @@ def transaction_indication( ) self.active_proxy_put_reqs.update( { - transaction_indication_params.transaction_id: - transaction_indication_params.originating_transaction_id + transaction_indication_params.transaction_id: transaction_indication_params.originating_transaction_id # noqa: E501 } ) diff --git a/pyproject.toml b/pyproject.toml index a86b72a..12cd7c3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -84,6 +84,8 @@ ignore = [ "N818", # Exception names should end in "Error", requires API change "S101", # Use of assert, should be changed in the future "ANN204", # Do not use return typing on __init__, __new__ and __call__ methods + "E111", # Recommended to be disabled when using the ruff formatter + "E114" # Recommended to be disabled when using the ruff formatter ] [tool.ruff.lint.extend-per-file-ignores] diff --git a/release-checklist.md b/release-checklist.md index bbdf0f9..2209683 100644 --- a/release-checklist.md +++ b/release-checklist.md @@ -12,7 +12,7 @@ The steps shown here are for Ubuntu/MacOS. 3. Update `CHANGELOG.md`: Convert `unreleased` section into version section with date and new `unreleased`section. 4. Run tests with `pytest .` -5. Run auto-formatter with `black .` +5. Run auto-formatter with `ruff format .` 6. Run linter with `ruff check .` 7. Wait for CI/CD results. This also runs the tests on different operating systems diff --git a/src/cfdppy/request.py b/src/cfdppy/request.py index b4d20e0..d463648 100644 --- a/src/cfdppy/request.py +++ b/src/cfdppy/request.py @@ -25,7 +25,7 @@ class PutRequest: :py:class:`tmtccmd.config.defs.CfdpParams` class with the generic :py:func:`tmtccmd.config.cfdp.generic_cfdp_params_to_put_request` API and/or all related specific APIs. - """ + """ destination_id: UnsignedByteField # All the following fields are optional because a put request can also be a metadata-only