Skip to content

add enums to support gas public offer - #63

Open
PeterRimmer71 wants to merge 4 commits into
masterfrom
feature/SupportGasPublicOffer
Open

add enums to support gas public offer#63
PeterRimmer71 wants to merge 4 commits into
masterfrom
feature/SupportGasPublicOffer

Conversation

@PeterRimmer71

Copy link
Copy Markdown
Contributor

Add market and status enums to support GAS public offer

@PeterRimmer71
PeterRimmer71 requested review from a team as code owners June 26, 2026 10:02
jacopocinaark
jacopocinaark previously approved these changes Jun 26, 2026
Copilot AI review requested due to automatic review settings July 28, 2026 13:51

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds new Market and Status enum members in Artesian.GMEPublicOffers intended to support GAS public offer querying.

Changes:

  • Extend Status enum with DIS.
  • Extend Market enum with GMP_ASTA, GMP_Cont, MI_Cont, MGS.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/Artesian/GMEPublicOffers/_Enum/Status.py Adds DIS status enum value.
src/Artesian/GMEPublicOffers/_Enum/Market.py Adds new GAS-related market enum values.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +28 to +31
GMP_ASTA = 230
GMP_Cont = 234
MI_Cont = 235
MGS = 240
COM = 7
PCOM = 8
PREJ = 9
DIS = 10

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in commit 8fc100d by adding Status.DIS: "DIS" to GMEPublicOfferQuery.__getStatus().

Copilot AI review requested due to automatic review settings July 28, 2026 14:04

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (2)

src/Artesian/GMEPublicOffers/_Enum/Market.py:31

  • New Market enum members were added (GMP_ASTA/GMP_Cont/MI_Cont/MGS), but GMEPublicOfferQuery.__getMarket() does not map them to API strings. Passing any of these values into queries will currently raise "Not supported Market" and the feature described in the PR won't work end-to-end.
    GMP_ASTA = 230
    GMP_Cont = 234
    MI_Cont = 235
    MGS = 240

src/Artesian/GMEPublicOffers/GMEPublicOfferQuery.py:375

  • __getStatus() still doesn't handle Status.PREJ even though it exists in the Status enum. Using Status.PREJ will currently raise "Not supported Status"; since this PR is extending status support, the switcher should be kept in sync with the enum.
            Status.ACC: "ACC",
            Status.INC: "INC",
            Status.REJ: "REJ",
            Status.REP: "REP",
            Status.REV: "REV",

Copilot AI review requested due to automatic review settings July 28, 2026 14:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (3)

src/Artesian/GMEPublicOffers/GMEPublicOfferQuery.py:346

  • __getMarket() contains a duplicated Market.MRR key in the switcher dict (it appears twice). The later duplicate is dead code and makes it harder to see whether a distinct market mapping is missing.
            Market.MIA2: "MIA2",
            Market.MIA3: "MIA3",
            Market.MRR: "MRR",
            Market.AFRR: "AFRR",
            Market.GMP_ASTA: "GMP_ASTA",

src/Artesian/GMEPublicOffers/GMEPublicOfferQuery.py:350

  • New market codes were added (e.g., GMP_ASTA, GMP_Cont, MI_Cont, MGS), but the existing request-building tests only assert a few older market values. Add/extend pytest/unittest coverage (e.g., in tests/TestGMEPO.py) to assert these new market values are serialized into the market query parameter correctly.
            Market.GMP_ASTA: "GMP_ASTA",
            Market.GMP_Cont: "GMP_Cont",
            Market.MI_Cont: "MI_Cont",
            Market.MGS: "MGS",

src/Artesian/GMEPublicOffers/GMEPublicOfferQuery.py:380

  • Status.DIS is now supported in __getStatus(), but the current tests only exercise Status.ACC (and don’t explicitly assert the status segment/value for DIS). Add a test that builds a query with Status.DIS and asserts the generated request uses the expected DIS code.
            Status.SUB: "SUB",
            Status.COM: "COM",
            Status.PCOM: "PCOM",
            Status.DIS: "DIS",
        }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants