Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/django.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
max-parallel: 4
matrix:
python-version: ['3.10', '3.11', '3.12', '3.13']
python-version: ["3.10", "3.11", "3.12", "3.13"]

steps:
- name: Check out repository
Expand All @@ -29,7 +29,7 @@ jobs:
working-directory: canvas_editor
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
python -m pip install -e ".[dev]"

- name: Run Tests
working-directory: canvas_editor
Expand Down Expand Up @@ -86,6 +86,6 @@ jobs:
coverage xml

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # release v5.5.1
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # release v5.5.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
15 changes: 10 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,12 @@ By participating, you can help improve the project and make it even better :rais
1. **Fork the Repository**: Click the "Fork" button at the top right corner of this repository's page to create your own copy.

2. **Clone Your Fork**: Clone your forked repository to your local machine using Git :octocat::

```bash
git clone https://github.com/ARTIST-Association/CANVAS.git
``
```

3. **Install all development dependencies** in a separate python virtual environment from the main branch of your repo.
This will put a number of pre-commit hooks, for code linting and code style for both Python and JavaScript, into place.
It will also install tools like ruff and ESLint, used for development.
Expand All @@ -21,17 +24,20 @@ By participating, you can help improve the project and make it even better :rais
python3 -m venv <insert/path/to/your/venv>
source <insert/path/to/your/venv/bin/activate>

# Dev tools
cd CANVAS/canvas_editor/
python -m pip install -e ".[dev]"

# Pre commit hooks
pre-commit install

# Dev tools
cd canvas_editor/
python -m pip install -r requirements.txt
# Install all JavaScript dev dependencies
npm install
```

4. **Create a Branch**: Create a new branch for your contribution. Choose a descriptive name. Depending on what you want
to work on, prepend either of the following prefixes, `features`, `maintenance`, `bugfix`, or `hotfix`. Example:

```bash
git checkout -b features/your-feature-name
```
Expand Down Expand Up @@ -145,11 +151,11 @@ By participating, you can help improve the project and make it even better :rais

As the remote branch is already linked


8. **Rebase Onto Current Main:** Rebase your feature branch onto the current main branch of the original repo.
This will include any changes that might have been pushed into the main in the meantime and resolve possible conflicts.
To sync your fork with the original upstream repo, check out [this page](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork)
or follow the steps below. Note that before you can sync your fork with an upstream repo, you must configure a remote that points to the upstream repository in Git.

```
cd <path/to/your/local/project/fork>
git fetch upstream
Expand All @@ -160,7 +166,6 @@ By participating, you can help improve the project and make it even better :rais

9. **Open a Pull Request**: Go to the [original repository](https://github.com/ARTIST-Association/CANVAS.git) and click the "New Pull Request" button. Follow the guidelines in the template to submit your pull request.


## Code of Conduct

Please note that we have a [Code of Conduct](CODE_OF_CONDUCT.md), and we expect all contributors to follow it. Be kind and respectful to one another :blue_heart:.
Expand Down
14 changes: 4 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,30 +14,24 @@

We heavily recommend to install `CANVAS` package in a dedicated `Python3.10+` virtual environment ([click here for the documentation](https://docs.python.org/3/library/venv.html)).

After setting up and activating the virtual environment _(or deciding against it)_, execute the following instructions, to set up the code base
After setting up and activating the virtual environment _(or deciding against it)_, execute the following instructions, start the server.
See [CONTRIBUTING.md](/CONTRIBUTING.md) on how to set up a development environment.

```bash
# You may have to replace python with python3, depending on your operating system.
# clone the repo
git clone https://github.com/ARTIST-Association/CANVAS.git

# install requirements
cd CANVAS-PSE2425/
pip install -r requirements.txt

# Installing Pre-commit Hooks
pre-commit install
cd CANVAS/canvas_editor/
pip install .

# add the .env file to the root of the canvas_editor folder
# containing debug variable, client_id + secret_key for OpenID, email-host password, etc.

# configure the database
cd canvas_editor/
python manage.py migrate

# Install npm dependencies
npm install

# start the server
python manage.py runserver

Expand Down
87 changes: 61 additions & 26 deletions canvas_editor/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,35 +5,70 @@ description = "An web-based 3D editor for ARTIST"
readme = "README.md"
requires-python = ">=3.10"


dependencies = [
"django==5.2.8",
"djangorestframework==3.16.1",
"artist-csp==1.0.0",
"django-cleanup==9.0.0",
"django-allauth==65.13.1",
"python-dotenv==1.2.1",
"Pillow==12.0.0",
"jwt==1.4.0",
]


[project.optional-dependencies]
dev = [
"coverage==7.12.0",
"pre-commit==4.5.0",
"mypy==1.18.2",
"ruff==0.14.6",
"parameterized==0.9.0",
"unittest-xml-reporting==3.2.0",
]


[tool.setuptools.packages.find]
include = [
"account_management",
"autosave_api",
"canvas",
"editor",
"hdf_management",
"job_interface",
"project_management",
]

[tool.ruff]
# Exclude a variety of commonly ignored directories.
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".ipynb_checkpoints",
".mypy_cache",
".nox",
".pants.d",
".pyenv",
".pytest_cache",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
".vscode",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"site-packages",
"venv",
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".ipynb_checkpoints",
".mypy_cache",
".nox",
".pants.d",
".pyenv",
".pytest_cache",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
".vscode",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"site-packages",
"venv",
]

line-length = 120
Expand Down
17 changes: 0 additions & 17 deletions canvas_editor/requirements.txt

This file was deleted.