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

Release 1.0.0rc1 #24

Merged
merged 30 commits into from
Jul 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
4ad44e2
migrate to poetry (#3)
freddyheppell Jul 2, 2024
94cf7a7
Support more Python versions (#4)
freddyheppell Jul 2, 2024
d25f828
Change linting to Ruff (#5)
freddyheppell Jul 2, 2024
248e71a
convert pickle fixtures to json tables (#6)
freddyheppell Jul 2, 2024
de859bd
Remove yoast plugin requirement (#12)
freddyheppell Jul 2, 2024
d1204f6
Better support no scrape (#13)
freddyheppell Jul 3, 2024
4c9c672
Integrate scraping (#15)
freddyheppell Jul 4, 2024
4525c4e
Add docs (#18)
freddyheppell Jul 9, 2024
2be30ff
hotfix: remove docconvert
freddyheppell Jul 9, 2024
44f5c39
hotfix: fix package name for version get
freddyheppell Jul 9, 2024
209cf84
Packaging improvements (#19)
freddyheppell Jul 9, 2024
41d2e00
rename main package for consistency (#20)
freddyheppell Jul 9, 2024
092a803
Feature/prefix consistency (#21)
freddyheppell Jul 9, 2024
29fdd22
Some tests for downloader (#22)
freddyheppell Jul 10, 2024
2139fd7
hotfix: print and wrong command name
freddyheppell Jul 10, 2024
bf83ee2
fix dl input directory path
freddyheppell Jul 10, 2024
57954d7
Prerelease restructure (#23)
freddyheppell Jul 10, 2024
b4e9f9f
add changelog for 1.0.0
freddyheppell Jul 10, 2024
5b7e62f
clean up naming of translation pickers
freddyheppell Jul 10, 2024
9ee3bea
set version to 1.0.0rc1
freddyheppell Jul 10, 2024
e91244d
change pytest to use importlib mode (#25)
freddyheppell Jul 10, 2024
8ee54d0
Change CLI to use click (#26)
freddyheppell Jul 11, 2024
cfe249a
Feature/packaging meta (#27)
freddyheppell Jul 11, 2024
246ac54
rename repo
freddyheppell Jul 11, 2024
9ebe0bc
Remove print statements (#28)
freddyheppell Jul 11, 2024
a429a19
add cli version
freddyheppell Jul 11, 2024
03ade1b
Ruff
freddyheppell Jul 11, 2024
d64e47e
prepare release 1.0.0
freddyheppell Jul 11, 2024
03fd4d2
add publish workflow
freddyheppell Jul 11, 2024
72ff09c
Add building to CI test
freddyheppell Jul 11, 2024
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
8 changes: 0 additions & 8 deletions .flake8

This file was deleted.

35 changes: 19 additions & 16 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Lint

on:
push:
branches: ["main"]
branches: ["main", "dev"]
pull_request:
branches: ["main"]
branches: ["main", "dev"]

permissions:
contents: read
Expand All @@ -14,19 +14,22 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.8
uses: actions/setup-python@v3
- uses: actions/checkout@v4
- name: Install Poetry
run: pipx install poetry==1.8.3
- name: Set up Python 3.9
uses: actions/setup-python@v5
with:
python-version: "3.8"
cache: "pipenv"
- name: Install Pipenv
run: python -m pip install --upgrade pipenv wheel
python-version: "3.9"
cache: "poetry"
- name: Install Python dependencies
run: pipenv install --deploy --dev
- name: Lint with Black
run: pipenv run black --check .
- name: Lint with Flake8
run: pipenv run flake8 .
- name: Tests
run: pipenv run pytest
run: poetry install --no-interaction --no-root
- name: Install Project
run: poetry install --no-interaction
- name: Ruff Format Check
run: poetry run ruff format --check
id: format
- name: Ruff Lint Check
run: poetry run ruff check --output-format=github
# Still run if format check fails
if: success() || steps.format.conclusion == 'failure'
91 changes: 91 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
name: Push to PyPI

on:
push:
tags:
- '*'
workflow_dispatch:

jobs:
build:
name: Build Distribution
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Install Poetry
run: pipx install poetry==1.8.3
- name: Set up Python 3.9
uses: actions/setup-python@v5
with:
python-version: "3.9"
cache: "poetry"
- name: Install Python dependencies
run: poetry install --no-interaction --no-root
- name: Build
run: poetry build
- name: Store distribution packages
uses: actions/upload-artifact@v3
with:
name: python-package-distributions
path: dist/
publish-to-pypi:
name: Publish to PyPI
needs:
- build
runs-on: ubuntu-latest
environment:
name: testpypi
url: https://pypi.org/p/wpextract
permissions:
id-token: write
steps:
- name: Download distribution packages
uses: actions/download-artifact@v3
with:
name: python-package-distributions
path: dist/
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
# github-release:
# name: GitHub release
# needs:
# - publish-to-pypi
# runs-on: ubuntu-latest
#
# permissions:
# contents: write
# id-token: write
#
# steps:
# - name: Download distribution packages
# uses: actions/download-artifact@v3
# with:
# name: python-package-distributions
# path: dist/
# - name: Sign the dists with Sigstore
# uses: sigstore/[email protected]
# with:
# inputs: >-
# ./dist/*.tar.gz
# ./dist/*.whl
# - name: Create GitHub Release
# env:
# GITHUB_TOKEN: ${{ github.token }}
# run: >-
# gh release create
# '${{ github.ref_name }}'
# --repo '${{ github.repository }}'
# --notes ""
# - name: Upload artifact signatures to GitHub Release
# env:
# GITHUB_TOKEN: ${{ github.token }}
# # Upload to GitHub Release using the `gh` CLI.
# # `dist/` contains the built packages, and the
# # sigstore-produced signatures and certificates.
# run: >-
# gh release upload
# '${{ github.ref_name }}' dist/**
# --repo '${{ github.repository }}'
33 changes: 19 additions & 14 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Test

on:
push:
branches: ["main"]
branches: ["main", "dev"]
pull_request:
branches: ["main"]
branches: ["main", "dev"]

permissions:
contents: read
Expand All @@ -13,19 +13,24 @@ jobs:
test:
runs-on: ubuntu-latest

strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.8
uses: actions/setup-python@v3
with:
python-version: "3.8"
cache: "pipenv"
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- name: Install Poetry
run: pipx install poetry==1.8.3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
node-version: 16
- name: Install Pipenv
run: python -m pip install --upgrade pipenv wheel
python-version: ${{ matrix.python-version }}
cache: "poetry"
- name: Install Python dependencies
run: pipenv install --deploy --dev
run: poetry install --no-interaction --no-root
- name: Install Project
run: poetry install --no-interaction
- name: Build Project
run: poetry build
- name: Run tests
run: pipenv run pytest
run: poetry run pytest
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,7 @@ MANIFEST

## == JAVASCRIPT ==

node_modules/
node_modules/

## == DOCUMENTATION ==
site/
4 changes: 2 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ authors:
- given-names: Carolina
family-names: Scarton
orcid: 'https://orcid.org/0000-0002-0103-4072'
title: "wordpress-site-extractor"
title: "WPextract"
version: 1.0.0
doi: 10.5281/zenodo.10008086
date-released: 2023-10-20
url: "https://github.com/GateNLP/wordpress-site-extractor"
url: "https://github.com/GateNLP/wpextract"
preferred-citation:
type: conference-paper
authors:
Expand Down
35 changes: 22 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,19 +1,28 @@
.PHONY: black
black:
black .
.PHONY: format
format:
poetry run ruff format

.PHONY: flake8
flake8:
flake8 .
.PHONY: lint
lint:
poetry run ruff check --fix

.PHONY: isort
isort:
isort .
.PHONY: docdev
docdev:
poetry run mkdocs serve --watch src

.PHONY: lint
lint: isort black flake8
.PHONY: testonly
testonly:
poetry run pytest

.PHONY: testcov
testcov:
poetry run coverage run -m pytest

.PHONY: covreport
covreport: testcov
coverage report

.PHONY: test
test:
pytest
test: testcov
coverage html
poetry run python -m webbrowser ./htmlcov/index.html
4 changes: 4 additions & 0 deletions NOTICE
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
WPextract
Copyright 2022-2024 The University of Sheffield

Portions of this code are derived from WPJsonScraper, which is available under the MIT license. For details, see src/wpextract/download/LICENSE.
29 changes: 0 additions & 29 deletions Pipfile

This file was deleted.

Loading