ansys / pyseascape

Pythonic interface to Ansys RedHawk-SC, Totem-SC and other seascape tools
https://seascape.docs.pyansys.com
MIT License
3 stars 0 forks source link

General improvements to project layout #41

Closed RobPasMue closed 1 year ago

RobPasMue commented 1 year ago

๐Ÿ“ Description of the feature

Hi all!

I just realized that PySeascape has its requirements defined as requirements_*.txt files in the repository. In the PyAnsys ecosystem we are moving towards having them integrated inside the pyproject.toml file such that the install process goes from:

pip install -r requirements_tests.txt
pip install .

to

pip install .[tests]

This is done by defining an optional target with the specific requirements needed. It will also allow to simplify the number of configuration files at the root level of the repository

Furthermore, we have also been working on setting up some common PyAnsys actions so that other projects can take advantage of the same implementations - and thus improve the maintainability of our actions!

Another topic to be considered is the multi-versioning of the docs. At the PyAnsys core team we have been working on setting up docs that allow for multiversioning. However this will require that the docs are published in a gh-pages branch.

Finally, I also realized that you have both a setup.py file and a pyproject.toml file. The latter one is becoming the standard in the Python community and the usage of setup.py is deprecated for newer Python versions.

Let me propose a PR with these changes! I know that there are many changes, but they will definitely improve the quality of the project and align it to other PyAnsys libraries =)

๐Ÿ’ก Steps for implementing the feature

๐Ÿ”— Useful links and references

No response

RobPasMue commented 1 year ago

Oh, I also realized that there was a Makefile for running code maintainability targets. These operations are performed using pre-commit in other PyAnsys libraries. In fact, there was already a .pre-commit-config.yml file available in your repository. This means that you will not have to run:

make doctest
make codespell
make flake8

To test the quality of the source code. You can run all of those targets (including black) directly using pre-commit:

pip install pre-commit
pre-commit run --all-files

In fact! You can even install pre-commit in your local repository and it will always run before performing a commit (i.e. hence its name, "pre-commit"):

pip install pre-commit
pre-commit install

Adding it to the bucket list =)