Skip to content

Commit

Permalink
Merge branch 'main' into refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
maxhoerstr committed Aug 20, 2024
2 parents ea838f5 + a8d9393 commit 54d5757
Show file tree
Hide file tree
Showing 83 changed files with 1,022 additions and 190 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/build_and_deploy_docu.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# SPDX-FileCopyrightText: The PFDL Contributors
# SPDX-License-Identifier: CC0-1.0

name: Build and deploy docu

on:
Expand All @@ -6,6 +9,8 @@ on:
- 'main'
paths:
- 'docs/**'
- '.github/workflows/build_and_deploy_docu.yml'
- 'mkdocs.yml'


permissions:
Expand All @@ -16,9 +21,9 @@ jobs:
name: Build and deploy Docu
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0

- uses: actions/setup-python@v4
- uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4.7.1
with:
python-version: '3.10'

Expand Down
20 changes: 17 additions & 3 deletions .github/workflows/code_coverage.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,37 @@
# SPDX-FileCopyrightText: The PFDL Contributors
# SPDX-License-Identifier: CC0-1.0

name: Measure code coverage

on:
push:
branches:
- 'main'
paths:
- 'pfdl_scheduler/**'
- 'tests/**'
- 'requirements.txt'
- '.github/workflows/**'
pull_request:
branches:
- 'main'
paths:
- 'pfdl_scheduler/**'
- 'tests/**'
- 'requirements.txt'
- '.github/workflows/**'

permissions:
contents: read

jobs:
code-coverage:
name: Code Coverage
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0

- uses: actions/setup-python@v4
- uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4.7.1
with:
python-version: '3.10'

Expand All @@ -33,4 +47,4 @@ jobs:
coverage run --omit=tests/*,pfdl_scheduler/parser/PFDL* -m unittest discover -s tests/unit_test
coverage report
coverage json
coverage html
coverage html
18 changes: 10 additions & 8 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@
# SPDX-FileCopyrightText: The PFDL Contributors
# SPDX-License-Identifier: CC0-1.0

name: Lint

on:
push:
branches:
- 'main'
paths:
- 'pfdl_scheduler/**'
pull_request:
pull_request:
branches:
- 'main'
paths:
- 'pfdl_scheduler/**'

permissions:
contents: read

jobs:
lint-check:
name: Lint Check
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0

- uses: actions/setup-python@v4
- uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4.7.1
with:
python-version: '3.10'

Expand All @@ -30,4 +32,4 @@ jobs:
- name: Run Lint check
run: |
python3 ci_lint_runner.py pfdl_scheduler 8
python3 ci_lint_runner.py tests 8
python3 ci_lint_runner.py tests 8
17 changes: 17 additions & 0 deletions .github/workflows/reuse.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# SPDX-FileCopyrightText: The PFDL Contributors
# SPDX-License-Identifier: CC0-1.0

name: REUSE Compliance Check

on: [push, pull_request]

permissions:
contents: read

jobs:
reuse:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: REUSE Compliance Check
uses: fsfe/reuse-action@a46482ca367aef4454a87620aa37c2be4b2f8106 # v3.0.0
34 changes: 19 additions & 15 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,27 @@
# SPDX-FileCopyrightText: The PFDL Contributors
# SPDX-License-Identifier: CC0-1.0

name: Tests

on:
on:
push:
paths:
- 'pfdl_scheduler/**'
branches:
- 'main'
pull_request:
branches:
- 'main'
paths:
- 'pfdl_scheduler/**'

permissions:
contents: read

jobs:
unit-tests:
name: Unit Tests
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0

- uses: actions/setup-python@v4
- uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4.7.1
with:
python-version: '3.10'

Expand All @@ -26,23 +30,23 @@ jobs:
sudo apt -qq update
sudo apt -qq install -y graphviz
pip3 install -r requirements.txt
pip3 install unittest-xml-reporting --upgrade
pip3 install unittest-xml-reporting --upgrade
- name: Run Unit Tests
run: python3 -m xmlrunner discover -s tests/unit_test -v -o tmp/build/unittest-reports

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
with:
name: Unit Test results
path: tmp/build/unittest-reports/*.xml

integration-tests:
name: Integration Tests
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0

- uses: actions/setup-python@v4
- uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4.7.1
with:
python-version: '3.10'

Expand All @@ -51,12 +55,12 @@ jobs:
sudo apt -qq update
sudo apt -qq install -y graphviz
pip3 install -r requirements.txt
pip3 install unittest-xml-reporting --upgrade
pip3 install unittest-xml-reporting --upgrade
- name: Run Unit Tests
run: python3 -m xmlrunner discover -s tests/integration_tests -v -o tmp/build/integrationtest-reports

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
with:
name: Integration Test results
path: tmp/build/integrationtest-reports/*.xml
119 changes: 8 additions & 111 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so
# SPDX-FileCopyrightText: The PFDL Contributors
# SPDX-License-Identifier: CC0-1.0

# Distribution / packaging
__pycache__/
.Python
build/
develop-eggs/
Expand All @@ -25,122 +20,24 @@ share/python-wheels/
.installed.cfg
*.egg
MANIFEST
.venv

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

*.interp
*.tokens
*.vscode
*.antlr

# for debugging only
# ignore docu build folder
site/

# ignore log files
temp/
6 changes: 5 additions & 1 deletion third_party/styleguide/.pylintrc → .pylintrc
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
# SPDX-FileCopyrightText: Google LLC
# SPDX-FileCopyrightText: The PFDL Contributors
# SPDX-License-Identifier: CC-BY-3.0 AND Apache-2.0
#
# This Pylint rcfile contains a best-effort configuration to uphold the
# best-practices and style described in the Google Python style guide
# https://google.github.io/styleguide/pyguide.html
# and was further slightly adapted to our needs.
#
# Its original open-source location is:
# https://google.github.io/styleguide/pylintrc
# https://github.com/google/styleguide/blob/ea180f7259da4ae90ae086c1eefbeb5f440dbea2/pylintrc

[MASTER]

Expand Down
12 changes: 12 additions & 0 deletions .reuse/dep5
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: pfdl
Upstream-Contact:
Source: https://github.com/iml130/pfdl

Files: docs/img/*
Copyright: The PFDL Contributors
License: CC-BY-4.0

Files: pfdl_grammar/*
Copyright: The PFDL Contributors
License: MIT
Loading

0 comments on commit 54d5757

Please sign in to comment.