Skip to content

remove pyscriptjs and synclink #1787

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

Merged
merged 2 commits into from
Oct 4, 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
9 changes: 1 addition & 8 deletions .github/workflows/publish-unstable.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,13 @@
name: "Publish Unstable"

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

pull_request: # Run on any PR that modifies files under pyscriptjs/ and examples/
branches:
- main
paths:
- pyscriptjs/**
- examples/**

workflow_dispatch:

jobs:
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ coverage.xml
*.py,cover
.hypothesis/
.pytest_cache/
pyscriptjs/examples

# Translations
*.mo
Expand Down
12 changes: 0 additions & 12 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,3 @@ repos:
- id: prettier
exclude: pyscript\.core/test|pyscript\.core/dist|pyscript\.core/types|pyscript.core/src/stdlib/pyscript.js|pyscript\.sw/
args: [--tab-width, "4"]

- repo: https://github.com/pre-commit/mirrors-eslint
rev: v8.36.0
hooks:
- id: eslint
files: pyscriptjs/src/.*\.[jt]sx?$ # *.js, *.jsx, *.ts and *.tsx
types: [file]
additional_dependencies:
- eslint@8.25.0
- typescript@5.0.4
- "@typescript-eslint/eslint-plugin@5.58.0"
- "@typescript-eslint/parser@5.58.0"
9 changes: 0 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ tag := latest
git_hash ?= $(shell git log -1 --pretty=format:%h)

base_dir ?= $(shell git rev-parse --show-toplevel)
src_dir ?= $(base_dir)/pyscriptjs/src
examples ?= ../$(base_dir)/examples
app_dir ?= $(shell git rev-parse --show-prefix)

Expand Down Expand Up @@ -101,14 +100,6 @@ test-examples:
mkdir -p test_results
$(PYTEST_EXE) -vv $(ARGS) pyscript.core/tests/integration/ --log-cli-level=warning --junitxml=test_results/integration.xml -k 'zz_examples'

test-py:
@echo "Tests from $(src_dir)"
mkdir -p test_results
$(PYTEST_EXE) -vv $(ARGS) tests/py-unit/ --log-cli-level=warning --junitxml=test_results/py-unit.xml

test-ts:
npm run test

fmt: fmt-py fmt-ts
@echo "Format completed"

Expand Down
3 changes: 1 addition & 2 deletions examples/handtrack/say_hello.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
rel="stylesheet"
href="https://pyscript.net/latest/pyscript.css"
/>
<script defer src="../../pyscriptjs/build/pyscript.js"></script>
<!-- <script defer src="https://pyscript.net/latest/pyscript.js"></script> -->
<script defer src="https://pyscript.net/latest/pyscript.js"></script>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're retiring latest right..? This should be a versioned link..?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, many examples have the same link i.e. https://pyscript.net/latest/pyscript.js

You can checkout the antigravity.html in the examples folder in the current state of the repository here: https://github.com/pyscript/pyscript/blob/main/examples/antigravity.html#L11

I guess we can address everything related to examples in a separate / follow-up PR?

The purpose of this specific change was to at least make things consistent, even if they are wrong and are to be cleaned up eventually...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack. OK. We definitely need to get the examples story straight. For the record (and reflecting the conversation with @antocuni on Slack this morning):

  • Examples will be removed from this repository.
  • They will have their own versioned repository (tracking the PyScript version).
  • The examples will be synced with versions on PyScript.com
  • We're retiring latest and the examples will be pinned to specific versions of PyScript.

Right?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, we should stop using /latest.
Whether we want to actually remove the URL is an open question, but it's probably good to discuss it elsewhere

</head>

<body>
Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ dynamic = ["version"]

[tool.codespell]
ignore-words-list = "afterall"
skip = "pyscriptjs/node_modules/*,*.js,*.json"

[tool.ruff]
builtins = [
Expand Down
5 changes: 2 additions & 3 deletions pyscript.core/tests/integration/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def pytest_configure(config):
--no-fake-server, but because of how pytest works, they are available only
if this is the "root conftest" for the test session.

This means that if you are in the pyscriptjs directory:
This means that if you are in the pyscript.core directory:

$ py.test # does NOT work
$ py.test tests/integration/ # works
Expand All @@ -70,10 +70,9 @@ def pytest_configure(config):
"""
if not hasattr(config.option, "dev"):
msg = """
Running a bare "pytest" command from the pyscriptjs directory
Running a bare "pytest" command from the pyscript.core directory
is not supported. Please use one of the following commands:
- pytest tests/integration
- pytest tests/py-unit
- pytest tests/*
- cd tests/integration; pytest
"""
Expand Down
6 changes: 0 additions & 6 deletions pyscript.core/tests/integration/test_zz_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
reason="SKIPPING EXAMPLES: these should be moved elsewhere and updated"
)
@with_execution_thread(None)
@pytest.mark.usefixtures("chdir")
class TestExamples(PyScriptTest):
"""
Each example requires the same three tests:
Expand All @@ -26,11 +25,6 @@ class TestExamples(PyScriptTest):
- Testing that the page contains appropriate content after rendering
"""

@pytest.fixture()
def chdir(self):
# make sure that the http server serves from the right directory
ROOT.join("pyscriptjs").chdir()

def test_hello_world(self):
self.goto("examples/hello_world.html")
self.wait_for_pyscript()
Expand Down
48 changes: 0 additions & 48 deletions pyscriptjs/.eslintrc.js

This file was deleted.

6 changes: 0 additions & 6 deletions pyscriptjs/.prettierignore

This file was deleted.

9 changes: 0 additions & 9 deletions pyscriptjs/.prettierrc.js

This file was deleted.

137 changes: 0 additions & 137 deletions pyscriptjs/Makefile

This file was deleted.

3 changes: 0 additions & 3 deletions pyscriptjs/README.md

This file was deleted.

14 changes: 0 additions & 14 deletions pyscriptjs/__mocks__/_pyscript.js

This file was deleted.

1 change: 0 additions & 1 deletion pyscriptjs/__mocks__/cssMock.js

This file was deleted.

16 changes: 0 additions & 16 deletions pyscriptjs/__mocks__/fileMock.js

This file was deleted.

Loading