Skip to content

Commit

Permalink
reactor: move code to parse wikitext in separate module
Browse files Browse the repository at this point in the history
code relies on mwparserfromhell, which should become optional
Refs: #56
  • Loading branch information
simontaurus committed Oct 27, 2024
1 parent 62becc7 commit ed20642
Show file tree
Hide file tree
Showing 4 changed files with 788 additions and 728 deletions.
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,26 @@ General features for object oriented interaction with knowledge graphs are plann
pip install osw
```

### Variants
| Variant | Description |
| -- | -- |
`osw[wikitext]` | Additional functions in `wiki_tools` to transform mediawiki markup / templates
`osw[DB]` | interact with SQL databases per DatabaseController
`osw[S3]` | Interact with S3 Stores per S3FileController
`osw[dataimport]` | Additional tools to import data
`osw[UI]` | To use a helper UI to work with entity slots

To install multiple optional/extra dependencies run
```
pip install osw[opt1, opt2, ...]
```

To install all optional/extra dependencies run
```
pip install osw[all]
```


## Troubleshooting

### `Error: datamodel-codegen not found`
Expand Down
24 changes: 19 additions & 5 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ install_requires =
pydantic>=1.10.17
datamodel-code-generator>=0.25
mwclient>=0.10.0
mwparserfromhell
rdflib
PyLD
SPARQLWrapper
Expand Down Expand Up @@ -79,10 +78,24 @@ exclude =
# Add here additional requirements for extra features, to install with:
# `pip install osw[PDF]` like:
# PDF = ReportLab; RXP
dataimport = geopy; deepl
DB = psycopg2; sqlalchemy
UI = pysimplegui
S3 = boto3
wikitext =
mwparserfromhell
DB =
psycopg2
sqlalchemy
S3 =
boto3
dataimport =
geopy
deepl
UI =
pysimplegui
all =
%(dataimport)s
%(DB)s
%(UI)s
%(S3)s
%(wikitext)s

# Add here dev requirements (semicolon/line-separated)
dev =
Expand All @@ -99,6 +112,7 @@ testing =
deepl
sqlalchemy
psycopg2-binary # see: https://www.psycopg.org/docs/install.html#psycopg-vs-psycopg-binary
mwparserfromhell

[options.entry_points]
# Add here console scripts like:
Expand Down
Loading

0 comments on commit ed20642

Please sign in to comment.