Skip to content

Commit 0c260e4

Browse files
committed
Merge remote-tracking branch 'origin/master' into delete-project-data
2 parents 83f34ea + dba7a19 commit 0c260e4

File tree

653 files changed

+45263
-31855
lines changed

Some content is hidden

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

653 files changed

+45263
-31855
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,5 +154,5 @@ venv
154154

155155
# frontend/i18n files, which are created during build or updating the languages
156156
src/packages/frontend/i18n/extracted.json
157-
src/packages/frontend/i18n/*.compiled.json
157+
src/packages/frontend/i18n/trans/*.compiled.json
158158

DEVELOPMENT.md

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

README.md

Lines changed: 49 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,25 @@ CoCalc is web-based software that enables collaboration in research, teaching, a
66

77
**CoCalc** supports sophisticated calculations that arise in teaching, research, and authoring documents. This includes working with the full data science and scientific Python stack, [SageMath](https://www.sagemath.org), [Julia](https://julialang.org), [R Statistics](https://cocalc.com/doc/r-statistical-software.html), [Octave](https://www.gnu.org/software/octave/), and much more. It also offers capabilities to author documents in [LaTeX](https://cocalc.com/doc/latex-editor.html), R/knitr and Markdown, storing and organizing files, a web-based [Linux Terminal](https://doc.cocalc.com/terminal.html), an [X11 graphical desktop](https://doc.cocalc.com/x11.html), and communication tools like a [chatrooms](https://doc.cocalc.com/chat.html), [course management](https://cocalc.com/doc/teaching.html) and more. It is the best choice for [teaching remote scientific courses](https://cocalc.com/doc/teaching.html).
88

9+
## Quick Start
10+
11+
1. Visit https://cocalc.com
12+
2. Sign up for a free account
13+
3. Create a new project
14+
4. Choose a computational environment (e.g., Jupyter Notebook, Sage Worksheet, LaTeX Editor)
15+
5. Start collaborating with others in real-time
16+
17+
## Key Features
18+
19+
- **Jupyter Notebooks**: Interactive Python, R, and Julia environments
20+
- **Sage Worksheets**: Powerful mathematical computations
21+
- **LaTeX Editor**: Collaborative document creation with real-time preview
22+
- **Linux Terminal**: Full command-line access
23+
- **Computational Whiteboard**: Visual collaboration and code execution
24+
- **Course Management**: Tools for teaching and managing classes
25+
- **Real-time Collaboration**: Work together seamlessly on projects
26+
- **Version Control**: Built-in time travel and project history
27+
928
## Website
1029

1130
- [CoCalc](https://cocalc.com/index.html) -- commercial CoCalc hosting and support
@@ -20,6 +39,24 @@ CoCalc is web-based software that enables collaboration in research, teaching, a
2039
You can obtain a packaged version of CoCalc for your own on-premises infrastructure: [**CoCalc Cloud**](https://doc-cloud.cocalc.com/).
2140
It runs on Kubernetes and inherits the security and scalability of the SaaS platform.
2241

42+
### CoCalc Cloud
43+
44+
CoCalc Cloud runs on Kubernetes and inherits the security and scalability of the SaaS platform. To get started:
45+
46+
1. Visit https://cocalc.com/pricing/onprem for pricing information
47+
2. Contact [email protected] to discuss deployment options
48+
3. Prepare your Kubernetes cluster
49+
4. Follow the deployment guide at https://doc-cloud.cocalc.com/
50+
5. Configure your instance and start using your self-hosted CoCalc
51+
52+
### CoCalc-Docker (for smaller deployments or personal use)
53+
54+
1. Ensure Docker is installed on your system
55+
2. Visit the CoCalc-Docker repository: https://github.com/sagemathinc/cocalc-docker
56+
3. Follow the installation and usage instructions provided in the repository's README
57+
58+
For more detailed information on self-hosting options, please contact [email protected].
59+
2360
## History
2461

2562
_CoCalc_ was formerly called _SageMathCloud_.
@@ -28,11 +65,7 @@ The name was coined in fall 2016 and changed around spring 2017.
2865

2966
## Contributors
3067

31-
### YOU?!
32-
33-
New -- Feb 2022: If you want to work on something at https://github.com/sagemathinc/cocalc/issues, [contact us](email:[email protected]), and we might be able to pay you!
34-
35-
### Contributors
68+
CoCalc is made possible by the hard work of many contributors. Our team includes mathematicians, computer scientists, and software engineers from around the world. Key contributors include:
3669

3770
- Greg Bard
3871
- Rob Beezer
@@ -52,7 +85,9 @@ New -- Feb 2022: If you want to work on something at https://github.com/sagemat
5285
- Jonathan Thompson
5386
- Todd Zimmerman
5487

55-
... and _many_ others: See https://github.com/sagemathinc/cocalc/graphs/contributors
88+
... and others: See https://github.com/sagemathinc/cocalc/graphs/contributors
89+
90+
We welcome new contributions! If you're interested in contributing, please see our Contributing Guidelines (link to be added).
5691

5792
## Copyright/License
5893

@@ -82,6 +117,14 @@ In particular, [CoCalc OnPrem](https://cocalc.com/pricing/onprem) is designed fo
82117

83118
The scripts [here](https://github.com/sagemathinc/cocalc/tree/master/src/dev) might be helpful.  We do most of our development of CoCalc on https://cocalc.com itself. CoCalc requires pnpm version at least 9.
84119

120+
## Support and Community
121+
122+
- **User Manual**: https://doc.cocalc.com/
123+
- **Mailing List**: https://groups.google.com/forum/#!forum/cocalc
124+
- **Discord Chat**: https://discord.gg/nEHs2GK
125+
- **Bug Reports**: https://github.com/sagemathinc/cocalc/issues
126+
- **Commercial Support**: https://cocalc.com/pricing
127+
85128
## Acknowledgements
86129

87130
### Browserstack

docs/Issue Triage.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,34 @@
11
## Issue Triage
2+
23
Contributors with sufficient permissions on the CoCalc repo can help by adding
34
labels to triage issues:
45

5-
* Yellow, **A**-prefixed labels state which **area** of CoCalc the issue relates to.
6+
- Yellow, **A**-prefixed labels state which **area** of CoCalc the issue relates to.
67
Answers the question: "Where should I be looking?"
78

8-
* Green, **E**-prefixed labels explain the type of **experience** necessary
9+
- Green, **E**-prefixed labels explain the type of **experience** necessary
910
to fix the issue.
1011
Answers the question "What kind of effort is necessary?"
1112

12-
* Red, **I**-prefixed labels indicate the **importance** (relevance) of the issue.
13+
- Red, **I**-prefixed labels indicate the **importance** (relevance) of the issue.
1314
Answers the question: "Why is this important?"
1415

15-
* **M** is market segment priority.
16+
- Orange, **P**-prefixed labels indicate a bug's **priority**.
1617

17-
* Orange, **P**-prefixed labels indicate a bug's **priority**.
18+
- **M** is market segment priority. (ws: these are confusing and should be merged with the P- priorities)
1819

19-
* The purple **meta** label denotes a list of issues collected from other categories.
20+
- The purple **meta** label denotes a list of issues collected from other categories.
2021

21-
* The black, **blocked** label denotes an issue blocked by another.
22+
- The black, **blocked** label denotes an issue blocked by another.
2223

23-
* Finally, **upstream** signals the problem is related to a library, usually includes a link to another issue.
24+
- Finally, **upstream** signals the problem is related to a library, usually includes a link to another issue.
2425

2526
If you're looking for somewhere to start, check out the [E-easy][eeasy] tag.
2627

27-
[eeasy]:https://github.com/sagemathinc/cocalc/labels/E-easy
28+
[eeasy]: https://github.com/sagemathinc/cocalc/labels/E-easy
2829

2930
### List of labels and their descriptions
31+
3032
Most tags should be self explanatory but some can be unclear. If you're unsure what a label means how it's different from another email John Jeng at [email protected]. He'll probably add it to the description here.
3133

3234
- `blocked` -- Always link what the issue is blocked by.
@@ -37,5 +39,4 @@ Most tags should be self explanatory but some can be unclear. If you're unsure w
3739
- `I-software request` -- Requests for adding something to be installed in CoCalc by default.
3840
- `I-UA` -- Text that needs to be reworded or a tip that needs to get written.
3941

40-
4142
Inspired by [Rust's triage system](https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#issue-triage).

docs/README.md

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,5 @@
11
# Guidelines
2-
This collection of files provides general knowledge for working with the CoCalc.
3-
4-
**WARNING (June 2021): we haven't looked at this in years, and it is probably all wrong.**
5-
6-
Ask clarifying questions and update this as you go.
7-
8-
# Webapp Code Layout
9-
`entry-point.coffee`
10-
- `desktop_app.cjsx` / `mobile_app.cjsx`
11-
- Projects View (`projects.cjsx`)
12-
- Account View (`account.cjsx`)
13-
- Project View (`project_page.cjsx`)
14-
- About View (`r_help.cjsx`)
152

16-
Additionally, it has top level widget components:
17-
- Help
18-
- File Notifications (`file_use.cjsx`)
19-
- Connection Status
20-
21-
22-
# External Resources
23-
HTML/CSS
24-
- [Flexbox](https://css-tricks.com/snippets/css/a-guide-to-flexbox/)
3+
This collection of files provides general knowledge for working with the CoCalc.
254

26-
Redux:
27-
- [Getting Started](https://egghead.io/courses/getting-started-with-redux)
28-
- [Idiomatic Redux](https://egghead.io/courses/building-react-applications-with-idiomatic-redux)
29-
- [Why you might not need redux](https://medium.com/@dan_abramov/you-might-not-need-redux-be46360cf367#.g6zxcajc5)
5+
Last Updated: September 2024.

docs/Random Notes.md

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

docs/STYLE.md

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# CoCalc Style Guide
2+
3+
## Language (Javascript/Typescript/Python)
4+
5+
- Prettier: Use the _defaults_ with the latest version of prettier on all of our Javascript and Typescript code. Use yapf for Python.
6+
7+
- NOTE: prettier's defaults change over time, but we don't ever just run it on our full massive codebase.
8+
9+
- Typescript: Always prefer Typescript over Javascript and CoffeeScript
10+
11+
- NOTE: there's still some coffeescript code in CoCalc; it's terrifying and should all be rewritten in Typescript.
12+
13+
- Variable Names: Use the standard Javascript camelCase convention for variable names, unless there is a good reason otherwise. Good reasons include: variable names that are also used in PostgreSQL and interop with Python (lower case with underscores).
14+
15+
- NOTE: there's a lot of Javascript code in cocalc that uses Python conventions. Long ago Nicholas R. argued "by using Python conventions we can easily distinguish our code from other code"; in retrospect, this was a bad argument, and only serves to make Javascript devs less comfortable in our codebase, and make our code look weird compared to most Javascript code. Rewrite it.
16+
17+
- Javascript Methods: Prefer arrow functions for methods of classes.
18+
19+
- it's standard
20+
- avoids subtle problems involving "this" binding
21+
- easier to search for function definition in editor
22+
- NOTE: there's a lot of code in cocalc that uses non-arrow-functions; rewrite it and don't add more of this.
23+
24+
- Async Programming: Prefer async/await to callbacks if at all possible.
25+
26+
- NOTE: CoCalc used to not use async/await or promises at all, so there is still some code that uses the callback [async library](https://github.com/caolan/async). This code is terrifying, and it should all be rewritten.
27+
28+
## React
29+
30+
- Functional Components and hooks: Always prefer functional components with hooks over class components
31+
32+
- NOTE: there are still a lot of class components in cocalc; rewrite them.
33+
34+
- Use the style of https://react.dev/learn/typescript for React with Typescript:
35+
- typescript detects unused props,
36+
- defaults are natural and do not need MyButton.defaultProps, which is deprecated,
37+
- uses minimal notation (less characters typed),
38+
- very common in tutorials and other code
39+
- NOTE: a lot of our code used to be class components, hence still is written like `prop.[propname]`
40+
41+
In particular, use
42+
43+
```ts
44+
function MyButton({ title, disabled }: MyButtonProps) {
45+
return <button disabled={disabled}>{title}</button>;
46+
}
47+
```
48+
49+
and do NOT use
50+
51+
```ts
52+
function MyButton(props: MyButtonProps) {
53+
return <button disabled={props.disabled}>{props.title}</button>;
54+
}
55+
```
56+
57+
or
58+
59+
```ts
60+
const MyButton: React.FC<MyButtonProps> = (props) => {
61+
return <button disabled={props.disabled}>{props.title}</button>;
62+
};
63+
```
64+
65+
- Memoization: avoid using `React.memo`
66+
67+
- it leads to subtle bugs
68+
- it's far better to render 20 items slowly, e.g., using virtualization, then to render 20000 items quickly
69+
- NOTE: there's 100\+ uses of React.memo in cocalc right now; I'm not happy with this, though I wrote them. It's almost always a bad idea.
70+
71+
## UI Design
72+
73+
- As much as possible, use [Antd components](https://ant.design/) in the standard way.
74+
75+
- Avoid doing new design if possible; use the conventions and components of Antd.
76+
- If there is a cancel button next to another button, then cancel goes first, following the Antd convention, e.g., see Popconfirm.
77+
- NOTE: We wrote a lot of custom components, e.g., for number input, before switching fully to Antd, and those are still partly in use. Rewrite all of that to use Antd.
78+
79+
- Bootstrap:
80+
- CoCalc used to use jquery + bootstrap (way before react even existed!) for everything, and that's still in use for some things today (e.g., Sage Worksheets). Rewrite or delete all this.
81+
- CoCalc also used to use react-bootstrap, and sadly still does. Get rid of this.
82+

0 commit comments

Comments
 (0)