Skip to content
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
3 changes: 1 addition & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,4 @@
<!-- Note: Only user-facing changes require a changelog entry. Internal-only API changes do not require a changelog entry. Changes in documentation do not require a changelog entry. -->

- [ ] All tests pass locally
- [ ] I have updated `CHANGELOG.md`
- [ ] I have created documentation for this(if applicable)
- [ ] I have created / updated documentation for this (if applicable)
4 changes: 2 additions & 2 deletions .github/workflows/prepare-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

defaults:
run:
working-directory: ./pyscript.core
working-directory: ./core

jobs:
prepare-release:
Expand Down Expand Up @@ -57,7 +57,7 @@ jobs:

- name: Generate index.html
working-directory: .
run: sed 's#_PATH_#./#' ./public/index.html > ./pyscript.core/dist/index.html
run: sed -e 's#_PATH_#./#' -e 's#_VERSION_#latest#' -e 's#_DOC_VERSION_#latest#' -e 's#_TAG_VERSION_##' ./public/index.html > ./core/dist/index.html

- name: Zip dist folder
run: zip -r -q ./build.zip ./dist
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:

defaults:
run:
working-directory: ./pyscript.core
working-directory: ./core

jobs:
publish-release:
Expand Down Expand Up @@ -59,7 +59,7 @@ jobs:

- name: Generate index.html in snapshot
working-directory: .
run: sed 's#_PATH_#https://pyscript.net/releases/${{ github.ref_name }}/#' ./public/index.html > ./pyscript.core/dist/index.html
run: sed -e 's#_PATH_#https://pyscript.net/releases/${{ github.ref_name }}/#' -e 's#_VERSION_#${{ github.ref_name }}#' -e 's#_DOC_VERSION_#${{ github.ref_name }}#' -e 's#_TAG_VERSION_#/tag/${{ github.ref_name }}#' ./public/index.html > ./core/dist/index.html

- name: Generate release.tar from snapshot and put it in dist/
working-directory: .
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:

defaults:
run:
working-directory: ./pyscript.core
working-directory: ./core

jobs:
publish-snapshot:
Expand Down Expand Up @@ -69,7 +69,7 @@ jobs:

- name: Generate index.html in snapshot
working-directory: .
run: sed 's#_PATH_#https://pyscript.net/snapshots/${{ inputs.snapshot_version }}/#' ./public/index.html > ./pyscript.core/dist/index.html
run: sed -e 's#_PATH_#https://pyscript.net/snapshots/${{ inputs.snapshot_version }}/#' -e 's#_VERSION_#${{ inputs.snapshot_version }}#' -e 's#_DOC_VERSION_#${{ inputs.snapshot_version }}#' -e 's#_TAG_VERSION_#/tag/${{ inputs.snapshot_version }}#' ./public/index.html > ./core/dist/index.html

- name: Copy to Snapshot
run: >
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/publish-unstable.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: "Publish Unstable"

on:
push: # Only run on merges into main that modify files under pyscript.core/ and examples/
push: # Only run on merges into main that modify files under core/ and examples/
branches:
- main
paths:
- pyscript.core/**
- core/**
- examples/**

workflow_dispatch:
Expand All @@ -18,7 +18,7 @@ jobs:
contents: read
defaults:
run:
working-directory: ./pyscript.core
working-directory: ./core
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -64,7 +64,7 @@ jobs:

- name: Generate index.html in snapshot
working-directory: .
run: sed 's#_PATH_#https://pyscript.net/unstable/#' ./public/index.html > ./pyscript.core/dist/index.html
run: sed -e 's#_PATH_#./#' -e 's#_VERSION_#latest#' -e 's#_DOC_VERSION_#latest#' -e 's#_TAG_VERSION_##' ./public/index.html > ./core/dist/index.html

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ on:
branches:
- main
paths:
- pyscript.core/**
- core/**
- .github/workflows/test.yml

pull_request: # Only run on merges into main that modify certain files
branches:
- main
paths:
- pyscript.core/**
- core/**
- .github/workflows/test.yml
workflow_dispatch:

Expand Down Expand Up @@ -75,6 +75,6 @@ jobs:
with:
name: pyscript
path: |
pyscript.core/dist/
core/dist/
if-no-files-found: error
retention-days: 7
16 changes: 8 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,11 @@ coverage/
test_results

# @pyscript/core npm artifacts
pyscript.core/test-results/*
pyscript.core/core.*
pyscript.core/dist
pyscript.core/dist.zip
pyscript.core/src/plugins.js
pyscript.core/src/stdlib/pyscript.js
pyscript.core/src/3rd-party/*
!pyscript.core/src/3rd-party/READMEmd
core/test-results/*
core/core.*
core/dist
core/dist.zip
core/src/plugins.js
core/src/stdlib/pyscript.js
core/src/3rd-party/*
!core/src/3rd-party/READMEmd
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ repos:
- id: check-yaml
- id: detect-private-key
- id: end-of-file-fixer
exclude: pyscript\.core/dist|\.min\.js$
exclude: core/dist|\.min\.js$
- id: trailing-whitespace

- repo: https://github.com/psf/black
rev: 24.8.0
hooks:
- id: black
exclude: pyscript\.core/src/stdlib/pyscript/__init__\.py
exclude: core/src/stdlib/pyscript/__init__\.py

- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
Expand All @@ -42,7 +42,7 @@ repos:
rev: "v3.0.0-alpha.6"
hooks:
- id: prettier
exclude: pyscript\.core/test|pyscript\.core/dist|pyscript\.core/types|pyscript.core/src/stdlib/pyscript.js|pyscript\.sw/|pyscript.core/src/3rd-party
exclude: core/test|core/dist|core/types|core/src/stdlib/pyscript.js|pyscript\.sw/|core/src/3rd-party
args: [--tab-width, "4"]

- repo: https://github.com/pycqa/isort
Expand Down
2 changes: 0 additions & 2 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
ISSUE_TEMPLATE
*.min.*
package-lock.json
docs
examples/panel.html
28 changes: 0 additions & 28 deletions .readthedocs.yml

This file was deleted.

97 changes: 0 additions & 97 deletions CHANGELOG.md

This file was deleted.

6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ check-python:

# Check the environment, install the dependencies.
setup: check-node check-npm check-python
cd pyscript.core && npm install && cd ..
cd core && npm install && cd ..
ifeq ($(VIRTUAL_ENV),)
echo "\n\n\033[0;31mCannot install Python dependencies. Your virtualenv is not activated.\033[0m"
false
Expand All @@ -55,15 +55,15 @@ clean:

# Build PyScript.
build:
cd pyscript.core && npx playwright install chromium && npm run build
cd core && npx playwright install chromium && npm run build

# Run the precommit checks (run eslint).
precommit-check:
pre-commit run --all-files

# Run all automated tests in playwright.
test:
cd pyscript.core && npm run test:integration
cd core && npm run test:integration

# Format the code.
fmt: fmt-py
Expand Down
19 changes: 0 additions & 19 deletions TROUBLESHOOTING.md

This file was deleted.

18 changes: 14 additions & 4 deletions pyscript.core/README.md → core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ We have moved and renamed previous _core_ module as [polyscript](https://github.

## Documentation

Please read [core documentation](./docs/README.md) to know more about this project.
Please read [core documentation](https://docs.pyscript.net/) to know more about this project.

## Development

Clone this repository then run `npm install` within its folder.
Clone this repository then run `npm install` within this folder.

Use `npm run build` to create all artifacts and _dist_ files.

Expand All @@ -35,9 +35,19 @@ Before running the tests, we need to create a tests environment first. To do so
make setup
```

This will create a tests environment [in the root of the project, named `./env`]and install all the dependencies needed to run the tests.
This will create a tests environment [in the root of the project, named `./env`] and install all the dependencies needed to run the tests.

After the command has completed and the tests environment has been created, you can run the **automated tests** with
A lot of problems related to `make setup` are related to node and npm being outdated. Once npm and node are updated, `make setup` should work. You can follow the steps on the [npm documentation](https://docs.npmjs.com/try-the-latest-stable-version-of-npm) to update npm (the update command for Linux should work for Mac as well). Once npm has been updated you can continue to the instructions to update node below.

To update Node run the following commands in order (most likely you'll be prompted for your user password, this is normal):

```
sudo npm cache clean -f
sudo npm install -g n
sudo n stable
```

After the `make setup` command has completed, you can run the **automated tests** with
the following command:

```
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions pyscript.core/package.json → core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
"jsdelivr": "./jsdelivr.js",
"browser": "./index.js",
"main": "./index.js",
"engines": {
"node": ">=20"
},
"files": [
"./dist/",
"./src/",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions core/src/3rd-party/toml.js

Large diffs are not rendered by default.

Loading