Skip to content

Add solar system simulation tutorial #469

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

Closed
wants to merge 1 commit into from
Closed

Add solar system simulation tutorial #469

wants to merge 1 commit into from

Conversation

kakirastern
Copy link
Contributor

Fixes #457

Polish up @pllim's original contribution for an Astropy implementation of the solar system simulation. Reduced the problem in to a 3-body solar system problem, in order to improve notebook performance.

@kakirastern
Copy link
Contributor Author

More issues arose related to the notebooks needing updating @eblur:

Configuration error:
There is a programmable error in your configuration file:

Traceback (most recent call last):
  File "/home/circleci/project/venv/lib/python3.7/site-packages/nbformat/reader.py", line 14, in parse_json
    nb_dict = json.loads(s, **kwargs)
  File "/usr/local/lib/python3.7/json/__init__.py", line 348, in loads
    return _default_decoder.decode(s)
  File "/usr/local/lib/python3.7/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/local/lib/python3.7/json/decoder.py", line 353, in raw_decode
    obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 6 column 3 (char 67)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/circleci/project/venv/lib/python3.7/site-packages/sphinx/config.py", line 348, in eval_config_file
    execfile_(filename, namespace)
  File "/home/circleci/project/venv/lib/python3.7/site-packages/sphinx/util/pycompat.py", line 81, in execfile_
    exec(code, _globals)
  File "/home/circleci/project/tutorials/conf.py", line 164, in <module>
    process_notebooks(nb_tutorials_path, **processkwargs)
  File "/home/circleci/project/scripts/convert.py", line 238, in process_notebooks
    nbc.execute()
  File "/home/circleci/project/scripts/convert.py", line 94, in execute
    nb = nbformat.read(f, as_version=IPYTHON_VERSION)
  File "/home/circleci/project/venv/lib/python3.7/site-packages/nbformat/__init__.py", line 143, in read
    return reads(buf, as_version, **kwargs)
  File "/home/circleci/project/venv/lib/python3.7/site-packages/nbformat/__init__.py", line 73, in reads
    nb = reader.reads(s, **kwargs)
  File "/home/circleci/project/venv/lib/python3.7/site-packages/nbformat/reader.py", line 58, in reads
    nb_dict = parse_json(s, **kwargs)
  File "/home/circleci/project/venv/lib/python3.7/site-packages/nbformat/reader.py", line 17, in parse_json
    raise NotJSONError(("Notebook does not appear to be JSON: %r" % s)[:77] + "...") from e
nbformat.reader.NotJSONError: Notebook does not appear to be JSON: '{\n  "nbformat": 4,\n  "nbformat_minor"...

make: *** [Makefile:43: html] Error 2

@pllim
Copy link
Member

pllim commented Nov 18, 2020

Should I wait for CI to pass before having a look?

@kakirastern
Copy link
Contributor Author

Sure

@adrn
Copy link
Member

adrn commented Dec 2, 2020

Hey @kakirastern - I just checked out your branch and tried to open the notebook locally with Jupyter, but I get an error similar to above "Notebook does not appear to be JSON". Does it open for you locally? Maybe you need to save again and commit a new version of the notebook?

@kakirastern
Copy link
Contributor Author

@adrn Checked that it is indeed in .ipynb format, but yeah the JSON formatting is somehow messed up as I downloaded the notebook from Google Colab. Let me fix it with PyCharm pronto, or needs be I will just hack the file with my Sublime Text.

@eteq eteq closed this Dec 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Notebook to do simple solar system simulation
4 participants