-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Move release note generation to a sub module #3299
Changes from 62 commits
0cb1ee4
7b9e493
f74d1c5
99eb34a
c87d6fb
c5dfb84
758f0bc
8fa281e
8ae1360
19de9cd
ff85b71
72b3acb
3c7e8f0
82c1642
54baaf9
40c12af
1e2473b
5578047
deadfb5
fcebe5c
0b400e9
b323412
104de86
1dff8b5
78d22e1
d4d01b1
8293867
6a12b86
c58eb24
80f8a29
cec724c
8c1e5b2
2afcd90
b6273fe
bfb69d7
6834fbc
7042b87
06ebe0b
f576c1a
de6b870
3c03477
3b132ce
b9c5374
d35b9aa
123b406
04f4101
54d5116
26436a7
5a5465f
8458e3b
4d321dc
8f3865e
49f6cf3
aceba84
4b98eec
71bd361
ec17d84
180803a
e458552
66e3812
af986fb
91f7096
1c9a9a7
394733f
3cbe316
f7559dc
93ffa8a
939d8b1
2925d89
d8d1e8e
208f51f
a4beff9
80623c0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -27,7 +27,7 @@ jobs: | |||||
git checkout -b "${head_ref}" fork/${head_ref} | ||||||
changed_directories="$(git diff --name-only "fork/${head_ref}" "origin/${base_ref}")" | ||||||
fi | ||||||
if [[ ${changed_directories} =~ "library_generation/" ]]; then | ||||||
if [[ ${changed_directories} =~ "hermetic_build/" ]]; then | ||||||
echo "should_run=true" >> $GITHUB_OUTPUT | ||||||
else | ||||||
echo "should_run=false" >> $GITHUB_OUTPUT | ||||||
|
@@ -46,32 +46,19 @@ jobs: | |||||
- uses: actions/checkout@v4 | ||||||
- uses: actions/setup-python@v5 | ||||||
with: | ||||||
python-version: 3.11 | ||||||
- name: install pyenv | ||||||
shell: bash | ||||||
run: | | ||||||
set -ex | ||||||
curl https://pyenv.run | bash | ||||||
# setup environment | ||||||
export PYENV_ROOT="$HOME/.pyenv" | ||||||
export PATH="$PYENV_ROOT/bin:$PATH" | ||||||
echo "PYENV_ROOT=${PYENV_ROOT}" >> $GITHUB_ENV | ||||||
echo "PATH=${PATH}" >> $GITHUB_ENV | ||||||
|
||||||
set +ex | ||||||
python-version: 3.12 | ||||||
- name: install python dependencies | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. |
||||||
shell: bash | ||||||
run: | | ||||||
set -ex | ||||||
pushd library_generation | ||||||
pip install -r requirements.txt | ||||||
pip install . | ||||||
popd | ||||||
pip install --upgrade pip | ||||||
pip install hermetic_build/common | ||||||
pip install hermetic_build/library_generation | ||||||
- name: Run integration tests | ||||||
shell: bash | ||||||
run: | | ||||||
set -x | ||||||
python -m unittest library_generation/test/integration_tests.py | ||||||
python -m unittest hermetic_build/library_generation/tests/integration_tests.py | ||||||
library-generation-unit-tests: | ||||||
runs-on: ubuntu-22.04 | ||||||
needs: should-run-library-generation-tests | ||||||
|
@@ -80,23 +67,23 @@ jobs: | |||||
- uses: actions/checkout@v4 | ||||||
- uses: actions/setup-python@v5 | ||||||
with: | ||||||
python-version: 3.11 | ||||||
python-version: 3.12 | ||||||
- name: install python dependencies | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. |
||||||
shell: bash | ||||||
run: | | ||||||
set -ex | ||||||
pushd library_generation | ||||||
pip install -r requirements.txt | ||||||
pip install . | ||||||
popd | ||||||
pip install --upgrade pip | ||||||
pip install hermetic_build/common | ||||||
pip install hermetic_build/library_generation | ||||||
pip install hermetic_build/release_note_generation | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How about we keep the dependencies together. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Created |
||||||
- name: Run shell unit tests | ||||||
run: | | ||||||
set -x | ||||||
library_generation/test/generate_library_unit_tests.sh | ||||||
hermetic_build/library_generation/tests/generate_library_unit_tests.sh | ||||||
- name: Run python unit tests | ||||||
run: | | ||||||
set -x | ||||||
python -m unittest discover -s library_generation/test/ -p "*unit_tests.py" | ||||||
python -m unittest discover -s hermetic_build -p "*unit_tests.py" | ||||||
library-generation-lint-shell: | ||||||
runs-on: ubuntu-22.04 | ||||||
needs: should-run-library-generation-tests | ||||||
|
@@ -106,7 +93,7 @@ jobs: | |||||
- name: Run ShellCheck | ||||||
uses: ludeeus/action-shellcheck@2.0.0 | ||||||
with: | ||||||
scandir: 'library_generation' | ||||||
scandir: 'hermetic_build' | ||||||
format: tty | ||||||
severity: error | ||||||
library-generation-lint-python: | ||||||
|
@@ -115,16 +102,20 @@ jobs: | |||||
if: needs.should-run-library-generation-tests.outputs.should_run == 'true' | ||||||
steps: | ||||||
- uses: actions/checkout@v4 | ||||||
- uses: actions/setup-python@v5 | ||||||
with: | ||||||
python-version: 3.12 | ||||||
- name: install python dependencies | ||||||
shell: bash | ||||||
run: | | ||||||
set -ex | ||||||
pushd library_generation | ||||||
pip install -r requirements.txt | ||||||
popd | ||||||
pip install --upgrade pip | ||||||
pip install hermetic_build/common | ||||||
pip install hermetic_build/library_generation | ||||||
pip install hermetic_build/release_note_generation | ||||||
- name: Lint | ||||||
shell: bash | ||||||
run: | | ||||||
# exclude generated golden files | ||||||
# exclude owlbot until further refaction | ||||||
black --check library_generation --exclude "(library_generation/test/resources/goldens)" | ||||||
black --check hermetic_build --exclude "(library_generation/tests/resources/goldens)" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
""" | ||
Package information of library_generation python scripts | ||
""" | ||
|
||
from setuptools import setup | ||
|
||
setup( | ||
name="common", | ||
version="0.1", | ||
python_requires=">=3.12", | ||
package_dir={ | ||
"common": ".", | ||
}, | ||
install_requires=[ | ||
"black==24.8.0", | ||
"parameterized==0.9.0", | ||
"PyYAML==6.0.2", | ||
], | ||
) |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -22,8 +22,7 @@ It requires docker and python 3.x to be installed. | |||||
|
||||||
``` | ||||||
python -m pip install . | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The development guide shows commands to be run from the With this, then we could correct this to
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. |
||||||
python -m pip install -r requirements.txt | ||||||
python -m unittest test/integration_tests.py | ||||||
python -m unittest tests/integration_tests.py | ||||||
``` | ||||||
|
||||||
# Running the unit tests | ||||||
|
@@ -34,7 +33,7 @@ Every unit test script ends with `unit_tests.py`. | |||||
To avoid them specifying them individually, we can use the following command: | ||||||
|
||||||
```bash | ||||||
python -m unittest discover -s test/ -p "*unit_tests.py" | ||||||
python -m unittest discover -s tests/ -p "*unit_tests.py" | ||||||
``` | ||||||
|
||||||
> [!NOTE] | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need to install
library_generation
anymore once we moveConfigChange
out of this module?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. We need to install
library_generation
because config change is still part of it. Once it moves tocommon
, we don't need to install it.