Open moe-ad opened 2 days ago
I raised my concerns to @jorgepiloto yesterday... I don't think this is a good idea since it will make this Python package to no longer work as a normal, modern Python package, and also dependabot will probably stop working properly...
I know it is time consuming and implies touching a lot of places whenever a new library is added but I wouldn't move from pyproject.toml to setup.py. Most of the affected files are typically in the docs. We could restrict this "new file" approach only to the documentation if you prefer but still, there are many nuances to take into account...
I raised my concerns to @jorgepiloto yesterday... I don't think this is a good idea since it will make this Python package to no longer work as a normal, modern Python package, and also dependabot will probably stop working properly.
Agreed, this is a step backwards with respect to this being a modern Python package.
As a simple quality-of-life improvement, a pre-commit hook which either checks or updates the various places (taking pyproject.toml
as input) might help.
This can be a simple Python script which is executed as a local hook.
Yep I agree! That would be a much easier way to handle it. Or a dedicated script that you just run when you need to add a new library.
Something closer to the original suggestion which I'd also consider workable is:
.yml
links.py
, examples.rst
etc, for example in Jinja2 formatpyproject.toml
the update would be a bit more complicated, as we'd want to keep it as source of truth for the versions (to allow dependabot to work). Could be as simple as a consistency check here.So worst case, you would have to add the library in two places (pyproject.toml
, and the source-of-truth file), and get a CI error if they don't match.
Works too =)
Thank you both for your valuable inputs @greschd and @RobPasMue. We will start exploring doing this in a way similar to your suggestions. Once the final solution becomes available, I will tag you both for additional inputs.
Let's start by creating the YML file:
projects:
pymapdl:
name: ...
repository: ...
thumbnail: ...
...
We'll read this from the conf.py
and use Jinja to short the content of the RST files.
A number of files (e.g. pyproject.toml, links.py, examples.rst to name a few) have to be edited manually each time there is a new addition/subtraction to/from the pyansys metapackage. This issue will address removing this manual process by: