diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..f3473ad --- /dev/null +++ b/.dockerignore @@ -0,0 +1,10 @@ +.DS_Store +.ruff_cache/ +.coverage +accounts/ +results-raw/ +results-parsed/ +accounts.db* +data/ +data_media/ +dist/ diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9d8299f..07f2324 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,18 +22,15 @@ jobs: - name: install dependencies run: pip install -e .[dev] - - name: lint - run: make lint - - - name: test - run: make test + - run: make lint + - run: make test release: + if: ${{ startsWith(github.ref, 'refs/tags/v') }} runs-on: ubuntu-latest + needs: test permissions: contents: write - if: ${{ startsWith(github.ref, 'refs/tags/v') }} - needs: test steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 diff --git a/Makefile b/Makefile index e126436..e2695c0 100644 --- a/Makefile +++ b/Makefile @@ -6,6 +6,9 @@ install: pip install -e .[dev] python -m build +build: + python -m build --sdist --wheel --outdir dist/ . + lint: @# https://docs.astral.sh/ruff/settings/#sorting-imports @ruff check --select I --fix . @@ -39,7 +42,7 @@ test-py-matrix: @make test-py v=3.10 @make test-py v=3.11 @make test-py v=3.12 - @make test-py v=3.13-rc + @make test-py v=3.13 test-sq-matrix: @# https://www.sqlite.org/chronology.html @@ -70,7 +73,3 @@ update-mocks: twscrape list_timeline --raw --limit 10 1494877848087187461 | jq > ./tests/mocked-data/raw_list_timeline.json @# twscrape favoriters --raw --limit 10 1649191520250245121 | jq > ./tests/mocked-data/raw_favoriters.json @# twscrape liked_tweets --raw --limit 10 2244994945 | jq > ./tests/mocked-data/raw_likes.json - -x: - twscrape tweet_details --raw 1790441814857826439 | jq > ./tests/mocked-data/card_broadcast.json - twscrape tweet_details --raw 1789054061729173804 | jq > ./tests/mocked-data/card_audiospace.json diff --git a/pyproject.toml b/pyproject.toml index 82c1dc7..162d1c3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "twscrape" -version = "0.14" +version = "0.15.0" authors = [{ name = "vladkens", email = "v.pronsky@gmail.com" }] description = "Twitter GraphQL and Search API implementation with SNScrape data models" readme = "readme.md"