Skip to content

Commit

Permalink
enhance CONTRIBUTING.md and update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
alegresor committed Apr 5, 2023
1 parent 360b73f commit 92de820
Show file tree
Hide file tree
Showing 6 changed files with 57 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ docs/Gemfile.lock
sphinx/_build/
sphinx/_static/
sphinx/demo_rst/
sphinx/readme_rst/
sphinx/md_rst/
sphinx/uml/
node_modules/*

Expand Down
47 changes: 44 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Join team communications by reaching out to us at [qmc-software@googlegroups.com

## Installation

In a git enabled terminal (e.g. [bash](https://gitforwindows.org/) for Windows) with [conda](https://docs.conda.io/en/latest/miniconda.html) installed and C compilers enabled (Windows users may want to install [Cygwin](https://www.cygwin.com) or [MinGW](https://www.mingw-w64.org) and may find this [tutorial from Visual Studio Code](https://code.visualstudio.com/docs/languages/cpp) helpful), run
In a git enabled terminal (e.g. [bash](https://gitforwindows.org/) for Windows) with [miniconda](https://docs.conda.io/en/latest/miniconda.html) installed and C compilers enabled (Windows users may need to install [Microsoft C++ Build Tools](https://visualstudio.microsoft.com/visual-cpp-build-tools/)), run

~~~
git clone https://github.com/QMCSoftware/QMCSoftware.git
Expand All @@ -24,16 +24,57 @@ pip install -e .

Doctests and unittests take a few minute to run with

~~~
make tests_no_docker
~~~

Optionally, you may install [Docker](https://www.docker.com/products/docker-desktop/) and then run all tests with

~~~
make tests
~~~

After installing [Pandoc](https://pandoc.org/installing.html) and [$\LaTeX$](https://www.latex-project.org/get/), documentation may be compiled into your preferred format with
After installing [Pandoc](https://pandoc.org/installing.html) and [LaTeX](https://www.latex-project.org/get/), documentation may be compiled into your preferred format with

```
doc_html
doc_pdf
doc_epub
```

See the `makefile` for more commands and the [developers page](https://qmcpy.org/references-for-python-and-mathematical-software-development/) on [qmcpy.org](https://qmcpy.org) for more tools
Demos may be run by opening [Jupyter](https://jupyter.org/) using

~~~
jupyter notebook
~~~

and then navigating to the desired file in the `demo/` directory. Some of our developers prefer [JupyterLab](https://jupyter.org/), which may be installed with

~~~
pip install jupyterlab
~~~

and then run with

~~~
jupyter-lab
~~~

The [Developers Tools](https://qmcpy.org/references-for-python-and-mathematical-software-development/) page on [qmcpy.org](https://qmcpy.org) documents additional tools we have found helpful for mathematical software development and presentation.

## Visual Studio Code Tips and Tricks

[VSCode](https://code.visualstudio.com) is the IDE of choice for many of our developers. Here we compile some helpful notes regarding additional setup for VSCode.

- Run `CMD`+`p` then `> Python: Select Interpreter` then select the `('qmcpy')` choice from the dropdown to link the qmcpy environment into your workspace. Now when you open a terminal, your command line should read `(qmcpy) username@...` which indicates the qmcpy environment has been automatically activated. Also, when debugging the qmcpy environment will be automatically used.
- Go to `File` and click `Save Workspace as...` to save a qmcpy workspace for future development.

### Useful Extensions
- Python
- Jupyter
- Markdown Preview Enhanced
- eps-preview, which requires
- Postscript Language
- pdf2svg
- Git Graph
- Code Spell Checker
4 changes: 3 additions & 1 deletion makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# -C for sphix-build will not look for conf.py
# -b for sphinx-build will look for conf.py

mddir = sphinx/readme_rst/
mddir = sphinx/md_rst/
nbdir = sphinx/demo_rst/
umldir = sphinx/uml/
nbconvertcmd = jupyter nbconvert --to rst --output-dir='$(nbdir)'
Expand All @@ -22,6 +22,8 @@ _doc: # gets run by sphinx/conf.py so we don't need to commit files in $(mddir)
@grep -v "\[\!" README.md > README2.md
@pandoc --mathjax README2.md -o $(mddir)QMCSoftware.rst
@rm README2.md
# CONTRIBUTING --> RST
@pandoc --mathjax CONTRIBUTING.md -o $(mddir)CONTRIBUTING.rst
# Jupyter Notebook Demos --> RST
@mkdir $(nbdir)
@for f in demos/*.ipynb; do \
Expand Down
7 changes: 7 additions & 0 deletions sphinx/contributing.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Contributing to QMCSoftware
===========================

.. toctree::
:maxdepth: 2

md_rst/CONTRIBUTING.rst
1 change: 1 addition & 0 deletions sphinx/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ QMCPy Documentation


readme
contributing
license
algorithms
demos
Expand Down
2 changes: 1 addition & 1 deletion sphinx/readme.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ About Our QMC Software Community
.. toctree::
:maxdepth: 2

readme_rst/QMCSoftware.rst
md_rst/QMCSoftware.rst

0 comments on commit 92de820

Please sign in to comment.