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

Galran/new emitters module #79

Merged
merged 2 commits into from
Apr 5, 2021
Merged

Galran/new emitters module #79

merged 2 commits into from
Apr 5, 2021

Conversation

galran
Copy link
Collaborator

@galran galran commented Apr 4, 2021

This PR will add the new Emitters module to the package.
I’m reluctant to remove the old emitters implementation as they are used in multiple examples and copy snips and maybe scripts outside the package.
I would suggest adding the new module and over time removing the old implementation.
Currently, I’ve labeled the documentation page as “Emitters (NEW)” – I know it’s ugly but I don’t want to turn it into a huge package-wide change now.

Ran Gal added 2 commits April 3, 2021 00:11
… and CompositeSource data types and added a docmentation page for the new emitters.

also added the using of the OpticSim.Emitters to the documentation script.
@codecov-io
Copy link

codecov-io commented Apr 4, 2021

Codecov Report

Merging #79 (cdb57cc) into main (4141f69) will decrease coverage by 2.67%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #79      +/-   ##
==========================================
- Coverage   51.69%   49.01%   -2.68%     
==========================================
  Files          54       55       +1     
  Lines        6092     6425     +333     
==========================================
  Hits         3149     3149              
- Misses       2943     3276     +333     
Impacted Files Coverage Δ
src/OpticSim.jl 83.33% <ø> (ø)
src/Optical/Emitters.jl 0.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4141f69...cdb57cc. Read the comment docs.

@BrianGun
Copy link
Contributor

BrianGun commented Apr 4, 2021

@galran let's bite the bullet and blow away the old emitter code and make the change to the new emitter code. It will be more difficult to do it later when people have started to use the old emitter api and have to rewrite code.

@galran
Copy link
Collaborator Author

galran commented Apr 4, 2021

@BrianGun Do you want to clean the old emitters code as part of this PR or in two steps. accept this one and do a "clean PR" separately?

@BrianGun
Copy link
Contributor

BrianGun commented Apr 5, 2021

Let's do the merge in two steps. First add the new emitters but leave the old emitter code and examples, etc., then in a separate PR make all the examples and scripts compatible with the new emitter model.

Copy link
Contributor

@BrianGun BrianGun left a comment

Choose a reason for hiding this comment

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

@galran This module is named Emitters and the file is named Emitters.jl. Won't this replace the existing Emitters module and possibly cause issues with old code that uses the old interface? I thought we were going to do the update in two steps, first add the new Emitters.jl and then update the old code to match. Won't overwriting Emitters.jl automatically cause all the old code to break?

Also it might be a good idea to break Emitters.jl into multiple files. There's a lot of code in that one file. Or did you intend to do this in the second phase when all the old Emitter code is switched over to the new emitter code?

@galran
Copy link
Collaborator Author

galran commented Apr 5, 2021

@BrianGun I don't think the file name is part of the Julia namespace in any way - i might be wrong.
The old emitters interface is inside Emitter.jl which I will remove soon. I'm not sure i understand the potential problem you are referring to.

I can break the file into separate files and include them, but I think the content is separated using regions which make is esier to navigate. maybe i will break them into Emitters_Power.jl, Emitters_Origins.jl...

@BrianGun BrianGun merged commit 18fdf89 into main Apr 5, 2021
@BrianGun BrianGun deleted the galran/new_emitters_module branch April 5, 2021 18:31
@alfredclwong alfredclwong mentioned this pull request Apr 7, 2021
13 tasks
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.

3 participants