Skip to content

Commit 0112815

Browse files
authored
Merge pull request #1 from modelblocks-org/remove-clio
Update documentation to modelblocks
2 parents 2732d91 + af629b7 commit 0112815

17 files changed

Lines changed: 203 additions & 56 deletions

File tree

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
name: Bug report
3+
about: For general problems with the documentation
4+
title: ''
5+
labels: bug
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the issue is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the issue:
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Screenshots**
24+
If applicable, add screenshots to help explain your problem.
25+
26+
**Additional context**
27+
Add any other context about the problem here.

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: General information
4+
url: https://www.modelblocks.org/
5+
about: Please reach out through our website for general questions.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Guideline suggestion
3+
about: Suggest an idea to make modelblocks better!
4+
title: ''
5+
labels: enhancement
6+
assignees: ''
7+
8+
---
9+
10+
**Is this suggestion related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

.github/workflows/pr-ci.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
branches: [ main ]
6+
7+
jobs:
8+
build:
9+
name: Build
10+
runs-on: ${{ matrix.os }}
11+
strategy:
12+
matrix:
13+
os: [ubuntu-latest]
14+
steps:
15+
- uses: actions/checkout@v4
16+
- name: setup-pixi
17+
uses: prefix-dev/setup-pixi@v0.9.4
18+
- name: Run tests
19+
run: pixi run test

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ build/
1414
dist/
1515
wheels/
1616
*.egg-info
17-
src/clio_tools/_version.py
1817

1918
# Virtual environments
2019
.venv

CITATION.cff

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# https://citation-file-format.github.io/
44
cff-version: 1.2.0
55
message: Please cite this project using the metadata from this file.
6-
title: "modelblocks - Re-usable building blocks for energy system models"
6+
title: "modelblocks - Reusable building blocks for energy system models"
77
repository: https://github.com/modelblocks-org/docs
88
license: Apache 2.0
99
version: 0.0.1

README.md

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,23 @@
1-
# A framework for modular and easy to understand energy modelling tools
1+
# Modelblocks documentation
22

3-
`clio` aims to be a collection modularisation guidelines and tools that help energy modellers produce high-quality research that is repeatable, understanable and easy to use.
3+
`modelblocks` aims to be a collection modular tools and modularisation guidelines that help energy modellers produce high-quality research that is repeatable, understanable, and easy to use.
44

5-
Please read all about it in our [documentation](https://clio.readthedocs.io/en/stable/)!
5+
Please read all about it in our [documentation](https://modelblocks.readthedocs.io/en/stable/)!
66

7-
## `clio` development
7+
## `modelblocks` documentation development
88

9-
Install [`pixi`](https://pixi.sh/latest/) and run:
9+
We rely on [`pixi`](https://pixi.sh/latest/) for development and maintenance.
10+
To install, simply run the following:
1011

1112
```bash
12-
git clone git@github.com:calliope-project/clio.git
13-
cd clio
14-
pixi install --all # Installs both default and developer dependencies
13+
git clone git@github.com:modelblocks-org/docs.git
14+
cd docs
15+
pixi install --all
1516
```
17+
18+
## Helper commands
19+
20+
- `pixi run build-docs`: build a local version of the documentation
21+
- `pixi run serve-docs`: render the documentation on your browser
22+
- `pixi run style`: run CI linting, refractoring and spellchecking
23+
- `pixi run test`: quick local test of the documentation

docs/Background/our_framework.md

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -42,29 +42,31 @@ These are topic-specific data-generating [`snakemake`](https://snakemake.github.
4242
Below is an example of how a data module can be accessed by another workflow.
4343

4444
```python
45-
# Include local module configuration.
46-
configfile: "config/modules/foobar.yaml"
45+
# Load the module configuration
46+
with open(workflow.source_path("config/geoboundaries.yaml"), "r") as file:
47+
config_geoboundaries = yaml.safe_load(file.read())
4748

48-
module foobar:
49+
module geoboundaries:
4950
# Request a specific module version.
5051
snakefile:
5152
github(
52-
"calliope-project/foobar",
53+
"modelblocks-org/module_geo_boundaries",
5354
path="workflow/Snakefile",
54-
tag="v1.0.0"
55+
tag="v0.1.9"
5556
)
56-
# Module configuration has its own key to ensure isolation.
57-
config: config["foobar"]
58-
# A prefix is added to isolate module input/output files.
59-
prefix: "results/module_foobar"
57+
# Specify the module configuration.
58+
config: config_geoboundaries
59+
# Pathvars let you tune input/output file location.
60+
pathvars:
61+
shapes="results/module_geoboundaries/shapes.parquet"
6062

6163
# Rewrite rule names to avoid naming conflicts
62-
use rule * from foobar as module_foobar_*
64+
use rule * from geoboundaries as module_geoboundaries_*
6365
```
6466

6567
??? note "Template"
6668

67-
All data modules should follow [our standardised template](https://github.com/calliope-project/data-module-template).
69+
All data modules should follow [our standardised template](https://github.com/modelblocks-org/data-module-template).
6870
This template provides a baseline for developers to ensure the following.
6971

7072
- Version-specific access via version tags.
@@ -81,9 +83,9 @@ These are study-specific workflows that combine the outputs of all other types o
8183
Since they tend to be study-specific, they will rarely (if ever) be accessed by other tools or components.
8284
It is perfectly possible to ensure that a model builder can be accessed modularly, but this is not required.
8385

84-
## The `clio_tools` integration utilities
86+
## The `clio_tools` integration utility
8587

86-
To save time and enable component developers to check against the latest `clio` standards, we provide the `clio_tools` library.
88+
To save time and enable component developers to check against the latest `modelblocks` standards, we provide the `clio_tools` library.
8789
This is a set of useful utility functions, geared towards ensuring smooth interfacing.
8890

89-
For more information, check [`clio_tools`](https://github.com/modelblocks-org/clio-tools)
91+
For more information, check [`clio_tools`](https://github.com/modelblocks-org/clio-tools).

docs/Developer_guidelines/getting_started.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ If you don't, we recommend following `mamba`'s [installation advice](https://git
1313
mamba install -c conda-forge copier
1414
```
1515

16-
2. Call the `copier` template of the type of component you wish to make. Currently, we only support [data modules](https://github.com/calliope-project/data-module-template).
16+
2. Call the `copier` template of the type of component you wish to make. Currently, we only support [data modules](https://github.com/modelblocks-org/data-module-template).
1717

1818
```shell
19-
copier copy 'https://github.com/calliope-project/data-module-template'
19+
copier copy 'https://github.com/modelblocks-org/data-module-template'
2020
```
2121

2222
3. You'll be prompted with some questions. After answering them, `copier` will auto-generate the module for you.

docs/Developer_guidelines/requirements.md

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
We enforce the following requirements in all projects.
66

7-
1. **Open-source code**: projects must use either MIT or Apache 2.0, which are both [OSI approved](https://opensource.org/licenses) open-source licenses, and they must be openly available in platforms such as GitHub.
7+
1. **Open-source code**: projects must use either Apache 2.0 or MIT open-source licenses, which are [OSI approved](https://opensource.org/licenses), and they must be openly available in platforms such as GitHub.
88
2. **Open data**: data produced by projects (dataset tools and data modules in particular) should use a [CC-BY-4.0 license](https://creativecommons.org/licenses/by/4.0/) whenever possible.
99
3. **Versioning**: projects must be version controlled with official releases, which can be used to specify the version of the project used in a study and/or dataset, and an accompanying CHANGELOG. Project developers are free to choose their preferred approach (e.g., [SemVer](https://semver.org/) or [CalVer](https://calver.org/)).
1010
4. **Testing**: projects must employ some type of testing to ensure quality and long-term stability. The approach will vary depending on the type of project:
@@ -46,7 +46,7 @@ The following is a list of general advice on how to format files to help tools i
4646

4747
???+ example "Example of a tidy table"
4848

49-
| year | country_id | shape_id | demand |
49+
| year | country_id | shape_id | demand_mwh |
5050
|---------------|------------------|------------------|--------------|
5151
| 2020 | ITA | North | 4500 |
5252
| 2020 | ITA | East | 4800 |
@@ -68,20 +68,13 @@ The following is a list of general advice on how to format files to help tools i
6868
"shape_id": "no_unit",
6969
"demand": "mwh"
7070
}
71-
dataframe.attrs["source"] = "github.com/calliope-project/clio"
71+
dataframe.attrs["source"] = "github.com/modelblocks-org/docs"
7272
dataframe.attrs["license"] = "CC-BY-4.0"
7373
dataframe.to_parquet('my_data.parquet')
7474
```
7575

7676
3. **Raster data**: we prefer to use GeoTIFF (.tiff) files.
7777
4. **Polygon data**: we prefer [GeoParquet](https://geoparquet.org/) (.parquet) files.
78-
79-
??? example "Example shapefiles in our standard format"
80-
81-
You can find some simple examples of our standard data format in the `clio/resources/shapes` folder.
82-
83-
--8<-- "resources/shapes/README.md:docs"
84-
8578
5. **Gridded data**: we prefer to use [netCDF](https://www.unidata.ucar.edu/software/netcdf/) (.nc) files.
8679

8780
## Metadata conventions
@@ -95,7 +88,7 @@ The following is a list of general advice on how to format files to help tools i
9588

9689
???+ example "Example of tabular subnational data"
9790

98-
| country_id | shape_id | shape_spec | demand |
91+
| country_id | shape_id | shape_spec | demand_mwh |
9992
|------------------|------------------|------------------|--------------|
10093
| DEU | DE13 | NUTS2024 | 4500 |
10194
| DEU | DE14 | NUTS2024 | 4800 |

0 commit comments

Comments
 (0)