google / startup-os Goto Github PK
View Code? Open in Web Editor NEWWorking examples of Google's Open Source stack and deployment to the cloud.
License: Apache License 2.0
Working examples of Google's Open Source stack and deployment to the cloud.
License: Apache License 2.0
Essentially this command:
bazel run @bazel_deps//:parse -- format-deps --overwrite --deps
pwd/dependencies.yaml
Should be run as part of SimpleFormatter
, possibly using a flag (unless @bazel_deps//:parse uses a standard formatter for yaml files).
Consider adding .bazelproject
file like is done here so Android Studio with Bazel plugin can easily import the project
//tools:formatter currently relies on yapf being available on the user's system.
We should:
http_archive
that will make bazel download itpy_binary
It's similar to how buildifier
and clang-format
work with the formatter.
Hi,
I would like to suggest having some kind of a centralized place directory which will hold all the tests. This is order to separate tests from code, and having an easy way of finding one's class tests.
The suggested idea is as such:
Have a test directory at the root of the project, on each added class have a corresponding test class under the test directory, where the path underneath the test class will correspond to the path of the original class.
For example, lets say we have the following project:
startupos/
code_reviewer/
some_feature/
SomeInteface.java
SomeImpl.java
the matching test directory will look as such:
startupos/
tests/
code_reviewer/
some_feature/
SomeImplTest.java
What do you think?
A more detailed README file which suggests a series of routes through the code, depending on what aspects people are interested in.
This one is really trivial -
Move
https://github.com/google/startup-os/blob/master/completion.sh
To tools
Instead of running buildifier as a separate formatter here and here, run it from SimpleFormatter.
$ git remote -v
origin [email protected]:google/startup-os.git (fetch)
origin [email protected]:google/startup-os.git (push)
Interestingly, it did successfully push, so unclear why it needed the usename.
Docs here: https://docs.bazel.build/versions/master/bazel-and-java.html#directory-structure
Prefer Maven's standard directory layout (sources under src/main/java, tests under src/test/java)
Which is preferred? If you have 100 projects, I am having a hard time picturing how it looks in a single repository
Follow instructions here:
https://github.com/angular/angular/blob/master/docs/BAZEL.md#remote-cache
alexeagle@ can help if needed.
npm
instead of ng
Current location: https://github.com/google/startup-os/tree/master/proto_vs_json
Local server marks lines as changed not by them actual number, but by number after adding placeholders (blue numbers on the pic).
Line 27 isn't highlighted, because placeholder 31 is highlighted instead.
Temporary front-end method, which fixes the issue:
tempFixChangesLineNumber(textChanges: TextChange[]): void {
let delimiter: number = 0;
textChanges.forEach(textChange => {
switch (textChange.getType()) {
case ChangeType.DELETE:
case ChangeType.ADD:
textChange.setLineNumber(textChange.getLineNumber() - delimiter);
break;
case ChangeType.LINE_PLACEHOLDER:
delimiter++;
}
});
}
It would be good to see the logging configuration file setup in it's entirety
This includes both local_server
and front-end code.
Looks like we can use tools/bazel
:
https://github.com/bazelbuild/bazel/blob/master/scripts/packages/bazel.sh#L19
//tools:formatter
currently relies on yapf
and clang-format
being available on the user's system.
We should make a BUILD target that will make bazel
download them, and then add them to runtime_deps
of //tools:formatter
, so that they're available to the tool to use.
Looking in the tools folder, there seem to be some interesting tools, but there is no documentation. What is aa
? What is buildtools_wrapper
? Ideally, we don't have to hunt through the source code to find out, so some documentation would be great.
Please ask which one, some may be outdated or low priority.
Webapp follow-up: Deleting Diff asks whether to delete workspace.
That's a better place to put them, and it cleans up the tools
folder.
Also, see what is missing to make you want to work with these commands (and aa
in general).
The tool should be under tools
and do these 2 steps:
Now that we have a basic multi-repo cli, multi-repo Code Review, think about how we can do multi-repo CI. Say we have startup-os
and hasadna
as the 2 repos. Author presses submit after approval in Reviewer, to a diff that changes both repos. Now what do we do to push the changes to both repos, and make hasadna
point to the new commit in startup-os?
Instead of genrule
use FirestoreConfigLoader
with static method load
which loads google-services.json
from Android Assets
If file was created with one of diff commits, opening the file throws the exception:
fatal: Path 'tools/local_server/my-new-file.txt' does not exist in 'f7be0169da78ead679e7491e726ed481532a0336'
at com.google.startupos.common.repo.GitRepo.runCommand(GitRepo.java:95)
at com.google.startupos.common.repo.GitRepo.runCommand(GitRepo.java:78)
at com.google.startupos.common.repo.GitRepo.runCommand(GitRepo.java:70)
at com.google.startupos.common.repo.GitRepo.getFileContents(GitRepo.java:350)
at com.google.startupos.tools.reviewer.localserver.service.CodeReviewService.readTextFile(CodeReviewService.java:108)
at com.google.startupos.tools.reviewer.localserver.service.CodeReviewService.readTextFile(CodeReviewService.java:138)
at com.google.startupos.tools.reviewer.localserver.service.CodeReviewService.getTextDiff(CodeReviewService.java:206)
at com.google.startupos.tools.reviewer.localserver.service.CodeReviewServiceGrpc$MethodHandlers.invoke(CodeReviewServiceGrpc.java:697)
at io.grpc.stub.ServerCalls$UnaryServerCallHandler$UnaryServerCallListener.onHalfClose(ServerCalls.java:171)
at io.grpc.internal.ServerCallImpl$ServerStreamListenerImpl.halfClosed(ServerCallImpl.java:283)
at io.grpc.internal.ServerImpl$JumpToApplicationThreadServerStreamListener$1HalfClosed.runInContext(ServerImpl.java:706)
at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)
at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:123)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Example: https://startupos-5f279.firebaseapp.com/diff/65/startup-os/tools/local_server/my-new-file.txt
We'd like to put the rules in our repo, and have a script to automatically send them to Firestore. This would assume we have the right credentials.
Make UI highlight these files:
We want users of Reviewer
to be able to still work with GitHub
reviews. This makes it easier for them to do the transition. The most important feature for this would be syncing comments between Reviewer
and GitHub
.
This way, we can split the files to separate targets and not necessarily download all of them every time (and all their previous versions, as they're stored in the git repo).
Pull request #235 introduces prefix to each generated target for Maven dependencies. We did this in order to avoid clashes with rules_closure that we're using in startup-os-example. Investigate whether we could revert it while still maintaining both repos working.
Python was chosen for speed of implementation, Java should be used for consistency
The command essentially does this:
# Kill previous:
if [ "$(uname)" = "Darwin" ] || [ "$(uname)" = "Linux" ]; then
# Mac & Linux
# kill HTTP gateway (port 7000), gRPC server (port 8001) and Angular server (8000)
# -t makes `lsof` output only PIDs so output can be piped to `kill`
# -n and -P prevent `lsof` from resolving addresses and ports, therefore
# making execution faster
# we filter for processes that listen on port in order to kill only
# servers (i.e. Angular) instead of clients (i.e. Chrome)
kill $(lsof -tnP -i:7000 -i:8000 -i:8001 -sTCP:LISTEN)
# else
# # Windows
# # TODO: kill local_http_gateway & local_server
fi
Right now, web_login
asks for more permissions than needed, and we should only ask for those that Reviewer asks for, which are the standard Firebase auth permissions.
We are currently asking for "View and manage your data across Google Cloud Platform services".
Haven't tried to build yet, but I was struck that some of the java code for aa and LocalServer isn't organized along the usual package conventions, though the code itself does have package statements. E.g. in AaTool.java
We should add a new command for the local gRPC server that, given 2 files, returns them and their diff.
Here's the server:
https://github.com/google/startup-os/tree/master/tools/reviewer/local_server
Here's the text diff:
https://github.com/google/startup-os/blob/master/common/TextDifferencer.java
The server response should include both the compared files and their diff.
I'm not sure where else to report this bug I've encountered, so if it isn't the right place, would someone from the StartupOS team kindly point me in the right direction?
After forking and cloning StartupOS to my Windows computer, if I try to run bazel query //...
(part of the installation instructions), I encounter the following error:
ERROR: error loading package '': Encountered error while reading extension file 'defs.bzl': no such package '@build_bazel_rules_typescript//': No WORKSPACE file found in C:/users/jonathan/_bazel_jonathan/zjfrytj2/external/build_bazel_rules_typescript
When I navigate to C:/users/jonathan/_bazel_jonathan/zjfrytj2/external/build_bazel_rules_typescript
, Windows throws up the following error message box:
git clone https://github.com/jbduncan/startup-os
cd startup-os
bazel query //...
Windows 7
bazel version
Build label: 0.15.0
Build target: bazel-out/x64_windows-opt/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Tue Jun 26 12:09:42 2018 (1530014982)
Build timestamp: 1530014982
Build timestamp as int: 1530014982
Current location: https://github.com/google/startup-os/tree/master/android
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.