Skip to content
This repository was archived by the owner on Feb 6, 2025. It is now read-only.

Poetry install pypi release #18

Draft
wants to merge 54 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
274043e
Add action to check for code quality
Jan 18, 2023
51ff643
Fix styling errors
Jan 18, 2023
6033355
Fix flake8 problems
Jan 18, 2023
f5cc333
Fix mypy typing errors
Jan 18, 2023
d49a67d
Replace build action with unit tests
Jan 18, 2023
d4f9c2c
Mark expected failure of `test_working`
Jan 19, 2023
0421186
Add typing for `create_test_table` fixture
Jan 19, 2023
76cf4a9
Add typing for `init_empty_test_repo` fixture
Jan 19, 2023
b3974a3
Pin dolt version to 0.52.0
Jan 19, 2023
cd790ce
Add `ORDER BY` clause to make test reliable
Jan 19, 2023
1d35d39
`test_merge_conflict` has incorrect logic
Jan 19, 2023
e4733e9
Fix fixture to set up a doltdb
Jan 19, 2023
8f88c7d
Refer to proper dolt version
Jan 19, 2023
52def37
Add action to block fixup commits
Jan 19, 2023
5c218d2
Disable fail-fast on unit tests
Jan 19, 2023
40677d0
Remove conda configurations
Jan 19, 2023
4357fad
Remove metrics api from unit tests action
Jan 19, 2023
ab3cf51
Remove poetry lock file
Jan 19, 2023
a6ba196
Add standard gitignore
Jan 19, 2023
78ab876
Remove Makefile
Jan 19, 2023
593814a
Add project metadata to pyproject.toml
Jan 19, 2023
91ad0e9
Remove `run_tests` script
Jan 19, 2023
2dc2534
Add pragmas for lines that will never be covered
Jan 19, 2023
9e03406
Remove unused mixin file
Jan 19, 2023
86530d5
Run unit tests against pinned and latest version
Jan 20, 2023
3ccfe80
Pin dolt version to v0.52.8
Jan 20, 2023
80f3350
Remove conda and publish actions
Jan 20, 2023
90f70cd
Add release workflow
Jan 20, 2023
25e0d19
Add change log
Jan 20, 2023
1250f3f
Try adding a windows configuration for the tests
Jan 23, 2023
9dbcd87
Mark tests that fail on windows as expected
Jan 23, 2023
06ec4cf
Rename package to `lumicks-doltcli` to avoid clash
Jan 24, 2023
b448e2a
Merge pull request #1 from lumicks/fix-github-actions
crisp-snakey Jan 24, 2023
d83dda0
Add `track` argument to checkout
Jan 17, 2023
b0afc9c
Add option to specify the branch to pull from
Jan 24, 2023
47826f7
Update for new release
Jan 24, 2023
e7b32ba
Merge pull request #4 from lumicks/checkout-track
crisp-snakey Jan 24, 2023
7298329
Fix version in change log header
Jan 26, 2023
f0789be
Merge pull request #6 from lumicks/changelog-version-fix
crisp-snakey Jan 26, 2023
f4727bf
Bump dolt version
radao Jul 17, 2023
5200607
Fix paths
radao Jul 17, 2023
5e1e359
Fix unit tests by updating `Branch` type
radao Jul 17, 2023
cd80402
Merge pull request #8 from lumicks/7-bump-dolt-version
radao Jul 17, 2023
4e48f33
Prepare for new release
radao Jul 17, 2023
40f9562
Merge pull request #10 from lumicks/0.2.0-release
radao Jul 17, 2023
8d84e5c
Release to pypi
radao Jul 18, 2023
e9c1dc9
Merge pull request #11 from lumicks/9-publish-lumicks-doltcli-to-pypi
radao Jul 18, 2023
5731ee3
Set content type of long description
radao Jul 18, 2023
a171896
Merge pull request #13 from lumicks/12-fix-packaging
radao Jul 18, 2023
de65911
Publish with poetry
radao Jul 18, 2023
dea5f34
Add reference to readme
radao Jul 18, 2023
22f63fc
Merge pull request #15 from lumicks/14-publish-using-poetry
radao Jul 19, 2023
52a8829
Prepare for 0.2.1 release
radao Jul 19, 2023
ae09537
Merge pull request #16 from lumicks/0.2.1-release
radao Jul 19, 2023
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
34 changes: 34 additions & 0 deletions .github/workflows/block_fixups.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: block_fixups

on:
pull_request:
types: [opened, synchronize]

jobs:
block_fixups:
name: block fixup! commits
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: block fixup! commits
run: |
LINE_NO=`grep -r -n "\"base\":" $GITHUB_EVENT_PATH | cut -d ":" -f 1`
REFS=`tail +$LINE_NO $GITHUB_EVENT_PATH | grep "\"ref\"" | cut -d ":" -f 2 | tr -d ',|"| '`
BASE=`echo $REFS | cut -d " " -f 1`
CURRENT=`echo $REFS | cut -d " " -f 2`
FIXUP_COUNT=`git log --pretty=format:%s origin/$BASE..origin/$CURRENT | grep fixup! | wc -l || echo 0`

echo "Merge $CURRENT into $BASE with $FIXUP_COUNT fixup! commits"
if [ "$FIXUP_COUNT" -gt 0 ]; then
git log --pretty=format:%s origin/$BASE..origin/$CURRENT | grep fixup!
exit 1
fi

REJ_COUNT=`git diff --name-only origin/$BASE origin/$CURRENT | grep .rej | wc -l || echo 0`
echo "Merge $CURRENT into $BASE with $REJ_COUNT .rej files"
if [ "$REJ_COUNT" -gt 0 ]; then
git diff --name-only origin/$BASE origin/$CURRENT | grep .rej
exit 1
fi
59 changes: 0 additions & 59 deletions .github/workflows/build.yaml

This file was deleted.

85 changes: 85 additions & 0 deletions .github/workflows/code_quality.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: code_quality

on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths:
- ".github/workflows/code_quality.yml"
- "doltcli/**"
- "scripts/**"
- "tests/**"
- "requirements/development.txt"
- "pyproject.toml"

jobs:
black:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
architecture: x64
cache: 'pip'
cache-dependency-path: "**/requirements/development.txt"

- name: Run black checks
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements/development.txt
black --check --diff --color .

isort:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
architecture: x64
cache: 'pip'
cache-dependency-path: "**/requirements/development.txt"

- name: Run isort checks
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements/development.txt
isort --check --diff --color .

flake8:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
architecture: x64
cache: 'pip'
cache-dependency-path: "**/requirements/development.txt"

- name: Run flake8 checks
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements/development.txt
flake8 .

mypy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
id: setup-python
with:
python-version: "3.10"
architecture: x64
cache: 'pip'
cache-dependency-path: "**/requirements/development.txt"

- name: Run mypy
run: |
python -m pip install -r requirements/development.txt
mkdir -p .mypy_cache
mypy doltcli --config-file pyproject.toml
30 changes: 0 additions & 30 deletions .github/workflows/conda.yml

This file was deleted.

62 changes: 0 additions & 62 deletions .github/workflows/publish.yaml

This file was deleted.

28 changes: 28 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: release

on:
release:
types: [published]

jobs:
release-package:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
lfs: true
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
- uses: Gr1N/setup-poetry@v8
- name: Install Poetry dependencies
run: poetry install
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
- name: Create Python package
run: poetry build
- name: Publish package to PyPi
run: poetry publish -u __token__ -p $token
env:
token: ${{ secrets.PYPI_API_TOKEN }}

55 changes: 55 additions & 0 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: unit_tests

on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths:
- ".github/workflows/unit_tests.yml"
- "doltcli/**"
- "scripts/**"
- "tests/**"
- "requirements/development.txt"
- "pyproject.toml"

jobs:
unit_tests:
strategy:
fail-fast: false
matrix:
python-version: ['3.8', '3.9', '3.10']
os: [ubuntu-latest, windows-latest]
dolt-version: ['1.7.5']
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Dolt Windows
if: ${{ runner.os == 'Windows' }}
run: |
choco install dolt --version=${{ matrix.dolt-version }}
$env:Path += ';C:\Program Files\Dolt\bin\'
dolt config --global --add user.email [email protected]
dolt config --global --add user.name "Bojack Horseman"
- name: Install Dolt Linux
if: ${{ runner.os == 'Linux' }}
run: |
sudo curl -L https://github.com/dolthub/dolt/releases/download/v${{ matrix.dolt-version }}/install.sh | sudo bash
dolt config --global --add user.email [email protected]
dolt config --global --add user.name "Bojack Horseman"
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pytest pytest-cov
- name: Run Linux Tests
if: ${{ runner.os == 'Linux' }}
run: |
pytest -v tests --cov=doltcli --cov-report=term --cov-report xml
- name: Run Windows Tests
if: ${{ runner.os == 'Windows' }}
run: |
$env:Path += ';C:\Program Files\Dolt\bin\'
pytest -v tests
Loading