Skip to content

Commit 26e7a54

Browse files
@pyscript/core deprecation (#1607)
1 parent f0e69cb commit 26e7a54

File tree

142 files changed

+13
-52811
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

142 files changed

+13
-52811
lines changed

.github/workflows/test-next.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,17 +44,18 @@ jobs:
4444
${{ runner.os }}-build-
4545
${{ runner.os }}-
4646
47-
- name: install next deps
48-
working-directory: pyscript.core
49-
run: npm i; npx playwright install
47+
# TODO: this will likely change soon to pyscript.next
48+
# - name: install next deps
49+
# working-directory: pyscript.core
50+
# run: npm i; npx playwright install
5051

51-
- name: build next
52-
working-directory: pyscript.core
53-
run: npm run build
52+
# - name: build next
53+
# working-directory: pyscript.core
54+
# run: npm run build
5455

55-
- name: Run next tests
56-
working-directory: pyscript.core
57-
run: npm run test
56+
# - name: Run next tests
57+
# working-directory: pyscript.core
58+
# run: npm run test
5859

5960
# TODO: DO we want to upload next yet?
6061
# - uses: actions/upload-artifact@v3

.gitignore

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -141,12 +141,3 @@ coverage/
141141

142142
# junit xml for test results
143143
test_results
144-
145-
# pyscript.core
146-
pyscript.core/coverage/
147-
pyscript.core/node_modules/
148-
pyscript.core/cjs/
149-
!pyscript.core/cjs/package.json
150-
pyscript.core/min.js
151-
pyscript.core/esm/worker/xworker.js
152-
pyscript.core/types/

.prettierignore

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,3 @@ ISSUE_TEMPLATE
33
package-lock.json
44
docs
55
examples/panel.html
6-
pyscript.core/micropython/
7-
pyscript.core/pyscript/
8-
pyscript.core/types/
9-
pyscript.core/esm/worker/xworker.js
10-
pyscript.core/cjs/package.json
11-
pyscript.core/min.js
12-
pyscript.core/pyscript.js

pyscript.core/.eslintrc.json

Lines changed: 0 additions & 13 deletions
This file was deleted.

pyscript.core/.github/workflows/node.js.yml

Lines changed: 0 additions & 30 deletions
This file was deleted.

pyscript.core/.gitignore

Lines changed: 0 additions & 10 deletions
This file was deleted.

pyscript.core/.npmignore

Lines changed: 0 additions & 21 deletions
This file was deleted.

pyscript.core/.npmrc

Lines changed: 0 additions & 1 deletion
This file was deleted.

pyscript.core/README.md

Lines changed: 3 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -1,92 +1,5 @@
1-
# @pyscript/core
1+
# @pyscript/core - deprecated
22

3-
[![build](https://github.com/WebReflection/python/actions/workflows/node.js.yml/badge.svg)](https://github.com/WebReflection/python/actions/workflows/node.js.yml) [![Coverage Status](https://coveralls.io/repos/github/WebReflection/python/badge.svg?branch=api&t=1RBdLX)](https://coveralls.io/github/WebReflection/python?branch=api)
3+
After various discussions around this topic, we decided to avoid any confusion around this folder which never really belonged in here, as _core_ as we meant it was meant to be a _PyScript Next_ dependency, not the _PyScript Next_ itself.
44

5-
---
6-
7-
## Documentation
8-
9-
Please read [the documentation page](./docs/README.md) to know all the user-facing details around this module.
10-
11-
## Development
12-
13-
The working folder (source code of truth) is the `./esm` one, while the `./cjs` is populated as a dual module and to test (but it's 1:1 code, no transpilation except for imports/exports).
14-
15-
```sh
16-
# install all dependencies needed by core
17-
npm i
18-
```
19-
20-
### Build / Artifacts
21-
22-
This project requires some automatic artifact creation to:
23-
24-
* create a _Worker_ as a _Blob_ based on the same code used by this repo
25-
* create automatically the list of runtimes available via the module
26-
* create the `core.js` or the `pyscript.js` file used by most integration tests
27-
* create a sha256 version of the Blob content for CSP cases
28-
29-
Accordingly, to build latest project:
30-
31-
```sh
32-
# create all artifacts needed to test core
33-
npm run build
34-
35-
# optionally spin a server with CORS, COOP, and COEP enabled
36-
npm run server
37-
```
38-
39-
If **no minification** is desired or helpful while debugging potential issues, please use `NO_MIN=1` in front of the _build_ step:
40-
41-
```sh
42-
NO_MIN=1 npm run build
43-
44-
npm run server
45-
```
46-
47-
### Dev Build
48-
49-
Besides spinning the _localhost_ server via `npm run server`, the `npm run dev` will watch changes in the `./esm` folder and it will build automatically non optimized artifacts out of the box.
50-
51-
## Integration Tests
52-
53-
To keep it simple, and due to technical differences between what was in PyScript before and what we actually need for core (special headers, multiple interpreters, different bootstrap logic), core integration tests can be performed simply by running:
54-
55-
```sh
56-
npm run test:integration
57-
```
58-
59-
The package's entry takes care of eventually bootstrapping localhost, starting in parallel all tests, and shutting down the server after, if any was bootstrapped.
60-
61-
The tool to test integration is still _playwright_ but moves things a bit faster (from my side) tests are written in JS.
62-
63-
#### Integration Tests Structure
64-
65-
```
66-
integration
67-
├ interpreter
68-
│ ├ micropython
69-
│ ├ pyodide
70-
│ ├ ruby-wasm-wasi
71-
│ ├ wasmoon
72-
│ ├ xxx.yy
73-
│ ├ xxx.toml
74-
│ └ utils.js
75-
├ _shared.js
76-
├ micropython.js
77-
├ pyodide.js
78-
├ ruby-wasm-wasi.js
79-
└ wasmoon.js
80-
```
81-
82-
- **interpreter** this folder contains, per each interpreter, a dedicated folder with the interpreter's name. Each of these sub-folders will contain all `.html` and other files to test every specific behavior. In this folder, it's possible to share files, config, or anything else that makes sense for one or more interpreters.
83-
- **\_shared.js** contains some utility used across all tests. Any file prefixed with `_` (underscore) will be ignored for tests purposes but it can be used by the code itself.
84-
- **micropython.js** and all others contain the actual test per each interpreter. If a test is the same across multiple interpreters it can be exported via the `_shared.js` file as it is for most _Pyodide_ and _MicroPython_ cases.
85-
86-
The [test/integration.spec.js](./test/integration.spec.js) file simply loops over folders that match interpreters _by name_ and execute in parallel all tests.
87-
88-
#### Manual Test
89-
90-
To **test manually** an integration test, simply `npm run server` and reach the _html_ file created for that particular test.
91-
92-
As example, reaching http://localhost:8080/test/integration/interpreter/micropython/fetch.html would log in the console and show expectations on the page and this can be easily tested via multiple browsers by simply reaching the very same integration test.
5+
We have hence moved and renamed _core_ as [polyscript](https://github.com/pyscript/polyscript/#readme) which is the base module to build up a better _PyScript Next_ without confusing our users or ourselves while talking about these two distinct projects.

pyscript.core/cjs/package.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)