Skip to content
This repository has been archived by the owner on Oct 23, 2022. It is now read-only.

Build steps #27

Merged
merged 12 commits into from
Mar 19, 2021
Merged

Build steps #27

merged 12 commits into from
Mar 19, 2021

Conversation

alfredclwong
Copy link
Collaborator

@alfredclwong alfredclwong commented Mar 19, 2021

Resolves #7, resolves #25, resolves #13

I haven't had time to properly self-review any of this, but feel free to check it out and add comments/commits in the meantime. I'll try to get back online later today so we can talk about publishing v0.1.0 once this is pushed to main.

Here is my description of the new functionality, copied verbatim from the new glasscat.md.

Julia module for importing and using AGF glass specifications.

The entire AGF glass catalog is specified in AGFGlassCat.jl. This Julia source file is generated automatically when ] build OpticSim is called. The build script downloads AGF files to deps/downloads/glasscat/ and then uses these to generate corresponding Julia source files at src/GlassCat/data/. These steps are run automatically on setup when the package is first installed using ] add OpticSim, creating a sufficient working environment for our example/test code.

Adding new AGF sources is done by editing deps/sources.txt. Minimally, you must provide a name (e.g. SCHOTT) and sha256sum for the AGF file, which can then be placed manually into deps/downloads/glasscat/[NAME].agf. Instead of manually sourcing the AGF file, you can also provide a download link for the build script. deps/sources.txt already contains examples of all possible use cases. After updating the file, execute ] build OpticSim to rebuild AGFGlassCat.jl.

Source names will be used as module names, so follow the standard convections: alphanumeric, no leading numbers, begin with an uppercase letter. Furthermore, optical systems in the examples file expect glass catalogs to have specific names. The default setup includes HOYA, NIKON, OHARA, SCHOTT and SUMITA; changing these names could break some examples.

Glass types are accessed like so: OpticSim.GlassCat.CATALOG_NAME.GLASS_NAME, e.g.

OpticSim.GlassCat.Sumita.LAK7
OpticSim.GlassCat.SCHOTT.PK3

All glasses and catalogs are exported in their respective modules, so it is possible to invoke using calls for convenience, e.g.

using OpticSim
GlassCat.Sumita.LAK7
using OpticSim.GlassCat
SCHOTT.PK3
using OpticsSim.GlassCat.SCHOTT
N_BK7

@alfredclwong alfredclwong requested a review from BrianGun March 19, 2021 16:42
@BrianGun
Copy link
Contributor

@alfredclwong

checks are failing.

@alfredclwong
Copy link
Collaborator Author

@BrianGun if/when you approve this I'll make a new PR changing the version number to 0.1.0, from which I can trigger the Registrator bot. Hopefully then the registration can happen automatically over the weekend.

I figure starting out clean again will avoid any conflicts with the bot, which doesn't like skipped versions. Pre-alpha (0.x.y) versions don't matter that much anyway.

Any objections?

@BrianGun BrianGun merged commit d492ca0 into main Mar 19, 2021
@BrianGun BrianGun deleted the build-steps branch March 19, 2021 20:57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sumita glass download link Documentation for installation doesn't match code Build steps
2 participants