Comments (11)
Just an update on the docs front. The gh-pages cannot be deployed at the moment because all the docs point at the old locations under the src.
structure. I will update this but not immediately.
from dlux.
I've created a new branch with the following structure:
docs/
- optical_system.md
- wavefronts/
- fresnel_wavefront.md
- physical_wavefront.md
- layers/
- ect.
Where each class get's it's own markdown file. We can change this up, but I assumed that we would not be transitioning to a (readthedocs.io) [https://readthedocs.io] web site so the heavy structuring will make it easy to find the relevant information. I was planning to writing these today, to aid my own understanding of some of the code.
from dlux.
@benjaminpope has set up a gh-pages branch for docs https://louisdesdoigts.github.io/dLux/, but I think starting out with this is a good idea, and then we can merge it together cohesively once we have most of it written.
from dlux.
Ahhh, I was wondering what the gh-pages
branch was for. I'll keep writing docs
on the Documentation
branch for now then. But move them over long term.
from dlux.
Also how do we want to document the __init__
and __call__
dunder methods. At the moment I have been documenting both parameter sets just under a #### Parameters:
label in Documentation
. This is confusing because it does not specify when to provide the parameters. The other option is to have a #### Constructor:
heading and then a #### Parameters:
heading.
Let me know what you think.
from dlux.
Spoke with @benjaminpope and we are using mkdocs
.
from dlux.
Hello again,
Just checking in with an update. The Wavefront
branch now contains full documentation for the PhysicalWavefront
class although this has been spread over Wavefront
and PlanarWavefront
(name subject to change, I just wanted something more physical). As part of the documenting I have been updating names to match the PEP 8
style guides. This will be subject to review and will probably require @LouisDesdoigts and I to sit down and review each case individually. Some examples are get_XXYY
became get_pixel_grid
and invertXY
became invert_x_and_y
. Some probably more annoying ones will be pixelscale
to pixel_scale
. @LouisDesdoigts I will probably make a pull request for the Wavefront
branch into the GaussianWavefront
branch either today or tomorrow and we can go over these details then.
Regards
Jordan
from dlux.
Hi all,
While I was updating the GitHub issue I thought I would comment on the current state of this. I have set-up the mkdocs.yml
with the following structure:
nav:
- Home:
- User Documentation:
- Optical System:
- Layers:
- Create Wavefront:
- ect.
- Developer Documentation:
- Propagators:
- Propagator:
- Variable Sampling:
- Variable Sampling Propagator:
- ect.
- Fixed Sampling:
- Fixed Sampling Propagator:
- ect.
- Wavefronts:
- Wavefront:
- Physical Wavefront:
- Angular Wavefront:
- Gaussian Wavefront:
These will be available from the GitHub pages by the end of the day and are pending the pull request of the Propagators
branch.
Regards
Jordan
from dlux.
So this did not make it through the pull request because of the following error:
ERROR - Error building page
'developer_documentation/propagators/propagator.md': Could not
resolve equinox
Traceback (most recent call last):
File "/home/jordan/anaconda3/envs/jax/lib/python3.10/site-packages/mkdocs_autorefs/plugin.py", line 78, in _get_item_url
return self._url_map[identifier]
KeyError: 'src.wavefronts.eqx.Module'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/jordan/anaconda3/envs/jax/lib/python3.10/site-packages/griffe/dataclasses.py", line 945, in resolve_target
resolved = self.modules_collection[self.target_path]
File "/home/jordan/anaconda3/envs/jax/lib/python3.10/site-packages/griffe/mixins.py", line 26, in __getitem__
return self.members[parts[0]] # type: ignore[attr-defined]
KeyError: 'equinox'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/jordan/anaconda3/envs/jax/bin/mkdocs", line 8, in <module>
sys.exit(cli())
File "/home/jordan/anaconda3/envs/jax/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
return self.main(*args, **kwargs)
File "/home/jordan/anaconda3/envs/jax/lib/python3.10/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/home/jordan/anaconda3/envs/jax/lib/python3.10/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/jordan/anaconda3/envs/jax/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/jordan/anaconda3/envs/jax/lib/python3.10/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/home/jordan/anaconda3/envs/jax/lib/python3.10/site-packages/mkdocs/__main__.py", line 192, in build_command
build.build(config.load_config(**kwargs), dirty=not clean)
File "/home/jordan/anaconda3/envs/jax/lib/python3.10/site-packages/mkdocs/commands/build.py", line 314, in build
_build_page(file.page, config, doc_files, nav, env, dirty)
File "/home/jordan/anaconda3/envs/jax/lib/python3.10/site-packages/mkdocs/commands/build.py", line 220, in _build_page
output = config['plugins'].run_event(
File "/home/jordan/anaconda3/envs/jax/lib/python3.10/site-packages/mkdocs/plugins.py", line 102, in run_event
result = method(item, **kwargs)
File "/home/jordan/anaconda3/envs/jax/lib/python3.10/site-packages/mkdocs_autorefs/plugin.py", line 205, in on_post_page
fixed_output, unmapped = fix_refs(output, url_mapper)
File "/home/jordan/anaconda3/envs/jax/lib/python3.10/site-packages/mkdocs_autorefs/references.py", line 191, in fix_refs
html = AUTO_REF_RE.sub(fix_ref(url_mapper, unmapped), html)
File "/home/jordan/anaconda3/envs/jax/lib/python3.10/site-packages/mkdocs_autorefs/references.py", line 157, in inner
url = url_mapper(unescape(identifier))
File "/home/jordan/anaconda3/envs/jax/lib/python3.10/site-packages/mkdocs_autorefs/plugin.py", line 107, in get_item_url
url = self._get_item_url(identifier, fallback)
File "/home/jordan/anaconda3/envs/jax/lib/python3.10/site-packages/mkdocs_autorefs/plugin.py", line 83, in _get_item_url
new_identifiers = fallback(identifier)
File "/home/jordan/anaconda3/envs/jax/lib/python3.10/site-packages/mkdocstrings/handlers/base.py", line 508, in get_anchors
anchors = handler.get_anchors(handler.collect(identifier, fallback_config))
File "/home/jordan/anaconda3/envs/jax/lib/python3.10/site-packages/mkdocstrings_handlers/python/handler.py", line 200, in collect
doc_object = self._modules_collection[identifier]
File "/home/jordan/anaconda3/envs/jax/lib/python3.10/site-packages/griffe/mixins.py", line 27, in __getitem__
return self.members[parts[0]][parts[1:]] # type: ignore[attr-defined]
File "/home/jordan/anaconda3/envs/jax/lib/python3.10/site-packages/griffe/mixins.py", line 27, in __getitem__
return self.members[parts[0]][parts[1:]] # type: ignore[attr-defined]
File "/home/jordan/anaconda3/envs/jax/lib/python3.10/site-packages/griffe/mixins.py", line 27, in __getitem__
return self.members[parts[0]][parts[1:]] # type: ignore[attr-defined]
File "/home/jordan/anaconda3/envs/jax/lib/python3.10/site-packages/griffe/dataclasses.py", line 821, in __getitem__
return self.target[key]
File "/home/jordan/anaconda3/envs/jax/lib/python3.10/site-packages/griffe/dataclasses.py", line 921, in target
self.resolve_target()
File "/home/jordan/anaconda3/envs/jax/lib/python3.10/site-packages/griffe/dataclasses.py", line 947, in resolve_target
raise AliasResolutionError(self.target_path) from error
griffe.exceptions.AliasResolutionError: Could not resolve equinox
which as all mkdocs
errors seem to be is very cryptic.
Any help appreciated,
Jordan
from dlux.
So I managed to fix this using the typing
module.
from dlux.
The docs pages now deploy and are more or less fully populated with low-level tutorial notebooks, so I consider this to be complete
from dlux.
Related Issues (20)
- Add sub headings in API docs HOT 1
- Position in binary is not flux weighted HOT 2
- `UniformSpider` API missing HOT 1
- Improve FP-precision by setting wavefront amplitude as opposed to scaling output PSFs?
- Update `ApplyJitter` class HOT 1
- pyproject.toml fixes HOT 1
- oversample in MFT? HOT 1
- change banner
- Add `CoronagraphicLayer` and `InterpolatedLayer`
- logo does not display on main README.md
- Add intrapixel sensitivity map downsampling HOT 1
- Add Convolution detector layer
- Missing `new_pixel_scale` return value in `utils.propagation.FFT` docstring
- ConcretizationTypeError in nd_coords HOT 5
- Inconsistency between parameter raising from `LayeredOpticalSystem` and `LayeredDetector`
- PointSource enforces flux as float HOT 1
- Remove all calls to `.normalise` when calculating things.
- HST-like Aperture Incorrect Size in Docs
- Add FoV method to child-classes of `ParametricOpticalSystem`
- `dlu.nandiv` fails on float inputs
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dlux.