Skip to content

Commit

Permalink
chore: Pytest & Prettier Update (#56)
Browse files Browse the repository at this point in the history
* Deprecated

* Check INI

* Prettify

* Prettify

* Simplify

* RC

* Ignore

* Simplify

* Consistency

* Prettify

* Heh

* useTabs
  • Loading branch information
RickiJay-WMDE committed Jan 20, 2025
1 parent 95def7c commit c02979c
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 27 deletions.
13 changes: 2 additions & 11 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,6 @@ name: Docs Lint

on:
pull_request:
paths:
- "data/gx/**/*.json"
- "*.md"
- "**/*.md"
- "*.yml"
- "**/*.yml"
- ".github/workflows/docs.yml"

jobs:
lint-check:
Expand All @@ -20,10 +13,8 @@ jobs:
uses: actions/setup-node@v4

- name: npm install
run: npm install prettier
run: npm install prettier prettier-plugin-ini

- name: npm check
run: |
npx prettier --check --use-tabs data/gx/**/*.json
npx prettier --check --use-tabs *.md **/*.md
npx prettier --check --use-tabs *.yml **/*.yml
npx prettier --check .
6 changes: 6 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
data/gx/uncommitted/
node_modules/
.ipynb_checkpoints/
.pytest_cache/
tests/**/data/*.html
package*.json
12 changes: 12 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"useTabs": true,
"overrides": [
{
"files": "*.ini",
"options": {
"plugins": ["prettier-plugin-ini"],
"iniSpaceAroundEquals": true
}
}
]
}
1 change: 0 additions & 1 deletion alembic.ini
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ version_path_separator = os # Use os.pathsep. Default configuration used for ne

sqlalchemy.url = sqlite:///data/wikibase-data.db


[post_write_hooks]
# post_write_hooks defines scripts or Python functions that are run
# on newly generated revision scripts. See the documentation for further
Expand Down
2 changes: 1 addition & 1 deletion alembic/README
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Generic single-database configuration.
Generic single-database configuration.
2 changes: 1 addition & 1 deletion prod-settings.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
database_connection_string = sqlite+aiosqlite:///$TOOL_DATA_DIR/wikibase-data.db

[logging]
log_directory=$TOOL_DATA_DIR/logs
log_directory = $TOOL_DATA_DIR/logs
log_level = INFO
29 changes: 16 additions & 13 deletions pytest.ini
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
[pytest]
asyncio_mode = auto
asyncio_default_fixture_loop_scope = function

markers =
data: database tests
mutation: mutation tests
query: query tests
agg: aggregate query tests
connectivity: connectivity observation tests
log: log observation tests
property: property popularity observation tests
quantity: quantity observation tests
soup: soup-based observation tests
sparql: sparql-based observation tests
statistics: statistics observation tests
user: user observation tests
version: software version observation tests
data: database tests
mutation: mutation tests
query: query tests
agg: aggregate query tests
connectivity: connectivity observation tests
log: log observation tests
property: property popularity observation tests
quantity: quantity observation tests
soup: soup-based observation tests
sparql: sparql-based observation tests
statistics: statistics observation tests
user: user observation tests
version: software version observation tests

0 comments on commit c02979c

Please sign in to comment.