On Tuesday, June 13, 2023 at 1:40:42 PM UTC-7 Tobias Diez wrote:

But I think it would be better to reuse tools (or at least their ideas) 
that were developed exactly to manage and restrict dependencies between 
different layers/modules of an application, such as 
https://github.com/zyskarch/pytestarch, 
https://github.com/seddonym/import-linter, 
https://github.com/jwbargsten/pytest-archon, https://github.com/TNG/ArchUnit. 
All of them define external rules about admissible relationships. 


Of course there are tools like this. But I decided to go for a more 
explicit approach, reusing a mechanism (# optional) that is already 
familiar to Sage developers. 

For example, the question "why did this doctest not run" is trivial to 
answer with the explicit annotations; whereas when using stacktrace 
inspection tools, all answers will be technical.

And as I explained elsewhere, the # optional annotations also improve the 
documentation for the benefit of the project. 
- Some of the # optional annotations such as "# optional - 
sage.libs.singular" give specific attribution to the various libraries that 
we use for the actual computations. This has the potential of improving our 
project's relation to upstream developers, counteracting the impression 
that Sage tries to take credit for functionality provided by the upstream 
project. (I will not elaborate on this with examples.)
- Some # optional annotations reduce the barrier for contributors, by 
clearly signaling to developers "it's OK and definitely not your fault if 
you don't understand this doctest". 

Finally, the explicit annotations also enable an incremental 
development/documentation process regarding library dependencies -- not 
just within the modularization project but also very useful when preparing 
to replace the use of one library for a feature with another library. The 
interaction of various libraries is sometimes very complex in Sage, and 
developers can add "# optional" annotations while navigating this maze of 
dependencies.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/f3865714-a407-4855-bd82-832c0b4dc424n%40googlegroups.com.

Reply via email to