diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index af9a1cd..d817e61 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -15,7 +15,7 @@ jobs: with: python-version: 3.9 - name: Setup Pipenv - run: make setup + run: make setup-ci - run: git config user.name 'github-actions[bot]' && git config user.email 'github-actions[bot]@users.noreply.github.com' - name: Publish docs run: mkdocs gh-deploy --clean --force \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3877d13..f3d23c5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,11 +16,11 @@ jobs: with: python-version: 3.9 - name: Setup Pipenv - run: make setup + run: make setup-ci - name: Create test config run: | touch config.yml - pipenv run config + make config sed -i "s//${{ secrets.TEST_NOTION_TOKEN }}/g" config.yml sed -i "s//${{ secrets.TEST_NOTION_TOKEN_V2 }}/g" config.yml sed -i "s//${{ secrets.TEST_ZOTERO_TOKEN }}/g" config.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 77e711d..7d8aae1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -19,11 +19,11 @@ jobs: with: python-version: ${{ matrix.python-version }} - name: Setup Pipenv - run: make setup + run: make setup-ci - name: Create test config run: | touch config.yml - pipenv run config + make config sed -i "s//${{ secrets.TEST_NOTION_TOKEN }}/g" config.yml sed -i "s//${{ secrets.TEST_NOTION_TOKEN_V2 }}/g" config.yml sed -i "s//${{ secrets.TEST_ZOTERO_TOKEN }}/g" config.yml diff --git a/.gitignore b/.gitignore index 9c8b832..e1c791b 100644 --- a/.gitignore +++ b/.gitignore @@ -141,4 +141,5 @@ cython_debug/ *.yml !.github/workflows/*.yml !mkdocs.yml -scratch \ No newline at end of file +scratch +.secrets \ No newline at end of file diff --git a/Makefile b/Makefile index ada9dd8..9ea9687 100644 --- a/Makefile +++ b/Makefile @@ -16,7 +16,10 @@ setup-ci: setup pip install -r requirements-dev.txt clean: - rm -rf dist build requirements.txt requirements-dev.txt notionsci.egg-info + rm -rf dist build notionsci.egg-info + +config: + python -m notionsci config -f config.yml #---- Packaging ---- diff --git a/notionsci/config/constants.py b/notionsci/config/constants.py index 39dad08..0a444f2 100644 --- a/notionsci/config/constants.py +++ b/notionsci/config/constants.py @@ -3,6 +3,6 @@ DEFAULT_PROFLE = "default" OVERRIDE_CONFIG_NAME = "config.yml" -TEMPLATE_ZOTERO = 'https://efficacious-alarm-7cc.notion.site/Zotero-Library-908bf67ef61048b79a1a10dfa5826302' +TEMPLATE_ZOTERO = 'https://efficacious-alarm-7cc.notion.site/Zotero-Library-36f83fd853994420a53d818a5b67da3e' DEV_TESTS_PAGE = "https://www.notion.so/NotionSci-Tests-22ecab6188d147ef83fa455e2694395b" diff --git a/notionsci/connections/notion/structures/blocks.py b/notionsci/connections/notion/structures/blocks.py index b361602..fa59d75 100644 --- a/notionsci/connections/notion/structures/blocks.py +++ b/notionsci/connections/notion/structures/blocks.py @@ -161,7 +161,7 @@ def to_markdown(self, context: MarkdownContext) -> str: @dataclass_dict_convert(dict_letter_case=snakecase) @dataclass class ChildPageBlock: - text: str + title: str @dataclass diff --git a/requirements.txt b/requirements.txt index 67bf1f0..ac46b09 100644 --- a/requirements.txt +++ b/requirements.txt @@ -32,7 +32,7 @@ idna==3.2 ; python_version >= '3' inquirer==2.7.0 mistletoe==0.7.2 mypy-extensions==0.4.3 -notion +git+https://github.com/EgorDm/notion-py.git notion-client==0.6.0 numpy==1.21.2 ; python_version < '3.11' and python_version >= '3.7' pandas==1.3.3