Skip to content

Commit

Permalink
Merge pull request #310 from MC-kit/devel
Browse files Browse the repository at this point in the history
return approximate presentaion from 'legacy' branch
  • Loading branch information
dvp2015 authored Feb 22, 2024
2 parents 5428f5f + e174c6c commit fc905e9
Show file tree
Hide file tree
Showing 66 changed files with 1,878 additions and 1,640 deletions.
2 changes: 1 addition & 1 deletion .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Language: Cpp
# BasedOnStyle: Microsoft
AccessModifierOffset: -2
AlignAfterOpenBracket: BlockIndent
AlignAfterOpenBracket: Align
AlignConsecutiveMacros: false
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/clean-workflow-logs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ name: Clean Workflow Logs
on:
workflow_dispatch:
inputs:
# days_old:
# description: "The amount of days old to delete"
# default: "7"
# required: false
# days_old:
# description: "The amount of days old to delete"
# default: "7"
# required: false
dry:
description: "Dry run"
default: "false"
Expand All @@ -15,12 +15,12 @@ jobs:
clean-logs:
runs-on: ubuntu-latest
steps:
# - uses: igorjs/gh-actions-clean-workflow@v1
# with:
# token: ${{ secrets.GITHUB_TOKEN }}
# owner: ${{ github.repository_owner }}
# repo: ${{ github.event.repository.name }}
# days_old: ${{ github.event.inputs.days_old }}
# - uses: igorjs/gh-actions-clean-workflow@v1
# with:
# token: ${{ secrets.GITHUB_TOKEN }}
# owner: ${{ github.repository_owner }}
# repo: ${{ github.event.repository.name }}
# days_old: ${{ github.event.inputs.days_old }}
- name: Clean workflow runs
uses: dmvict/[email protected]
with:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/combine-prs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: actions/github-script@v6
- uses: actions/github-script@v7
id: fetch-branch-names
name: Fetch branch names
with:
Expand Down Expand Up @@ -100,7 +100,7 @@ jobs:
console.log('Combined: ' + combined);
return combined
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3.5.3
- uses: actions/checkout@v4
with:
fetch-depth: 0
# Creates a branch with other PR branches merged together
Expand All @@ -126,7 +126,7 @@ jobs:
git pull origin $sourcebranches --no-edit
git push origin $COMBINE_BRANCH_NAME
# Creates a PR with the new combined branch
- uses: actions/github-script@v6
- uses: actions/github-script@v7
name: Create Combined Pull Request
env:
PRS_STRING: ${{ steps.fetch-branch-names.outputs.prs-string }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ jobs:
draft_release:
runs-on: ubuntu-latest
steps:
- uses: release-drafter/release-drafter@v5
- uses: release-drafter/release-drafter@v6
env:
GITHUB_TOKEN: ${{ secrets.MCKIT_GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
# and building of dependencies.

- name: Publish the release notes
uses: release-drafter/release-drafter@v5
uses: release-drafter/release-drafter@v6
with:
publish: ${{ steps.check-version.outputs.tag != '' }}
tag: ${{ steps.check-version.outputs.tag }}
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@ name: Mark stale issues and pull requests

on:
schedule:
- cron: "10 10 * * 0" # at 10:10 every Sunday
# See expression format: https://www.techielass.com/schedule-github-actions-using-cron-expressions
- cron: "10 10 * * 0" # at 10:10 every Sunday
# See expression format: https://www.techielass.com/schedule-github-actions-using-cron-expressions
jobs:
stale:

runs-on: ubuntu-latest

steps:
- uses: actions/stale@v9
with:
repo-token: ${{ secrets.MCKIT_GITHUB_TOKEN }}
stale-issue-message: 'Stale issue message'
stale-pr-message: 'Stale pull request message'
stale-issue-label: 'no-issue-activity'
stale-pr-label: 'no-pr-activity'
- uses: actions/stale@v9
with:
repo-token: ${{ secrets.MCKIT_GITHUB_TOKEN }}
stale-issue-message: 'Stale issue message'
stale-pr-message: 'Stale pull request message'
stale-issue-label: 'no-issue-activity'
stale-pr-label: 'no-pr-activity'
25 changes: 13 additions & 12 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
- name: Load poetry cache
id: cached-poetry-dependencies
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
.cache/pypoetry
Expand Down Expand Up @@ -102,7 +102,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.DEFAULT_PYTHON }}
python-version: ${{ env.DEFAULT_PYTHON }}

- name: Use frozen pip version
run: |
Expand All @@ -116,7 +116,7 @@ jobs:
- name: Load poetry cache
id: cached-poetry-dependencies
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
.cache/pypoetry
Expand All @@ -141,8 +141,8 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ['3.9', '3.10', '3.11']
os: [ ubuntu-latest, macos-latest, windows-latest ]
python-version: [ '3.9', '3.10', '3.11' ]

steps:

Expand All @@ -169,7 +169,7 @@ jobs:
- name: Load poetry cache
id: cached-poetry-dependencies
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
.cache/pypoetry
Expand All @@ -187,9 +187,9 @@ jobs:
run: nox --force-color --session tests --python ${{ matrix.python-version }}

- name: Upload coverage data
uses: actions/upload-artifact@v3.1.3
uses: actions/upload-artifact@v4
with:
name: coverage-data
name: coverage-data-${{ runner.os }}-${{ matrix.python-version }}
path: ".coverage.*"

coverage:
Expand All @@ -212,7 +212,7 @@ jobs:
- name: Load poetry cache
id: cached-poetry-dependencies
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
.cache/pypoetry
Expand All @@ -232,9 +232,10 @@ jobs:
nox --version
- name: Download coverage data
uses: actions/download-artifact@v3.0.2
uses: actions/download-artifact@v4
with:
name: coverage-data
pattern: coverage-data-*
merge-multiple: true

- name: Combine coverage data and display human readable report
run: |
Expand All @@ -245,4 +246,4 @@ jobs:
nox --force-color --session=coverage -- xml
- name: Upload coverage report
uses: codecov/codecov-action@v3.1.4
uses: codecov/codecov-action@v4
15 changes: 8 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,10 @@
#
# pre-commit autoupdate
#
# See for more information:
# See:
# https://pre-commit.com/ and
# https://github.com/pre-commit/pre-commit
# For more hooks:
# https://pre-commit.com/hooks.html

# https://github.com/pre-commit/pre-commit for more information
# https://pre-commit.com/hooks.html for more hooks
default_language_version:
python: python3.11

Expand All @@ -31,6 +29,7 @@ repos:
- id: check-json
- id: check-merge-conflict
- id: check-shebang-scripts-are-executable
exclude: notebooks
- id: check-symlinks
- id: check-toml
- id: check-yaml
Expand All @@ -40,7 +39,6 @@ repos:
- id: name-tests-test
args:
- --pytest-test-first
- id: no-commit-to-branch
- id: mixed-line-ending
- id: requirements-txt-fixer
- id: trailing-whitespace
Expand Down Expand Up @@ -70,21 +68,24 @@ repos:
- --py39-plus
language: system
types: [ python ]

# Nicely sort imports
- id: isort
name: isort
exclude: tools|\.idea|\.cache|^notebooks|^extern
entry: isort
language: system
types: [ python ]

# Black, the code formatter, natively supports pre-commit
- id: black
name: black
entry: black
language: system
types: [ python ]
exclude: ^notebooks|^extern
# Lint

# Lint and fix Python code
- id: ruff
name: ruff
entry: ruff --force-exclude --fix --config pyproject.toml
Expand Down
1 change: 1 addition & 0 deletions adhoc/calc_up_intersections.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
We don't use bounding boxes here, because the number of cells in the model is much more (about 1000 times)
than number of GA envelopes. The complexity is not reduced significantly using bounding box.
"""

import typing as tp

from functools import reduce
Expand Down
1 change: 1 addition & 0 deletions adhoc/cross_fields/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""TODO..."""

from __future__ import annotations


Expand Down
1 change: 1 addition & 0 deletions adhoc/cross_fields/add_envelop.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Insert envelop for generators NG14 and ING-07 into building model."""

from __future__ import annotations

from mckit import Body, Universe
Expand Down
1 change: 1 addition & 0 deletions adhoc/cross_fields/insert_dnfm_dummies.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Use cell 1000 as envelop.
"""

from __future__ import annotations

from mckit import Transformation, Universe
Expand Down
1 change: 1 addition & 0 deletions adhoc/cross_fields/insert_generators.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Insert generators NG14 and ING-07 into envelop 1000 in extended building model."""

from __future__ import annotations

from mckit import Body, Transformation, Universe
Expand Down
1 change: 1 addition & 0 deletions adhoc/demo_typer.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Try typer CLI."""

from __future__ import annotations

from typing import Annotated, Optional
Expand Down
1 change: 1 addition & 0 deletions adhoc/ep11/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""TODO..."""

from __future__ import annotations


Expand Down
Loading

0 comments on commit fc905e9

Please sign in to comment.