Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Cimpy 3_0 #40

Open
wants to merge 27 commits into
base: cgmes3
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
e9896ea
Fix formatting with black formatter
stv0g Jun 17, 2024
807b1b6
Add simple pre-commit config
stv0g Jun 17, 2024
2c35fc9
Add GitHub actions workflow for running pre-commit
stv0g Jun 17, 2024
d3784b6
Fix missing newline at end-of-file
stv0g Jun 17, 2024
360746e
Remove trailing whitespaces
stv0g Jun 17, 2024
c90cd2a
Cleanup .gitignore
stv0g Jun 17, 2024
aecadd0
Fix warnings and formatting from black and flake8
stv0g Jun 17, 2024
824caa6
Make all filenames PEP-8 compliant
stv0g Jun 17, 2024
9a99426
Update Python packaging files to use new best practices
stv0g Jun 17, 2024
f37a217
Replace print with logging package
stv0g Jun 17, 2024
4f63a10
Use proper printf-style formatting for logging
stv0g Jun 17, 2024
8feb082
Fix capitalization of comments
stv0g Jun 17, 2024
0e89379
Fix camelCase naming of variables
stv0g Jun 17, 2024
a79f8eb
Fix pytest CI workflow
stv0g Jun 17, 2024
5caeeea
Simplify CI action for building docs
stv0g Jun 17, 2024
5ae145b
docs: Move workflow figure into images folder
stv0g Jun 17, 2024
5eb9238
Fix code-smells detected by Sonar Cloud
stv0g Jun 17, 2024
d23596b
Cleanups (#30)
m-mirz Jun 19, 2024
932de3b
fix(ci): Fix permissions of GITHUB_TOKEN in order to deploy GitHub pages
stv0g Jun 20, 2024
1376f9a
fix(ci): Fix permissions of `GITHUB_TOKEN` in order to deploy GitHub …
stv0g Jun 20, 2024
8c3688e
fix(ci): Another take at fixing the pages deployment
stv0g Jun 20, 2024
b9c3abb
fix(doc): Update copyright year
stv0g Jun 20, 2024
ddbfae0
fix(ci): Fix permissions of `GITHUB_TOKEN` in order to deploy GitHub …
stv0g Jun 20, 2024
d611e32
Bump version to v1.1.0
stv0g Jun 20, 2024
fb219e7
switch to Apache license
m-mirz Jun 22, 2024
06aaeee
Switch to Apache license (#37)
m-mirz Jun 23, 2024
0b0ed7d
Added cimpy 3_0 version
ThomasSchwierz Sep 5, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[flake8]
max-line-length = 120
70 changes: 70 additions & 0 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Documentation

on:
pull_request:

push:
branches:
- master

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
build:
name: Build
runs-on: ubuntu-latest

permissions:
pages: write
id-token: write

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.8

- name: Install Graphviz
shell: bash
run: |
sudo apt-get -y install graphviz

- name: Install Python dependencies
run: |
pip install .[doc]

- name: Build documentation
working-directory: documentation
run: |
sphinx-apidoc \
--full \
--doc-project "cimpy" \
--separate \
--output-dir "." \
"../"

python3 set_inheritance_diagram.py

make html

touch _build/html/.nojekyll

ls -l _build/html

- name: Upload Artifact
uses: actions/upload-pages-artifact@v3
with:
path: documentation/_build/html

- name: Deploy to GitHub Pages
if: github.ref == 'refs/heads/master'
id: deployment
uses: actions/deploy-pages@v4
14 changes: 14 additions & 0 deletions .github/workflows/pre-commit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: pre-commit

on:
pull_request:
push:
branches: [main]

jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: pre-commit/[email protected]
38 changes: 0 additions & 38 deletions .github/workflows/pytest.yaml

This file was deleted.

40 changes: 40 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Pytest

on:
push:
branches:
- master
pull_request:

jobs:
test:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup python
uses: actions/setup-python@v5
with:
python-version: 3.8

- name: Install Graphviz
shell: bash
run: |
sudo apt-get -y install graphviz

- name: Install Python dependencies
run: |
pip install .[dev]

- name: Run pytest
run: |
pytest -v -cov --junitxml=report.xml

- name: Upload pytest test results
uses: actions/upload-artifact@v4
if: ${{ always() }}
with:
name: pytest-results
path: cimpy/report.xml
35 changes: 0 additions & 35 deletions .github/workflows/workflow.yaml

This file was deleted.

9 changes: 3 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
# python folders
# Python folders
*.egg-info/
__pycache__
.idea
.venv
./cimpy/__pycache__
*.egg
build/
dist/

# log files
*.log

# vs code
# VSCode
.vscode/*

# documentation
# documentation/
19 changes: 19 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
exclude: ^cimpy/cgmes_

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace

- repo: https://github.com/psf/black
rev: 22.10.0
hooks:
- id: black

- repo: https://github.com/PyCQA/flake8
rev: 7.1.0
hooks:
- id: flake8
32 changes: 0 additions & 32 deletions Dockerfile

This file was deleted.

Loading