-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cleaning up the custom Makefile #2973
Comments
@matentzn @anitacaron Any thoughts or objections before I start tackling this? |
Its all in version control, follow your instincts on what to delete! I will support it as a principle, and may object to specific things being removed if I see them in a PR.
I did a refactoring at some point, but yes, you can remove if you know for a fact they are redundant. However, i know that the ones called "local-%" are not 100% redundant, but I never had the time to investigate in what way. Generally agreed
Misnowner, these are just tests that should be run on the normal gitub action QC CI. If the all tests that are labelled as
Hard yes. ready for burn down.
I would trust your judgement.
I will trust you and support you on this!
Lots of work to investigate, would have that low in list of priorities, but yes. In summary, all your suggestions are sane and make sense! As for the evalution, I would like to make sure that three files are kept an eye on during major refactorings:
As long as all changes to these three files are under control, I am happy! |
I’m talking about those rules: # This OWLTools call is designed for running in travis; does not clog stdout
ELKRUN= $(OWLTOOLS) $< $(QELK) --run-reasoner -r elk -u > $@.tmp || (tail -1000 $@.tmp && exit -1) && (tail -1000 $@.tmp && mv $@.tmp $@)
travis_test: $(TMPDIR)/is_ok
ttest-uberon: uberon.owl $(REPORTDIR)/bfo-check.txt
$(ELKRUN)
ttest-ext: ext.owl
$(ELKRUN)
ttest-tax: $(TMPDIR)/uberon-edit-plus-tax-equivs.owl
$(ELKRUN) They are not called from anywhere else in the Makefile and they are not explicitly called from the CI workflow. As far as I can tell, it’s dead code.
Filling my flame thrower right now.
Yes, checking which workarounds are still needed and which can be jettisoned could prove to be quite a bit of work, I agree. This would clearly come after easier bits such as removing comments. (Overall I’ve listed the subtasks more or less in the order in which I plan to tackle them.) |
IMO, all this travis stuff can go! |
Related issues that can be fixed as part of the Makefile cleanup: |
The
uberon.Makefile
is currently a big mess.Since burning it down to the ground and starting anew is not an option (not that I wouldn’t want to do it, but more reasonable people on this project would disagree, and that’s probably for the best), we need to improve it incrementally instead.
Purging commented out code
It’s easy to think that code that is commented out is harmless, but I argue that it is not the case. The amount of commented code in the Makefile is one of the things that make it very hard to read. I can understand the reluctance to throw away old code just in case it could be useful again, but we should remember that everything is under version control anyway: we’ll never definitely lose anything.
So I propose to mercilessly erase commented out code in cases like the following examples:
etc.
Purging obsolete comments
In addition to commented out code, there are also plain text comments that are clearly outdated. Again, they are not harmless. One can lose quite a bit of time just trying to figure out whether a given comment is actually saying something useful that one should be aware of, or if it is something that is only of interest for Uberon archeologists.
For example, there’s an entire blocks of comments dedicated on phenoscape and how to merge it with Uberon – but phenoscape as a separate entity is no longer a thing since two years ago!
Same punition as above: we should delete such comments. Again, they will remain in the history of the project for eternity, if really someone needed to consult them one day.
Obsolete mirroring and import rules
There are lots of custom rules to deal with mirrors and imports. I suspect many if not most of them should no longer be necessary especially after the switch to base merging. We should review those rules to check:
Obsolete rules related to Travis
We are no longer using Travis, so there’s no reason to keep Travis-specific rules around. We should whether those rules are still used as part of the GitHub-based CI checks, and if they are not, delete them.
Use of OWLTOOLS when a ROBOT equivalent already exists
There are rules that make use of OWLTOOLS for tasks that ROBOT is completely able to perform. For example:
This is merely equivalent to
Merging rules that no longer need to be kept separate
In the previous example, the
$(TMPDIR)/unreasoned.owl
target is only used once elsewhere in the Makefile, as a dependency to the following rule:If
$(TMPDIR)/unreasoned.owl
is now itself generated by a ROBOT command and is not used anywhere else, then there’s no need for two separate rules and even for two separate commands! It can all be done in a single rule with a single ROBOT pipeline:Reducing the number of times we spawn a new OWLTOOLS or ROBOT process reduces the number of times the ontology needs to be parsed from disk. In the case of Uberon I am willing to bet the gain speed wouldn’t be negligeable.
Potentially obsolete workarounds
There are several instances where we work around problems coming from imported ontologies. Nothing inherently wrong with that (sometimes we don’t have any choice), but we should check whether those workarounds are still needed.
For example:
Pointless targets
Consider the following rule:
First, it is again using OWLTOOLS where ROBOT would do just fine. But most importantly, the only point of that rule is to merge the imports. OK, this may be “used for subsets”, except that… at this point in the pipeline the imports have already been merged! They have been merged since the early steps of the pipeline.
tmp/merged.owl
is actually the same thing asext.owl
(modulo the differences caused by serialisation, e.g. different IDs for blank nodes). This entire step is useless: two invocations of OWLTOOLS/ROBOT, two loads of the same ontology… for nothing.Bottom line
Without re-writing the Makefile scratch, I think that, step-by-step, we can considerably improvide its readibility and therefore its maintainability, all the while making the pipeline faster (by removing needless steps), without introducing any changes in the pipeline’s outputs.
The text was updated successfully, but these errors were encountered: