Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/rates-schema.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "RatesConfig",
"description": "Schema for core and GPU hour rate configuration",
"description": "Schema for core and GPU hour rate configuration; cluster core counts are derived from slurm.conf",
"type": "object",
"properties": {
"defaultRate": {
Expand Down
1 change: 0 additions & 1 deletion src/rates.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"defaultRate": 0.02,
"defaultGpuRate": 0.2,
"clusterCores": 100,
"historicalRates": {
"2024-01": 0.015
},
Expand Down
16 changes: 0 additions & 16 deletions src/slurmcostmanager.js
Original file line number Diff line number Diff line change
Expand Up @@ -1023,22 +1023,6 @@ function Rates({ onRatesUpdated }) {
})
)
),
React.createElement(
'div',
null,
React.createElement(
'label',
null,
'Total Cluster Cores: ',
React.createElement('input', {
type: 'number',
step: '1',
value: config.clusterCores,
onChange: e =>
setConfig({ ...config, clusterCores: e.target.value })
})
)
),
React.createElement('h3', null, 'Account Overrides'),
React.createElement(
'table',
Expand Down
10 changes: 9 additions & 1 deletion test/unit/billing_summary.test.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,15 @@ def fake_open(path, *args, **kwargs):
), mock.patch.object(SlurmDB, 'fetch_invoices', return_value=[]), mock.patch(
'builtins.open', side_effect=fake_open
), mock.patch.object(
SlurmDB, 'cluster_resources', return_value={'cores': 100}
SlurmDB,
'_parse_slurm_conf',
return_value={
'nodes': 1,
'sockets': 1,
'cores': 100,
'threads': 1,
'gres': {},
},
):
db = SlurmDB()
summary = db.export_summary('2024-02-01', '2024-02-29')
Expand Down
Loading