Skip to content

Commit

Permalink
Max/reset fix (#18)
Browse files Browse the repository at this point in the history
* Adds sql to file and test

* Improve PR

* Tests for errors

* One more test

* Add dolt path override

* Black

* Fixes

* Avoid re-opening the same tmpfile

* Var name change

* accidetally deleted line

* Fix old python csv bug

* tempdir silently fail on rmtree

* Ignore shutil errors

* Edit readme

* Fix reset function

* Better CI fmt/lint/test

* Fix codecov upload

* Fix lint line
  • Loading branch information
max-hoffman authored Jun 25, 2021
1 parent 126252b commit 6eba196
Show file tree
Hide file tree
Showing 21 changed files with 583 additions and 535 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,15 @@ jobs:
- name: Install poetry dependencies
run: poetry install
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
- name: Execute black
run: poetry run black . --check --exclude tests -t py37
- name: Execute mypy
run: poetry run mypy doltcli
- name: Format
run: |
poetry run make fmt
- name: Lint
run: |
poetry run make lint
- name: Execute pytest
run: |
poetry run pytest . --cov=doltcli --cov-report=term --cov-report xml
poetry run make test
- uses: codecov/codecov-action@v1
if: ${{ matrix.python-version }} == '3.9'
with:
Expand Down
18 changes: 18 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
line_length = 95
package = doltcli

.PHONY: fmt
fmt: ## Format code with black and isort
black . --check -t py37 --line-length=${line_length} || ( black . -t py37 --line-length=${line_length} && false )
isort .

.PHONY: lint
lint: ## Run linters
mypy ${package}
flake8 ${package} \
--max-line-length=${line_length} \
--ignore=F401,E501

.PHONY: lint
test: ## Run tests
pytest tests --cov=${package} --cov-report=term --cov-report xml
12 changes: 2 additions & 10 deletions doltcli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,13 @@
Dolt,
DoltException,
DoltHubContext,
_execute,
KeyPair,
Remote,
Status,
Table,
_execute,
)
from .types import (
BranchT,
CommitT,
DoltT,
KeyPairT,
RemoteT,
StatusT,
TableT,
)
from .types import BranchT, CommitT, DoltT, KeyPairT, RemoteT, StatusT, TableT
from .utils import (
CREATE,
FORCE_CREATE,
Expand Down
15 changes: 0 additions & 15 deletions doltcli/branch_mixin.py

This file was deleted.

12 changes: 0 additions & 12 deletions doltcli/config_mixin.py

This file was deleted.

18 changes: 0 additions & 18 deletions doltcli/creds_mixin.py

This file was deleted.

Loading

0 comments on commit 6eba196

Please sign in to comment.