Skip to content

Commit 8f97d58

Browse files
Provide more guidance (#302)
Include Windows specific instructions and instructions for bulk testing on an existing TIMES model. --------- Co-authored-by: Siddharth Krishna <[email protected]>
1 parent be9a145 commit 8f97d58

File tree

1 file changed

+33
-5
lines changed

1 file changed

+33
-5
lines changed

README.md

Lines changed: 33 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ After installation, run the following command to see the basic usage and availab
2727
xl2times --help
2828
```
2929

30+
If the tool is installed on Windows, the above commands should be prefixed by `python -m`.
31+
3032
## Documentation
3133

3234
The tool's documentation is at http://xl2times.readthedocs.io/ and the source is in the [`docs/`](https://github.com/etsap-TIMES/xl2times/blob/main/docs) directory.
@@ -43,6 +45,24 @@ cd docs
4345
make html
4446
```
4547

48+
## Testing on an existing model
49+
50+
If you have an existing TIMES model in Excel (e.g. developed using Veda) and would like to use the tool with it, we recommend to conduct bulk testing first. Bulk testing will allow understanding how much of the syntax used in the model is supported by the tool.
51+
52+
Start by generating `*.dd` files based on `AllScenario` scenario group (i.e. in Veda).
53+
54+
Afterwards, execute the following command from the root of the tool (assumes `My_Bulk_Test` case name) to extract all the data from the `*.dd` files:
55+
```bash
56+
python xl2times/dd_to_csv.py "C:\VEDA\GAMS_WrkTIMES\My_Bulk_Test" ground_truth
57+
```
58+
59+
Finally, execute the tool on the model (e.g. `My_TIMES-Model`) and compare the results to the previously extracted data (assumes activated virtual environment):
60+
```bash
61+
xl2times "C:\VEDA\VEDA_Models\My_TIMES-Model" --ground_truth_dir=ground_truth
62+
```
63+
64+
The tool will summarise any differences between the data it generates and the extracted data.
65+
4666
## Development
4767

4868
### Setup
@@ -55,6 +75,14 @@ pip install -U pip
5575
pip install -e .[dev]
5676
```
5777

78+
On Windows:
79+
```bash
80+
python -m venv .venv
81+
".venv/Scripts/python" -m pip install -U pip
82+
".venv/Scripts/activate"
83+
pip install -e .[dev]
84+
```
85+
5886
We use the [black](https://pypi.org/project/black/) code formatter. The `pip` command above will install it along with other requirements.
5987

6088
We also use the [pyright](https://github.com/microsoft/pyright/) type checker -- our GitHub Actions check will fail if pyright detects any type errors in your code. You can install pyright in your virtual environment and check your code by running these commands in the root of the repository:
@@ -75,7 +103,7 @@ git commit --no-verify
75103

76104
We use the TIMES DemoS models and some public TIMES models as benchmarks.
77105
See our GitHub Actions CI `.github/workflows/ci.yml` and the utility script `utils/run_benchmarks.py` to see how to we benchmark the tool and check PRs automatically for regression.
78-
If you are a developer, you can use the below instructions to set up and run the benchmarks locally:
106+
If you are a developer, you can use the below instructions to set up and run the benchmarks locally on Linux/WSL:
79107

80108
```bash
81109
./setup-benchmarks.sh
@@ -126,10 +154,10 @@ VS Code will highlight the changes in the two files, which should correspond to
126154
### Publishing the Tool
127155

128156
Follow these steps to release a new version of `xl2times` and publish it on PyPI:
129-
- [ ] Bump the version number in `pyproject.toml` and `xl2times/__init__.py` (use [Semantic Versioning](https://semver.org/))
130-
- [ ] Open a PR with this change titled "Release vX.Y.Z"
131-
- [ ] When the PR is merged, create a [new release](https://github.com/etsap-TIMES/xl2times/releases/new) titled "vX.Y.Z". Select "Create a new tag: on publish" and click "Generate release notes" to generate the notes automatically.
132-
- [ ] Click "Publish release" to publish the release on GitHub. A GitHub Actions workflow will automatically upload the distribution to PyPI.
157+
- Bump the version number in `pyproject.toml` and `xl2times/__init__.py` (use [Semantic Versioning](https://semver.org/))
158+
- Open a PR with this change titled "Release vX.Y.Z"
159+
- When the PR is merged, create a [new release](https://github.com/etsap-TIMES/xl2times/releases/new) titled "vX.Y.Z". Select "Create a new tag: on publish" and click "Generate release notes" to generate the notes automatically.
160+
- Click "Publish release" to publish the release on GitHub. A GitHub Actions workflow will automatically upload the distribution to PyPI.
133161

134162
## Contributing
135163

0 commit comments

Comments
 (0)