-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
647f3b0
commit 8647e19
Showing
5 changed files
with
33 additions
and
249 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,10 +15,10 @@ jobs: | |
run: sudo apt install sqlite3 libsqlite3-dev python3-pip | ||
|
||
- name: Install Python packages | ||
run: sudo pip3 install pandas | ||
run: sudo pip3 install pandas tabulate | ||
|
||
- name: Generate Materials HTML | ||
run: sudo mkdir ./docs/html && sudo python3 ./docs/gen_materials_page.py | ||
run: sudo python3 ./docs/additional_docs/gen_materials_page.py | ||
|
||
- name: Doxygen Action | ||
uses: mattnotmitt/[email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import sqlite3 | ||
import pandas as pd | ||
import os | ||
|
||
# Change working directory to the directory of this file | ||
os.chdir(os.path.dirname(os.path.abspath(__file__))) | ||
|
||
db_path = '../../data/data_sources/EPDL/EPDL.db' | ||
conn = sqlite3.connect(db_path) | ||
c = conn.cursor() | ||
|
||
# Export Materials table to pandas dataframe | ||
df = pd.read_sql_query("SELECT * FROM Materials", conn) | ||
|
||
# Add units to density column name | ||
df.rename(columns={'Density': 'Density (g/cm3)'}, inplace=True) | ||
|
||
# Export df to markdown | ||
df.to_markdown('Materials.md', index=False) | ||
|
||
header = "# Materials Available For Simulation" | ||
|
||
# Add header to markdown file | ||
with open('Materials.md', 'r+') as f: | ||
content = f.read() | ||
f.seek(0, 0) | ||
f.write(header + '\n' + content) | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.