***
Wartungsfenster jeden ersten Mittwoch vormittag im Monat
***
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
fairnb
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Weise, Martin
fairnb
Commits
035f0999
Commit
035f0999
authored
2 years ago
by
Mahler, Lukas
Browse files
Options
Downloads
Patches
Plain Diff
add test ipynb'
parent
4df03108
No related branches found
No related tags found
1 merge request
!1
Dev
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/test.ipynb
+112
-0
112 additions, 0 deletions
test/test.ipynb
with
112 additions
and
0 deletions
test/test.ipynb
0 → 100644
+
112
−
0
View file @
035f0999
{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"%load_ext autoreload\n",
"%autoreload 2"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import pathlib\n",
"import yaml"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"BASE_PATH = pathlib.Path(\"\").absolute().parent\n",
"\n",
"BASE_PATH"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"with open(BASE_PATH / \"config\" / \"test-config.yml\", \"r\") as file:\n",
" config = yaml.safe_load(file)"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"## DBREPO"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"from dbrepo_ismir.dbrepo import DBRepoConnector"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"dbrepo_connector = DBRepoConnector(\n",
" config[\"dbrepo\"][\"credentials\"][\"username\"],\n",
" config[\"dbrepo\"][\"credentials\"][\"password\"],\n",
" config[\"dbrepo\"][\"host\"],\n",
" config[\"dbrepo\"][\"container-id\"],\n",
" config[\"dbrepo\"][\"database-id\"]\n",
")"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"dbrepo_connector.authenticate()"
]
}
],
"metadata": {
"kernelspec": {
"display_name": ".venv",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.9"
},
"vscode": {
"interpreter": {
"hash": "fbdad3b52853b758871b4d238ec94da75d74e372cb79c920964ecd5f864ef60d"
}
}
},
"nbformat": 4,
"nbformat_minor": 2
}
%% Cell type:code id: tags:
```
python
%
load_ext
autoreload
%
autoreload
2
```
%% Cell type:code id: tags:
```
python
import
pathlib
import
yaml
```
%% Cell type:code id: tags:
```
python
BASE_PATH
=
pathlib
.
Path
(
""
).
absolute
().
parent
BASE_PATH
```
%% Cell type:code id: tags:
```
python
with
open
(
BASE_PATH
/
"
config
"
/
"
test-config.yml
"
,
"
r
"
)
as
file
:
config
=
yaml
.
safe_load
(
file
)
```
%% Cell type:markdown id: tags:
## DBREPO
%% Cell type:code id: tags:
```
python
from
dbrepo_ismir.dbrepo
import
DBRepoConnector
```
%% Cell type:code id: tags:
```
python
dbrepo_connector
=
DBRepoConnector
(
config
[
"
dbrepo
"
][
"
credentials
"
][
"
username
"
],
config
[
"
dbrepo
"
][
"
credentials
"
][
"
password
"
],
config
[
"
dbrepo
"
][
"
host
"
],
config
[
"
dbrepo
"
][
"
container-id
"
],
config
[
"
dbrepo
"
][
"
database-id
"
]
)
```
%% Cell type:code id: tags:
```
python
dbrepo_connector
.
authenticate
()
```
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment