hipspy / hips

Python library to handle HiPS
https://hips.readthedocs.io
13 stars 16 forks source link

Add skeleton class TileFileCache #11

Closed adl1995 closed 7 years ago

adl1995 commented 7 years ago

This class will provide functionality such as reading data from the hips-extra repository and fetching tiles from remote servers (like CDS) into the local tile cache.

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling 630425b56c7b131a69aef6d48b03acc4c67bbcef on adl1995:master into e491423c65a07e7b0f4cf3a09d6357b9242a2f2c on hipspy:master.

cdeil commented 7 years ago

@adl1995 - There's some boilerplate involved. Please do for hips.tiles the equivalent of what I did for hips.draw here: https://github.com/hipspy/hips/commit/4fc6601f464edef9c6f85eb71349dfec46cf064b

One check you can do is

python setup.py build_docs
open docs/_build/html/index.html

and check if your new class appears there.

For this to work, you need to add the __all__, add the __init__.py files with the imports, like I did for hips.tiles. Let me know if you run into any issues.


Apart from that, I would always suggest to start with a high-level docs example or test that exercises the new functionality for the "common case" and "user" side. This will help us develop a package / an API that's user-friendly, and to focus on developing the key functionality first, instead of getting side-tracked to develop "infrastructure" like cache stuff that we think we'll need, but then at the end don't really need.

When you add classes and methods and high-level tests like that, at first they will not work, because they aren't implemented yet. What you can do is put raise NotImplementedError into the methods, and put a @pytest.mark.xfail on the tests. Then once we've discussed the code structure and API a bit, you would start to implement it and make it work piece by piece.

OK?

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling f10051f35e53a4c030f9003bf9386a7fbce57472 on adl1995:master into e491423c65a07e7b0f4cf3a09d6357b9242a2f2c on hipspy:master.

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling 0a1f731313002bd42077b0d0a8efeb3131c50100 on adl1995:master into e491423c65a07e7b0f4cf3a09d6357b9242a2f2c on hipspy:master.

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling 9b408b2937593581708b079fe8eab493967c5641 on adl1995:master into e491423c65a07e7b0f4cf3a09d6357b9242a2f2c on hipspy:master.

cdeil commented 7 years ago

@adl1995 - What's the status with this pull request? It's a dummy class without anything implemented / no tests or working code.

Do you want to continue and implement something here, or close this and start / continue with some other part (e.g. #24 or other things we talked about in the last 2 weeks)?

cdeil commented 7 years ago

@adl1995 - Close this PR and continue coding in #33 ? (or the other way around: your choice)

adl1995 commented 7 years ago

Closing this PR. This will instead be implemented in #33.