Commit graph

32 commits

Author SHA1 Message Date
Aljaž Mur Eržen
055277c319
Build and serialize parser spec during build process (#6302) 2023-10-18 22:23:05 +02:00
Elvis Pranskevichus
6ff2479008
Adapt setup.py/pyproject.toml to setuptools 54 (#4261)
The "editable mode" has been changed in >=setuptools-54 to no longer
call `setup.py develop` on which we've been relying so far.  And
although the `SETUPTOOLS_ENABLE_FEATURE=legacy-editable` escape hatch
exists, it probably wouldn't for long, so it's a good idea to switch
everything to be compatible with the brave new world of PEP 517/660.

Co-authored-by: Fantix King <fantix.king@gmail.com>
2022-08-19 15:10:25 -07:00
Yury Selivanov
7a92d524f4 make: Remove the --no-build-isolation flag (causes a bit too much pain) 2022-06-15 14:20:00 -07:00
Elvis Pranskevichus
f2e4cfe655
Makefile: Use --no-build-isolation when building (#3866)
Otherwise modern `pip` will attempt to build dependencies in a clean
environment, which makes it hard to test against development versions of
dependencies.
2022-05-25 16:18:16 -07:00
Yury Selivanov
00083864cc make: Touch Cython files in the default target
Cython/setuptools don't always trace the graph of pyx file changes
and fail to rebuild things when necessary.
2022-04-23 15:24:55 -07:00
Elvis Pranskevichus
579e2529fb
Rename 'studio' to 'ui' internally for consistency with URL and CLI (#3721) 2022-04-05 11:23:33 -07:00
Elvis Pranskevichus
efcd341a19
Add make studio target for convenience (#3718) 2022-04-05 10:39:03 -07:00
Elvis Pranskevichus
b8e4e2d3ac setup: Allow rust extensions to be built separately
Add `rust-only` to `BUILD_EXT_MODE` and add a `make rust` target.
2022-01-30 16:25:08 -08:00
Victor Petrovykh
6b47fa3591
Convert the docs to use lower-case keywords consistently. (#3348)
* Convert the docs to use lower-case keywords consistently.

The client library examples are left as is. The queries appear inside
strings and so upper-case keywords may be desirable in that instance.

The :eql-statement: no longer requires the title to be all in upper-case.
The statement itself is normalized to be lower-case for purposes of
referencing.

* Update the `project init` examples.

Issue #3366

* Update function cheatsheets.

Use the expression to define functions and not a string.

Issue #3366

* Stop using a link to `detached`.

Use either `:eql:op:detached` or `:eql:kw:detached`. The keyword usage
points to the "with block" page, whereas the operator refers tot he
stdlib.

Issue #3366

* Update the autogeneted meta grammar file.

Issue #3366
2022-01-25 11:28:41 -08:00
Colin McDonnell
99c778022b
Docs reorg (#3039)
* Move round and random to Numerics. Add references to len, contain, and find to bytes.

* Data Model -> Schema Modeling. Simplify Overview page. Add Terminology Overview section. Split out separate Modules page.

* Add Comparison page under schema modeling

* Add Guides > Terminology

* Add Guides > Migrations

* Improve wording

* Git comm

* Remove Type System. Add Inheritance page.

* Consolidate Object Types, User-defined types, and Free objects into one page

* Add Using Projects guide

* Add Data Model > Migrations

* Centralize Array and Tuple docs into Standard Library. Remove Data Model > CollTypes, Data Model > Scalars, EdgeQL > Expressions > Tuple, and EdgeQL > Expressions > Array

* Update DDL callout in Data Model > Overview

* Write SDL > Links page. Add Modeling Relations guide.

* Fix -diff parsing

* Add Links docs

* Add constraints, readonly, annotations to props page

* Remove table from Terminology

* Update Properties and Link Props pages.

* Update Computeds and Indexes pages

* Rework Aliases page

* Rework Constraints page. Add constraint examples to Links and Using Link Props guide.

* Remove references to 'computable'. Move Migrations to guides. Address PR reviews.

* Reorganize file structure. Start EdgeQL docs.

* Filled out literals page with funcops tables

* Simplify datamodel > primitives

* Write sets page

* WIP

* Write select page. Move introspection under Guides. Move Shaping and Function Calls to Reference.

* Update command pages

* WIP

* Update edgedb-info docs

* Add cfg to stdlib

* Finish EdgeQL docs

* Fix tests

* Improve Inheritance page, add abstract annotation example, clean up Schema > Object Types

* Clean up Primitive Types intro

* Clean up funcops, rename

* Remove link props page

* Lowercase headers

* Write using projects guide

* Add ref to Sets

* Update quickstart

* Improve quickstart

* Simplify quickstart

* Add tabular See Also

* Remove cookbook

* Add tabular TOCs to top of large pages

* Clarify wording

* Address reviews. Commands -> EdgeQL. Update connection parameters page.

* Move commands to Reference > EdgeQL

* Move casts to Reference > EdgeQL. Standarize navbar casing

* Document gotchas with relative durations

* Add clients connection docs. Document delete source limitation.

* Closes #3079

* Rename props.rst files

* Document detached

* Address @1st1 reviews

* Remove .vscode

* Update .gitignore

* Remove extra code block

* Rearrange constraints, fix typos

* Clarify that {} is union

* Document custom scalars

* Clarify conneciton docs

* Clean up edgedb_info

* Address reviews
2021-11-10 17:27:39 -05:00
Elvis Pranskevichus
7845b50147
Makefile: Revert to PEP 517 mode (#3090)
This is a revert of 740b494443.  It seems
like `--no-use-pep517` breaks too and I can no longer reproduce the
original issue with pip 21.3.1.

Also, adjust the `make clean` target to explicitly remove the ignored
directories too.
2021-10-25 12:26:25 -07:00
Elvis Pranskevichus
740b494443
Unbreak make build (#3056)
Recent versions of pip seem to have broken editable `pip install` by
in PEP 517 mode.
2021-10-19 17:30:20 -07:00
Fantix King
7bd25de573 Fix BUILD_EXT_MODE and avoid building rust_ext twice 2021-09-28 13:49:49 -04:00
Victor Petrovykh
4e0890c160 Update the docs.
Move things from datamodel to standard library. Update some of the
descriptive text.
2021-09-28 13:06:30 -04:00
Victor Petrovykh
be865d1003 Add an auto-generated cast table to the docs.
The table shows all the possible casts for the built-in scalars.
2021-06-25 08:39:31 -07:00
Łukasz Langa
56458319a2 Add make clean 2020-07-07 22:34:54 +02:00
Łukasz Langa
c7e2a9fc5b
Allow explit OPTIONAL qualifiers in DDL and SDL (#1469)
Also makes DESCRIBE output OPTIONAL by default in both DDL and SDL.

Fixes #1342
2020-06-08 21:22:43 +02:00
Victor Petrovykh
1aa57b9697
Reimplement floor division operator in pure SQL.
Implement floor division and its companion modular division in pure SQL.
The basic principle is that integer division result is always rounded
down (as opposed to rounded to 0). This has the desirable property that
modular division always yields positive results for positive modulus,
while giving negative results for negative modulus.

Mathematically they are equivalent, but practically modular division
that always produces the results between 0 and the modulus is useful,
since these are often used as offsets (in, say, arrays) where 1 and -1
(for mod 2) are not equivalent.

Fixes #753.
2019-11-12 16:29:26 -05:00
Yury Selivanov
90e62d6886 Implement strict separation between timezone-aware and local date/time
* The DB server is *always* configured to work un UTC timezone.

* It's no longer possible to cast a string without an explicit
  timezone into a std::datetime.  Likewise, std::local_time,
  std::local_date, and std::local_datetime reject string values
  with a timezone.

* to_datetime() now always requires a timezone.

* New function variant: to_datetime(local_datetime, timezone)
  allows to convert a local date/time to a timezone-aware type.

* New functions variants: to_local_datetime(datetime, timezone),
  to_local_time(datetime, timezone), and
  to_local_date(datetime, timezone) can convert local date/time
  objects into a timezone-aware std::datetime.

* Date/time arithmetic between "local" date/time values and
  timezone-aware date/time values is no longer allowed.
2019-04-02 11:39:48 -04:00
Victor Petrovykh
9578fb383c eschema: Convert eschema grammar to SDL closer to DDL.
The language used to defined eschema is currently very similar to DDL
and very different (case-sensitive, whitesapce-sensitive). Which means
that in principle it's a whole new language that needs to be documented
(by us) and learned (by the users). This is a non-trivial burden.
There's also some confusion as to which is primary source of truth - DDL
or eschema?

The new approach is to make the Schema Definition Language (SDL) to be
much more closely related to DDL. The rule of thumb is to make it so
that if you take a CREATE ... statement from DDL and strip out all
the CREATE and SET keywords you should end up with a valid SDL
declaration. The goal of DDL is to specify how to change the DB from
one state to the next, the goal of SDL is to describe the final state.
This is why SDL just mirrors CREATE and SET DDL since we're not
interested in the exact details of the steps.

The grammar has been stripped and moved to the EdgeQL grammar tree, but
the package is still called "eschema" and has a separate codegen and ast.

The command `edb gen-meta-grammars` now only has one valid argument
`edgeql`. However, we still keep two pygments grammars using it
(potentially useful if there's different quirks that need to be
accounted for).

Drop the parentheses from the `EXTENDING` list in both SDL and DDL.

Issue #498.
2019-03-14 18:19:37 -04:00
Yury Selivanov
b421f96380 make: Fix pygments target to keep files as is if gen-meta-grammars fails 2019-03-12 20:38:00 -04:00
Victor Petrovykh
a1c00462e1 Add a 'gen-meta-grammars' command to 'edb'.
This command generates the meta information useful for creation of
various grammars and highlighters. In particular, this information is
used by the pygments grammars used in REPL.

The command `make pygments` will regenerate an up-to-date grammar based
on the current state of EdgeDB.
2019-03-12 20:26:47 -04:00
Yury Selivanov
5943fbc523 make: Make 'cython' the first target; add "make postgres" 2019-03-08 14:17:34 -05:00
Yury Selivanov
f1a2f7450d Add 'make cython' target to simplify rebuilding server extensions 2019-01-18 18:37:09 -05:00
Yury Selivanov
bb768b9480 Merge documentation back to the core edgedb repo.
The initial motivation to keep the documentation in its own repo
was to make it easier to (a) grant commit bits only for docs
modifications; (b) contain the churn of docs updates in a separate
repo; (c) require no copyright assigmnent to make contributions.

However, as we later discovered, having docs separate from the main
code base makes it significantly harder to ensure synchronized updates
to both repos.  Updating documentation properly has been neglected for
the past couple of months.

This commit merges back edgedb-docs repo to the main repo.  The former
repository will be archived.
2018-12-11 12:58:02 -05:00
Elvis Pranskevichus
0401e00d9a Replace the clumsy Makefile with proper command infrastructure
Semantix now has a proper infrastructure for shell commands, complete
with argument passing and complex sub-commands.  Every semantix-based
project (including semantix itself) will how have an executable script
'sx.py' in the root of that project that will serve as an entry point
for semantix commands.

Additionally, there is a new convenience tool `sx' (in semantix/tools)
that automatically finds and executes sx.py when run from within a
project directory hierarchy.  Place it into your PATH.

So instead of `make test' one now writes `sx test' or
`./sx.py test'
2010-03-19 13:33:48 -04:00
Yury Selivanov
75f521992e tests: enable "--colorize" option by default for "make test" command 2010-01-29 20:05:08 -05:00
Elvis Pranskevichus
6533530688 caos: Rename ConceptLink[Type] to Link{Type} and 'link_type' to 'name'
Rectify some misnaming of graph link-related objects.  Concept prefix is
not correct, since the link can also point to an Atom.  'link_type'
attribute is turned into 'name'.

Also, make the meta backend Link class a subclass of GraphObject.
2010-01-01 20:36:40 -05:00
Elvis Pranskevichus
1b56bde7df lang.yaml: Add support for automatic schema-controlled object construction
This commit makes it possible to specify in a schema that a certain node
has to be constructed as a given object.

Adding 'object: full.class.Name' to a node declaration in a schema will
attach a special tag to a maching data node during validation, which in
turn will call the specified class' 'construct' classmethod during
construction phase.
2009-12-26 15:45:12 -05:00
Elvis Pranskevichus
103f069239 Rework YAML format and validation
Increase YAML integration by placing validation inside the YAML
processing pipeline after the composition step.  The validator now
works on the node tree instead of flattened data which gives much more
flexibility and, more importantly, provides access to YAML context.

Another feature of this integration: document SCHEMA and document NAME
are now specified uniformly via custom directives.  This also makes
it possible to support multidocument YAML files.
2009-12-22 14:55:27 -05:00
Elvis Pranskevichus
bf38ed8ed5 Convert tests to py.test infrastructure
Standard unittest has clearly failed to satisfy our requirements for a
robust testsuite infrastructure.  Even with our limited number of
tests we had to invent hacks to extend and customize test discovery and
selection.  Moreover, setting up any kind of sane boilerplate for a
group of tests is a huge pain with unittest with its disconnected
setUp()/tearDown() methods.

Our next contender is py.test.  It has powerful built-in discovery
mechanisms, clever factory-based support for environment setup
(funcargs) and it is possible to extend it nicely without the need to
modify any tests.

I was hoping that it will also help speed up test execution, but
performance wins are marginal.

This commit has a balance of -337 lines of code, which clearly shows
what level of unnecessary provisioning overhead unittest had.
2009-12-20 23:50:00 -05:00
Elvis Pranskevichus
3465d4670e Revamp test infrastructure for better test selectivity and debug control 2009-06-13 23:18:58 -04:00