Skip to content
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

Grab bag of issues #4331

Closed
wants to merge 13 commits into from
Closed

Grab bag of issues #4331

wants to merge 13 commits into from

Conversation

nabobalis
Copy link
Contributor

@nabobalis nabobalis commented Jul 1, 2020

No description provided.

@nabobalis nabobalis added this to the 2.1 milestone Jul 1, 2020
@nabobalis nabobalis marked this pull request as ready for review July 4, 2020 07:59
@nabobalis nabobalis requested a review from a team as a code owner July 4, 2020 07:59
@dstansby
Copy link
Member

dstansby commented Jul 4, 2020

What's the context/motivation for this?

@nabobalis
Copy link
Contributor Author

The context is trying to see what happens if we unindent the retry code in the sample data to get RTD to successfully do retry on the failed sample data.

I need to rewrite more code here.

@nabobalis nabobalis changed the title moved retry out of loop Removed retry from the sample data. Jul 5, 2020
@nabobalis nabobalis requested review from a team as code owners July 5, 2020 10:00
@nabobalis
Copy link
Contributor Author

Seems we are failing to download the sunspot data, I am not sure why.

@nabobalis nabobalis requested a review from a team as a code owner July 8, 2020 10:19
@nabobalis nabobalis changed the title Removed retry from the sample data. Removed retry from the sample data and updated install docs Jul 8, 2020
@nabobalis
Copy link
Contributor Author

nabobalis commented Jul 8, 2020

Some of this should be backported but will need to be done manually.

@nabobalis
Copy link
Contributor Author

I plan to update the CI guide as well.

@nabobalis
Copy link
Contributor Author

nabobalis commented Jul 8, 2020

TODO:

  • Add tox command for using the precommit
  • Undo the example skip once we fix the downloader.
  • Add page/ Update page on our current CI.

@nabobalis nabobalis requested a review from a team as a code owner July 12, 2020 12:41
@nabobalis
Copy link
Contributor Author

On the warning for examples I can get this:

Unexpected failing examples:
/home/nabil/GitHub/sunpy/examples/map/map_data_histogram.py failed leaving traceback:
Traceback (most recent call last):
  File "/home/nabil/GitHub/sunpy/.tox/build_docs/lib/python3.8/site-packages/sphinx_gallery/gen_gallery.py", line 159, in call_memory
    return 0., func()
  File "/home/nabil/GitHub/sunpy/.tox/build_docs/lib/python3.8/site-packages/sphinx_gallery/gen_rst.py", line 466, in __call__
    exec(self.code, self.fake_main.__dict__)
  File "/home/nabil/GitHub/sunpy/examples/map/map_data_histogram.py", line 24, in <module>
    aia_smap = aia.submap(bottom_left, top_right)
  File "/home/nabil/GitHub/sunpy/.tox/build_docs/lib/python3.8/site-packages/sunpy/util/decorators.py", line 320, in inner_f
    warnings.warn(f"Pass {', '.join(args_msg)} as keyword args. "
sunpy.util.exceptions.SunpyDeprecationWarning: Pass top_right=<SkyCoord (Helioprojective: obstime=2011-06-07T06:33:02.770, rsun=696000000.0 m, observer=<HeliographicStonyhurst Coordinate (obstime=2011-06-07T06:33:02.770): (lon, lat, radius) in (deg, deg, m)
    (-0.00406308, 0.04787238, 1.51846026e+11)>): (Tx, Ty) in arcsec
    (100., 400.)> as keyword args. From version 2.1 passing these as positional arguments will result in an error.

@nabobalis
Copy link
Contributor Author

nabobalis commented Jul 12, 2020

Now I can't get it to work again.

Sometimes?

@nabobalis
Copy link
Contributor Author

Still getting:

DEBUG: Failed to download EVE_TIMESERIES from http://data.sunpy.org/sunpy/v1/20110607_EVE_L0CS_DIODES_1m.txt: Timeout on reading data from socket [sunpy.data._sample]
loading translations [en]... done

Task was destroyed but it is pending!
task: <Task pending name='Task-120' coro=<Downloader._write_worker() running at /home/docs/checkouts/readthedocs.org/user_builds/sunpy/conda/4331/lib/python3.8/site-packages/parfive/downloader.py:469> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x7f44e4d46250>()]>>
Exception ignored in: <coroutine object Downloader._write_worker at 0x7f44e4d441c0>
Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/sunpy/conda/4331/lib/python3.8/site-packages/parfive/downloader.py", line 469, in _write_worker
    offset, chunk = await queue.get()
  File "/home/docs/checkouts/readthedocs.org/user_builds/sunpy/conda/4331/lib/python3.8/asyncio/queues.py", line 165, in get
    getter.cancel()  # Just in case getter is not done yet.
  File "/home/docs/checkouts/readthedocs.org/user_builds/sunpy/conda/4331/lib/python3.8/asyncio/base_events.py", line 719, in call_soon
    self._check_closed()
  File "/home/docs/checkouts/readthedocs.org/user_builds/sunpy/conda/4331/lib/python3.8/asyncio/base_events.py", line 508, in _check_closed
    raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed
making output directory... done


* `CodeCov <https://codecov.io/gh/sunpy/sunpy/>`_: Checks how many lines of the code lack test coverage.
* figure_report/figure_tests (Giles): Show the final results of the figure tests.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just noticed when writing this, we have three figure giles checks.

@nabobalis nabobalis marked this pull request as draft July 13, 2020 12:24

:meth:`numpy.ndarray.mean` but ``:func:`` will not.

Never add ``:class:`` this will break the linking.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much thanks to the MPL docs for this section.

@nabobalis nabobalis changed the title Removed retry from the sample data and updated install docs Grabbag of issues Jul 15, 2020
@nabobalis nabobalis changed the title Grabbag of issues Grab bag of issues Jul 15, 2020
@@ -72,10 +72,10 @@ repos:
args: ['--in-place', '--remove-all-unused-imports', '--remove-unused-variable']
exclude: ".*(.fits|.fts|.fit|.txt|tca.*|extern.*|.rst|.md|__init__.py|sunpy/extern|docs/conf.py)$"
- repo: https://github.com/timothycrosley/isort
rev: 4.3.21-2
rev: 5.1.0
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isort update.

Comment on lines +89 to +95
sunpy is open source, under the BSD-2 license, and by contributing you are stating that you have the right to and agree to, have your work distributed under the terms of this license.

If you work at a university or research institution, you will need to check if you can contribute code you have written at work.
You should start by checking if there is a Open Source Software Policy (e.g., `Standford's policy <https://otl.stanford.edu/open-source-stanford>`__) for your work place.
If not, `OSS-Watch <http://oss-watch.ac.uk/resources/contributing>`__ summaries what you will need to check and who to ask, however this is from a UK point of view.
`Standford's guidance <https://otl.stanford.edu/sites/g/files/sbiybj10286/f/otlcopyrightguide.pdf>`__ for example allows someone to contribute and open source their code.
If you are unsure if your university or institution allows you to contribute under the BSD-2 license, you should contact the relevant department or administrator that deals with copyright.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs more passes and reviews. I was unsure what to suggest. I was able to find some resources but not many.

@nabobalis
Copy link
Contributor Author

nabobalis commented Jul 15, 2020

I might need to split this up. But I would rather not.

@nabobalis
Copy link
Contributor Author

Dev build

INFO: Failed to download one or more sample data files, retrying with a mirror. [sunpy.data._sample]
Traceback (most recent call last):
  File "/home/vsts/work/1/s/examples/acquiring_data/2011_06_07_sampledata_overview.py", line 32, in <module>
    aia_cutout03_map = sunpy.map.Map(sample_data.AIA_193_CUTOUT03_IMAGE)
AttributeError: module 'sunpy.data.sample' has no attribute 'AIA_193_CUTOUT03_IMAGE'

Task was destroyed but it is pending!
task: <Task pending name='Task-131' coro=<Downloader._write_worker() running at /home/vsts/work/1/s/.tox/py38-devdeps/lib/python3.8/site-packages/parfive/downloader.py:469> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x7fd3e64d3f70>()]>>
Exception ignored in: <coroutine object Downloader._write_worker at 0x7fd3e773e6c0>
Traceback (most recent call last):
  File "/home/vsts/work/1/s/.tox/py38-devdeps/lib/python3.8/site-packages/parfive/downloader.py", line 469, in _write_worker
    offset, chunk = await queue.get()
  File "/opt/hostedtoolcache/Python/3.8.3/x64/lib/python3.8/asyncio/queues.py", line 165, in get
    getter.cancel()  # Just in case getter is not done yet.
  File "/opt/hostedtoolcache/Python/3.8.3/x64/lib/python3.8/asyncio/base_events.py", line 719, in call_soon
    self._check_closed()
  File "/opt/hostedtoolcache/Python/3.8.3/x64/lib/python3.8/asyncio/base_events.py", line 508, in _check_closed
    raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed
ERROR: InvocationError for command /bin/bash -ec 'for f in /home/vsts/work/1/s/examples/*/*.py; do [[ $f == *skip* ]] && continue; echo $f && python $f; done' (exited with code 1)
py38-devdeps: Shutting down tox-pypi-filter server

@nabobalis nabobalis closed this Jul 16, 2020
@nabobalis nabobalis deleted the retry branch July 16, 2020 17:45
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.

None yet

2 participants