Skip to content
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

changed: script names #284

Merged
merged 1 commit into from
Dec 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,17 @@ jobs:
- name: Format
run: |
source .venv/bin/activate
pdm run format_src
pdm run format-src

- name: Lint
run: |
source .venv/bin/activate
pdm run lint_src
pdm run lint-src

- name: Type
run: |
source .venv/bin/activate
pdm run type_src
pdm run type-src

check_docs:
runs-on: ubuntu-22.04
Expand All @@ -64,12 +64,12 @@ jobs:
- name: Format
run: |
source .venv/bin/activate
pdm run format_docs
pdm run format-docs

- name: Lint
run: |
source .venv/bin/activate
pdm run lint_docs
pdm run lint-docs

check_tools:
runs-on: ubuntu-22.04
Expand All @@ -92,25 +92,25 @@ jobs:
path: node_modules
key: cache_dev_js_ubuntu22_${{ hashFiles('package-lock.json') }}

- name: Install package
- name: Deploy package
run: |
source .venv/bin/activate
pdm run pkg_install
pdm run deploy

- name: Format
run: |
source .venv/bin/activate
pdm run format_tools
pdm run format-tools

- name: Lint
run: |
source .venv/bin/activate
pdm run lint_tools
pdm run lint-tools

- name: Type
run: |
source .venv/bin/activate
pdm run type_tools
pdm run type-tools

test_ubuntu22:
runs-on: ubuntu-22.04
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ jobs:
path: .coverage/html
key: cache_coverage_${{ github.run_id }}

- name: Install package
- name: Deploy package
run: |
source .venv/bin/activate
pdm run pkg_install
pdm run deploy

- name: Get vizzu-lib tag
id: vizzu_tag
Expand All @@ -62,7 +62,7 @@ jobs:
- name: Build documentation
run: |
source .venv/bin/activate
pdm run docs_build
pdm run build-docs

publish_docs:
if: ${{ ((github.event_name == 'release' && github.event.action == 'published') || github.event_name == 'workflow_dispatch') }}
Expand Down Expand Up @@ -116,10 +116,10 @@ jobs:
path: .coverage/html
key: cache_coverage_${{ steps.run_id.outputs.run_id }}

- name: Install package
- name: Deploy package
run: |
source .venv/bin/activate
pdm run pkg_install
pdm run deploy

- name: Get vizzu-lib tag
id: vizzu_tag
Expand Down Expand Up @@ -148,5 +148,5 @@ jobs:
run: |
source .venv/bin/activate
git fetch origin gh-pages || echo "gh-pages does not exist"
pdm run docs_deploy
pdm run deploy-docs
git push origin gh-pages
15 changes: 5 additions & 10 deletions .github/workflows/init.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
python3.10 -m venv ".venv"
source .venv/bin/activate
pip install pdm==2.8.0
pdm run init_py
pdm install

- name: Cache dev-js environment
id: cache_dev_js_ubuntu22
Expand All @@ -42,7 +42,7 @@ jobs:
if: steps.cache_dev_js_ubuntu22.outputs.cache-hit != 'true'
run: |
source .venv/bin/activate
pdm run init_js
npm install

init_pkg:
runs-on: ubuntu-22.04
Expand All @@ -60,20 +60,15 @@ jobs:
path: .venv
key: cache_dev_py_ubuntu22_${{ hashFiles('pdm.lock') }}

- name: Install package
- name: Deploy package
run: |
source .venv/bin/activate
pdm run pkg_install
pdm run deploy

- name: Build package
run: |
source .venv/bin/activate
pdm run pkg_build

- name: Check package
run: |
source .venv/bin/activate
pdm run pkg_check
pdm run build

- name: Cache package
uses: actions/cache@v3
Expand Down
41 changes: 23 additions & 18 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,20 +41,25 @@ source .venv/bin/activate
pip install pdm==2.8.0
```

Once set up, you can utilize the pre-defined `pdm` scripts. For example, you can
initialize the entire development environment using the command `pdm run init`,
or specific parts like `init_src_py`, `init_src`, `init_docs`, or `init_tools`.
Once set up, you can install development dependencies:

```sh
pdm run init
pdm install
```

**Note:** For all available `pdm` scripts, run `pdm run --list`.
For contributing to the documentation you need to install `npm` development
dependencies:

```sh
npm install
```

The development requirements are installed based on the `pdm.lock` and
`package-lock.json` files. To update the development requirements, you can use
the command `pdm run lock`.

**Note:** For all available `pdm` scripts, run `pdm run --list`.

For better development practices, you can set up `pre-commit` and `pre-push`
hooks in your local `Git` repository. The `pre-commit` hook will format the code
automatically, and the `pre-push` hook will run the CI steps before pushing your
Expand All @@ -80,7 +85,7 @@ pdm run ci
```

However, if you want to run the CI steps on specific parts of the project, you
can use the following scripts: `ci_src_py`, `ci_src`, `ci_docs`, or `ci_tools`.
can use the following scripts: `ci-src-py`, `ci-src`, `ci-docs`, or `ci-tools`.

#### Formatting

Expand All @@ -90,15 +95,15 @@ You can check the code's formatting using the `format` script:
pdm run format
```

If you need to fix any formatting issues, you can use the `fix_format` script:
If you need to fix any formatting issues, you can use the `fix-format` script:

```sh
pdm run fix_format
pdm run fix-format
```

If you wish to format specific parts of the project, you can use the following
scripts: `format_src_py`, `format_src`, `format_docs`, `format_tools`, or
`fix_format_src_py`, `fix_format_src`, `fix_format_docs`, `fix_format_tools`.
scripts: `format-src-py`, `format-src`, `format-docs`, `format-tools`, or
`fix-format-src-py`, `fix-format-src`, `fix-format-docs`, `fix-format-tools`.

#### Code analyses

Expand All @@ -109,8 +114,8 @@ pdm run lint
```

If you need to run code analyses for specific parts of the project, you can
utilize the following scripts: `lint_src_py`, `lint_src`, `lint_docs`, or
`lint_tools`.
utilize the following scripts: `lint-src-py`, `lint-src`, `lint-docs`, or
`lint-tools`.

#### Typing

Expand All @@ -121,7 +126,7 @@ pdm run type
```

If you want to check specific parts of the project, you can use the following
scripts: `type_src` or `type_tools`.
scripts: `type-src` or `type-tools`.

#### Testing

Expand All @@ -143,10 +148,10 @@ site.
git clone --depth 1 https://github.com/vizzuhq/vizzu-lib.git
```

To build the documentation, you can use the `docs_build` script:
To build the documentation, you can use the `build-docs` script:

```sh
pdm run docs_build
pdm run build-docs
```

You can read the online version at [ipyvizzu.com](https://ipyvizzu.vizzuhq.com).
Expand All @@ -168,9 +173,9 @@ To release `ipyvizzu`, follow the steps below:
workflow, which builds, checks, and uploads the `ipyvizzu` package to
[pypi](https://pypi.org/project/ipyvizzu).

Before making a release, you can build and check the package using the
`pkg_release` script:
Before making a release, you can build and check the package using the `release`
script:

```sh
pdm run pkg_release
pdm run release
```
Loading