From 2579dcd10839cdf95f3c61746527f3ca9550f8bf Mon Sep 17 00:00:00 2001 From: Marcel Zwiers Date: Tue, 3 Oct 2023 21:50:51 +0200 Subject: [PATCH] Minor layout and date tweaks --- CONTRIBUTING.rst | 18 +++++++++--------- bidscoin/__init__.py | 2 +- docs/conf.py | 27 ++++++++++++++------------- docs/index.rst | 14 ++++++++++++-- 4 files changed, 36 insertions(+), 25 deletions(-) diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 854acdc0..b3ac4c29 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -20,25 +20,25 @@ Project organization How to contribute code ---------------------- -The preferred way to contribute to the BIDScoin code base or documentation is use a `forking wokflow `__, i.e. fork the `main repository `__, create a feature branch, and submit a pull request. If you are unsure what that means, here is a set-up workflow you may wish to follow: +The preferred way to contribute to the BIDScoin code base or documentation is to use a `forking wokflow `__, i.e. fork the `main repository `__, create a feature branch, and submit a pull request. If you are unsure what that means, here is a set-up workflow you may wish to follow: 0. Fork the `project repository `_ on GitHub, by clicking on the “Fork” button near the top of the page — this will create a personal copy of the repository. 1. Set up a clone of the repository on your local machine and connect it to both the “official” and your copy of the repository on GitHub:: - git clone git://github.com/Donders-Institute/bidscoin - cd bidscoin - git remote rename origin official - git remote add origin git://github.com/[YOUR_GITHUB_USERNAME]/bidscoin + git clone git://github.com/Donders-Institute/bidscoin + cd bidscoin + git remote rename origin official + git remote add origin git://github.com/[YOUR_GITHUB_USERNAME]/bidscoin 2. When you wish to start a new contribution, create a new branch:: - git checkout -b [topic_of_your_contribution] + git checkout -b [topic_of_your_contribution] 3. When you are done making the changes you wish to contribute, commit and push them to GitHub:: - git commit -am "[A SHORT DESCRIPTION OF THE CHANGES]" # Run this command every time you have made a set of changes that belong together - git push -u origin topic_of_your_contribution + git commit -am "[A SHORT DESCRIPTION OF THE CHANGES]" # Run this command every time you have made a set of changes that belong together + git push -u origin topic_of_your_contribution Git will provide you with a link which you can click to initiate a pull request (if any of the above seems overwhelming, you can look up the `Git `__ or `GitHub `__ documentation on the web) @@ -47,7 +47,7 @@ Coding guidelines It is recommended to check that your contribution complies with the following rules before submitting a pull request: -* CLI applications (i.e. Python modules that have an entrypoint + manpage in ``pyproject.toml``) should have informative docstrings and arguments, with usage examples presented as argparse epilogues. All CLIs and plugins should be described in the Sphinx RTD documentation. +* CLI applications (i.e. Python modules that have an entrypoint + manpage in `pyproject.toml <./pyproject.toml>`__) should have informative docstrings and arguments, with usage examples presented as argparse epilogues. All CLIs and plugins should be described in the Sphinx RTD documentation. * Docstrings are formatted in `Sphinx style `__ * New modules or functionality should be accompanied with `type hints `__ and new (py)tests * All tests performed with `tox `__ must pass (python environments can be skipped, if at least one of them is checked) diff --git a/bidscoin/__init__.py b/bidscoin/__init__.py index baa1661a..02386fdb 100644 --- a/bidscoin/__init__.py +++ b/bidscoin/__init__.py @@ -44,7 +44,7 @@ # Add license metadata __license__ = 'GNU General Public License v3 or later (GPLv3+)' -__copyright__ = '2018-2023, Marcel Zwiers' +__copyright__ = f"2018-{datetime.date.today().year}, Marcel Zwiers" __disclaimer__ = """\ This module and all modules in this package are part of BIDScoin (https://github.com/Donders-Institute/bidscoin). diff --git a/docs/conf.py b/docs/conf.py index 612fc4c2..fe78fa16 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -11,6 +11,7 @@ # documentation root, use os.path.abspath to make it absolute, like shown here. from pathlib import Path +from datetime import date try: import tomllib except ModuleNotFoundError: @@ -19,9 +20,10 @@ # -- Project information ----------------------------------------------------- -project = 'BIDScoin' -copyright = '2018-2023, Marcel Zwiers' -author = 'Marcel Zwiers' +project = 'BIDScoin' +copyright = f"2018-{date.today().year}, Marcel Zwiers" +author = 'Marcel Zwiers' +master_doc = 'index' # The full version, including alpha/beta/rc tags from file with open(Path(__file__).parents[1]/'pyproject.toml', 'rb') as fid: @@ -33,10 +35,10 @@ # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. -nitpicky = True -extensions = ['myst_parser'] -source_suffix = {'.rst': 'restructuredtext', - '.md': 'markdown'} +nitpicky = True +extensions = ['myst_parser'] +source_suffix = {'.rst': 'restructuredtext', + '.md': 'markdown'} # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] @@ -52,14 +54,13 @@ # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -html_theme = 'sphinx_rtd_theme' +html_theme = 'sphinx_rtd_theme' +highlight_language = "none" # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['_static'] -master_doc = 'index' -highlight_language = "none" -html_favicon = "./_static/bidscoin_logo.png" -# html_logo = "./_static/bidscoin_logo_small.png" +html_static_path = ['_static'] +html_favicon = "./_static/bidscoin_logo.png" +# html_logo = "./_static/bidscoin_logo_small.png" diff --git a/docs/index.rst b/docs/index.rst index 26c6c9df..00ada7b7 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -2,17 +2,27 @@ .. toctree:: :maxdepth: 3 - :hidden: + :caption: Getting started installation preparation + +.. toctree:: + :maxdepth: 3 + :caption: Usage + workflow bidsmap options plugins bidsapps utilities - screenshots + +.. toctree:: + :maxdepth: 3 + :caption: Miscellaneous + tutorial troubleshooting + screenshots CHANGELOG