From 3475b2102e8907ea1780771c40a0d4dd7bb820f7 Mon Sep 17 00:00:00 2001
From: Reinder Kraaij <kraaij@astron.nl>
Date: Thu, 6 Mar 2025 16:02:51 +0100
Subject: [PATCH] rename lofar_sid folder

---
 .gitignore                     |  5 ++--
 MANIFEST.in                    |  2 +-
 README.md                      |  2 +-
 docs/source/conf.py            |  6 ++--
 lofar_sid/README.md            |  9 ++++++
 {sid => lofar_sid}/__init__.py |  2 +-
 {sid => lofar_sid}/contract.py |  2 +-
 pyproject.toml                 |  2 +-
 sid/README.md                  | 53 ----------------------------------
 tests/test_sid.py              |  8 ++---
 tox.ini                        | 14 ++++-----
 11 files changed, 30 insertions(+), 75 deletions(-)
 create mode 100644 lofar_sid/README.md
 rename {sid => lofar_sid}/__init__.py (87%)
 rename {sid => lofar_sid}/contract.py (76%)
 delete mode 100644 sid/README.md

diff --git a/.gitignore b/.gitignore
index 0934642..82ffa0d 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 8f65033..86f22f9 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 df813fd..dc13392 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 30eca28..11a352a 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 0000000..5b41ed6
--- /dev/null
+++ b/lofar_sid/README.md
@@ -0,0 +1,9 @@
+# sid
+
+![Build status](https://git.astron.nl/lofar2.0/sid/badges/main/pipeline.svg)
+![Test coverage](https://git.astron.nl/lofar2.0/sid/badges/main/coverage.svg)
+<!-- ![Latest release](https://git.astron.nl/lofar2.0/sid/badges/main/release.svg) -->
+
+
+## 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 3d0a287..0d11a71 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 0de4194..d4d0a76 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 9408b0a..9e8708c 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 75fdc1b..0000000
--- a/sid/README.md
+++ /dev/null
@@ -1,53 +0,0 @@
-# sid
-
-![Build status](https://git.astron.nl/lofar2.0/sid/badges/main/pipeline.svg)
-![Test coverage](https://git.astron.nl/lofar2.0/sid/badges/main/coverage.svg)
-<!-- ![Latest release](https://git.astron.nl/lofar2.0/sid/badges/main/release.svg) -->
-
-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 4500123..dcb857f 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 9eccd81..f99dc1e 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
-- 
GitLab