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

Rebase against upstream #21

Draft
wants to merge 71 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
8ee57fd
limit keyword split to first match, allow colons to be part of the ke…
fwuehr1995 Feb 16, 2024
020a7f9
Function to load from a path or string a python mod
lbiaggi Jan 10, 2024
611e024
Merge pull request #641 from lbiaggi/load-files
jacebrowning Mar 14, 2024
b94019a
Merge pull request #634 from fwuehr1995/develop
jacebrowning Mar 15, 2024
1e237f7
Bump black from 23.12.1 to 24.3.0
dependabot[bot] Mar 20, 2024
06f5de8
Merge pull request #644 from doorstop-dev/dependabot/pip/black-24.3.0
jacebrowning Mar 21, 2024
ce3c120
Implement a custom validator peer doorstop document
lbiaggi Mar 21, 2024
3ccc9db
Add to docs informations related to custom validator
lbiaggi Mar 21, 2024
34adb54
Update mock class to accept new attribute
lbiaggi Mar 21, 2024
70f610d
Add custom validator tests
lbiaggi Mar 21, 2024
a74612a
Create an ext that do SHA for files in references
lbiaggi Mar 21, 2024
59bbe4f
Insert tests for file SHAs calculations
lbiaggi Mar 21, 2024
7f93614
Update docs with sha
lbiaggi Mar 21, 2024
2d4e882
Insert an example using custom validator and sha
lbiaggi Mar 21, 2024
31e3ad8
Update tests impacted with new example
lbiaggi Mar 21, 2024
7537688
Merge pull request #645 from lbiaggi/calculate_sha_refs
jacebrowning Apr 4, 2024
647f940
Remove extra whitespace
lbiaggi Apr 6, 2024
37fb9e3
Merge pull request #647 from lbiaggi/fix-tests
jacebrowning Apr 6, 2024
562d018
Replace deprecated VS Code settings
jacebrowning Apr 9, 2024
cb0885e
Drop support for Python 3.8
jacebrowning Apr 9, 2024
4a0953e
Merge pull request #648 from doorstop-dev/drop-python-3.8
jacebrowning Apr 9, 2024
92d3df3
Explicitly provide token
jacebrowning Apr 10, 2024
fe8fc8d
Update build-system requirement to poetry-core
abderrahim Sep 7, 2024
a614fc8
Merge pull request #660 from abderrahim/poetry-core
jacebrowning Sep 7, 2024
55a1a5e
Fix runner version to macos-13, as setup-python only support >=3.11 o…
robtaylor Sep 30, 2024
7143747
Ignore minimised JS when grepping
robtaylor Sep 29, 2024
f92c598
Merge pull request #663 from robtaylor/fix-mac
jacebrowning Sep 30, 2024
4ddf1b8
Merge pull request #665 from robtaylor/git-grep
jacebrowning Sep 30, 2024
156f458
Fix codecov failure due to undeclared secret use
robtaylor Sep 30, 2024
581bded
Remove retying of running tests as no longer needed
robtaylor Oct 1, 2024
6820ac6
Make CI test execution fail fast, as should all be passing now
robtaylor Oct 1, 2024
789cd1e
Mock plantuml execution
robtaylor Oct 3, 2024
f5a2de4
Merge pull request #670 from robtaylor/codecov-check
jacebrowning Oct 3, 2024
2c8ff0d
Only run change-coverage for PRs
robtaylor Oct 3, 2024
1c2a757
Remove dependency on distutils, fixes #657
robtaylor Sep 30, 2024
a8966bd
Remove support for veracity, fixes #626
robtaylor Sep 30, 2024
a3d8b7a
Merge pull request #671 from robtaylor/change_cov_pr
jacebrowning Oct 3, 2024
e29d3cb
Coverage for launch on, nt, cygwin, darwin and posix
robtaylor Oct 4, 2024
08d2c67
Remove tests for veracity
robtaylor Oct 4, 2024
8e58e29
Merge pull request #664 from robtaylor/fix-657
jacebrowning Oct 4, 2024
7865edf
Merge pull request #666 from robtaylor/remove-veracity
jacebrowning Oct 4, 2024
225e9a1
Add git pre-commit hooks to doorstop
Dec 11, 2023
3e8739e
feat(review): check if files exists during review
lbiaggi Nov 28, 2023
b43323a
Create ext point per Doc folder and refs checksum
lbiaggi Nov 28, 2023
5044e0f
Create a crude pipeline for doorstop need to improve
lbiaggi Dec 13, 2023
75b5c96
Improvements identified through lint
lbiaggi Dec 13, 2023
e9250dc
Move dynamic loading module function to reusability
lbiaggi Jan 9, 2024
1e7f608
Expose doorstop using the new parameter option
lbiaggi Dec 20, 2023
07b9b12
Remove allow failure from the pipeline
lbiaggi Jan 9, 2024
8e5e28b
Add publish support for AsciiDoc output
reiterative Mar 19, 2024
77252e5
Update python and poetry.lock
lbiaggi Jul 31, 2024
48f9539
Always run doorstop lint stage
lbiaggi Jul 31, 2024
0d815c2
Remove unnecessary * from ignore pattern
lbiaggi Aug 1, 2024
657429f
fix(core/vcs/tests): Remove * from the beginning
lbiaggi Aug 1, 2024
2969c81
Update poetry lock and pyproject version
lbiaggi Aug 7, 2024
0ebb867
feat(ci): Initial version for doorstop fork under CT
lbiaggi Aug 22, 2024
de9a138
fix(linters): Update pylint to 3.2
lbiaggi Aug 23, 2024
222ae0c
fix(linters): Update pylinter config
lbiaggi Aug 30, 2024
fe0b80b
fix(linters): Apply pylint changes
lbiaggi Aug 30, 2024
6786bda
feat(doorstop): ability to read an rc file from cwd
lbiaggi Sep 4, 2024
83a761a
Add support for mkdocs rendering
reiterative Sep 3, 2024
ecd7d2a
feat(doorstop): Add a debug message about settings
lbiaggi Sep 4, 2024
00d5d6f
fix(ci): run tests with python 3.12
lbiaggi Sep 4, 2024
aaa71b6
fix(ci): Wrong tag matching rule for releases
lbiaggi Sep 4, 2024
db4f04c
Allow references to hidden file paths
reiterative Sep 4, 2024
d37884e
fix(security): Bump packages due to security issues.
lbiaggi Sep 5, 2024
6bab22d
Updates for codethink.0.2 release
reiterative Sep 5, 2024
9692a07
Keep trailing newline when dumping markdown
frankmillward Sep 23, 2024
32713ed
feat(doorstop): Implement external parent
lbiaggi Sep 13, 2024
bfc1896
docs(doorstop): external parent usage
lbiaggi Sep 27, 2024
ff19788
Bump release tag
lbiaggi Oct 3, 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
5 changes: 5 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
CHANGELOG.md merge=union

*.xlsx binary
*.min.js binary
*.min.css binary
doorstop/core/files/templates/html/output/*.js binary
doorstop/core/files/templates/html/tex-mml-chtml.js binary
doorstop/core/tests/files/published*.html binary

# Python, Git, and Cygwin have different ideas about the correct line endings
*.yml -text
Expand Down
13 changes: 13 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
changelog:
categories:
- title: Features
labels:
- '*'
exclude:
labels:
- dependencies
- title: Dependencies
labels:
- dependencies


8 changes: 4 additions & 4 deletions .github/workflows/change-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ jobs:

- uses: actions/setup-python@v5
with:
python-version: "3.11"
python-version: "3.12"
architecture: x64

- uses: Gr1N/setup-poetry@v8
- uses: Gr1N/setup-poetry@v9

- name: Check system dependencies
run: make doctor
Expand All @@ -43,6 +43,6 @@ jobs:
- name: Check coverage
run: |
TEST_INTEGRATION=true poetry run pytest doorstop --doctest-modules --cov=doorstop --cov-report=xml --cov-report=term-missing
git fetch origin develop:develop
git fetch origin main:main
# TEST_INTEGRATION=true poetry run diff-cover ./coverage.xml --fail-under=100 --compare-branch=develop
TEST_INTEGRATION=true poetry run diff-cover ./coverage.xml --fail-under=100 --compare-branch=$(git for-each-ref --sort=-committerdate refs/heads/develop | cut -f 1 -d ' ')
TEST_INTEGRATION=true poetry run diff-cover ./coverage.xml --fail-under=100 --compare-branch=$(git for-each-ref --sort=-committerdate refs/heads/main | cut -f 1 -d ' ')
20 changes: 12 additions & 8 deletions .github/workflows/execute-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,17 @@ on:
workpath:
required: true
type: string
secrets:
CODECOV_TOKEN:
required: true

jobs:
test:
runs-on: ${{ inputs.os }}
strategy:
fail-fast: false
fail-fast: true
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["3.10", "3.11", "3.12"]
name: Python ${{ matrix.python-version }}

defaults:
Expand All @@ -43,7 +46,7 @@ jobs:
python-version: ${{ matrix.python-version }}
architecture: x64

- uses: Gr1N/setup-poetry@v8
- uses: Gr1N/setup-poetry@v9

- name: Check system dependencies
run: make doctor
Expand All @@ -67,11 +70,12 @@ jobs:
current_path: ${{ inputs.workpath }}
attempt_limit: 5
attempt_delay: 2000
- name: Upload coverage
uses: codecov/codecov-action@v1
if: ${{ inputs.os == 'ubuntu-latest' && matrix.python-version == '3.9' && github.repository == 'doorstop-dev/doorstop' }}
with:
fail_ci_if_error: true
#
# - name: Upload coverage
# uses: codecov/codecov-action@v1
# if: ${{ inputs.os == 'ubuntu-latest' && matrix.python-version == '3.10' && github.repository == 'doorstop-dev/doorstop' }}
# with:
# fail_ci_if_error: true

- name: Run checks
run: make check
Expand Down
59 changes: 59 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Codethink Doorstop Release

on:
push:
tags:
- "v3.*"

jobs:
tests:
uses: ./.github/workflows/execute-tests.yml
with:
os: "ubuntu-latest"
workpath: "/home/runner/work/doorstop/doorstop"

build-and-upload:
needs: tests
name: Build and Upload
runs-on: ${{ matrix.os }}
permissions:
contents: write
strategy:
matrix:
python: ["3.10", "3.11", "3.12"]
os:
- ubuntu-latest
# - macos-latest
# - windows-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}

- uses: Gr1N/setup-poetry@v9

- run: poetry version ${{ github.ref_name }}
name: Set poetry version

- name: Build wheels and sdist (tarball)
run: make dist

- uses: actions/cache@v4
with:
path: .venv
key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }}

- name: Create Github Release
uses: softprops/action-gh-release@v2
if: ${{ matrix.python == '3.12' && matrix.os == 'ubuntu-latest'}}
with:
files: |
dist/*.whl
dist/*.tar.gz
tag_name: ${{ github.ref_name }}


12 changes: 10 additions & 2 deletions .github/workflows/test-linux.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,26 @@
name: Linux

on:
push:
pull_request:
branches: [ develop ]
types:
- opened
- synchronize
- reopened
- edited
branches: [ main ]

jobs:
Coverage:
uses: ./.github/workflows/change-coverage.yml
with:
os: "ubuntu-latest"
workpath: "/home/runner/work/doorstop/doorstop"
if: github.event_name == 'pull_request'

Test:
uses: ./.github/workflows/execute-tests.yml
with:
os: "ubuntu-latest"
workpath: "/home/runner/work/doorstop/doorstop"
secrets:
CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}}
7 changes: 4 additions & 3 deletions .github/workflows/test-osx.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
name: macOS

on:
push:
pull_request:
branches: [ develop ]
branches: [ main ]

jobs:
Test:
uses: ./.github/workflows/execute-tests.yml
with:
os: "macos-latest"
os: "macos-13"
workpath: "/Users/runner/work/doorstop/doorstop"
secrets:
CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}}
12 changes: 12 additions & 0 deletions .github/workflows/test-osx.yml.disabled
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# name: macOS
#
# on:
# pull_request:
# branches: [ main ]
#
# jobs:
# Test:
# uses: ./.github/workflows/execute-tests.yml
# with:
# os: "macos-latest"
# workpath: "/Users/runner/work/doorstop/doorstop"
10 changes: 8 additions & 2 deletions .github/workflows/test-windows.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
name: Windows

on:
push:
pull_request:
branches: [ develop ]
types:
- opened
- synchronize
- reopened
- edited
branches: [ main ]

jobs:
Test:
Expand All @@ -12,3 +16,5 @@ jobs:
basepath: 'D:\'
os: "windows-latest"
workpath: 'C:\a\doorstop\doorstop'
secrets:
CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}}
67 changes: 67 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Environment variables declared in the `variables` dictionary below
# can be expanded in job definitions or before_script below
#
variables:
# Docker Images
CONTAINER_REGISTRY: "gitlab.codethink.co.uk:5000/safety/dockerfiles"

NODE_IMAGE_ID: "d7aad9b98608971d0b5620a99290f76845269c49"
NODE_CONTAINER: "${CONTAINER_REGISTRY}/node:${NODE_IMAGE_ID}"

DCS_CONTAINER_REGISTRY: "gitlab.codethink.co.uk:5000/safety"
DCS_CONTAINER_IMAGE_ID: "00f2e962522ecab4f1d7a3a95224ff8efd299a53"
DCS_CONTAINER: "${DCS_CONTAINER_REGISTRY}/dcs-toolchain:${DCS_CONTAINER_IMAGE_ID}"

default:
image: "${DCS_CONTAINER}"
tags:
# Check the runners in https://gitlab.codethink.co.uk/groups/codethink/-/wikis/Internal-Gitlab-Runners
- sml.amd64
before_script:
- pip install poetry
- make install

#
# Declare the stages
#
stages:
- lint
- test
- build
#
# Workflow rules for controlling when pipelines are created.
# For more details see https://docs.gitlab.com/ee/ci/yaml/workflow.html
#
workflow:
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- if: $CI_PIPELINE_SOURCE == "web"
- if: $CI_PIPELINE_SOURCE == "schedule"
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH

###########################################################
# Lint stage jobs #
###########################################################

#
# General yaml linter, this recursively detects malformed YAML
#
lint-doorstop:
stage: lint
script:
- make check
#
# Validate the markdown for invalid links, using markdown-link-check, see:
#
# https://github.com/tcort/markdown-link-check
#
test-doorstop:
stage: test
needs: [lint-doorstop]
script:
- make test

build-doorstop:
stage: build
script:
- make dist
12 changes: 12 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
exclude: ^(doorstop|docs)/.*

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
- id: check-yaml
- repo: https://gitlab.codethink.co.uk/lorry-mirrors/github/doorstop-dev/doorstop
rev: codethink-tag-3.0b11
hooks:
- id: check-doorstop-errors
- id: check-unreviewed-items
2 changes: 1 addition & 1 deletion .pylint.ini
Original file line number Diff line number Diff line change
Expand Up @@ -419,4 +419,4 @@ known-third-party=enchant

# Exceptions that will emit a warning when being caught. Defaults to
# "Exception"
overgeneral-exceptions=Exception
overgeneral-exceptions=builtins.Exception
4 changes: 2 additions & 2 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ version: 2
build:
os: ubuntu-22.04
tools:
python: "3.8"
python: "3.9"

mkdocs:
configuration: mkdocs.yml

python:
install:
- requirements: docs/requirements.txt
- requirements: docs/requirements.txt
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
python 3.8.13
python 3.9.17
poetry 1.7.1
4 changes: 2 additions & 2 deletions .verchew.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ version = GNU Make
[Python]

cli = python
version = 3.8 || 3.9 || 3.10 || 3.11 || 3.12
version = 3.9 || 3.10 || 3.11 || 3.12

[Poetry]

Expand All @@ -17,6 +17,6 @@ version = 1.7

cli = dot
cli_version_arg = -V
version = 9
version = 9 || 10
optional = true
message = This is only needed to generate UML diagrams for documentation.
9 changes: 3 additions & 6 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,9 @@
"prof/": true,
"site/": true,
},
"python.linting.enabled": true,
"python.linting.pylintEnabled": true,
"python.linting.pylintArgs": ["--rcfile", ".pylint.ini"],
"python.linting.mypyEnabled": true,
"python.linting.mypyArgs": ["--config-file", ".mypy.ini"],
"python.linting.pydocstyleEnabled": true,
"python.defaultInterpreterPath": ".venv/bin/python",
"pylint.args": ["--rcfile=.pylint.ini"],
"editor.formatOnSave": true,
"cSpell.words": [
"Autobuild",
"basepath",
Expand Down
14 changes: 13 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
# 3.0 (beta) Codethink 0.2

- Allow references to hidden file paths
- Bump package versions to address security issues

# 3.0 (beta) Codethink 0.1

- Add publish support for AsciiDoc output
- Ability to define settings through `.doorstoprc.py`
- Support for mkdocs-flavoured markdown
- Dropped support to python 3.9

# 3.0 (beta)

- **BREAKING:** Dropped support for Python 3.6 and 3.7.
- **BREAKING:** Dropped support for Python 3.6, 3.7, and 3.8.
- **BREAKING:** Removed `--no-body-levels` option to `doorstop publish`.
- Fixed overriding default attributes with `doorstop add`. ([@tangoalx](https://github.com/doorstop-dev/doorstop/pull/544))
- Fixed encoding error with special characters on Windows. ([@urbasus](https://github.com/doorstop-dev/doorstop/pull/526))
Expand Down
Loading