Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix types and CI, refactor GHA workflow #49

Merged
merged 6 commits into from
Dec 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,14 @@ jobs:
env:
DEBIAN_FRONTEND: noninteractive
run: |
pip install -e '.[dev]'
pip install setuptools
make install
- name: Run the tests
run: pytest
- name: Install types
run: python -m pip install types-requests types-setuptools
run: make test
- name: Validate typing
run: |
mypy .
run: make typecheck
- name: Build a distribution
run: |
python setup.py sdist bdist_wheel
run: make dists
- name: Publish a Python distribution to PyPI
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
Expand Down
20 changes: 0 additions & 20 deletions .github/workflows/main.yml

This file was deleted.

7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@ all: clean test dists
install:
pip install -q -e ".[dev]"

test: install
test:
pytest

dists: install
typecheck:
mypy alephclient/

dists:
python setup.py sdist
python setup.py bdist_wheel

Expand Down
4 changes: 2 additions & 2 deletions alephclient/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,9 +343,9 @@ def _bulk_chunk(
url = self._make_url(f"collections/{collection_id}/_bulk")
params = {"entityset_id": entityset_id}
if unsafe:
params['safe'] = not unsafe
params["safe"] = "false"
if cleaned:
params['clean'] = not cleaned
params["clean"] = "false"
try:
response = self.session.post(url, json=chunk, params=params)
response.raise_for_status()
Expand Down
2 changes: 2 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
"wheel",
"pytest",
"pytest-mock >= 1.10.0",
"types-requests",
"types-setuptools",
]
},
entry_points={
Expand Down
Loading