Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
KOLANICH committed Nov 1, 2022
0 parents commit 317dc7a
Show file tree
Hide file tree
Showing 25 changed files with 2,525 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
root = true

[*]
charset = utf-8
indent_style = tab
indent_size = 4
insert_final_newline = true
end_of_line = lf

[*.{yml,yaml}]
indent_style = space
indent_size = 2
1 change: 1 addition & 0 deletions .github/.templateMarker
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
KOLANICH/python_project_boilerplate.py
8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version: 2
updates:
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "daily"
allow:
- dependency-type: "all"
15 changes: 15 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: CI
on:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
build:
runs-on: ubuntu-22.04
steps:
- name: typical python workflow
uses: KOLANICH-GHActions/typical-python-workflow@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
graph.dot

__pycache__
*.py[co]
/*.egg-info
*.srctrlbm
*.srctrldb
build
dist
.eggs
monkeytype.sqlite3
/.ipynb_checkpoints
13 changes: 13 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
image: registry.gitlab.com/kolanich-subgroups/docker-images/fixed_python:latest

variables:
DOCKER_DRIVER: overlay2
SAST_ANALYZER_IMAGE_TAG: latest
SAST_DISABLE_DIND: "true"
SAST_CONFIDENCE_LEVEL: 5
CODECLIMATE_VERSION: latest

include:
- template: SAST.gitlab-ci.yml
- template: Code-Quality.gitlab-ci.yml
- template: License-Management.gitlab-ci.yml
1 change: 1 addition & 0 deletions Code_Of_Conduct.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
No codes of conduct!
4 changes: 4 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
include UNLICENSE
include *.md
include tests
include .editorconfig
205 changes: 205 additions & 0 deletions ReadMe.md

Large diffs are not rendered by default.

24 changes: 24 additions & 0 deletions UNLICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
This is free and unencumbered software released into the public domain.

Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.

In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
of the public at large and to the detriment of our heirs and
successors. We intend this dedication to be an overt act of
relinquishment in perpetuity of all present and future rights to this
software under copyright law.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.

For more information, please refer to <https://unlicense.org/>
40 changes: 40 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
[build-system]
requires = ["setuptools>=61.2.0", "setuptools_scm[toml]>=3.4.3"]
build-backend = "setuptools.build_meta"

[project]
name = "timberAllocation"
readme = "ReadMe.md"
description = "Just a tool trying to solve the task of optimal cutting existing pieces of timber into pieces that when combined give pieces of needed length"
authors = [{name = "KOLANICH"}]
classifiers = [
"Development Status :: 4 - Beta",
"Environment :: Other Environment",
"Intended Audience :: Developers",
"License :: Public Domain",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Topic :: Software Development :: Libraries :: Python Modules",
]
keywords = ["algorythms", "greedy", "divide-and-conquer", "dynamic programming", "optimization"]
license = {text = "Unlicense"}
requires-python = ">=3.4"
dynamic = ["version"]
dependencies = [
"RichConsole", # @ git+https://gitlab.com/KOLANICH/RichConsole.py.git
]
[project.optional-dependencies]
optimization = ["autograd"]

[project.urls]
Homepage = "https://github.com/KOLANICH-research/timberAllocation.py"

[tool.setuptools]
zip-safe = true

[tool.setuptools.packages.find]
include = ["timberAllocation", "timberAllocation.*"]

[tool.setuptools_scm]
19 changes: 19 additions & 0 deletions tests/47,31->51,22,5.dot
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
digraph "" {
47 [color=green];
31 [color=green];
47 [color=green];
51 [color=red];
22 [color=red];
5 [color=red];
47 -> {25, 22} [color=green];
47 -> {20, 27} [color=green];
31 -> {5, 26} [color=green];
31 -> {9, 22} [color=green];
9 -> {5, 4} [color=cyan];
51 -> {47, 4} [color=red];
25 -> {20, 5} [color=cyan];
51 -> {20, 31} [color=red];
27 -> {22, 5} [color=cyan];
26 -> {22, 4} [color=cyan];
31 -> {4, 27} [color=green];
}
3 changes: 3 additions & 0 deletions tests/47,31->51,22,5.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#{51:1, 22:1, 5:1}
1 47
2 31
5 changes: 5 additions & 0 deletions tests/toy.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#{6.7: 1, 4.3: 1}
1 3.87
2 3.17
3 4
4 3.5
42 changes: 42 additions & 0 deletions tests/wood.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#{230: 9, 110: 10}
14 242
32 234
36 141 89
27 230
2 224
43 219
3 209
33 209
15 208
24 178 29
31 178 29
29 154.5 50
19 170 32
41 186
10 184
42 180
16 164.5
6 163
40 160
39 103 56
17 153
25 152
23 150
28 150
12 147
8 142.5
34 139
26 136
30 104
13 99
35 89
20 86
7 84.5
9 80
11 78
1 31
5 27
37 23
22 20
18 14
21 6.5
6 changes: 6 additions & 0 deletions tests/wood1.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#{46: 1, 44: 1, 26:1, 27:1, 110: 1, 80: 1, 11: 1, 21: 1, }
36 89
39 103
34 139
22 20
18 14
Loading

0 comments on commit 317dc7a

Please sign in to comment.