Skip to content

Commit 0a65047

Browse files
authored
Refactor + improve docs (#305)
- kinda revert the change from #304 where all collections inherit from `list` - there is now a new base class `MultiClusterMap`, which acts as a dict but is capable of holding data from multiple clusters (for example when querying database jobs from multiple clusters in pyslurm.db.Jobs) - improve docs
1 parent 485722b commit 0a65047

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+1368
-872
lines changed

CHANGELOG.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1616
- New attributes for a Database Job:
1717
- extra
1818
- failed_node
19-
- Now possible to initialize a pyslurm.db.Jobs collection with existing job
19+
- Now possible to initialize a [pyslurm.db.Jobs][] collection with existing job
2020
ids or pyslurm.db.Job objects
2121
- Added `as_dict` function to all Collections
22+
- Added a new Base Class [MultiClusterMap][pyslurm.xcollections.MultiClusterMap] that some Collections inherit from.
2223

2324
### Fixed
2425

@@ -28,9 +29,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2829
- the Job was older than a day
2930

3031
### Changed
31-
32-
- All Collections (like [pyslurm.Jobs](https://pyslurm.github.io/23.2/reference/job/#pyslurm.Jobs)) inherit from `list` now instead of `dict`
32+
3333
- `JobSearchFilter` has been renamed to `JobFilter`
34+
- Renamed `as_dict` Function of some classes to `to_dict`
3435

3536
## [23.2.1](https://github.com/PySlurm/pyslurm/releases/tag/v23.2.1) - 2023-05-18
3637

docs/reference/config.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,3 @@ title: Config
77
removed in the future when a replacement is introduced
88

99
::: pyslurm.config
10-
handler: python

docs/reference/constants.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,3 @@ title: constants
33
---
44

55
::: pyslurm.constants
6-
handler: python
7-

docs/reference/db/cluster.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,3 @@ title: Cluster
77
removed in the future when a replacement is introduced
88

99
::: pyslurm.slurmdb_clusters
10-
handler: python

docs/reference/db/connection.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,3 @@ title: Connection
33
---
44

55
::: pyslurm.db.Connection
6-
handler: python

docs/reference/db/event.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,3 @@ title: Event
77
removed in the future when a replacement is introduced
88

99
::: pyslurm.slurmdb_events
10-
handler: python

docs/reference/db/job.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,4 @@ title: Job
77
will be removed in a future release
88

99
::: pyslurm.db.Job
10-
handler: python
11-
1210
::: pyslurm.db.Jobs
13-
handler: python

docs/reference/db/jobfilter.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,3 @@ title: JobFilter
33
---
44

55
::: pyslurm.db.JobFilter
6-
handler: python

docs/reference/db/jobstats.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,3 @@ title: JobStatistics
33
---
44

55
::: pyslurm.db.JobStatistics
6-
handler: python

docs/reference/db/jobstep.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,4 @@ title: JobStep
33
---
44

55
::: pyslurm.db.JobStep
6-
handler: python
7-
86
::: pyslurm.db.JobSteps
9-
handler: python

0 commit comments

Comments
 (0)