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

Add sphinx-lint to the ci workflow and Makefile. #496

Merged
merged 8 commits into from
Dec 9, 2023
Merged
Show file tree
Hide file tree
Changes from 6 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
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,17 @@ name: build

on:
pull_request:
push:
mattwang44 marked this conversation as resolved.
Show resolved Hide resolved

jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Lint
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ezio-melotti may you remove this? We can provide this linter in our tool set but I don't think it is ready for production use.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I now removed this. Let me know if there is anything else I should do before we merge this. You can also ping me on Discord if you want to talk about what should be changed in the workflow and/or sphinx-lint to make it suitable for this repo.

run: make lint

- name: Install Dependencies
run: sudo apt-get install gettext

Expand Down
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,16 @@ $(VENV)/bin/activate:
$(VENV)/bin/sphinx-build: $(VENV)/bin/activate
. $(VENV)/bin/activate; python3 -m pip install sphinx python-docs-theme

$(VENV)/bin/sphinx-lint: $(VENV)/bin/activate
. $(VENV)/bin/activate; python3 -m pip install sphinx-lint

$(VENV)/bin/blurb: $(VENV)/bin/activate
. $(VENV)/bin/activate; python3 -m pip install blurb


.PHONY: upgrade_venv
upgrade_venv: $(VENV)/bin/activate ## Upgrade the venv that compiles the doc
. $(VENV)/bin/activate; python3 -m pip install --upgrade sphinx python-docs-theme blurb
. $(VENV)/bin/activate; python3 -m pip install --upgrade sphinx python-docs-theme blurb sphinx-lint


.PHONY: progress
Expand Down Expand Up @@ -130,3 +132,7 @@ fuzzy: ## Find fuzzy strings
.PHONY: rm_cpython
rm_cpython: ## Remove cloned cpython repo
rm -rf $(CPYTHON_CLONE)

.PHONY: lint
lint: $(VENV)/bin/sphinx-lint ## Run sphinx-lint
$(VENV)/bin/sphinx-lint --enable default-role