Skip to content

Commit f3c3558

Browse files
committed
added example for dependency management as a table
1 parent f923603 commit f3c3558

1 file changed

Lines changed: 71 additions & 4 deletions

File tree

04_CsharpGrundlagenII.md

Lines changed: 71 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<!--
22
3-
author: Sebastian Zug, Galina Rudolf, André Dietrich, `Lina` & `Florian2501`
3+
author: Sebastian Zug, Galina Rudolf, André Dietrich, Volker Göhler, `Lina` & `Florian2501`
44
email: sebastian.zug@informatik.tu-freiberg.de
5-
version: 1.0.7
5+
version: 1.0.8
66
language: de
77
narrator: Deutsch Female
88
comment: Werte- und Referenzdatentypen, Array, String, implizite Variablendefinition und Nullables
@@ -44,7 +44,74 @@ beschäftigt und die Notwendigkeit
4444

4545
diskutiert.
4646

47-
> Natürlich ist das kein ausgemachtes Problem von C# ... Codebeispiel in Python
47+
> - Natürlich ist das kein ausgemachtes Problem von C#
48+
> - In Java sollten wir Maven nutzen und in Python zum Beispiel Poetry.
49+
50+
| Aktion | dotnet (C#) | poetry (Python) | maven (Java) |
51+
| --- | --- | --- | --- |
52+
| Erstellung | `dotnet new console -n Projektname` | `poetry new Projektname` | `mvn archetype:generate -DgroupId=com.example -DartifactId=Projektname -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false` |
53+
| Kompilieren | `cd Projektname && dotnet build` | `cd Projektname && poetry install` | `cd Projektname && mvn compile` |
54+
| Ausführung | `dotnet run` | `poetry run python Projektname/main.py (oder poetry shell + python main.py)` | `mvn exec:java -cp target/classes com.example.Projektname.App` |
55+
56+
> Ein Beispiel in Python könnte so aussehen:
57+
58+
```yaml pyproject.toml
59+
[project]
60+
name = "keyword-extraction"
61+
version = "0.1.1"
62+
description = "Extraktion von Keywords aus PDF-Dokumenten"
63+
authors = [
64+
{name = "Sebastian Zug",email = "sebastian.zug@informatik.tu-freiberg.de"},
65+
{name = "Volker Göhler",email = "volker.goehler@informatik.tu-freiberg.de"}
66+
]
67+
license = {text = "CC-BY-SA-4.0"}
68+
readme = "README.md"
69+
requires-python = ">=3.11,<=3.12.3"
70+
dependencies = [
71+
"ollama (>=0.5.1,<0.6.0)",
72+
"pymupdf (>=1.25.5,<1.26.0)",
73+
"pandas (>=2.2.3,<2.3.0)",
74+
"pyyaml (>=6.0.2,<6.1.0)",
75+
"tqdm (>=4.67.1,<4.68.0)",
76+
"urllib3 (>=2.4.0,<2.5.0)",
77+
"ipykernel (>=6.29.5,<6.30.0)",
78+
"jupyter (>=1.1.1,<1.2.0)",
79+
"jupyterlab (>=4.4.3,<4.5.0)",
80+
"networkx (>=3.5,<4.0)",
81+
"matplotlib (>=3.10.3,<4.0.0)",
82+
"langchain[openai] (>=0.3.26,<0.4.0)",
83+
"pypdf (>=5.8.0,<6.0.0)",
84+
"langchain-ollama (>=0.3.6,<0.4.0)",
85+
"langchain-chroma (>=0.2.5,<0.3.0)",
86+
"langchain-community (>=0.3.27,<0.4.0)",
87+
"langchain-text-splitters (>=0.3.8,<0.4.0)",
88+
"langgraph (>=0.5.4,<0.6.0)"
89+
]
90+
91+
[project.scripts]
92+
extract = "keyword_extraction.main:main"
93+
94+
[tool.poetry]
95+
packages = [
96+
{ include = "keyword_extraction", from = "src" }
97+
]
98+
99+
[tool.poetry.group.dev.dependencies]
100+
pytest = "^8.3.5"
101+
102+
[tool.pytest.ini_options]
103+
pythonpath = "src"
104+
testpaths = [
105+
"tests"
106+
]
107+
filterwarnings = [
108+
'ignore::DeprecationWarning',
109+
]
110+
111+
[build-system]
112+
requires = ["poetry-core>=2.0.0,<3.0.0"]
113+
build-backend = "poetry.core.masonry.api"
114+
```
48115

49116
## Referenzdatentypen
50117

@@ -573,4 +640,4 @@ public class Program
573640
}
574641
}
575642
```
576-
@LIA.eval(`["main.cs"]`, `mcs main.cs`, `mono main.exe`)
643+
@LIA.eval(`["main.cs"]`, `mcs main.cs`, `mono main.exe`)

0 commit comments

Comments
 (0)