Skip to content

Commit c6d9717

Browse files
authored
Add Nox sessions (#167)
* http → https * Remove benchmarks * Remove benchmarks * Add noxfile.py * http → https * Add watchdog as dependency * Update Nox sessions * Requirement: Nikola → Nikola[extras]
1 parent 922a36d commit c6d9717

File tree

4 files changed

+39
-12
lines changed

4 files changed

+39
-12
lines changed

conf.py

+6-9
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,9 @@
2525
# This is the URL where Nikola's output will be deployed.
2626
# If not set, defaults to SITE_URL
2727
BASE_URL = "https://www.plasmapy.org/"
28-
BENCHMARKS = "http://www.plasmapy.org/plasmapy-benchmarks/"
2928
CITATION_INSTRUCTIONS = "https://docs.plasmapy.org/en/stable/about/citation.html"
3029
CODE_OF_CONDUCT = "https://docs.plasmapy.org/en/latest/CODE_OF_CONDUCT.html"
31-
DOCS = "http://docs.plasmapy.org/"
30+
DOCS = "https://docs.plasmapy.org/"
3231
FACEBOOK = "https://www.facebook.com/PlasmaPy-101663168274541"
3332
FEEDBACK_BOX = "https://docs.google.com/forms/d/e/1FAIpQLSdT3O5iHZrLJRuavFyzoR23PGy0Prfzx2SQOcwJGWtvHyT2lw/viewform?usp=sf_link"
3433
MAILING_LIST = "https://groups.google.com/forum/#!forum/plasmapy"
@@ -297,7 +296,7 @@
297296
# FORCE_ISO8601 = False
298297

299298
# Date format used to display post dates. (translatable)
300-
# Used by babel.dates, CLDR style: http://cldr.unicode.org/translation/date-time
299+
# Used by babel.dates, CLDR style: https://cldr.unicode.org/translation/date-time
301300
# You can also use 'full', 'long', 'medium', or 'short'
302301
# DATE_FORMAT = 'yyyy-MM-dd HH:mm'
303302

@@ -360,7 +359,7 @@
360359

361360
# Enable reST directives that insert the contents of external files such
362361
# as "include" and "raw." This maps directly to the docutils file_insertion_enabled
363-
# config. See: http://docutils.sourceforge.net/docs/user/config.html#file-insertion-enabled
362+
# config. See: https://docutils.sourceforge.net/docs/user/config.html#file-insertion-enabled
364363
# REST_FILE_INSERTION_ENABLED = True
365364

366365
# Create by default posts in one file format?
@@ -812,7 +811,7 @@
812811
# fields you want to keep in images. (See also PRESERVE_EXIF_DATA)
813812
#
814813
# For a full list of field names, please see here:
815-
# http://www.cipa.jp/std/documents/e/DC-008-2012_E.pdf
814+
# https://www.cipa.jp/std/documents/e/DC-008-2012_E.pdf
816815
#
817816
# This is a dictionary of lists. Each key in the dictionary is the
818817
# name of a IDF, and each list item is a field you want to preserve.
@@ -992,7 +991,6 @@
992991
'- <a href="{facebook}">Facebook</a> '
993992
'- <a href="{youtube}">YouTube</a> '
994993
'- <a href="{chat}">Chat</a> '
995-
'- <a href="{benchmarks}">Benchmarks</a> '
996994
'- Powered by <a href="https://getnikola.com" rel="nofollow">Nikola</a>'
997995
)
998996

@@ -1020,7 +1018,6 @@
10201018
"facebook": FACEBOOK,
10211019
"youtube": YOUTUBE_CHANNEL,
10221020
"chat": CHAT,
1023-
"benchmarks": BENCHMARKS,
10241021
},
10251022
)
10261023
}
@@ -1058,7 +1055,7 @@
10581055
# INDEX_FILE = "index.html"
10591056

10601057
# If a link ends in /index.html, drop the index.html part.
1061-
# http://mysite/foo/bar/index.html => http://mysite/foo/bar/
1058+
# https://mysite/foo/bar/index.html => https://mysite/foo/bar/
10621059
# (Uses the INDEX_FILE setting, so if that is, say, default.html,
10631060
# it will instead /foo/default.html => /foo)
10641061
STRIP_INDEXES = True
@@ -1088,7 +1085,7 @@
10881085
# DEPLOY_DRAFTS = True
10891086

10901087
# Allows scheduling of posts using the rule specified here (new_post -s)
1091-
# Specify an iCal Recurrence Rule: http://www.kanzaki.com/docs/ical/rrule.html
1088+
# Specify an iCal Recurrence Rule: https://www.kanzaki.com/docs/ical/rrule.html
10921089
# SCHEDULE_RULE = ''
10931090
# If True, use the scheduling rule to all posts (not pages!) by default
10941091
# SCHEDULE_ALL = False

noxfile.py

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import nox
2+
3+
nox.options.default_venv_backend = "uv|virtualenv"
4+
5+
6+
@nox.session
7+
def build(session) -> None:
8+
"""Build the site with Nikola."""
9+
session.install("-r", "requirements.txt")
10+
session.run("nikola", "build")
11+
12+
13+
@nox.session
14+
def check(session) -> None:
15+
"""Check links and files in the generated site."""
16+
session.install("-r", "requirements.txt")
17+
session.run("nikola", "build")
18+
session.run(
19+
"nikola",
20+
"check",
21+
"--check-links",
22+
"--find-sources",
23+
)
24+
25+
26+
@nox.session
27+
def clean(session) -> None:
28+
"""Remove output files."""
29+
session.install("-r", "requirements.txt")
30+
session.run("nikola", "clean")

pages/index.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ If you are unfamiliar with Python, please check out the
8888

8989
## Learn PlasmaPy
9090

91-
[PlasmaPy's documentation](http://docs.plasmapy.org/en/latest) describes how to use PlasmaPy and provides several [examples](https://docs.plasmapy.org/en/latest/examples.html).
91+
[PlasmaPy's documentation](https://docs.plasmapy.org/en/latest) describes how to use PlasmaPy and provides several [examples](https://docs.plasmapy.org/en/latest/examples.html).
9292

9393
## Get Help
9494

@@ -100,7 +100,7 @@ longer discussions on more detailed topics.
100100

101101
## Contribute and Report Bugs
102102

103-
Making [feature requests](https://github.com/PlasmaPy/PlasmaPy/issues/new?template=Feature_request.md), [reporting bugs](https://github.com/PlasmaPy/PlasmaPy/issues/new?template=Bug_report.md), and [offering suggestions](https://docs.google.com/forms/d/e/1FAIpQLSdT3O5iHZrLJRuavFyzoR23PGy0Prfzx2SQOcwJGWtvHyT2lw/viewform) are some of the most helpful ways to contribute to the ongoing development of PlasmaPy. The documentation discusses how to [contribute code and documentation](http://docs.plasmapy.org/en/latest/CONTRIBUTING.html) to PlasmaPy and contains a [development guide](http://docs.plasmapy.org/en/latest/development/index.html).
103+
Making [feature requests](https://github.com/PlasmaPy/PlasmaPy/issues/new?template=Feature_request.md), [reporting bugs](https://github.com/PlasmaPy/PlasmaPy/issues/new?template=Bug_report.md), and [offering suggestions](https://docs.google.com/forms/d/e/1FAIpQLSdT3O5iHZrLJRuavFyzoR23PGy0Prfzx2SQOcwJGWtvHyT2lw/viewform) are some of the most helpful ways to contribute to the ongoing development of PlasmaPy. The documentation discusses how to [contribute code and documentation](https://docs.plasmapy.org/en/latest/CONTRIBUTING.html) to PlasmaPy and contains a [development guide](https://docs.plasmapy.org/en/latest/development/index.html).
104104

105105
## Acknowledgments
106106

requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Nikola
1+
Nikola[extras]
22
webassets

0 commit comments

Comments
 (0)