Skip to content

Commit

Permalink
Feat/35 implement regex matching (#44)
Browse files Browse the repository at this point in the history
* Implemented regex matching, initial commit

* Added credentials check for cubes and removed all references to set_db()

* Implemented regex matching, initial commit

* Added credentials check for cubes and removed all references to set_db()

* fix tests

* refactoring Find and Result class to work with new database detection logic; because find does not use names like Table and Cube, use has to specify the database

* fix tests
---------

Co-authored-by: Michael Aydinbas <[email protected]>
Co-authored-by: Michael Aydinbas <[email protected]>
  • Loading branch information
3 people authored Jan 29, 2024
1 parent 6e060f7 commit ceff3ad
Show file tree
Hide file tree
Showing 26 changed files with 11,322 additions and 5,268 deletions.
32 changes: 26 additions & 6 deletions nb/00_Setup.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"cells": [
{
"cell_type": "markdown",
"id": "ab52102c",
"metadata": {},
"source": [
"# Setup `pystatis`\n",
Expand All @@ -19,17 +20,36 @@
},
{
"cell_type": "markdown",
"id": "bd45ca01",
"metadata": {},
"source": [
"`dotenv` is uses here to load a local `.env` file that contains the above mentioned environmental variables so we don't have to input them."
]
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 4,
"id": "888706f5-3a9e-4e0a-9ca6-fa430280bc03",
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"pystatis version: 0.1.5\n"
]
},
{
"data": {
"text/plain": [
"True"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"from pathlib import Path\n",
"\n",
Expand All @@ -43,13 +63,13 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 5,
"id": "ee7969b6",
"metadata": {},
"outputs": [],
"source": [
"# only execute if you want to delete your config file for test purposes\n",
"# config.delete_config()"
"# pystatis.config.delete_config()"
]
},
{
Expand All @@ -76,7 +96,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 6,
"id": "6c301da5",
"metadata": {},
"outputs": [],
Expand Down Expand Up @@ -127,7 +147,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.6"
"version": "3.11.5"
}
},
"nbformat": 4,
Expand Down
123 changes: 0 additions & 123 deletions nb/01_Databases.ipynb

This file was deleted.

513 changes: 513 additions & 0 deletions nb/01_table.ipynb

Large diffs are not rendered by default.

24 changes: 3 additions & 21 deletions nb/cube.ipynb → nb/02_cube.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,7 @@
"import logging\n",
"logging.basicConfig(level=logging.INFO)\n",
"\n",
"from pystatis import Cube\n",
"from pystatis.db import set_db"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "812c0e39",
"metadata": {},
"outputs": [],
"source": [
"set_db(\"genesis\")"
"from pystatis import Cube"
]
},
{
Expand All @@ -31,7 +20,7 @@
"metadata": {},
"outputs": [],
"source": [
"c = Cube(name=\"23211BJ001\")"
"c = Cube(name=\"22922KJ001\")"
]
},
{
Expand All @@ -41,7 +30,7 @@
"metadata": {},
"outputs": [],
"source": [
"c.get_data()"
"c.get_data() # TODO: currently broken?"
]
},
{
Expand Down Expand Up @@ -98,13 +87,6 @@
"\n",
"pprint(c.metadata)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down
15 changes: 2 additions & 13 deletions nb/cache.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,7 @@
"import logging\n",
"logging.basicConfig(level=logging.INFO)\n",
"\n",
"from pystatis import Cube, Table, clear_cache\n",
"from pystatis.db import set_db"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "5c944d20",
"metadata": {},
"outputs": [],
"source": [
"set_db(\"genesis\")"
"from pystatis import Cube, Table, clear_cache"
]
},
{
Expand Down Expand Up @@ -85,7 +74,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.5"
"version": "3.11.6"
},
"vscode": {
"interpreter": {
Expand Down
Loading

0 comments on commit ceff3ad

Please sign in to comment.