asdf-format / tutorials Goto Github PK
View Code? Open in Web Editor NEWLicense: BSD 3-Clause "New" or "Revised" License
License: BSD 3-Clause "New" or "Revised" License
This leads to an exception with asdf 2.15.1
Exercise 3 in Anatomy_of_an_ASDF_file asks the user to use the command lien tool, but the notebook contains no information on how to use the tool.
The Reading_a_JWST_ASDF_file.ipynb notebook requires the jwst library. The third cell fails if jwst has not been installed. I suggest testing for a minimum version of the jwst library in that cell; a failure should gracefully tell the user to install jwst.
TypeError Traceback (most recent call last)
Input In [22], in <cell line: 2>()
1 wcs = af.tree['meta']['wcs']
----> 2 wcs(100,200)
TypeError: 'TaggedDict' object is not callable
AttributeError Traceback (most recent call last)
Input In [23], in <cell line: 1>()
----> 1 wcs.invert(5.9, -72)
AttributeError: 'TaggedDict' object has no attribute 'invert'
AttributeError Traceback (most recent call last)
Input In [24], in <cell line: 2>()
1 # what is the output coordinate frame and units?
----> 2 wcs.output_frame
AttributeError: 'TaggedDict' object has no attribute 'output_frame'
The opening sentence of the anatomy notebook appears to be missing a word and/or punctuation:
This is intended for those that are interested in some of the details is not a full description, but should be treated as a basic introduction.
The following codeblock from Anatomy_of_an_ASDF_File throws an error:
# Let's look at the corresponding raw contents of the last file'
with open('tut_with_data2.asdf','rb') as taf2: print(taf2.read()[:3251].decode("utf-8"))
Error:
---------------------------------------------------------------------------
UnicodeDecodeError Traceback (most recent call last)
<ipython-input-34-185bbb71f5c0> in <module>
1 # Let's look at the corresponding raw contents of the last file'
----> 2 with open('tut_with_data2.asdf','rb') as taf2: print(taf2.read()[:3251].decode("utf-8"))
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd3 in position 3205: invalid continuation byte
Notebook: asdf-format/tutorials/Your_second_ASDF_converter.ipynb
If cookiecutter is executed in the top directory of the notebook (~/converter_tutorial), then the notebook will fail in the notebook section "Installing the packages", when the first "pip install --editable ." is attempted (see the ERROR DUMP below).
The command in the first cell of the notebook,
cd ~/converter_tutorial
will fail if the top directory of the notebook does not already exist.
Recommendations:
(1) The first cell of the notebook with the "cd ~/converter_tutorial" command should be deleted (or ignored).
(2) The following cell describing the use of cookiecutter should be deleted (or ignored).
---> The notebook runs without any problems --- if these two cells are ignored.
I can see the utility of using cookiecutter to simplify the implementation of new schemas, but the infrastructure created by cookiecutter (if done in the top directory of the notebook) has apparently not been integrated with the remainder of the notebook.
ERROR DUMP: BEGIN
Obtaining file:///Users/mighell/converter_tutorial/myschemas
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... error
ERROR: Command errored out with exit status 1:
command: /Users/mighell/anaconda3/bin/python /Users/mighell/anaconda3/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py prepare_metadata_for_build_wheel /var/folders/hm/q_z_s75n06s81n61dny6jkn40000gp/T/tmpkk59uytx
cwd: /Users/mighell/converter_tutorial/myschemas
Complete output (34 lines):
Traceback (most recent call last):
File "/Users/mighell/anaconda3/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 349, in <module>
main()
File "/Users/mighell/anaconda3/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 331, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/Users/mighell/anaconda3/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 151, in prepare_metadata_for_build_wheel
return hook(metadata_directory, config_settings)
File "/private/var/folders/hm/q_z_s75n06s81n61dny6jkn40000gp/T/pip-build-env-2ke3x0jt/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 188, in prepare_metadata_for_build_wheel
self.run_setup()
File "/private/var/folders/hm/q_z_s75n06s81n61dny6jkn40000gp/T/pip-build-env-2ke3x0jt/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 174, in run_setup
exec(compile(code, __file__, 'exec'), locals())
File "setup.py", line 4, in <module>
setup()
File "/private/var/folders/hm/q_z_s75n06s81n61dny6jkn40000gp/T/pip-build-env-2ke3x0jt/overlay/lib/python3.9/site-packages/setuptools/__init__.py", line 155, in setup
return distutils.core.setup(**attrs)
File "/private/var/folders/hm/q_z_s75n06s81n61dny6jkn40000gp/T/pip-build-env-2ke3x0jt/overlay/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 109, in setup
_setup_distribution = dist = klass(attrs)
File "/private/var/folders/hm/q_z_s75n06s81n61dny6jkn40000gp/T/pip-build-env-2ke3x0jt/overlay/lib/python3.9/site-packages/setuptools/dist.py", line 458, in __init__
_Distribution.__init__(
File "/private/var/folders/hm/q_z_s75n06s81n61dny6jkn40000gp/T/pip-build-env-2ke3x0jt/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 293, in __init__
self.finalize_options()
File "/private/var/folders/hm/q_z_s75n06s81n61dny6jkn40000gp/T/pip-build-env-2ke3x0jt/overlay/lib/python3.9/site-packages/setuptools/dist.py", line 851, in finalize_options
ep(self)
File "/private/var/folders/hm/q_z_s75n06s81n61dny6jkn40000gp/T/pip-build-env-2ke3x0jt/overlay/lib/python3.9/site-packages/setuptools_scm/integration.py", line 104, in infer_version
_assign_version(dist, config)
File "/private/var/folders/hm/q_z_s75n06s81n61dny6jkn40000gp/T/pip-build-env-2ke3x0jt/overlay/lib/python3.9/site-packages/setuptools_scm/integration.py", line 51, in _assign_version
_version_missing(config)
File "/private/var/folders/hm/q_z_s75n06s81n61dny6jkn40000gp/T/pip-build-env-2ke3x0jt/overlay/lib/python3.9/site-packages/setuptools_scm/__init__.py", line 106, in _version_missing
raise LookupError(
LookupError: setuptools-scm was unable to detect version for /Users/mighell/converter_tutorial/myschemas.
Make sure you're either building from a fully intact git repository or PyPI tarballs. Most other sources (such as GitHub's tarballs, a git checkout without the .git folder) don't contain the necessary metadata and will not work.
For example, if you're using pip, instead of https://github.com/user/proj/archive/master.zip use git+https://github.com/user/proj.git#egg=proj
----------------------------------------
WARNING: Discarding file:///Users/mighell/converter_tutorial/myschemas. Command errored out with exit status 1: /Users/mighell/anaconda3/bin/python /Users/mighell/anaconda3/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py prepare_metadata_for_build_wheel /var/folders/hm/q_z_s75n06s81n61dny6jkn40000gp/T/tmpkk59uytx Check the logs for full command output.
ERROR: Command errored out with exit status 1: /Users/mighell/anaconda3/bin/python /Users/mighell/anaconda3/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py prepare_metadata_for_build_wheel /var/folders/hm/q_z_s75n06s81n61dny6jkn40000gp/T/tmpkk59uytx Check the logs for full command output.
Note: you may need to restart the kernel to use updated packages.
**ERROR DUMP: END""
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.