Skip to content

Commit 4fe8bd1

Browse files
Merge pull request #211 from daisybio/development
v.1.3.1
2 parents fdd45e6 + 05999b1 commit 4fe8bd1

File tree

10 files changed

+291
-289
lines changed

10 files changed

+291
-289
lines changed

create_report.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,13 @@
1919
parser = argparse.ArgumentParser(description="Generate reports from evaluation results")
2020
parser.add_argument("--run_id", required=True, help="Run ID for the current execution")
2121
parser.add_argument("--dataset", required=True, help="Dataset name for which to render the result file")
22-
parser.add_argument("--path_data", required=True, help="Path to the data")
22+
parser.add_argument("--path_data", required=False, help="Path to the data, default is ./data")
2323
parser.add_argument("--result_path", required=False, help="Path to the results, default is ./results")
2424
args = parser.parse_args()
2525
run_id = args.run_id
2626
dataset = args.dataset
27-
path_data = pathlib.Path(args.path_data).resolve()
27+
path_to_data = args.path_data if args.path_data is not None else "data"
28+
path_data = pathlib.Path(path_to_data).resolve()
2829
result_path = args.result_path if args.result_path is not None else "results"
2930
result_path = pathlib.Path(result_path).resolve()
3031
# assert that the run_id folder exists

docs/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@
5656
# the built documents.
5757
#
5858
# The short X.Y version.
59-
version = "1.3.0"
59+
version = "1.3.1"
6060
# The full version, including alpha/beta/rc tags.
61-
release = "1.3.0"
61+
release = "1.3.1"
6262

6363
# The language for content autogenerated by Sphinx. Refer to documentation
6464
# for a list of supported languages.

docs/contributing.rst

Lines changed: 29 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -31,84 +31,63 @@ Request features on the `Issue Tracker`_.
3131
How to set up your development environment
3232
------------------------------------------
3333

34-
You need Python 3.10+ and Poetry_ to set up your development environment.
34+
1. Fork the repository on GitHub.
35+
2. Make a new conda environment with Python 3.11 or 3.12.
36+
3. ``pip install poetry`` : we use poetry to manage dependencies
37+
4. ``poetry install`` : this will install all dependencies
38+
5. Test whether the installation was successful by running the following command:
3539

36-
.. _Poetry: https://python-poetry.org/
40+
.. code:: console
3741
42+
$ python run_suite.py --run_id my_first_run --models NaiveDrugMeanPredictor ElasticNet --dataset TOYv1 --test_mode LCO
3843
39-
How to test the project
40-
-----------------------
44+
6. Visualize the results by running the following command:
4145

42-
For this, you need to install nox and nox-poetry:
46+
.. code:: console
4347
44-
.. code:: console
48+
$ python create_report.py --run_id my_first_run --dataset TOYv1
4549
46-
$ pip install nox nox-poetry
50+
How to test the project
51+
-----------------------
4752

48-
Run the full test suite:
53+
Unit tests are located in the ``tests`` directory,
54+
and are written using the pytest_ testing framework.
4955

50-
.. code:: console
56+
.. _pytest: https://pytest.readthedocs.io/
5157

52-
$ nox
58+
How to submit changes
59+
---------------------
5360

54-
List the available Nox sessions:
61+
Open a `pull request`_ to submit changes to this project against the ``development`` branch.
5562

56-
.. code:: console
63+
Your pull request needs to meet the following guidelines for acceptance:
5764

58-
$ nox --list-sessions
65+
- The code must pass all tests.
66+
- Include unit tests. This project maintains a high code coverage.
67+
- If your changes add functionality, update the documentation accordingly.
5968

60-
You can also run a specific Nox session.
61-
For example, invoke the unit test suite like this:
69+
To run linting and code formatting checks before committing your change, you can install pre-commit as a
70+
Git hook by running the following command:
6271

6372
.. code:: console
6473
65-
$ nox --session=tests
74+
$ nox --session=pre-commit -- install
6675
67-
Unit tests are located in the ``tests`` directory,
68-
and are written using the pytest_ testing framework.
76+
It is recommended to open an issue before starting work on anything.
6977

70-
.. _pytest: https://pytest.readthedocs.io/
78+
.. _pull request: https://github.com/daisybio/drevalpy/pulls
7179

7280
How to build and view the documentation
7381
---------------------------------------
7482

7583
This project uses Sphinx_ together with several extensions to build the documentation.
76-
77-
To install all required dependencies for the documentation run:
78-
79-
.. code:: console
80-
81-
$ pip install -r docs/requirements.txt
82-
83-
Please note that drevalpy itself must also be installed. To build the documentation run:
84+
To build the documentation, change into the docs/ directory and run:
8485

8586
.. code:: console
8687
8788
$ make html
8889
89-
from inside the docs folder. The generated static HTML files can be found in the `_build/html` folder.
90+
The generated static HTML files can be found in the `_build/html` folder.
9091
Simply open them with your favorite browser.
9192

9293
.. _sphinx: https://www.sphinx-doc.org/en/master/
93-
94-
How to submit changes
95-
---------------------
96-
97-
Open a `pull request`_ to submit changes to this project against the ``development`` branch.
98-
99-
Your pull request needs to meet the following guidelines for acceptance:
100-
101-
- The Nox test suite must pass without errors and warnings.
102-
- Include unit tests. This project maintains a high code coverage.
103-
- If your changes add functionality, update the documentation accordingly.
104-
105-
To run linting and code formatting checks before committing your change, you can install pre-commit as a Git hook by running the following command:
106-
107-
.. code:: console
108-
109-
$ nox --session=pre-commit -- install
110-
111-
It is recommended to open an issue before starting work on anything.
112-
This will allow a chance to talk it over with the owners and validate your approach.
113-
114-
.. _pull request: https://github.com/daisybio/drevalpy/pulls

0 commit comments

Comments
 (0)