Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Allow for including trade input file

Open
#1,306 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Quiet
Tech stack
rust
Domain
data

Research direction

Start by reviewing the linked suggestion and the proposed trade.csv schema in this issue. Trace how commodity levies are read and stored, then determine where trade relationships and separate import/export levies should be built; done means supporting the stated year, region, levy, and overlap-error rules.

Written by the indexing model from the issue text.

Description

question

We probably want this to be broadly like @tsmbland's suggestion here: https://github.com/EnergySystemsModellingLab/MUSE2/issues/523#issuecomment-4499524654

I don't think we should use the word "processes" in the file name. We can call these relationships "trade processes" among ourselves, but I think it might confuse users who aren't aware of the internal code structure. How about we just call this file trade.csv?

Here's what I personally think the file should look like, for the first implentation:

commodity_id,start_year,end_year,source_regions,destination_regions,import_levy,export_levy
COAL,,,UK,FRA,1,0

There are a few extra features compared to Tom's initial suggestion:

  • You can limit the trade relationship to a specified year range (or omit, meaning all milestone years)
  • You can specify multiple source and destination regions (if you put either as all, we obvs wouldn't apply these properties to regions "trading" with themselves)
  • You can have different levies for import/export

I think the way we should implement this is by building up maps of trade relationships as we go through the CSV file, line by line and storing import/export levies separately (as we do for commodity levies). If two entries overlap in commodity, milestone year, source region, destination region and whether its an import or export levy, then we give an error.

Dominant language
Rust
Stars
8
Forks
5
Avg merge
11h 31m
Merged PRs (30d)
33

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from EnergySystemsModellingLab/MUSE2

All issues in EnergySystemsModellingLab/MUSE2

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.