Skip to content

Commit 4b929a7

Browse files
committed
merge from main
2 parents 12211d6 + d1ba84c commit 4b929a7

File tree

128 files changed

+5060
-1268
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

128 files changed

+5060
-1268
lines changed

.flake8

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,33 @@ max-line-length = 100
3636
# See https://www.python.org/dev/peps/pep-0008/#should-a-line-break-before-or-after-a-binary-operator
3737
# for a discussion about the issue and why we disable this.
3838

39-
ignore = B902, D401, D100, W503
39+
# D205 - "1 blank line required between summary line and description"
40+
# D400 - "First line should end with a period"
41+
#
42+
# Sphinx (autoclass) has three modes of operation when it comes to
43+
# documenting classes: 'class', 'init', and 'both'. This pertains to how
44+
# docstrings for the class and init method are handled. Autoclass does
45+
# not produce a separate text for the class and init methods, but the
46+
# options above describe where the constructor documentation comes from.
47+
# This can be either the class docstring (autoclass_content = 'class')
48+
# or the __init__ docstring or both concatenated. The 'class' options
49+
# results in empty decriptions for the __init__ parameters. The
50+
# 'init' option ignores the class docstring, so, in order to get that
51+
# part into the output, it would need to be duplicated in the __init__
52+
# docstring. The better option is 'both'. However saying something like
53+
# "This class..." in the class docstring and "Initializes..." in the
54+
# __init__ docstring results in awkward phrasing when put together.
55+
# One can omit the description on the __init__ docstring and simply
56+
# document the parameters, but then flake8 complains about the
57+
# structure of the __init__ doctsring. The D205 and D400 errors are
58+
# precisely those complains. We disable these in order to have a
59+
# sane way of documenting classes with Sphinx' autoclass.
60+
61+
62+
ignore = B902, D205, D400, D401, D100, W503
4063

4164
# D103 - Missing docstring in public function
4265
#
4366
# Ignore docstrings requirement in tests
4467

4568
per-file-ignores = tests/*:D103
46-

.github/workflows/build-website.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ jobs:
1111
-
1212
name: Checkout
1313
uses: actions/checkout@v2
14+
-
15+
name: Fetch tags
16+
run: git fetch --all --tags
1417
-
1518
name: Build Website
1619
run: /bin/bash web/build.sh

.mypy

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,5 @@ ignore_missing_imports = True
1717
[mypy-pystache.*]
1818
ignore_missing_imports = True
1919

20+
[mypy-typing_compat.*]
21+
ignore_missing_imports = True

.readthedocs.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Read the Docs configuration file for Sphinx projects
2+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
3+
4+
# Required
5+
version: 2
6+
7+
# Set the OS, Python version and other tools you might need
8+
build:
9+
os: ubuntu-22.04
10+
tools:
11+
python: "3.11"
12+
13+
python:
14+
install:
15+
- requirements: requirements-docs.txt
16+
17+
18+
# Build documentation in the "docs/" directory with Sphinx
19+
sphinx:
20+
configuration: docs/conf.py
21+
fail_on_warning: true

Makefile

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ tests:
1818
coverage-tests:
1919
PYTHONPATH=$(CWD)/src:$(CWD)/tests/plugins1:$(CWD)/tests/plugins2:${PYTHONPATH} \
2020
${PYTHON} -m pytest -v --cov $(TESTARGS)
21+
22+
.PHONY: html-coverage-report
23+
html-coverage-report:
24+
PYTHONPATH=$(CWD)/src:$(CWD)/tests/plugins1:$(CWD)/tests/plugins2:${PYTHONPATH} \
25+
${PYTHON} -m pytest -v --cov --cov-report html
2126

2227
.PHONY: verbose-tests
2328
verbose-tests:
@@ -39,7 +44,7 @@ stylecheck:
3944
flake8 src tests
4045

4146
.PHONY: checks
42-
checks: typecheck stylecheck
47+
checks: typecheck stylecheck docs
4348

4449
.PHONY: docs
4550
docs:
@@ -51,7 +56,16 @@ docs:
5156
.PHONY: web-docs
5257
web-docs:
5358
rm -rf docs/.generated
54-
sphinx-build -W -b html -D html_theme='cloud' -D templates_path='_templates' docs docs/.web-build/
59+
rm -rf docs/.web-build
60+
git fetch --all --tags
61+
PSIJ_WEB_DOCS=1 sphinx-multiversion docs docs/.web-build
62+
PSIJ_WEB_DOCS=1 sphinx-build --keep-going -n -W -b html docs docs/.web-build/v/dev
63+
64+
.PHONY: web-docs-dev
65+
web-docs-dev:
66+
rm -rf docs/.generated
67+
rm -rf docs/.web-build
68+
PSIJ_WEB_DOCS=1 sphinx-build --keep-going -n -W -b html docs docs/.web-build/v/dev
5569

5670
.PHONY: style
5771
style:

QuickStart.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
# Quick Start Guide
22

3-
This document will guide you through the install procedure and your first hello world example.
3+
This document will guide you through the install procedure and your first Hello World example.
44

55
- [Requirements](#requirements)
6-
- [Install psij](#install-psij)
6+
- [Install PSI/J](#install-psij)
77
- [Hello World example](#hello-world)
88

99
## Requirements
1010
- python3.7+
1111

12-
## Install psij
12+
## Install PSI/J
1313

14-
If you have conda installed you might want to start from a fresh environment. This part is not installing psij but setting up a new environment with the specified python version:
14+
If you have conda installed you might want to start from a fresh environment. This part is not installing PSI/J but setting up a new environment with the specified python version:
1515

1616
1. `conda create -n psij python=3.7`
1717
2. `conda activate psij`
1818

1919

20-
Install psij from the GitHub repository:
20+
Install PSI/J from the GitHub repository:
2121

2222
1. Clone the repository into your working directory:
2323

README-dev.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
# Low Level Development Stuff
2-
3-
## Building the Documentation
1+
# Building the Documentation
42

53
There are two ways to build the documentation. One is the plain one, where
64
the plain Sphinx output is desired, and the other is the themed version that
@@ -13,7 +11,7 @@ is meant to integrate with the website.
1311
resulting pages, such as pages being cut off at the bottom. Please use
1412
a simple http server as detailed below.
1513

16-
### Building the Standalone Documentation
14+
## Building the Standalone Documentation
1715

1816
1. Make sure you have the documentation dependencies installed:
1917
```sh
@@ -28,7 +26,7 @@ is meant to integrate with the website.
2826
The output will be in `docs/.build`
2927

3028

31-
### Building the Themed Documentation
29+
## Building the Themed Documentation
3230

3331
This builds the themed version of the docs as well as the website. The steps
3432
are:
@@ -68,19 +66,22 @@ web site. The themed documentation will be found under the "Documentation"
6866
tab.
6967
7068
71-
### Release Process
69+
## Release Process
7270
7371
Here are the steps for putting out a fresh release to Pypi.
7472
7573
1. Create a new branch from main and make release specific updates:
76-
* Update `src/psij/version.py` to the new version number
74+
* Update `RELEASE` and `src/psij/version.py` to the new version number
7775
7876
2. Use the standard PR process and get changes from the above step merged to main.
7977
8078
3. Follow instructions here to [pypi docs](https://pypi.org/help/#apitoken) to
8179
setup tokens on your machine.
8280
83-
4. Run `make VERSION="version string" tag-and-release`. This will:
81+
4. Make a clean clone of the main branch
82+
83+
5. Run `make VERSION="version string" tag-and-release`, where the version string
84+
has the format "x.y.z[-s]". This will:
8485
* Create and push tags to GitHub.
8586
* Build the package.
8687
* Push built package to Pypi.

README-testing.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ python/cpython-x.y.z`) or something similar, such as loading a conda or
3636
virtual environment, please run the relevant commands before invoking
3737
`psij-ci-setup`.
3838

39+
Note: To upload data to the test server, you will need an authentication
40+
key. You can obtain such a key from https://testing.psij.io/auth.html.
41+
Obtaining a key requires a valid email.
42+
3943

4044
Testing with the CI Runner
4145
==========================

RELEASE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.1.0.post2
1+
0.9.0

docs/_static/extras.js

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,13 @@ $(document).ready(function() {
3535

3636
initializeSelectors(selectorType, value);
3737
});
38+
// Sphinx renders attributes differently from properties in that properties
39+
// come with a nice "property" prefix in the heading, whereas attributes just
40+
// have the name. This hacks the attribute headers to add a "attribute" text
41+
// before the attribute name
42+
$("dl.attribute > dt.sig").each(function() {
43+
$(this).prepend("<em class=\"attribute\"><span class=\"pre\">attribute</span><span class=\"w\"></span></em>");
44+
});
3845
});
3946

4047
function detectAll(selectorType) {
@@ -70,12 +77,19 @@ function detectAll(selectorType) {
7077
if (text == '"<&' + selectorType + '>"') {
7178
$(this).addClass(selectorType + "-item").addClass("psij-selector-value");
7279
}
73-
if (text == "executor" && prevSpans.length == 2
74-
&& prevSpans[0].text() == "execparams" && prevSpans[1].text() == '.') {
80+
if (prevSpans.length == 2 && prevSpans[0].text() == "execparams" && prevSpans[1].text() == '.') {
7581
// remove <span>execparams</span> and <span>.</span>
7682
prevSpans[0].remove();
7783
prevSpans[1].remove();
78-
$(this).addClass(selectorType + "-item").addClass("psij-selector-value");
84+
if (text == "executor") {
85+
$(this).addClass(selectorType + "-item").addClass("psij-selector-value");
86+
}
87+
else if (text == "queue_name") {
88+
$(this).text("QUEUE_NAME");
89+
}
90+
else if (text == "project_name") {
91+
$(this).text("PROJECT_NAME");
92+
}
7993
}
8094
prevSpans.push($(this));
8195
if (prevSpans.length > 2) {

0 commit comments

Comments
 (0)