Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ruff check for module docstrings #294

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions imap_processing/ccsds/ccsds_data.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"""Contains a data class for CCSDS data."""

from dataclasses import dataclass, fields


Expand Down
6 changes: 2 additions & 4 deletions imap_processing/cdf/defaults.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
"""Stores default values which can be used across instrument CDF files."""

from dataclasses import dataclass

import numpy as np

"""
This module is used for default values which can be used across instrument CDF files.
"""


@dataclass
class GlobalConstants:
Expand Down
17 changes: 8 additions & 9 deletions imap_processing/cdf/global_attrs.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
from dataclasses import dataclass
from typing import ClassVar, Union

import numpy as np

from imap_processing.cdf.defaults import GlobalConstants

"""
This module contains common attribute classes to use as a base for CDF files.
"""Contains common attribute classes to use as a base for CDF files.

All the classes with "Global" in their name are intended for use for global attributes
in CDF files. The rest are attributes for individual data fields within the CDF file.
Expand All @@ -20,6 +12,13 @@
imap_processing/idex/idex_cdf_attrs.py and imap_processing/idex/idex_packet_parser.py.
"""

from dataclasses import dataclass
from typing import ClassVar, Union

import numpy as np

from imap_processing.cdf.defaults import GlobalConstants


class GlobalConstantAttrs:
"""
Expand Down
2 changes: 2 additions & 0 deletions imap_processing/cdf/utils.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"""Various utility functions to support creation of CDF files."""

import os

import numpy as np
Expand Down
2 changes: 2 additions & 0 deletions imap_processing/codice/constants.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"""Contains constants variables to support CoDICE processing."""

# Lookup tables for Lossy decompression algorithms "A" and "B"
# These were provided by Greg Dunn via his sohis_cdh_utils.v script and then
# transformed into python dictionaries. The values in these tables are subject
Expand Down
6 changes: 6 additions & 0 deletions imap_processing/decom.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
"""Decommutate a packet file using a given packet definition.

This module contains a common function that can be used by multiple instruments
to decommutate CCSDS packet data using a given XTCE packet definition.
"""

from space_packet_parser import parser, xtcedef


Expand Down
2 changes: 2 additions & 0 deletions imap_processing/glows/l0/decom_glows.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"""Decommutate GLOWS CCSDS packets using GLOWS packet definitions."""

from enum import Enum
from pathlib import Path

Expand Down
2 changes: 2 additions & 0 deletions imap_processing/glows/l0/glows_l0_data.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"""Contains data classes to support GLOWS L0 processing."""

from dataclasses import dataclass, fields

from imap_processing.ccsds.ccsds_data import CcsdsData
Expand Down
2 changes: 2 additions & 0 deletions imap_processing/hit/l0/hit_l1a_decom.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"""Decommutates HIT CCSDS data and creates L1a data products."""

import logging
from collections import defaultdict
from enum import IntEnum
Expand Down
2 changes: 2 additions & 0 deletions imap_processing/ialirt/l0/decom_ialirt.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"""Decommutates i-alert packets and creates L1 data products."""

import collections
import logging

Expand Down
2 changes: 2 additions & 0 deletions imap_processing/idex/idex_cdf_attrs.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"""Contains CDF attribute definitions for IDEX."""

import dataclasses

from imap_processing.cdf.defaults import GlobalConstants
Expand Down
2 changes: 2 additions & 0 deletions imap_processing/idex/idex_constants.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"""Contains dataclasses to support IDEX processing."""

from dataclasses import dataclass


Expand Down
6 changes: 6 additions & 0 deletions imap_processing/idex/idex_packet_parser.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
"""Decommutates IDEX CCSDS packets.

This module contains code to decommutate IDEX packets and creates xarrays to
support creation of L1 data products.
"""

import dataclasses
import logging
from collections import namedtuple
Expand Down
2 changes: 2 additions & 0 deletions imap_processing/swe/l0/decom_swe.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"""Decommutates SWE CCSDS data packets."""

from imap_processing import decom, imap_module_directory


Expand Down
2 changes: 2 additions & 0 deletions imap_processing/swe/l1a/swe_l1a.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"""Contains code to perform SWE L1a processing."""

import logging

from imap_processing.cdf.utils import write_cdf
Expand Down
2 changes: 2 additions & 0 deletions imap_processing/swe/l1a/swe_science.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"""Contains code to perform SWE L1a science processing."""

import collections
import dataclasses

Expand Down
2 changes: 2 additions & 0 deletions imap_processing/swe/l1b/swe_l1b.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"""Contains code to perform SWE L1b processing."""

import xarray as xr

from imap_processing import imap_module_directory
Expand Down
2 changes: 2 additions & 0 deletions imap_processing/swe/l1b/swe_l1b_science.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"""Contains code to perform SWE L1b science processing."""

import dataclasses

import numpy as np
Expand Down
2 changes: 2 additions & 0 deletions imap_processing/swe/utils/swe_utils.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"""Various utility classes and functions to support SWE processing."""

import collections
import dataclasses
from enum import IntEnum
Expand Down
2 changes: 2 additions & 0 deletions imap_processing/ultra/l0/decom_ultra.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
"""Decommutates Ultra CCSDS packets."""

import logging
from enum import Enum
from typing import NamedTuple
Expand Down
Loading