Skip to content

WIP: major refactor for q as a module #350

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

Open
wants to merge 25 commits into
base: master
Choose a base branch
from
Open
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
528 changes: 0 additions & 528 deletions .github/workflows/build-and-package.yaml

This file was deleted.

37 changes: 37 additions & 0 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Documentation

on:
push:
branches: [ master ]
paths:
- "mkdocs/**/*"
- "doc/**/*"
- "*.md"
- "*.markdown"
release:
types: [published]

jobs:
deploy-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install mkdocs mkdocs-material
- name: Build man page
run: |
sudo apt-get update
sudo apt-get install -y ruby
gem install ronn
ronn doc/USAGE.markdown
gzip -c doc/USAGE > doc/USAGE.gz
- name: Deploy documentation
run: |
mkdocs build --config-file mkdocs/mkdocs.yml
mkdocs gh-deploy --force --config-file mkdocs/mkdocs.yml
33 changes: 33 additions & 0 deletions .github/workflows/publish-package.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Publish Python Package

on:
release:
types: [created]

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build twine
- name: Update version number
run: |
VERSION=${GITHUB_REF#refs/tags/v}
echo "Setting version to $VERSION"
sed -i "s/q_version = .*/q_version = '$VERSION'/" qtextasdata/__init__.py
cat qtextasdata/__init__.py
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python -m build
twine check dist/*
twine upload dist/*
55 changes: 55 additions & 0 deletions .github/workflows/python-package.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Python Package

on:
push:
branches: [ master ]
paths-ignore:
- "*.md"
- "*.markdown"
- "mkdocs/**/*"
pull_request:
branches: [ master ]
paths-ignore:
- "*.md"
- "*.markdown"
- "mkdocs/**/*"

jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]

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 dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pytest pytest-cov
if [ -f test-requirements.txt ]; then pip install -r test-requirements.txt; fi
pip install -e .
- name: Test with pytest
run: |
pytest -v --cov=qtextasdata

lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.9"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8
- name: Lint with flake8
run: |
flake8 qtextasdata --count --select=E9,F63,F7,F82 --show-source --statistics
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,5 @@ htmlcov/
.coverage
.DS_Store
*.egg
*.egg-info/
.vscode/
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
refactor-q
27 changes: 27 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Changelog

All notable changes to q (qtextasdata) will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Added
- Version bumping script (`bump-version.py`) for easier version management

## [4.0.0] - (release date)

Initial versioned release in the new format.

### Added
- (List major features added in 4.0.0)

### Changed
- (List major changes in 4.0.0)

### Fixed
- (List major fixes in 4.0.0)

[Unreleased]: https://github.com/harelba/q/compare/v4.0.0...HEAD
[4.0.0]: https://github.com/harelba/q/releases/tag/v4.0.0
Loading