Skip to content

Commit 9dad29e

Browse files
Refactor repository. Fixes pyscript#2161 (pyscript#2192)
* Remove duplicate LICENSE. * Remove un-userd pyscript.sw directory and its content. * Remove ReadTheDocs settings (unused). * Remove un-used pyproject.toml * Remove now unused CHANGELOG. Changes now tracked via release notes on GitHub. * Updated / cleaned release page template and associated GH actions. * Update prettierignore to remove un-needed refs. * Move troubleshooting into correct README. * Add reason for the index.html * Rename the "pyscript.core" directory to "core". * Update PR template because CHANGELOG is no longer used. * Codespell configuration in pyproject.toml. * Update pyscript.core -> core in .githubignore * Remove test-results/.last-run.json. This should be ignored by git. * Pin nodejs version. --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent abb1eb2 commit 9dad29e

230 files changed

Lines changed: 242 additions & 1679 deletions

File tree

Some content is hidden

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

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,4 @@
1111
<!-- 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. -->
1212

1313
- [ ] All tests pass locally
14-
- [ ] I have updated `CHANGELOG.md`
15-
- [ ] I have created documentation for this(if applicable)
14+
- [ ] I have created / updated documentation for this (if applicable)

.github/workflows/prepare-release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77

88
defaults:
99
run:
10-
working-directory: ./pyscript.core
10+
working-directory: ./core
1111

1212
jobs:
1313
prepare-release:
@@ -57,7 +57,7 @@ jobs:
5757

5858
- name: Generate index.html
5959
working-directory: .
60-
run: sed 's#_PATH_#./#' ./public/index.html > ./pyscript.core/dist/index.html
60+
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
6161

6262
- name: Zip dist folder
6363
run: zip -r -q ./build.zip ./dist

.github/workflows/publish-release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66

77
defaults:
88
run:
9-
working-directory: ./pyscript.core
9+
working-directory: ./core
1010

1111
jobs:
1212
publish-release:
@@ -59,7 +59,7 @@ jobs:
5959

6060
- name: Generate index.html in snapshot
6161
working-directory: .
62-
run: sed 's#_PATH_#https://pyscript.net/releases/${{ github.ref_name }}/#' ./public/index.html > ./pyscript.core/dist/index.html
62+
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
6363

6464
- name: Generate release.tar from snapshot and put it in dist/
6565
working-directory: .

.github/workflows/publish-snapshot.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010

1111
defaults:
1212
run:
13-
working-directory: ./pyscript.core
13+
working-directory: ./core
1414

1515
jobs:
1616
publish-snapshot:
@@ -69,7 +69,7 @@ jobs:
6969

7070
- name: Generate index.html in snapshot
7171
working-directory: .
72-
run: sed 's#_PATH_#https://pyscript.net/snapshots/${{ inputs.snapshot_version }}/#' ./public/index.html > ./pyscript.core/dist/index.html
72+
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
7373

7474
- name: Copy to Snapshot
7575
run: >

.github/workflows/publish-unstable.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
name: "Publish Unstable"
22

33
on:
4-
push: # Only run on merges into main that modify files under pyscript.core/ and examples/
4+
push: # Only run on merges into main that modify files under core/ and examples/
55
branches:
66
- main
77
paths:
8-
- pyscript.core/**
8+
- core/**
99
- examples/**
1010

1111
workflow_dispatch:
@@ -18,7 +18,7 @@ jobs:
1818
contents: read
1919
defaults:
2020
run:
21-
working-directory: ./pyscript.core
21+
working-directory: ./core
2222
steps:
2323
- name: Checkout
2424
uses: actions/checkout@v4
@@ -64,7 +64,7 @@ jobs:
6464

6565
- name: Generate index.html in snapshot
6666
working-directory: .
67-
run: sed 's#_PATH_#https://pyscript.net/unstable/#' ./public/index.html > ./pyscript.core/dist/index.html
67+
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
6868

6969
- name: Configure AWS credentials
7070
uses: aws-actions/configure-aws-credentials@v4

.github/workflows/test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ on:
55
branches:
66
- main
77
paths:
8-
- pyscript.core/**
8+
- core/**
99
- .github/workflows/test.yml
1010

1111
pull_request: # Only run on merges into main that modify certain files
1212
branches:
1313
- main
1414
paths:
15-
- pyscript.core/**
15+
- core/**
1616
- .github/workflows/test.yml
1717
workflow_dispatch:
1818

@@ -75,6 +75,6 @@ jobs:
7575
with:
7676
name: pyscript
7777
path: |
78-
pyscript.core/dist/
78+
core/dist/
7979
if-no-files-found: error
8080
retention-days: 7

.gitignore

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -142,11 +142,11 @@ coverage/
142142
test_results
143143

144144
# @pyscript/core npm artifacts
145-
pyscript.core/test-results/*
146-
pyscript.core/core.*
147-
pyscript.core/dist
148-
pyscript.core/dist.zip
149-
pyscript.core/src/plugins.js
150-
pyscript.core/src/stdlib/pyscript.js
151-
pyscript.core/src/3rd-party/*
152-
!pyscript.core/src/3rd-party/READMEmd
145+
core/test-results/*
146+
core/core.*
147+
core/dist
148+
core/dist.zip
149+
core/src/plugins.js
150+
core/src/stdlib/pyscript.js
151+
core/src/3rd-party/*
152+
!core/src/3rd-party/READMEmd

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ repos:
2121
- id: check-yaml
2222
- id: detect-private-key
2323
- id: end-of-file-fixer
24-
exclude: pyscript\.core/dist|\.min\.js$
24+
exclude: core/dist|\.min\.js$
2525
- id: trailing-whitespace
2626

2727
- repo: https://github.com/psf/black
2828
rev: 24.8.0
2929
hooks:
3030
- id: black
31-
exclude: pyscript\.core/src/stdlib/pyscript/__init__\.py
31+
exclude: core/src/stdlib/pyscript/__init__\.py
3232

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

4848
- repo: https://github.com/pycqa/isort

.prettierignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
ISSUE_TEMPLATE
22
*.min.*
33
package-lock.json
4-
docs
5-
examples/panel.html

.readthedocs.yml

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

0 commit comments

Comments
 (0)