|
| 1 | +name: Bug Report |
| 2 | +description: Create a report to help us reproduce and correct the bug |
| 3 | +labels: ['Bug', 'Needs Triage'] |
| 4 | + |
| 5 | +body: |
| 6 | +- type: markdown |
| 7 | + attributes: |
| 8 | + value: > |
| 9 | + #### Before submitting a bug, please make sure the issue hasn't been already |
| 10 | + addressed by searching through [the past issues](https://github.com/demiangomez/Parallel.GAMIT/issues). |
| 11 | +- type: textarea |
| 12 | + attributes: |
| 13 | + label: Describe the bug |
| 14 | + description: > |
| 15 | + A clear and concise description of what the bug is. |
| 16 | + validations: |
| 17 | + required: true |
| 18 | +- type: textarea |
| 19 | + attributes: |
| 20 | + label: Steps/Code to Reproduce |
| 21 | + description: | |
| 22 | + Please add a [minimal reproducible example](https://en.wikipedia.org/wiki/Minimal_reproducible_example) that can reproduce the error when running it. Be as succinct as possible, and include the input data that produces the bug. **Do not depend on access to postgres database**: instead you can export the input data, either as csv file using pgAdmin, or using pandas to export the relevant data. Example using pandas: |
| 23 | +
|
| 24 | + ```python |
| 25 | + import psycopg2 |
| 26 | + import pandas as pd |
| 27 | + from sqlalchemy import create_engine |
| 28 | + |
| 29 | + ## database credentials |
| 30 | + CREDS = { |
| 31 | + "host": "<HOSTNAME>", |
| 32 | + "user": "<USERNAME>", |
| 33 | + "port": 5432, |
| 34 | + "dbname": "<DBNAME>", |
| 35 | + "password": "<PASSWORD>" |
| 36 | + } |
| 37 | + CONNECTION_STRING = " ".join((f"{k}={v}" for k,v in CREDS.items())) |
| 38 | + ENGINE = create_engine( |
| 39 | + "postgresql+psycopg2://{user}:{password}@{host}:{port}/{dbname}".format(**CREDS) |
| 40 | + ) |
| 41 | +
|
| 42 | + # Getting data, modify this query as needed |
| 43 | + query = "SELECT * FROM public.gamit where 'year'='2024' and 'doy'='044'" |
| 44 | + |
| 45 | + df = pd.read_sql(query, ENGINE) |
| 46 | + # Modify to your output path |
| 47 | + df.to_csv("/filesystem/path.csv" |
| 48 | + |
| 49 | + ``` |
| 50 | +
|
| 51 | + Github allows you to drag the .csv file into the text box as an attachment that we can download later. If the results are short, you can also copy paste, or feel free to put it in a public gist and link it in the issue: https://gist.github.com. |
| 52 | +
|
| 53 | + In short, **we are going to run the data on just the code that is throwing the error** and we expect to get the same result as you. |
| 54 | +
|
| 55 | + We acknowledge that crafting a **minimal reproducible code example** requires some effort on your side but it really helps the maintainers quickly reproduce the problem and analyze its cause without any ambiguity. Ambiguous bug reports tend to be slower to fix because they will require more effort and back and forth discussion between the maintainers and the reporter to pin-point the precise conditions necessary to reproduce the problem. |
| 56 | + placeholder: | |
| 57 | + ``` |
| 58 | + Sample code to reproduce the problem |
| 59 | + ``` |
| 60 | + validations: |
| 61 | + required: true |
| 62 | +- type: textarea |
| 63 | + attributes: |
| 64 | + label: Expected Results |
| 65 | + description: > |
| 66 | + Please paste or describe the expected results. |
| 67 | + placeholder: > |
| 68 | + Example: No error is thrown. |
| 69 | + validations: |
| 70 | + required: true |
| 71 | +- type: textarea |
| 72 | + attributes: |
| 73 | + label: Actual Results |
| 74 | + description: | |
| 75 | + Please paste or describe the results you observe instead of the expected results. If you observe an error, please paste the error message including the **full traceback** of the exception, **and the final print statement from pgamit**. For example: |
| 76 | +
|
| 77 | + ```python-traceback |
| 78 | + --------------------------------------------------------------------------- |
| 79 | + 2024-10-21 09:08:16 g2global 2024 041 -> Creating network clusters |
| 80 | + -- Processing type is global with 731 active stations |
| 81 | + Traceback (most recent call last): |
| 82 | + File "/fs/project/gomez.124/opt/conda/pgamit/bin/ParallelGamit.py", line 756, in |
| 83 | + main() |
| 84 | + File "/fs/project/gomez.124/opt/conda/pgamit/bin/ParallelGamit.py", line 399, in main |
| 85 | + sessions = ExecuteGamit(cnn, JobServer, GamitConfig, stations, check_stations, args.ignore_missing, dates, |
| 86 | + File "/fs/project/gomez.124/opt/conda/pgamit/bin/ParallelGamit.py", line 700, in ExecuteGamit |
| 87 | + net_object = Network(cnn, archive, GamitConfig, stations, date, check_stations, ignore_missing) |
| 88 | + File "/fs/project/gomez.124/opt/conda/pgamit/lib/python3.10/site-packages/pgamit/network.py", line 176, in init |
| 89 | + self.sessions = self.create_gamit_sessions(cnn, archive, clusters, |
| 90 | + File "/fs/project/gomez.124/opt/conda/pgamit/lib/python3.10/site-packages/pgamit/network.py", line 382, in create_gamit_sessions |
| 91 | + sessions.append(GamitSession(cnn, archive, self.name, self.org, |
| 92 | + File "/fs/project/gomez.124/opt/conda/pgamit/lib/python3.10/site-packages/pgamit/pyGamitSession.py", line 72, in init |
| 93 | + stations_.append(stn for stn in stations if stn not in ties) |
| 94 | + File "/fs/project/gomez.124/opt/conda/pgamit/lib/python3.10/site-packages/pgamit/pyStation.py", line 299, in append |
| 95 | + raise pyStationException('type: ' + str(type(station)) + |
| 96 | + pgamit.pyStation.pyStationException: type: <class 'generator'> invalid. Can only append Station objects or lists of Station objects |
| 97 | + ``` |
| 98 | + placeholder: > |
| 99 | + Please paste or specifically describe the actual output or traceback. |
| 100 | + validations: |
| 101 | + required: true |
| 102 | +- type: textarea |
| 103 | + attributes: |
| 104 | + label: Versions |
| 105 | + render: shell |
| 106 | + description: | |
| 107 | + If you built pgamit from the git repo, please provide the commit hash of your build; if you installed pgamit via pip, run the following and paste the output below. |
| 108 | + ```python |
| 109 | + import pgamit; pgamit.__version__ |
| 110 | + ``` |
| 111 | + validations: |
| 112 | + required: true |
| 113 | +- type: markdown |
| 114 | + attributes: |
| 115 | + value: > |
| 116 | + Thanks for contributing 🎉! |
0 commit comments