Skip to content

Commit 84c73b5

Browse files
Migrate jupyterlab-git extension to jupyterLab 4.
1 parent dda8e82 commit 84c73b5

File tree

95 files changed

+16659
-15968
lines changed

Some content is hidden

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

95 files changed

+16659
-15968
lines changed

.eslintrc.js

+48-48
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,52 @@
11
module.exports = {
2-
extends: [
3-
'eslint:recommended',
4-
'plugin:@typescript-eslint/eslint-recommended',
5-
'plugin:@typescript-eslint/recommended',
6-
'plugin:prettier/recommended',
7-
'plugin:react/recommended'
8-
],
9-
parser: '@typescript-eslint/parser',
10-
parserOptions: {
11-
project: 'tsconfig.json',
12-
sourceType: 'module'
13-
},
14-
plugins: ['@typescript-eslint'],
15-
rules: {
16-
'@typescript-eslint/explicit-function-return-type': 'off',
17-
"@typescript-eslint/naming-convention": [
18-
"error",
19-
{
20-
"selector": "interface",
21-
"format": ["PascalCase"],
22-
"custom": {
23-
"regex": "^I[A-Z]",
24-
"match": true
25-
}
2+
extends: [
3+
'eslint:recommended',
4+
'plugin:@typescript-eslint/eslint-recommended',
5+
'plugin:@typescript-eslint/recommended',
6+
'plugin:prettier/recommended',
7+
'plugin:react/recommended'
8+
],
9+
parser: '@typescript-eslint/parser',
10+
parserOptions: {
11+
project: 'tsconfig.json',
12+
sourceType: 'module'
13+
},
14+
plugins: ['@typescript-eslint'],
15+
rules: {
16+
'@typescript-eslint/explicit-function-return-type': 'off',
17+
'@typescript-eslint/naming-convention': [
18+
'error',
19+
{
20+
selector: 'interface',
21+
format: ['PascalCase'],
22+
custom: {
23+
regex: '^I[A-Z]',
24+
match: true
2625
}
27-
],
28-
'@typescript-eslint/no-unused-vars': ['warn', { args: 'none' }],
29-
'@typescript-eslint/no-explicit-any': 'off',
30-
'@typescript-eslint/no-namespace': 'off',
31-
'@typescript-eslint/no-this-alias': [
32-
'error',
33-
{
34-
allowedNames: ['self'], // Allow `const self = this`
35-
},
36-
],
37-
'@typescript-eslint/no-use-before-define': 'off',
38-
'@typescript-eslint/quotes': [
39-
'error',
40-
'single',
41-
{ avoidEscape: true, allowTemplateLiterals: false }
42-
],
43-
curly: ['error', 'all'],
44-
eqeqeq: 'error',
45-
'prefer-arrow-callback': 'error'
46-
},
47-
settings: {
48-
react: {
49-
version: 'detect'
5026
}
27+
],
28+
'@typescript-eslint/no-unused-vars': ['warn', { args: 'none' }],
29+
'@typescript-eslint/no-explicit-any': 'off',
30+
'@typescript-eslint/no-namespace': 'off',
31+
'@typescript-eslint/no-this-alias': [
32+
'error',
33+
{
34+
allowedNames: ['self'] // Allow `const self = this`
35+
}
36+
],
37+
'@typescript-eslint/no-use-before-define': 'off',
38+
'@typescript-eslint/quotes': [
39+
'error',
40+
'single',
41+
{ avoidEscape: true, allowTemplateLiterals: false }
42+
],
43+
curly: ['error', 'all'],
44+
eqeqeq: 'error',
45+
'prefer-arrow-callback': 'error'
46+
},
47+
settings: {
48+
react: {
49+
version: 'detect'
5150
}
52-
};
51+
}
52+
};

.gitignore

+8-25
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
11
*.bundle.*
22
lib/
33
node_modules/
4+
*.log
5+
.eslintcache
6+
.stylelintcache
47
*.egg-info/
58
.ipynb_checkpoints
69
*.tsbuildinfo
710
jupyterlab_git/labextension
8-
9-
src/version.ts
11+
# Version file is handled by hatchling
12+
jupyterlab_git/_version.py
1013

1114
# Integration tests
1215
ui-tests/test-results/
1316
ui-tests/playwright-report/
1417

15-
1618
# Created by https://www.gitignore.io/api/python
1719
# Edit at https://www.gitignore.io/?templates=python
1820

@@ -63,6 +65,7 @@ htmlcov/
6365
.coverage.*
6466
.cache
6567
nosetests.xml
68+
coverage/
6669
coverage.xml
6770
*.cover
6871
.hypothesis/
@@ -81,9 +84,6 @@ docs/_build/
8184
# PyBuilder
8285
target/
8386

84-
# Jupyter Notebook
85-
.ipynb_checkpoints
86-
8787
# pyenv
8888
.python-version
8989

@@ -93,14 +93,6 @@ celerybeat-schedule
9393
# SageMath parsed files
9494
*.sage.py
9595

96-
# dotenv
97-
.env
98-
99-
# virtualenv
100-
.venv
101-
venv/
102-
ENV/
103-
10496
# Spyder project settings
10597
.spyderproject
10698
.spyproject
@@ -129,14 +121,5 @@ dmypy.json
129121
# OSX files
130122
.DS_Store
131123

132-
# jetbrains ide stuff
133-
*.iml
134-
.idea/
135-
136-
# vscode ide stuff
137-
*.code-workspace
138-
.history
139-
.vscode
140-
141-
# vim stuff
142-
*.swp
124+
# Yarn cache
125+
.yarn/

.prettierignore

+1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ node_modules
22
**/node_modules
33
**/lib
44
**/package.json
5+
!/package.json
56
jupyterlab_git

.yarnrc.yml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
enableImmutableInstalls: false
2+
3+
nodeLinker: node-modules

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Changelog
2+
3+
<!-- <START NEW CHANGELOG ENTRY> -->
4+
5+
<!-- <END NEW CHANGELOG ENTRY> -->

CONTRIBUTING.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,17 @@ If you have suggestions on how these processes can be improved, please suggest t
1515
If you are using this software and encounter some behavior that is unexpected, then you may have come across a bug!
1616
To get this fixed, first creation an issue that should have, ideally:
1717

18-
* The behavior you expected
19-
* The actual behavior (screenshots can be helpful here)
20-
* How someone else could reproduce it (version of the software, as well as your browser and OS can help)
18+
- The behavior you expected
19+
- The actual behavior (screenshots can be helpful here)
20+
- How someone else could reproduce it (version of the software, as well as your browser and OS can help)
2121

2222
Once you create this issue, someone with commit rights should come by and try to reproduce the issue locally and comment if they are able to. If they are able to, then they will add the `type:Bug` label. If they are not able to, then they will add the `status: Needs info` label and wait for information from you.
2323

2424
Hopefully, then some nice person will come by to fix your bug! This will likely be someone who already works on the project,
2525
but it could be anyone.
2626

2727
They will fix the bug locally, then push those changes to their fork. Then they will make a pull request, and in the description
28-
say "This fixes bug #xxx".
28+
say "This fixes bug #xxx".
2929

3030
Someone who maintains the repo will review this change, and this can lead to some more back and forth about the implementation.
3131

@@ -38,7 +38,7 @@ Maybe the current behavior isn't wrong, but you still have an idea on how it cou
3838

3939
The flow will be similar to opening a bug, but the process could be longer, as we all work together to agree on what
4040
behavior should be added. So when you open an issue, it's helpful to give some context around what you are trying to achieve,
41-
why that is important, where the current functionality falls short, and any ideas you have on how it could be improved.
41+
why that is important, where the current functionality falls short, and any ideas you have on how it could be improved.
4242

4343
These issues should get a `type:Enhancement` label. If the solution seems obvious enough and you think others will agree,
4444
then anyone is welcome to implement the solution and propose it in a pull request.

Design.md

+9-3
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,23 @@
1-
## Product Goals:
1+
## Product Goals:
2+
23
- Give users a good set of handrails so in their use of the UI, they don’t get themselves stuck.
34
- Provide a ‘happy path’ that the extension doesn’t deviate from. Make it easy for users to follow this happy path and difficult for them to deviate from it.
45
- Help establish a good working rhythm with Git that will help them develop a useful mental model .
56
- Expose the most frequently used commands that cover the majority of daily git use.
67
- Increase Usability of Git
78
- Shield user from repetitive actions.
8-
- Increase visibility of the state of Git Repos; surface state-related information.
9+
- Increase visibility of the state of Git Repos; surface state-related information.
910
- Unblock advanced commands by easing transition to terminal when necessary.
1011

11-
## Research Requirements:
12+
## Research Requirements:
13+
1214
- Surface the most used commands, and in what context they are used.
1315
- Discover Git functionality that is frequently helpful, but difficult to execute.
1416

1517
## Design Requirements:
18+
1619
### First Stage
20+
1721
- Add remote functionality (Push to Origin [default], Pull from Origin [default], Expose Remotes?)
1822
- Merge/diff conflicts handled in the terminal
1923
- Branches
@@ -28,7 +32,9 @@
2832
- Commit
2933
- Stage
3034
- Remove
35+
3136
### First Stage Stretch goals.
37+
3238
- Give Git feedback in the file browsers
3339
- Allow users to link to the git extension directly from the file browser.
3440
- Add Stash Functionality.

LICENSE

+10-9
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
11
BSD 3-Clause License
22

3-
Copyright (c) 2020, Jupyter Development Team All rights reserved.
3+
Copyright (c) 2023, Jupyter Development Team
4+
All rights reserved.
45

56
Redistribution and use in source and binary forms, with or without
67
modification, are permitted provided that the following conditions are met:
78

8-
* Redistributions of source code must retain the above copyright notice, this
9-
list of conditions and the following disclaimer.
9+
1. Redistributions of source code must retain the above copyright notice, this
10+
list of conditions and the following disclaimer.
1011

11-
* Redistributions in binary form must reproduce the above copyright notice,
12-
this list of conditions and the following disclaimer in the documentation
13-
and/or other materials provided with the distribution.
12+
2. Redistributions in binary form must reproduce the above copyright notice,
13+
this list of conditions and the following disclaimer in the documentation
14+
and/or other materials provided with the distribution.
1415

15-
* Neither the name of the copyright holder nor the names of its
16-
contributors may be used to endorse or promote products derived from
17-
this software without specific prior written permission.
16+
3. Neither the name of the copyright holder nor the names of its
17+
contributors may be used to endorse or promote products derived from
18+
this software without specific prior written permission.
1819

1920
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
2021
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

MANIFEST.in

-23
This file was deleted.

0 commit comments

Comments
 (0)