Skip to content

Commit bfbf487

Browse files
authored
Merge pull request #12 from cindytsai/Frontend
Frontend
2 parents 0b78da1 + 60876e2 commit bfbf487

26 files changed

+6380
-115
lines changed

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ root = true
44

55
[*]
66
indent_style = space
7-
indent_size = 4
7+
indent_size = 2
88
trim_trailing_whitespace = true
99
insert_final_newline = true
1010
charset = utf-8

.github/ISSUE_TEMPLATE.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
* jupyter_libyt version:
2-
* libyt version:
3-
* Python version:
4-
* Operating System:
1+
- jupyter_libyt version:
2+
- libyt version:
3+
- Python version:
4+
- Operating System:
55

66
### Summary
77

@@ -23,5 +23,3 @@ If there was a crash, please include the traceback here.
2323
```
2424

2525
#### Expected Outcome
26-
27-

.github/workflows/publish-to-pypi.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ jobs:
1212

1313
run_tests:
1414
name: Run Tests
15-
uses: ./.github/workflows/build-test.yml
15+
uses: ./.github/workflows/run-tests.yml
1616

17-
build_source:
17+
build_pkg:
1818
name: Build Sources
1919
runs-on: ubuntu-latest
2020
needs:
@@ -29,18 +29,18 @@ jobs:
2929
run: |
3030
python -m pip install --upgrade pip
3131
python -m pip install build
32-
- name: Build source tarball
33-
run: python -m build --sdist --outdir dist
34-
- name: Upload source tarball
32+
- name: Build source tarball and wheel
33+
run: python -m build
34+
- name: Upload source tarball and wheel
3535
uses: actions/upload-artifact@v4
3636
with:
37-
path: ./dist/*.tar.gz
37+
path: ./dist/jupyter_libyt*
3838

3939
publish_to_pypi:
4040
name: Publish to PyPI
4141
if: startsWith(github.event.ref, 'refs/tags/v')
4242
needs:
43-
- build_source
43+
- build_pkg
4444
runs-on: ubuntu-latest
4545
steps:
4646
- name: Download source tarball and builds
File renamed without changes.

.github/workflows/style-check.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,20 @@ jobs:
6666
python -m pip install tox
6767
- name: Run flake8
6868
run: tox -e lint
69+
70+
jlpm_lint:
71+
name: jlpm stylelint, prettier, eslint
72+
runs-on: ubuntu-latest
73+
steps:
74+
- uses: actions/checkout@v3
75+
- uses: actions/[email protected]
76+
with:
77+
python-version: "3.10"
78+
cache: 'pip'
79+
- name: Install dependencies
80+
run: python -m pip install -U "jupyterlab>=4.0.0,<5"
81+
- name: Run jlpm style and lint
82+
run: |
83+
jlpm
84+
jlpm run lint:check
85+

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,3 +108,8 @@ ENV/
108108
report.html
109109

110110
*.ipynb
111+
112+
# JupyterLab extension development
113+
node_modules/
114+
.yarn/
115+
jupyter_libyt/labextension/

.prettierignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
node_modules
2+
**/node_modules
3+
**/lib
4+
**/package.json
5+
!/package.json
6+
jupyter_libyt

.yarnrc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
nodeLinker: node-modules

AUTHORS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
## Contributors
22

3-
* Shin-Rong Tsai <[email protected]>
3+
- Shin-Rong Tsai <[email protected]>

CONTRIBUTING.md

Lines changed: 35 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
11
# Contributing
22

33
## Report Bugs and Submit Feedback
4+
45
Report bugs at https://github.com/yt-project/jupyter_libyt/issues.
56

67
If you are reporting a bug, please include:
78

8-
* Your operating system name and version.
9-
* Any details about your local setup that might be helpful in troubleshooting.
10-
* Detailed steps to reproduce the bug.
9+
- Your operating system name and version.
10+
- Any details about your local setup that might be helpful in troubleshooting.
11+
- Detailed steps to reproduce the bug.
1112

1213
If you are proposing a feature:
1314

14-
* Explain in detail how it would work.
15-
* Keep the scope as narrow as possible, to make it easier to implement.
16-
* Remember that this is a volunteer-driven project, and that contributions
15+
- Explain in detail how it would work.
16+
- Keep the scope as narrow as possible, to make it easier to implement.
17+
- Remember that this is a volunteer-driven project, and that contributions
1718
are welcome :)
1819

1920
## Setting Up Development Environment
@@ -22,67 +23,80 @@ If you are proposing a feature:
2223

2324
1. Fork the `jupyter_libyt` repo on GitHub.
2425
2. Clone your fork locally:
25-
```bash
26-
git clone https://github.com/<your-github-account>/jupyter_libyt.git
27-
```
26+
27+
```bash
28+
git clone https://github.com/<your-github-account>/jupyter_libyt.git
29+
```
30+
2831
3. Create a branch for local development:
29-
```bash
30-
git checkout -b name-of-your-bugfix-or-feature
31-
```
32+
33+
```bash
34+
git checkout -b name-of-your-bugfix-or-feature
35+
```
3236

3337
### Using `tox` to Test, Do Code-Formatting, and Linting
3438

3539
We use [`tox`](https://tox.wiki/en/4.11.3/installation.html) to run:
36-
- Python unit test ([`pytest`](https://docs.pytest.org/en/7.4.x/))
37-
- Converting old string to f-string ([`flynt`](https://github.com/ikamensh/flynt#flynt---string-formatting-converter))
38-
- Code formatting ([`black`](https://black.readthedocs.io/en/stable/))
39-
- Sort import order ([`isort`](https://pycqa.github.io/isort/index.html))
40-
- Linting ([`flake8`](https://flake8.pycqa.org/en/latest/))
40+
41+
- Python unit test ([`pytest`](https://docs.pytest.org/en/7.4.x/))
42+
- Converting old string to f-string ([`flynt`](https://github.com/ikamensh/flynt#flynt---string-formatting-converter))
43+
- Code formatting ([`black`](https://black.readthedocs.io/en/stable/))
44+
- Sort import order ([`isort`](https://pycqa.github.io/isort/index.html))
45+
- Linting ([`flake8`](https://flake8.pycqa.org/en/latest/))
4146

4247
#### Python Unit test
48+
4349
```bash
4450
tox
4551
```
4652

4753
#### Converting Old String to F-String
54+
4855
```bash
4956
tox -e fstring
5057
```
5158

5259
#### Code Formatting
60+
5361
```bash
5462
tox -e format
5563
```
5664

5765
#### Sort Import Order
66+
5867
```bash
5968
tox -e sort_import
6069
```
6170

6271
#### Linting
72+
6373
```bash
6474
tox -e lint
6575
```
6676

6777
### Pre-Commit
6878

6979
We use [pre-commit](https://pre-commit.com/#install) to check code format and style before committing:
70-
- Converting old string to f-string ([`flynt`](https://github.com/ikamensh/flynt#flynt---string-formatting-converter))
71-
- Code formatting ([`black`](https://black.readthedocs.io/en/stable/))
72-
- Sort import order ([`isort`](https://pycqa.github.io/isort/index.html))
73-
- Linting ([`flake8`](https://flake8.pycqa.org/en/latest/))
80+
81+
- Converting old string to f-string ([`flynt`](https://github.com/ikamensh/flynt#flynt---string-formatting-converter))
82+
- Code formatting ([`black`](https://black.readthedocs.io/en/stable/))
83+
- Sort import order ([`isort`](https://pycqa.github.io/isort/index.html))
84+
- Linting ([`flake8`](https://flake8.pycqa.org/en/latest/))
7485

7586
Set up pre-commit for the first time:
87+
7688
```bash
7789
pre-commit install
7890
```
7991

8092
Check every file:
93+
8194
```bash
8295
pre-commit run --all-files
8396
```
8497

8598
Commit your changes and push your branch to GitHub, pre-commit will apply to staged files before committing:
99+
86100
```bash
87101
git add .
88102
git commit -m "Your detailed description of your changes."

0 commit comments

Comments
 (0)