Skip to content

Commit

Permalink
Merge remote-tracking branch 'pypsa-earth-sec/snakemake-module' into …
Browse files Browse the repository at this point in the history
…merge-pyspa-earth-sec
  • Loading branch information
FabianHofmann committed Aug 16, 2024
2 parents d8c6351 + ef54888 commit 1480d7a
Show file tree
Hide file tree
Showing 86 changed files with 17,054 additions and 761 deletions.
27 changes: 27 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
name: Bug report
about: Create a report if something doesn't work quite right.
title: ''
labels: bug
assignees: ''
---

<!-- Please do not post usage questions here. Ask them on the Q&A at the discussion tab on GitHub: https://github.com/pypsa-meets-africa/pypsa-africa/discussions/categories/q-a -->

## Checklist

- [ ] I am using the current [`main`](https://github.com/pypsa-meets-africa/pypsa-earth-sec/tree/main) branch or the latest [release](https://github.com/pypsa-meets-africa/pypsa-earth-sec/releases). Please indicate.
- [ ] I am running on an up-to-date [`pypsa-africa` environment](https://github.com/pypsa-meets-africa/pypsa-africa/blob/main/envs/environment.yaml). Update via `conda env update -f envs/environment.yaml`.

## Describe the Bug

*Please provide a description of what the bug is and add a minimal example/command for reproducing the bug.*

## Error Message

*If applicable, paste any terminal output to help illustrating your problem.*
*In some cases it may also be useful to share your list of installed packages: `conda list`.*

```bash
<paste here>
```
61 changes: 61 additions & 0 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
###########################
###########################
## Linter GitHub Actions ##
###########################
###########################
name: Lint Code Base

#
# Documentation:
# https://help.github.com/en/articles/workflow-syntax-for-github-actions
#

#############################
# Start the job on all push #
#############################
on:
push:
branches-ignore: [main]
# Remove the line above to run when pushing to master

###############
# Set the Job #
###############
jobs:
build:
# Name the Job
name: Lint Code Base
# Set the agent to run on
runs-on: ubuntu-latest

##################
# Load all steps #
##################
steps:
##########################
# Checkout the code base #
##########################
- name: Checkout Code
uses: actions/checkout@v2
with:
# Full git history is needed to get a proper list of changed files within `super-linter`
fetch-depth: 0

################################
# Run Linter against code base #
################################
- name: Lint Code Base
uses: docker://ghcr.io/github/super-linter:slim-v4
env:
VALIDATE_ALL_CODEBASE: false
DEFAULT_BRANCH: main
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VALIDATE_SNAKEMAKE_LINT: false
VALIDATE_SNAKEMAKE_SNAKEFMT: false
VALIDATE_PYTHON_ISORT: false
VALIDATE_PYTHON_MYPY: false
VALIDATE_PYTHON_FLAKE8: false
VALIDATE_PYTHON_BLACK: false
VALIDATE_NATURAL_LANGUAGE: false
VALIDATE_JSCPD: false
VALIDATE_GITLEAKS: false
71 changes: 38 additions & 33 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
**/__pycache__
*.py[cod]
*$py.class

# Jupyter-related files
.ipynb_checkpoints

# General untracked file formats
Expand All @@ -15,55 +17,58 @@
*.zip
*.png
*.done
*.tif
*.csv
*.geojson
*.nc
*.xls
*.xlsx
*.org
*~

# Untracked files
# Specific untracked files
config.yaml
dag.svg

# Files appear for tests
configs/scenarios/config.custom.yaml
data/*.csv
data/*.geojson
gurobi.log
gadm_shapes.geojson
doc/*.vscode/settings.json

# Untracked folders (and files within)
img/
.snakemake/
bak
benchmarks/
backup*
cutouts/
data/
data/osm/
data/raw/
data/base_network/
results/
dask-worker-space/
img/
logs/
networks/
notebooks
notebooks/
pypsa/
resources/
scripts/temp
scripts/test.py
results/
.snakemake/
slurm
scripts/old
.tmp
doc/_build
sample_pypsa_eur
test/tmp/
configs/scenarios/config.*.yaml
!configs/scenarios/config.NG.yaml
dask-worker-space/

# Untrack some Jupyter changes
.ipynb_checkpoints
notebooks/*.nc
notebooks/*.csv
notebooks/*.zip
notebooks/*.tif
notebooks/old_notebooks/*.nc
notebooks/old_notebooks/*.csv
notebooks/old_notebooks/*.zip
notebooks/old_notebooks/*.tif

# Untrack test doc builds
doc/_build
# Specific configuration files
configs/scenarios/config.*.yaml
!configs/scenarios/config.NG.yaml

# VS code related
*.vscode
doc/*.vscode/settings.json
*.vscode/settings.json
# VS Code-related files
.vscode
*.code-workspace
*.vscode/settings.json

# Additional debugging folders
backup*
screenlog*

# Exclude specific file paths
!data/demand/unsd/paths/Energy_Statistics_Database.xlsx
9 changes: 9 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,15 @@ repos:
# Format Jupyter Python notebooks
- id: black-jupyter

# # Find common spelling mistakes in comments and docstrings
# - repo: https://github.com/codespell-project/codespell
# rev: v2.2.1
# hooks:
# - id: codespell
# args: ['--ignore-regex="\b[A-Z]+\b"'] # Ignore capital case words, e.g. country codes
# types_or: [python, rst, markdown]
# files: ^(actions|doc)/

# Do YAML formatting (before the linter checks it for misses)
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.14.0
Expand Down
6 changes: 6 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# SPDX-FileCopyrightText: PyPSA-Earth and PyPSA-Eur Authors
#
# SPDX-License-Identifier: AGPL-3.0-or-later

# Ignore all HTML files:
*.yaml
20 changes: 0 additions & 20 deletions .reuse/dep5

This file was deleted.

6 changes: 3 additions & 3 deletions .yamllint
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ rules:
max-spaces-inside: 0
max-spaces-inside-empty: 0
comments:
require-starting-space: true
min-spaces-from-content: 1
require-starting-space: false
min-spaces-from-content: 0
# Force correct indentation of comments
# yamllint disable-line rule:braces
comments-indentation: {}
Expand All @@ -34,7 +34,7 @@ rules:
key-duplicates: {}
line-length:
level: warning
max: 200
max: 350
new-line-at-end-of-file: enable
truthy:
check-keys: false # Disable truthy check hits on keys like "on": ...
Loading

0 comments on commit 1480d7a

Please sign in to comment.