mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-28 11:36:44 +00:00
[Documentation] Remove package credits (#8811)
* Remove hard-coded credits from docs - Extract *actual* package credits - Auto-build into docs * Include URLs when generating python license data * Update readthedocs process * Better URL extraction * Adjust build process for RTD * Spelling fixes * Install node and yarn * Command fix * Improved library sorting * Improved error message * Remove credits.md * Cleanup * Further cleanup * Tweak playwright test * Handle uncaught exception in fetchIcons * Fix for CORS settings in playwright testing * Enhance login check * Fix for barcode test --------- Co-authored-by: Matthias Mair <code@mjmair.com>
This commit is contained in:
parent
40cff05864
commit
ce617b7792
@ -1,77 +0,0 @@
|
||||
---
|
||||
title: Credits
|
||||
---
|
||||
|
||||
## Python Packages
|
||||
|
||||
InvenTree relies on the following Python libraries:
|
||||
|
||||
| Library | License | Description |
|
||||
| --- | --- | --- |
|
||||
| [Django](https://pypi.org/project/Django/) | BSD | Python web framework |
|
||||
| [invoke](https://www.pyinvoke.org/) | BSD | Task execution tool |
|
||||
| [wheel](https://wheel.readthedocs.io/en/stable/) | MIT | Python packaging |
|
||||
| [pillow](https://pypi.org/project/Pillow/) | HPND | Image manipulation |
|
||||
| [djangorestframework](https://pypi.org/project/djangorestframework/) | BSD | REST API |
|
||||
| [django-cors-headers](https://pypi.org/project/django-cors-headers/) | MIT | CORS headers |
|
||||
| [django-filter](https://pypi.org/project/django-filter/) | BSD | Advanced filtering for REST API |
|
||||
| [django-mptt](https://pypi.org/project/django-mptt/) | MIT | Modified preorder tree traversal |
|
||||
| [django-sql-utils](https://pypi.org/project/django-sql-utils/) | MIT | Advanced SQL subqueries |
|
||||
| [django-markdownx](https://pypi.org/project/django-markdownx/) | BSD | Markdown editor |
|
||||
| [django-markdownify](https://pypi.org/project/django-markdownify/) | MIT | Markdown template filters |
|
||||
| [coreapi](https://pypi.org/project/coreapi/) | BSD | API auto documentation |
|
||||
| [pygments](https://pypi.org/project/Pygments/) | BSD | Syntax highlighting |
|
||||
| [tablib](https://pypi.org/project/tablib/) | MIT | Data import/export |
|
||||
| [django-crispy-forms](https://pypi.org/project/django-crispy-forms/) | MIT | Advanced form rendering |
|
||||
| [django-import-export](https://pypi.org/project/django-import-export/) | BSD | Data import/export in admin interface |
|
||||
| [django-cleanup](https://pypi.org/project/django-cleanup/) | MIT | Automated cleanup of django media files |
|
||||
| [rapidfuzz](https://pypi.org/project/rapidfuzz/) | MIT | Fuzzy string matching |
|
||||
| [django-stdimage](https://pypi.org/project/django-stdimage/) | MIT | Advanced image fields for django |
|
||||
| [django-weasyprint](https://pypi.org/project/django-weasyprint/) | Apache 2.0 | PDF generation |
|
||||
| [django-money](https://pypi.org/project/django-money/) | BSD | Currency support |
|
||||
| [certifi](https://pypi.org/project/certifi/) | MPL 2.0 | Web certification |
|
||||
| [django-error-report](https://pypi.org/project/django-error-report/) | BSD | Error / excepttion management |
|
||||
| [django-test-migrations](https://pypi.org/project/django-test-migrations/) | MIT | Unit testing for database migrations |
|
||||
| [python-barcode](https://pypi.org/project/python-barcode/) | MIT | Barcode support |
|
||||
| [qrcode](https://pypi.org/project/qrcode/) | BSD | QR code support |
|
||||
| [django-q](https://pypi.org/project/django-q/) | MIT | Background task manager |
|
||||
| [gunicorn](https://pypi.org/project/gunicorn/) | MIT | Web server |
|
||||
| [flake8](https://pypi.org/project/flake8/) | MIT | style checking |
|
||||
| [pep8-naming](https://pypi.org/project/pep8-naming/) | Expat | name checking |
|
||||
| [coverage](https://pypi.org/project/coverage/) | Apache-2.0 | coverage checking |
|
||||
| [django-formtools](https://pypi.org/project/django-formtools/) | MIT | better forms / wizards |
|
||||
| [django-allauth](https://pypi.org/project/django-allauth/) | MIT | SSO for django |
|
||||
| [pint](https://pint.readthedocs.io/en/stable/) | [licence](https://github.com/hgrecco/pint/blob/master/LICENSE) | Physical unit conversion |
|
||||
|
||||
## Frontend libraries
|
||||
|
||||
InvenTree relies on the following frontend libraries and components:
|
||||
|
||||
| Name | License | Description |
|
||||
| --- | --- | --- |
|
||||
| [Bootstrap](https://github.com/twbs/bootstrap/) | MIT | Frontend framework |
|
||||
| [jquery](https://github.com/jquery/jquery) | MIT | JS framework |
|
||||
| [Bootstrap table](https://github.com/wenzhixin/bootstrap-table/) | MIT | Table rendering |
|
||||
| [Font Awesome - Icons](https://fontawesome.com/) | CC BY 4.0 License | Icons |
|
||||
| [Font Awesome - Code](https://fontawesome.com/) | MIT | Delivery code for icons |
|
||||
| [Select2](https://github.com/select2/select2/) | MIT | Searchable selection box |
|
||||
| [fullcalendar](https://github.com/fullcalendar/fullcalendar/) | MIT | Calendar rendering |
|
||||
| [chart.js](https://github.com/chartjs/Chart.js) | MIT | charts |
|
||||
| [Moment JS](https://github.com/moment/momentjs.com/) | MIT | Time and date rendering |
|
||||
| [jquery-treegrid](https://github.com/maxazan/jquery-treegrid/) | MIT | Treegrid rendering |
|
||||
| [clipboard.js](https://github.com/zenorocha/clipboard.js) | MIT | text copying |
|
||||
| [qr-scanner](https://github.com/nimiq/qr-scanner) | MIT | Javascript QR Code Scanner |
|
||||
|
||||
## Assets
|
||||
|
||||
### Splash Screen
|
||||
|
||||
The InvenTree splash screen graphic is sourced from [unsplash.com](https://unsplash.com/photos/Ixvv3YZkd7w) and used under the [unsplash license](https://unsplash.com/license).
|
||||
|
||||
## Source Code Contributions
|
||||
|
||||
The InvenTree project relies on the expertise and generosity of its [source code contributors](https://github.com/inventree/InvenTree/graphs/contributors).
|
||||
|
||||
## Translation Contributions
|
||||
|
||||
Translation efforts are supported by the InvenTree community. We appreciate the efforts of our [translation team](https://crowdin.com/project/inventree).
|
@ -148,10 +148,6 @@ pyupgrade `find . -name "*.py"`
|
||||
django-upgrade --target-version {{ config.extra.django_version }} `find . -name "*.py"`
|
||||
```
|
||||
|
||||
## Credits
|
||||
|
||||
If you add any new dependencies / libraries, they should be added to [the credits page](../credits.md).
|
||||
|
||||
## Migration Files
|
||||
|
||||
Any required migration files **must** be included in the commit, or the pull-request will be rejected. If you change the underlying database schema, make sure you run `invoke migrate` and commit the migration files before submitting the PR.
|
||||
|
@ -126,7 +126,7 @@ In the [settings screen](./global.md), navigate to the *Login Settings* panel. H
|
||||
| Enable SSO | Enable this option to allow single sign on for user login |
|
||||
| Enable SSO registration | Allow users to self-register with SSO |
|
||||
| Auto-fill SSO users | Automatically fill out user account data with information provided by external SSO app |
|
||||
| Allowed domains | Optionally restrict signup to certain domains |
|
||||
| Allowed domains | Optionally restrict user registration to certain domains |
|
||||
|
||||
### Configure Email
|
||||
|
||||
|
@ -19,7 +19,7 @@ To access the admin interface, select the "Admin" option from the drop-down user
|
||||
!!! info "Staff Only"
|
||||
Only users with staff access will be able to see the "Admin" option
|
||||
|
||||
An adminstation panel will be presented as shown below:
|
||||
An administration panel will be presented as shown below:
|
||||
|
||||
{% with id="admin", url="admin/admin.png", description="InvenTree Admin Panel" %}
|
||||
{% include 'img.html' %}
|
||||
|
@ -41,7 +41,7 @@ Configuration of basic server settings:
|
||||
|
||||
### Login Settings
|
||||
|
||||
Change how logins, password-forgot, signups are handled:
|
||||
Change how logins, password-forgot, user registrations are handled:
|
||||
|
||||
| Name | Description | Default | Units |
|
||||
| ---- | ----------- | ------- | ----- |
|
||||
|
@ -50,4 +50,4 @@ Some examples below demonstrate how the variable substitution can be implemented
|
||||
| `{% raw %}PO-{ref}{% endraw %}` | Render the *reference* variable without any custom formatting | PO-123 |
|
||||
| `{% raw %}PO-{ref:05d}{% endraw %}` | Render the *reference* variable as a 5-digit decimal number | PO-00123 |
|
||||
| `{% raw %}PO-{ref:05d}-{?:A}{% endraw %}` | *Require* a wildcard suffix with default suggested suffix `"A"`. | PO-00123-A <br> PO-00123-B |
|
||||
| `{% raw %}PO-{ref:05d}-{date:%Y-%m-%d}{% endraw %}` | Render the *date* variable in isoformat | PO-00123-2023-01-17 |
|
||||
| `{% raw %}PO-{ref:05d}-{date:%Y-%m-%d}{% endraw %}` | Render the *date* variable in ISO format | PO-00123-2023-01-17 |
|
||||
|
@ -103,13 +103,13 @@ By default, a public AWS service is used to resolve the public IP address of the
|
||||
#### Admin User
|
||||
|
||||
By default, an admin user is automatically generated with username `admin`, mail `admin@example.com` and a dynamic password that is saved to `/etc/inventree/admin_password`.
|
||||
These values can be customised with the environment variables `INVENTREE_ADMIN_USER`, `INVENTREE_ADMIN_EMAIL` and `INVENTREE_ADMIN_PASSWORD`.
|
||||
These values can be customized with the environment variables `INVENTREE_ADMIN_USER`, `INVENTREE_ADMIN_EMAIL` and `INVENTREE_ADMIN_PASSWORD`.
|
||||
To stop the automatic generation of an admin user, generate an empty file needs to be placed at `/etc/inventree/admin_password`.
|
||||
|
||||
#### Webconfig
|
||||
#### Web Config
|
||||
|
||||
By default, InvenTree is served internally on port 6000 and then proxied via Nginx. The config is placed in `/etc/nginx/sites-enabled/inventree.conf` and overwritten on each update. The location can be set with the environment variable `SETUP_NGINX_FILE`.
|
||||
This only serves an HTTP version of InvenTree, to use HTTPS (recommended for production) or customise any further an additional config file should be used.
|
||||
This only serves an HTTP version of InvenTree, to use HTTPS (recommended for production) or customize any further an additional config file should be used.
|
||||
|
||||
#### Extra python packages
|
||||
Extra python packages can be installed by setting the environment variable `SETUP_EXTRA_PIP`.
|
||||
|
@ -124,7 +124,7 @@ So, for a production setup, you should set `INVENTREE_DEBUG=false` in the [confi
|
||||
|
||||
### Potential Issues
|
||||
|
||||
Turning off DEBUG mode creates further work for the system administrator. In particular, when running in DEBUG mode, the InvenTree web server natively manages *static* and *media* files, which means that the InvenTree server can run "monolithically" without the need for a separate web server.
|
||||
Turning off DEBUG mode creates further work for the system administrator. In particular, when running in DEBUG mode, the InvenTree web server natively manages *static* and *media* files, which means that when DEBUG mode is *disabled*, the InvenTree server can no longer run as a monolithic process.
|
||||
|
||||
!!! info "Read More"
|
||||
Refer to the [proxy server documentation](./processes.md#proxy-server) for more details
|
||||
|
@ -48,7 +48,7 @@ This step ensures that the required database tables exist, and are at the correc
|
||||
|
||||
### Import Data
|
||||
|
||||
The new database should now be correctly initialized with the correct table structures required to import the data. Run the following command to load the databased dump file into the new database.
|
||||
The new database should now be correctly initialized with the correct table structures required to import the data. Run the following command to load the database dump file into the new database.
|
||||
|
||||
!!! warning "Empty Database"
|
||||
If the database is not *empty* (i.e. it contains data records) then the data import process will fail. If errors occur during the import process, run `invoke import-records` with the `-c` option to clear all existing data from the database.
|
||||
|
@ -24,7 +24,7 @@ Multiple stock items may share the same batch code without restriction, even acr
|
||||
|
||||
#### Generating Batch Codes
|
||||
|
||||
Batch codes can be generated automatically based on a provided pattern. The default pattern simply uses the current datecode as the batch number, however this can be customized within a certain scope.
|
||||
Batch codes can be generated automatically based on a provided pattern. The default pattern simply uses the current date-code as the batch number, however this can be customized within a certain scope.
|
||||
|
||||
{% with id="batch_code_pattern", url="stock/batch_code_template.png", description="Batch code pattern" %}
|
||||
{% include 'img.html' %}
|
||||
@ -150,4 +150,4 @@ Custom serial number functionality, with any arbitrary requirements or level of
|
||||
|
||||
A custom plugin allows the user to determine how a "valid" serial number is defined, and (crucially) how any given serial number value is incremented to provide the next value in the sequence.
|
||||
|
||||
Implementing custom methods for these two consideraions allows for complex serial number schema to be supported with minimal effort.
|
||||
Implementing custom methods for these two considerations allows for complex serial number schema to be supported with minimal effort.
|
||||
|
@ -82,7 +82,6 @@ nav:
|
||||
- Contributing: develop/contributing.md
|
||||
- Devcontainer: develop/devcontainer.md
|
||||
- React Frontend: develop/react-frontend.md
|
||||
- Credits: credits.md
|
||||
- Privacy: privacy.md
|
||||
- Release Notes: releases/release_notes.md
|
||||
- Security: security.md
|
||||
|
@ -1136,12 +1136,7 @@ COOKIE_MODE = (
|
||||
# Valid modes (as per the django settings documentation)
|
||||
valid_cookie_modes = ['lax', 'strict', 'none']
|
||||
|
||||
if not DEBUG and not TESTING and COOKIE_MODE in valid_cookie_modes:
|
||||
# Set the cookie mode (in production mode only)
|
||||
COOKIE_MODE = COOKIE_MODE.capitalize()
|
||||
else:
|
||||
# Default to False, as per the Django settings
|
||||
COOKIE_MODE = False
|
||||
COOKIE_MODE = COOKIE_MODE.capitalize() if COOKIE_MODE in valid_cookie_modes else False
|
||||
|
||||
# Additional CSRF settings
|
||||
CSRF_HEADER_NAME = 'HTTP_X_CSRFTOKEN'
|
||||
@ -1149,13 +1144,14 @@ CSRF_COOKIE_NAME = 'csrftoken'
|
||||
|
||||
CSRF_COOKIE_SAMESITE = COOKIE_MODE
|
||||
SESSION_COOKIE_SAMESITE = COOKIE_MODE
|
||||
LANGUAGE_COOKIE_SAMESITE = COOKIE_MODE
|
||||
|
||||
"""Set the SESSION_COOKIE_SECURE value based on the following rules:
|
||||
- False if the server is running in DEBUG mode
|
||||
- True if samesite cookie setting is set to 'None'
|
||||
- Otherwise, use the value specified in the configuration file (or env var)
|
||||
"""
|
||||
SESSION_COOKIE_SECURE = (
|
||||
COOKIE_SECURE = (
|
||||
False
|
||||
if DEBUG
|
||||
else (
|
||||
@ -1166,6 +1162,10 @@ SESSION_COOKIE_SECURE = (
|
||||
)
|
||||
)
|
||||
|
||||
CSRF_COOKIE_SECURE = COOKIE_SECURE
|
||||
SESSION_COOKIE_SECURE = COOKIE_SECURE
|
||||
LANGUAGE_COOKIE_SECURE = COOKIE_SECURE
|
||||
|
||||
# Ref: https://docs.djangoproject.com/en/4.2/ref/settings/#std-setting-SECURE_PROXY_SSL_HEADER
|
||||
if ssl_header := get_boolean_setting(
|
||||
'INVENTREE_USE_X_FORWARDED_PROTO', 'use_x_forwarded_proto', False
|
||||
|
@ -40,7 +40,10 @@ export default defineConfig({
|
||||
env: {
|
||||
INVENTREE_DEBUG: 'True',
|
||||
INVENTREE_PLUGINS_ENABLED: 'True',
|
||||
INVENTREE_ADMIN_URL: 'test-admin'
|
||||
INVENTREE_ADMIN_URL: 'test-admin',
|
||||
INVENTREE_SITE_URL: 'http://localhost:8000',
|
||||
INVENTREE_CORS_ORIGIN_ALLOW_ALL: 'True',
|
||||
INVENTREE_COOKIE_SAMESITE: 'Lax'
|
||||
},
|
||||
url: 'http://127.0.0.1:8000/api/',
|
||||
reuseExistingServer: !process.env.CI,
|
||||
|
@ -27,8 +27,7 @@ export function Boundary({
|
||||
}>): ReactNode {
|
||||
const onError = useCallback(
|
||||
(error: unknown, componentStack: string | undefined, eventId: string) => {
|
||||
console.error(`Error rendering component: ${label}`);
|
||||
console.error(error, componentStack);
|
||||
console.error(`ERR: Error rendering component: ${label}`);
|
||||
},
|
||||
[]
|
||||
);
|
||||
|
@ -36,7 +36,18 @@ export const useIconState = create<IconState>()((set, get) => ({
|
||||
fetchIcons: async () => {
|
||||
if (get().hasLoaded) return;
|
||||
|
||||
const packs = await api.get(apiUrl(ApiEndpoints.icons));
|
||||
const packs = await api.get(apiUrl(ApiEndpoints.icons)).catch((_error) => {
|
||||
console.error('ERR: Could not fetch icon packages');
|
||||
showNotification({
|
||||
title: t`Error`,
|
||||
message: t`Error loading icon package from server`,
|
||||
color: 'red'
|
||||
});
|
||||
});
|
||||
|
||||
if (!packs) {
|
||||
return;
|
||||
}
|
||||
|
||||
await Promise.all(
|
||||
packs.data.map(async (pack: any) => {
|
||||
|
@ -34,6 +34,7 @@ export const doQuickLogin = async (
|
||||
await page.goto(`${url}/login/?login=${username}&password=${password}`);
|
||||
await page.waitForURL('**/platform/home');
|
||||
|
||||
await page.getByLabel('navigation-menu').waitFor();
|
||||
await page.getByText(/InvenTree Demo Server -/).waitFor();
|
||||
};
|
||||
|
||||
|
@ -35,8 +35,24 @@ test('Purchase Orders - Barcodes', async ({ page }) => {
|
||||
await page.getByRole('img', { name: 'QR Code' }).waitFor();
|
||||
await page.getByRole('banner').getByRole('button').click();
|
||||
|
||||
// Link to barcode
|
||||
// Un-link barcode if a link exists
|
||||
await page.getByLabel('action-menu-barcode-actions').click();
|
||||
await page.waitForTimeout(100);
|
||||
|
||||
if (
|
||||
await page
|
||||
.getByLabel('action-menu-barcode-actions-unlink-barcode')
|
||||
.isVisible()
|
||||
) {
|
||||
await page.getByLabel('action-menu-barcode-actions-unlink-barcode').click();
|
||||
await page.getByRole('button', { name: 'Unlink Barcode' }).click();
|
||||
await page.waitForTimeout(100);
|
||||
} else {
|
||||
await page.keyboard.press('Escape');
|
||||
}
|
||||
|
||||
// Link to barcode
|
||||
await page.getByLabel('action-menu-barcode-actions', { exact: true }).click();
|
||||
await page.getByLabel('action-menu-barcode-actions-link-barcode').click();
|
||||
|
||||
await page.getByLabel('barcode-input-scanner').click();
|
||||
@ -49,7 +65,7 @@ test('Purchase Orders - Barcodes', async ({ page }) => {
|
||||
await page.getByRole('button', { name: 'Issue Order' }).waitFor();
|
||||
|
||||
// Ensure we can scan back to this page, with the associated barcode
|
||||
await page.goto(`${baseUrl}/home`);
|
||||
await page.goto(`${baseUrl}/`);
|
||||
await page.waitForTimeout(250);
|
||||
await page.getByRole('button', { name: 'Open Barcode Scanner' }).click();
|
||||
await page.getByPlaceholder('Enter barcode data').fill('1234567890');
|
||||
|
Loading…
x
Reference in New Issue
Block a user