Skip to content

Commit af986fb

Browse files
committed
change doc
1 parent 66e3812 commit af986fb

File tree

2 files changed

+13
-20
lines changed

2 files changed

+13
-20
lines changed

hermetic_build/library_generation/DEVELOPMENT.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ It requires docker and python 3.x to be installed.
2222

2323
```
2424
python -m pip install .
25-
python -m pip install -r requirements.txt
26-
python -m unittest test/integration_tests.py
25+
python -m unittest tests/integration_tests.py
2726
```
2827

2928
# Running the unit tests
@@ -34,7 +33,7 @@ Every unit test script ends with `unit_tests.py`.
3433
To avoid them specifying them individually, we can use the following command:
3534

3635
```bash
37-
python -m unittest discover -s test/ -p "*unit_tests.py"
36+
python -m unittest discover -s tests/ -p "*unit_tests.py"
3837
```
3938

4039
> [!NOTE]

hermetic_build/library_generation/README.md

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ configuration file.
88

99
- OS: Linux
1010
- Java runtime environment (8 or above)
11-
- Python (3.11.6 or above)
11+
- Python (3.12 or above)
1212
- Docker
1313
- Git
1414

@@ -190,27 +190,23 @@ libraries:
190190
1. Assuming Python 3 is installed, follow official guide from [Python.org](https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments/#create-and-use-virtual-environments) to create a virtual environment.
191191
The virtual environment can be installed to any folder, usually it is recommended to be installed under the root folder of the project(`sdk-platform-java` in this case).
192192
2. Assuming the virtual environment is installed under `sdk-platform-java`.
193-
Run the following command under the root folder of `sdk-platform-java` to install the dependencies of `library_generation`
193+
Run the following command under the root folder of `sdk-platform-java` to install `library_generation` and its dependencies.
194194

195195
```bash
196-
python -m pip install --require-hashes -r library_generation/requirements.txt
196+
python -m pip install hermetic_build/common
197+
python -m pip install hermetic_build/library_generation
197198
```
198199

199-
3. Run the following command to install `library_generation` as a module, which allows the `library_generation` module to be imported from anywhere
200-
```bash
201-
python -m pip install library_generation/
202-
```
203-
204-
4. Download api definition to a local directory
200+
3. Download api definition to a local directory
205201

206202
## An example to generate a repository using `entry_point.py`
207203

208204
```bash
209-
python library_generation/entry_point.py generate \
210-
--baseline-generation-config-path=/path/to/baseline_config_file \
211-
--current-generation-config-path=/path/to/current_config_file \
212-
--repository-path=path/to/repository \
213-
--api-definitions-path=path/to/api_definition
205+
python hermetic_build/library_generation/cli/entry_point.py generate \
206+
--baseline-generation-config-path=/path/to/baseline_config_file \
207+
--current-generation-config-path=/path/to/current_config_file \
208+
--repository-path=path/to/repository \
209+
--api-definitions-path=path/to/api_definition
214210
```
215211
If you run `entry_point.py` with the example [configuration](#an-example-of-generation-configuration)
216212
shown above, the repository structure is:
@@ -290,9 +286,7 @@ $repository_path
290286

291287
We have transferred the
292288
[implementation](https://github.com/googleapis/synthtool/tree/59fe44fde9866a26e7ee4e4450fd79f67f8cf599/docker/owlbot/java)
293-
of Java Owlbot Postprocessor into `sdk-platform-java/library_generation`. The
294-
implementation in synthtool is still valid and used by other services, so we
295-
have two versions during a transition period.
289+
of Java Owlbot Postprocessor into `sdk-platform-java/hermetic_build/library_generation`.
296290

297291
## Reflecting changes in synthtool/docker/owlbot/java into this repository
298292
The transfer was not a verbatim copy, it rather had modifications:

0 commit comments

Comments
 (0)