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

Updates for 3.6 #213

Merged
merged 17 commits into from
May 18, 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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ jobs:
- name: Install node
uses: actions/setup-node@v2.2.0
with:
node-version: '14.x'
node-version: '18.x'
- name: Install Python
uses: actions/setup-python@v2.2.2
with:
python-version: '3.8'
python-version: '3.10'
architecture: 'x64'


Expand All @@ -45,7 +45,7 @@ jobs:
yarn-

- name: Install dependencies
run: python -m pip install -U jupyter_packaging~=0.10.4 jupyterlab~=3.0.16 pip wheel
run: python -m pip install -U jupyter_packaging~=0.12.3 jupyterlab~=3.6.3 pip wheel
- name: Install the extension
run: |
set -eux
Expand Down
50 changes: 49 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ For more advanced usage documentation, see [here](docs/advanced.md).

## Requirements

- JupyterLab >= 3.0
- JupyterLab >= 3.6
- older versions are supported in previous releases available on PyPI and npm, check [releases](https://github.com/jupyterlab/jupyterlab-latex/releases)
- Python >= 3.6
- An application that can compile `.tex` files to PDF (e.g., `pdflatex`, `xelatex`; use `pdflatex.exe` on Windows with MiKTeX). This application must be available as a command in the same environment as the notebook server.
Expand Down Expand Up @@ -112,6 +112,54 @@ For example, to force your LaTeX distribution to run any command, use:
c.LatexConfig.shell_escape = "allow"
```

## Contributing

If you would like to contribute to the project, please read our [contributor documentation](https://github.com/jupyterlab/jupyterlab/blob/master/CONTRIBUTING.md).

JupyterLab follows the official [Jupyter Code of Conduct](https://github.com/jupyter/governance/blob/master/conduct/code_of_conduct.md).

### Development install

Note: You will need NodeJS to build the extension package.

The `jlpm` command is JupyterLab's pinned version of
[yarn](https://yarnpkg.com/) that is installed with JupyterLab. You may use
`yarn` or `npm` in lieu of `jlpm` below.

To simplify the development setup, you can use the following Conda environment:

```
conda create -n jupyterlab-latex-env -c conda-forge python=3.10 jupyterlab=3.6.3 jupyter_packaging=0.12.3 nodejs=18
conda activate jupyterlab-latex-env
```

```bash
# Clone the repo to your local environment
git clone https://github.com/jupyterlab/jupyterlab-latex.git
# Change directory to the jupyterlab-latex directory
cd jupyterlab-latex
# Install package in development mode
pip install -e .

# Link your development version of the extension with JupyterLab
jupyter labextension develop . --overwrite
# Server extension must be manually installed in develop mode
jupyter server extension enable jupyterlab_latex
# Rebuild extension Typescript source after making changes
jlpm run build
```

You can watch the source directory and run JupyterLab at the same time in different terminals to watch for changes in the extension's source and automatically rebuild the extension.

```bash
# Watch the source directory in one terminal, automatically rebuilding when needed
jlpm run watch
# Run JupyterLab in another terminal
jupyter lab
```

With the watch command running, every saved change will immediately be built locally and available in your running JupyterLab. Refresh JupyterLab to load the change in your browser (you may need to wait several seconds for the extension to be rebuilt).

## Changes

For information on the changes with different versions of the `jupyterlab-latex` library, see our [changelog](./docs/changelog.md)
36 changes: 0 additions & 36 deletions docs/advanced.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,39 +26,3 @@ in the JupyterLab advanced settings editor.
The extension defaults to running `synctex` for establishing the mapping.
You can configure this command by setting `c.LatexConfig.synctex_command`
in your `jupyter_notebook_config.py` file.

## Installing from source

You can install from source in order to develop the extension.

From the `jupyterlab-latex` directory, enter the following into your terminal:

```bash
pip install -e .
```

Link your development version of the extension with JupyterLab

```bash
jupyter labextension develop . --overwrite{% if cookiecutter.has_server_extension.lower().startswith('y') %}
```

Server extension must be manually installed in develop mode

```bash
jupyter server extension enable {{ cookiecutter.python_name }}{% endif %}
```

Rebuild extension Typescript source after making changes

```bash
jlpm run build
```

You can build a Python wheel for testing the distribution

```bash
python setup.py sdist bdist_wheel
```

The wheel and the source archive will be created in `dist/` directory.
26 changes: 16 additions & 10 deletions docs/changelog.md
Original file line number Diff line number Diff line change
@@ -1,44 +1,50 @@
# Changelog for `jupyterlab_latex`

- **3.1.0**:
- **3.2.0**:

- Minimum supported JupyterLab is 3.6.0
- Bump JS and Python dependencies
- Fix build issues

* **3.1.0**:

- Switch to prebuilt (federated) extension model
- Fix bug with icons visibility in the dark theme

- **3.0.0**:
* **3.0.0**:

- Update to JupyterLab 3.0
- Add LaTeX file menu
- Add download PDF button

- **v2.0.0**:
* **v2.0.0**:

- Update to JupyterLab 2.0

- **v1.0.0**:
* **v1.0.0**:

- Update to JupyterLab 1.0

- **0.6.1**:
* **0.6.1**:

- Added a new page component allowing the user to navigate PDFs by page label.

- **0.6.0**:
* **0.6.0**:

- Fixed a bug where the PDF would try to open if the initial build failed.

- **0.4.1**:
* **0.4.1**:

- Allow SyncTeX to work on windows by using absolute file paths.

- **0.4.0**:
* **0.4.0**:

- Allow SyncTeX to work on windows by using absolute file paths.

- **0.3.1**:
* **0.3.1**:

- Bugfix for SyncTeX on Windows.

- **0.3.0**:
* **0.3.0**:
- New synctex functionality; server endpoints & front-end UI
- New navigation UI for `PDFJSViewer`: zoom in/out, next/prev page, fit-to-pagewidth
1 change: 0 additions & 1 deletion jupyterlab_latex/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"__version__",
"_jupyter_labextension_paths",
"_jupyter_server_extension_paths",
"_jupyter_server_extension_points",
"_load_jupyter_server_extension",
"load_jupyter_server_extension",
]
Expand Down
36 changes: 18 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@jupyterlab/latex",
"version": "3.1.0",
"version": "3.2.0",
"description": "JupyterLab extension for running LaTeX",
"keywords": [
"jupyter",
Expand Down Expand Up @@ -56,20 +56,20 @@
]
},
"dependencies": {
"@jupyterlab/application": "^3.0.0",
"@jupyterlab/apputils": "^3.0.0",
"@jupyterlab/codeeditor": "^3.0.0",
"@jupyterlab/application": "^3.6.0",
"@jupyterlab/apputils": "^3.6.0",
"@jupyterlab/codeeditor": "^3.6.0",
"@jupyterlab/coreutils": "^5.0.0",
"@jupyterlab/docmanager": "^3.0.0",
"@jupyterlab/docregistry": "^3.0.0",
"@jupyterlab/filebrowser": "^3.0.0",
"@jupyterlab/fileeditor": "^3.0.0",
"@jupyterlab/launcher": "^3.0.0",
"@jupyterlab/mainmenu": "^3.0.0",
"@jupyterlab/docmanager": "^3.6.0",
"@jupyterlab/docregistry": "^3.6.0",
"@jupyterlab/filebrowser": "^3.6.0",
"@jupyterlab/fileeditor": "^3.6.0",
"@jupyterlab/launcher": "^3.6.0",
"@jupyterlab/mainmenu": "^3.6.0",
"@jupyterlab/services": "^6.0.0",
"@jupyterlab/settingregistry": "^3.0.0",
"@jupyterlab/statedb": "^3.0.0",
"@jupyterlab/ui-components": "^3.0.0",
"@jupyterlab/settingregistry": "^3.6.0",
"@jupyterlab/statedb": "^3.6.0",
"@jupyterlab/ui-components": "^3.6.0",
"@lumino/coreutils": "^1.5.3",
"@lumino/disposable": "^1.4.3",
"@lumino/domutils": "^1.2.3",
Expand All @@ -80,11 +80,11 @@
"react-dom": "^17.0.1"
},
"devDependencies": {
"@jupyterlab/builder": "^3.0.0-rc.13",
"@jupyterlab/builder": "^3.6.3",
"@types/react": "^16.9.16",
"@types/react-dom": "^16.9.4",
"@typescript-eslint/eslint-plugin": "^2.27.0",
"@typescript-eslint/parser": "^2.27.0",
"@typescript-eslint/eslint-plugin": "^4.13.0",
"@typescript-eslint/parser": "^4.13.0",
"eslint": "^7.5.0",
"eslint-config-prettier": "^6.10.1",
"eslint-plugin-prettier": "^3.1.2",
Expand All @@ -97,10 +97,10 @@
"tslint": "^5.18.0",
"tslint-config-prettier": "^1.18.0",
"tslint-plugin-prettier": "^2.0.1",
"typescript": "~4.1.3"
"typescript": "~5.0.4"
},
"resolutions": {
"@types/react": "~16.4.13"
"@types/react": "~18.2.6"
},
"jupyterlab": {
"extension": "lib/index.js",
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[build-system]
requires = [
"jupyter_packaging~=0.10,<2",
"jupyterlab~=3.0"
"jupyter_packaging~=0.12,<2",
"jupyterlab~=3.6"
]
build-backend = "jupyter_packaging.build_api"

Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[metadata]
license_file = LICENSE
license_files = LICENSE
Copy link
Member

Choose a reason for hiding this comment

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

this is the only change that's giving me pause. I've fallen of the train of the situations under which this doesn't work as intended (old setup tools?) but it would be a straightforward change to back it out if it causes troubles.

4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@
'Framework :: Jupyter',
],
install_requires=[
'jupyterlab>=3,<4',
'jupyter_server>=1.6,<2'
'jupyterlab>=3.6,<4',
'jupyter_server>=2'
],
cmdclass=wrap_installers(post_develop=post_develop, ensured_targets=ensured_targets)
)
Expand Down