From 91d3035ce78ac7b9f7317f747ef06199a9fe1c72 Mon Sep 17 00:00:00 2001 From: dhanushsaimudari Date: Wed, 4 Mar 2026 16:37:52 +0530 Subject: [PATCH 1/6] adding easy-to-find setup instructions for a local development environment --- README.rst | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/README.rst b/README.rst index 2370eb9d..ba6d48b0 100644 --- a/README.rst +++ b/README.rst @@ -24,13 +24,33 @@ To see the latest changes in ``radiospectra`` see our `changelog `__. -To install ``radiospectra`` once miniforge is installed run the following command: +The recommended way to install ``radiospectra`` is: -.. code:: bash +### Prerequisites +- Python 3.12 +- [miniforge](https://github.com/conda-forge/miniforge) (recommended) or venv + +### Conda (Recommended) +```bash +conda create -n radiospectra-dev python=3.12 +conda activate radiospectra-dev +git clone https://github.com/sunpy/radiospectra +cd radiospectra +pip install -e '.[dev,docs]' # Editable + testing/docs extras + +### venv/pip + + python3.12 -m venv .venv +source .venv/bin/activate # Linux/Mac +# .venv\Scripts\activate # Windows +pip install -e '.[dev,docs]' + +### Verify using: + +pytest tests/ # Run tests - $ conda install radiospectra For detailed installation instructions, see the `installation guide `__ in the ``sunpy`` docs. From 97d9606f36f64f4b8ce9747d4b33b7e8c76d94ec Mon Sep 17 00:00:00 2001 From: dhanushsaimudari Date: Mon, 9 Mar 2026 21:43:44 +0530 Subject: [PATCH 2/6] feature: add frequency_at_index method to GenericSpectrogram --- radiospectra/spectrogram/spectrogrambase.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/radiospectra/spectrogram/spectrogrambase.py b/radiospectra/spectrogram/spectrogrambase.py index f1cb2b3f..bebe7b30 100644 --- a/radiospectra/spectrogram/spectrogrambase.py +++ b/radiospectra/spectrogram/spectrogrambase.py @@ -107,3 +107,12 @@ def __repr__(self): f" {self.wavelength.min} - {self.wavelength.max}," f" {self.start_time.isot} to {self.end_time.isot}>" ) + def frequency_at_index(self, index): + """ + Returns the frequency at a specific index. + """ + freq = self.frequencies + max_freq= len(freq) + if index < 0 or index >= max_freq: + raise IndexError(f"Index {index} out of range for frequency axis with size {max_freq}.") + return freq[index] \ No newline at end of file From abb9049fd78abea324f4dba5498022b20792809e Mon Sep 17 00:00:00 2001 From: dhanushsaimudari Date: Fri, 13 Mar 2026 14:32:49 +0530 Subject: [PATCH 3/6] docs: remove accidental code changes from documentation branch --- radiospectra/spectrogram/spectrogrambase.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/radiospectra/spectrogram/spectrogrambase.py b/radiospectra/spectrogram/spectrogrambase.py index bebe7b30..f1cb2b3f 100644 --- a/radiospectra/spectrogram/spectrogrambase.py +++ b/radiospectra/spectrogram/spectrogrambase.py @@ -107,12 +107,3 @@ def __repr__(self): f" {self.wavelength.min} - {self.wavelength.max}," f" {self.start_time.isot} to {self.end_time.isot}>" ) - def frequency_at_index(self, index): - """ - Returns the frequency at a specific index. - """ - freq = self.frequencies - max_freq= len(freq) - if index < 0 or index >= max_freq: - raise IndexError(f"Index {index} out of range for frequency axis with size {max_freq}.") - return freq[index] \ No newline at end of file From 87cea91561a85caf2794b84260411c2511750230 Mon Sep 17 00:00:00 2001 From: dhanushsaimudari Date: Fri, 13 Mar 2026 15:08:56 +0530 Subject: [PATCH 4/6] docs: prioritize standard install and link to official sunpy docs --- README.rst | 38 ++++++++++++++++++-------------------- 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/README.rst b/README.rst index ba6d48b0..ec54a1a6 100644 --- a/README.rst +++ b/README.rst @@ -24,35 +24,33 @@ To see the latest changes in ``radiospectra`` see our `changelog `_ for detailed environment setup. -### Verify using: +2. **Editable Install**: Clone the repository and install it in editable mode: -pytest tests/ # Run tests +.. code-block:: bash + pip install -e ".[dev,docs]" + +3. **Verify Installation**: Run the tests to ensure everything is working correctly: + +.. code-block:: bash + + pytest -For detailed installation instructions, see the `installation guide `__ in the ``sunpy`` docs. Getting Help ============ From 60f5ef822ad7c266a708e668bab35af58420ce8c Mon Sep 17 00:00:00 2001 From: dhanushsaimudari Date: Fri, 13 Mar 2026 15:20:13 +0530 Subject: [PATCH 5/6] Add changelog entry for PR #170 --- changelog/170.doc.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog/170.doc.rst diff --git a/changelog/170.doc.rst b/changelog/170.doc.rst new file mode 100644 index 00000000..217978ff --- /dev/null +++ b/changelog/170.doc.rst @@ -0,0 +1 @@ +Added a "Development Setup" section to the README to assist new contributors. \ No newline at end of file From cfd18c7f8b8e44652c861b70ad6340869cc7d2fc Mon Sep 17 00:00:00 2001 From: dhanushsaimudari Date: Fri, 13 Mar 2026 16:35:07 +0530 Subject: [PATCH 6/6] style: fix end of file newline in changelog --- changelog/170.doc.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog/170.doc.rst b/changelog/170.doc.rst index 217978ff..19f52773 100644 --- a/changelog/170.doc.rst +++ b/changelog/170.doc.rst @@ -1 +1 @@ -Added a "Development Setup" section to the README to assist new contributors. \ No newline at end of file +Added a "Development Setup" section to the README to assist new contributors.