Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Pauline Backend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Pauline
Pauline Backend
Commits
60d8d9c9
There was an error fetching the commit references. Please try again later.
Commit
60d8d9c9
authored
Mar 19, 2022
by
Adrian Block
Browse files
Options
Downloads
Patches
Plain Diff
🔥
removed db cli
parent
10c18283
No related branches found
No related tags found
1 merge request
!3
Dev
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
app/cli.py
+0
-1
0 additions, 1 deletion
app/cli.py
app/cli/__init__.py
+0
-1
0 additions, 1 deletion
app/cli/__init__.py
app/cli/db.py
+0
-23
0 additions, 23 deletions
app/cli/db.py
with
0 additions
and
25 deletions
app/cli.py
+
0
−
1
View file @
60d8d9c9
...
...
@@ -8,7 +8,6 @@ app = typer.Typer()
app
.
add_typer
(
cli
.
scraper_command
,
name
=
"
scraper
"
)
app
.
add_typer
(
cli
.
courses_command
,
name
=
"
courses
"
)
app
.
add_typer
(
cli
.
db_command
,
name
=
"
db
"
)
if
__name__
==
"
__main__
"
:
app
()
This diff is collapsed.
Click to expand it.
app/cli/__init__.py
+
0
−
1
View file @
60d8d9c9
from
.scraper
import
scraper_command
from
.courses
import
courses_command
from
.db
import
db_command
This diff is collapsed.
Click to expand it.
app/cli/db.py
deleted
100644 → 0
+
0
−
23
View file @
10c18283
import
asyncio
import
typer
from
app
import
scraper
,
schemas
from
app.database
import
get_session
from
app.processing
import
mapper
db_command
=
typer
.
Typer
()
@db_command.command
()
def
scrapesite
(
semester
:
str
,
site_path
:
str
):
session
=
next
(
get_session
())
courses
=
asyncio
.
run
(
scraper
.
find_and_parse_courses
(
site_path
))
s
=
schemas
.
Semester
(
name
=
semester
,
courses
=
courses
)
db_s
=
mapper
.
map_semester
(
s
)
session
.
add
(
db_s
)
session
.
commit
()
print
(
"
Success!
"
)
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