diff --git a/.gitignore b/.gitignore index 093464236a37717059aad760bc3be8d4d433c7cd..82ffa0d48a3426b3e06618c49708a329d47f30a9 100644 --- a/.gitignore +++ b/.gitignore @@ -15,10 +15,9 @@ docs/source/source_documentation docs/build # Setuptools SCM -sid/_version.py +lofar_sid/_version.py # IDE configuration .vscode .idea -sid/interface/* - +lofar_sid/interface/* diff --git a/MANIFEST.in b/MANIFEST.in index 8f65033c7153618b78bfde9222dc965e5102c5e7..86f22f9d1c5cabfc3b21b6491667d4e636b902ce 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -3,5 +3,5 @@ include README.md recursive-include docs * recursive-exclude tests * -recursive-include sid/interface/opah *.py *.pyi +recursive-include lofar_sid/interface/opah *.py *.pyi recursive-include proto * \ No newline at end of file diff --git a/README.md b/README.md index df813fd0fb2f4df03178810c4a08a10f90b3e722..dc133924422f2dc5678a93df61e63d4959677177 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# sid +# lofar_sid This Repo contains the Following Proto defintions: diff --git a/docs/source/conf.py b/docs/source/conf.py index 30eca28da2f0711488e3361ea3fd6ea4d56101ec..11a352a2ae7cf8bd7649f3668833548c9e4fa54d 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -3,7 +3,7 @@ import os -from sid._version import __version__ +from lofar_sid._version import __version__ # -- General configuration ---------------------------------------------------- @@ -36,8 +36,8 @@ source_suffix = [".rst"] master_doc = "index" # General information about the project. -project = "sid" -copyright = "2023, ASTRON" +project = "lofar_sid" +copyright = "2025, ASTRON" # openstackdocstheme options repository_name = "https://git.astron.nl/lofar2.0/sid" diff --git a/lofar_sid/README.md b/lofar_sid/README.md new file mode 100644 index 0000000000000000000000000000000000000000..5b41ed6ae5d05fecf894cd5d8903e65541bcb345 --- /dev/null +++ b/lofar_sid/README.md @@ -0,0 +1,9 @@ +# sid + + + +<!--  --> + + +## License +This project is licensed under the Apache License Version 2.0 diff --git a/sid/__init__.py b/lofar_sid/__init__.py similarity index 87% rename from sid/__init__.py rename to lofar_sid/__init__.py index 3d0a2873a2b17c01af02c61050d6c509877f7b69..0d11a716c494d374d825d024e6bc7a7371959194 100644 --- a/sid/__init__.py +++ b/lofar_sid/__init__.py @@ -1,4 +1,4 @@ # Copyright (C) 2025 ASTRON (Netherlands Institute for Radio Astronomy) # SPDX-License-Identifier: Apache-2.0 -"""sid""" +"""lofar_sid""" diff --git a/sid/contract.py b/lofar_sid/contract.py similarity index 76% rename from sid/contract.py rename to lofar_sid/contract.py index 0de4194e00ac1c1e8aaf7b1f0d615f172adcf28c..d4d0a766e3482854867b7d9e4c18135cdeb1b34d 100644 --- a/sid/contract.py +++ b/lofar_sid/contract.py @@ -6,4 +6,4 @@ def about(): """Return""" - return "This is the SID interface library" + return "This is the Lofar SID interface library" diff --git a/pyproject.toml b/pyproject.toml index 9408b0aa49446be401a919ee6a588657df140272..9e8708c560070ca89ba382aeb10c1e0df6ce95c9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ requires = [ build-backend = "setuptools.build_meta" [tool.setuptools_scm] -version_file = "sid/_version.py" +version_file = "lofar_sid/_version.py" [tool.pylint] ignore = "_version.py" diff --git a/sid/README.md b/sid/README.md deleted file mode 100644 index 75fdc1b8c1ea621d97bc01b113be2495de1b941e..0000000000000000000000000000000000000000 --- a/sid/README.md +++ /dev/null @@ -1,53 +0,0 @@ -# sid - - - -<!--  --> - -Software interface description - -## Installation -``` -pip install . -``` - -## Setup - -One time template setup should include configuring the docker registry to regularly cleanup old images of -the CI/CD pipelines. And you can consider creating protected version tags for software releases: - -1. [Cleanup Docker Registry Images](https://git.astron.nl/groups/templates/-/wikis/Cleanup-Docker-Registry-Images) -2. [Setup Protected Verson Tags](https://git.astron.nl/groups/templates/-/wikis/Setting-up-Protected-Version-Tags) - -Once the cleanup policy for docker registry is setup you can uncomment the `docker push` comment in the `.gitlab-ci.yml` -file from the `docker_build` job. This will allow to download minimal docker images with your Python package installed. - -## Usage -```python -from sid import sid_module - -sid_module.version() # prints version -``` - -## Contributing - -To contribute, please create a feature branch and a "Draft" merge request. -Upon completion, the merge request should be marked as ready and a reviewer -should be assigned. - -Verify your changes locally and be sure to add tests. Verifying local -changes is done through `tox`. - -```pip install tox``` - -With tox the same jobs as run on the CI/CD pipeline can be ran. These -include unit tests and linting. - -```tox``` - -To automatically apply most suggested linting changes execute: - -```tox -e format``` - -## License -This project is licensed under the Apache License Version 2.0 diff --git a/tests/test_sid.py b/tests/test_sid.py index 450012360eef858692afa611efd2a017fed5cbef..dcb857f4137fdefd922282006919d7cee13eaa7b 100644 --- a/tests/test_sid.py +++ b/tests/test_sid.py @@ -4,18 +4,18 @@ """Testing of the Cool Module""" from unittest import TestCase -from sid.contract import about +from lofar_sid.contract import about -from sid.interface.opah.antennafield_pb2 import Antenna_Status +from lofar_sid.interface.opah.antennafield_pb2 import Antenna_Status class SidModule(TestCase): - """Test Case of the Sid Module""" + """Test Case of the Lofar Sid Module""" def test_about(self): """Testing that the module does not crash""" - self.assertEqual(about(), "This is the SID interface library") + self.assertEqual(about(), "This is the Lofar SID interface library") def test_antenna_status(self): """Testing that the enums are unique""" diff --git a/tox.ini b/tox.ini index 9eccd8148214f92226f24af4eb6bb2beff38eeb4..f99dc1e2d9e2f5d4dc3db0dae26855802eaa595f 100644 --- a/tox.ini +++ b/tox.ini @@ -17,7 +17,7 @@ deps = commands_pre = {envpython} --version - {envpython} -m grpc_tools.protoc -Isid/interface=proto --python_out=. --pyi_out=. --grpc_python_out=. proto/opah/observation.proto proto/opah/antennafield.proto proto/opah/grafana-apiv3.proto proto/opah/statistics.proto + {envpython} -m grpc_tools.protoc -Ilofar_sid/interface=proto --python_out=. --pyi_out=. --grpc_python_out=. proto/opah/observation.proto proto/opah/antennafield.proto proto/opah/grafana-apiv3.proto proto/opah/statistics.proto commands = @@ -27,7 +27,7 @@ commands = [testenv:coverage] commands = {envpython} --version - {envpython} -m pytest --cov-report term --cov-report xml --cov-report html --cov=sid tests/{posargs} + {envpython} -m pytest --cov-report term --cov-report xml --cov-report html --cov=lofar_sid tests/{posargs} # Use generative name and command prefixes to reuse the same virtualenv # for all linting jobs. @@ -37,14 +37,14 @@ package = editable envdir = {toxworkdir}/linting commands = pep8: {envpython} -m flake8 --version - pep8: {envpython} -m flake8 --exclude=sid/interface sid tests + pep8: {envpython} -m flake8 --exclude=lofar_sid/interface lofar_sid tests black: {envpython} -m black --version - black: {envpython} -m black --check --diff sid tests --exclude '.*pb2.*\.py|_version\.py' + black: {envpython} -m black --check --diff lofar_sid tests --exclude '.*pb2.*\.py|_version\.py' pylint: {envpython} -m pylint --version - pylint: {envpython} -m pylint --prefer-stub=true sid tests - format: {envpython} -m autopep8 -v -aa --in-place --recursive sid + pylint: {envpython} -m pylint --prefer-stub=true lofar_sid tests + format: {envpython} -m autopep8 -v -aa --in-place --recursive lofar_sid format: {envpython} -m autopep8 -v -aa --in-place --recursive tests - format: {envpython} -m black -v sid tests + format: {envpython} -m black -v lofar_sid tests [testenv:docs] ; unset LC_ALL / LANGUAGE from testenv, would fail sphinx otherwise