Skip to content

Commit

Permalink
Migrate jupyterlab-git extension to jupyterLab 4.
Browse files Browse the repository at this point in the history
  • Loading branch information
HaudinFlorence committed Apr 18, 2023
1 parent dda8e82 commit 84c73b5
Show file tree
Hide file tree
Showing 95 changed files with 16,659 additions and 15,968 deletions.
96 changes: 48 additions & 48 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,52 +1,52 @@
module.exports = {
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
'plugin:react/recommended'
],
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.json',
sourceType: 'module'
},
plugins: ['@typescript-eslint'],
rules: {
'@typescript-eslint/explicit-function-return-type': 'off',
"@typescript-eslint/naming-convention": [
"error",
{
"selector": "interface",
"format": ["PascalCase"],
"custom": {
"regex": "^I[A-Z]",
"match": true
}
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
'plugin:react/recommended'
],
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.json',
sourceType: 'module'
},
plugins: ['@typescript-eslint'],
rules: {
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/naming-convention': [
'error',
{
selector: 'interface',
format: ['PascalCase'],
custom: {
regex: '^I[A-Z]',
match: true
}
],
'@typescript-eslint/no-unused-vars': ['warn', { args: 'none' }],
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-namespace': 'off',
'@typescript-eslint/no-this-alias': [
'error',
{
allowedNames: ['self'], // Allow `const self = this`
},
],
'@typescript-eslint/no-use-before-define': 'off',
'@typescript-eslint/quotes': [
'error',
'single',
{ avoidEscape: true, allowTemplateLiterals: false }
],
curly: ['error', 'all'],
eqeqeq: 'error',
'prefer-arrow-callback': 'error'
},
settings: {
react: {
version: 'detect'
}
],
'@typescript-eslint/no-unused-vars': ['warn', { args: 'none' }],
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-namespace': 'off',
'@typescript-eslint/no-this-alias': [
'error',
{
allowedNames: ['self'] // Allow `const self = this`
}
],
'@typescript-eslint/no-use-before-define': 'off',
'@typescript-eslint/quotes': [
'error',
'single',
{ avoidEscape: true, allowTemplateLiterals: false }
],
curly: ['error', 'all'],
eqeqeq: 'error',
'prefer-arrow-callback': 'error'
},
settings: {
react: {
version: 'detect'
}
};
}
};
33 changes: 8 additions & 25 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
*.bundle.*
lib/
node_modules/
*.log
.eslintcache
.stylelintcache
*.egg-info/
.ipynb_checkpoints
*.tsbuildinfo
jupyterlab_git/labextension

src/version.ts
# Version file is handled by hatchling
jupyterlab_git/_version.py

# Integration tests
ui-tests/test-results/
ui-tests/playwright-report/


# Created by https://www.gitignore.io/api/python
# Edit at https://www.gitignore.io/?templates=python

Expand Down Expand Up @@ -63,6 +65,7 @@ htmlcov/
.coverage.*
.cache
nosetests.xml
coverage/
coverage.xml
*.cover
.hypothesis/
Expand All @@ -81,9 +84,6 @@ docs/_build/
# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# pyenv
.python-version

Expand All @@ -93,14 +93,6 @@ celerybeat-schedule
# SageMath parsed files
*.sage.py

# dotenv
.env

# virtualenv
.venv
venv/
ENV/

# Spyder project settings
.spyderproject
.spyproject
Expand Down Expand Up @@ -129,14 +121,5 @@ dmypy.json
# OSX files
.DS_Store

# jetbrains ide stuff
*.iml
.idea/

# vscode ide stuff
*.code-workspace
.history
.vscode

# vim stuff
*.swp
# Yarn cache
.yarn/
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ node_modules
**/node_modules
**/lib
**/package.json
!/package.json
jupyterlab_git
3 changes: 3 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
enableImmutableInstalls: false

nodeLinker: node-modules
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Changelog

<!-- <START NEW CHANGELOG ENTRY> -->

<!-- <END NEW CHANGELOG ENTRY> -->
10 changes: 5 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@ If you have suggestions on how these processes can be improved, please suggest t
If you are using this software and encounter some behavior that is unexpected, then you may have come across a bug!
To get this fixed, first creation an issue that should have, ideally:

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

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.

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

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

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

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

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

These issues should get a `type:Enhancement` label. If the solution seems obvious enough and you think others will agree,
then anyone is welcome to implement the solution and propose it in a pull request.
Expand Down
12 changes: 9 additions & 3 deletions Design.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
## Product Goals:
## Product Goals:

- Give users a good set of handrails so in their use of the UI, they don’t get themselves stuck.
- 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.
- Help establish a good working rhythm with Git that will help them develop a useful mental model .
- Expose the most frequently used commands that cover the majority of daily git use.
- Increase Usability of Git
- Shield user from repetitive actions.
- Increase visibility of the state of Git Repos; surface state-related information.
- Increase visibility of the state of Git Repos; surface state-related information.
- Unblock advanced commands by easing transition to terminal when necessary.

## Research Requirements:
## Research Requirements:

- Surface the most used commands, and in what context they are used.
- Discover Git functionality that is frequently helpful, but difficult to execute.

## Design Requirements:

### First Stage

- Add remote functionality (Push to Origin [default], Pull from Origin [default], Expose Remotes?)
- Merge/diff conflicts handled in the terminal
- Branches
Expand All @@ -28,7 +32,9 @@
- Commit
- Stage
- Remove

### First Stage Stretch goals.

- Give Git feedback in the file browsers
- Allow users to link to the git extension directly from the file browser.
- Add Stash Functionality.
Expand Down
19 changes: 10 additions & 9 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
BSD 3-Clause License

Copyright (c) 2020, Jupyter Development Team All rights reserved.
Copyright (c) 2023, Jupyter Development Team
All rights reserved.

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

* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

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

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

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
Expand Down
23 changes: 0 additions & 23 deletions MANIFEST.in

This file was deleted.

Loading

0 comments on commit 84c73b5

Please sign in to comment.