Skip to content

Commit 7273476

Browse files
pesapstaadecker
authored andcommitted
Merge branch 'wecc' into feature/post_process
2 parents 9ff8168 + 3fb8498 commit 7273476

File tree

34 files changed

+1675
-532
lines changed

34 files changed

+1675
-532
lines changed

docs/Database.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,18 @@ The command to enter PostgreSQL while SSH'd into the server is `psql wecc`.
4141

4242
## Making changes to the database
4343

44-
Whether it's adding data to the database or changing its schema, it's important
45-
to proceed carefully when making changes to the database. Always make sure to
44+
### Common operations
45+
46+
Some database changes are common operations that are used repeatedly.
47+
For these operations, it's helpful to make a command line tool to make the process easy.
48+
49+
For example, adding a scenario to the database is a common operation. Therefore, we have built
50+
the `switch db save_scenario` command to easily do this. (Run `switch db save_scenario --help` for details).
51+
52+
### Custom operations
53+
54+
When running custom operations on the database it's very important
55+
to proceed carefully. Always make sure to
4656
**test and keep track of your changes**.
4757

4858
Here are the steps to make a change.
@@ -61,9 +71,7 @@ to the convention `YYYY-MM-DD_<script_name>`.
6171
5. Open a pull request to add your script to the repository (see [`docs/Contribute.md`](Contribute.md))
6272
so we can keep track of the changes that have been made.
6373

64-
### Bigger changes
65-
66-
Sometimes, it isn't feasible to have your entire change as a single SQL script.
74+
Note that sometimes, it isn't feasible to have your entire change as a single SQL script.
6775
One way to make bigger changes is to use a Python script. Use the same process
6876
as for the SQL scripts. That is save your Python scripts in the `/database` folder.
6977

docs/Pandas.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,9 @@ kwargs = dict(
121121
index_col=False,
122122
dtype={"GENERATION_PROJECT": str}, # This ensures that the project id column is read as a string not an int
123123
)
124-
gen_projects = pd.read_csv("generation_projects_info.csv", *kwargs)
125-
costs = pd.read_csv("gen_build_costs.csv", *kwargs)
126-
predetermined = pd.read_csv("gen_build_predetermined.csv", *kwargs)
124+
gen_projects = pd.read_csv("generation_projects_info.csv", **kwargs)
125+
costs = pd.read_csv("gen_build_costs.csv", **kwargs)
126+
predetermined = pd.read_csv("gen_build_predetermined.csv", **kwargs)
127127

128128
# JOIN TABLES
129129
gen_projects = gen_projects.merge(

0 commit comments

Comments
 (0)