Proposal: Reorganize directories for simplicity and clarity
See original GitHub issueMain Goals
- Simplify root directory so the repository feels more accessible to first time readers or contributors.
- There are 4
sample*
directories and 2reproduction*
directories that should be more clearly identified as test projects - There are several build and test files cluttered in the root directory that could be placed in more specific subdirectories
- There are 4
- Change the convention of “customer-samples” to “samples”. My assumption is that new developers would expect to look at samples as small code projects that use the provided SDK in some meaningful way, so this proposed change would align with that.
- Change the convention of “samples” to “test-applications”. The “samples” in our repository really act as test applications to ensure our automatic instrumentation works as advertised. Renaming to “test-applications” is a little more clear about the intent, but I’m open to other suggestions on the name of this.
- Change the convention of “reproductions” to “regression”. These test applications serve as small regression tests to make sure previous bugs do not reoccur. Renaming to regression might convey that idea more clearly.
Proposed directory structure
Directory: /
Subdirectory name | Purpose |
---|---|
blog | Articles and walkthroughs (i.e. not code) to describe how the .NET Tracer can be used in various scenarios |
build | Contains artifacts, docker files, shell scripts, and code needed to run builds and CI |
docs | High-level documents |
samples | Previously named customer-samples , this contains .NET code that can be easily built against the Datadog.Trace NuGet package to demonstrate how it can be used for custom instrumentation |
src | Contains all project files and source files for .NET code, profiler code, and MSI code |
test | Contains all test projects (managed and native) and test applications |
tools | Miscellaneous .NET projects that are not product code or directly related to generating build artifacts |
Directory: /build
Subdirectory name | Purpose |
---|---|
artifacts | createLogPath.sh , Datadog png’s, and integrations.json |
docker | Directly moved from the /docker directory |
tools | Contains GeneratePackageVersions and PrepareRelease that were previously in the /tools directory |
Directory: /blog
Contents unchanged
Directory: /docs
Contents unchanged
Directory: /samples
(renamed from /customer-samples
)
Contents unchanged
Directory: /src
Subdirectory name | Purpose |
---|---|
WindowsInstaller | Project that generates MSI. Directly moved from the /deploy/Datadog.Trace.ClrProfiler.WindowsInstaller directory |
Datadog.Trace.ClrProfiler.Native/lib | CoreCLR headers needed to build CLR Profiler. Directly moved from the /lib directory |
Remaining Datadog.Trace.* projects | Unchanged |
Directory: /test
Subdirectory name | Purpose |
---|---|
benchmarks | Contains all benchmark projects |
Datadog.Trace.*Tests | Unchanged |
test-applications | All sample applications intended to test automatic instrumentation will be moved to this directory |
Directory: /tools
Subdirectory name | Purpose |
---|---|
Datadog.Core.Tools | Unchanged |
StartDistributedTrace | Unchanged |
UpdateVendors | Unchanged |
Directory: /test/test-applications
Subdirectory name | Purpose |
---|---|
aspnet | Contents will be a combination of the original /samples-aspnet directory and the /samples-iis directory |
integrations | Directly moved from the /samples directory |
integrations/dependency-libs | Directly moved from the /sample-libs directory |
regression | Directly moved from the /reproductions directory |
regression/dependency-libs | Directly moved from the /reproduction-dependencies directory |
Updates
- Originally the two subfolders
aspnet
andiis
were proposed as subdirectories of/test/Datadog.Trace.ClrProfiler.IntegrationTests/test-applications
. Instead, they’ll be combined into theaspnet
subdirectory - Originally the
test-applications
directory was proposed to be a subdirectory of/test/Datadog.Trace.ClrProfiler.IntegrationTests
. Instead, it will be a subdirectory oftest
- Updated new directory name to
/src/WindowsInstaller
based on feedback - Updated the proposal to reflect the directory move from
/lib
to/src/Datadog.Trace.ClrProfiler.Native/lib
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:10 (3 by maintainers)
Top Results From Across the Web
How to Create a Manageable and Logical Folder Structure
You'll want to create a basic, logical folder structure for each project. This will make it easy for you to store every type...
Read more >Chapter 4. Organizing and Naming Files and Folders
We'll see how you can use folders in a simple, straightforward way to stack files up so that you can back them up,...
Read more >Recommendations on File/Folder Naming Conventions
This resource is designed to help you strike that appropriate balance. Keep it simple: Keep names as short but meaningful as possible. If...
Read more >TensorFlow: A proposal of good practices for files, folders and ...
TensorFlow: A proposal of good practices for files, folders and models architecture | by Morgan | metaflow-ai.
Read more >10 ways to organize your digital files - YouTube
... your desktop and downloads folder 02:04 organize your files 04:37 ... RECENT VIDEOS: NOTION TOUR | how i plan & organize my...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have a branch with all of the changes at https://github.com/DataDog/dd-trace-dotnet/tree/zach/directory-restructuring . Since this touches a lot of files, it might be easier for reviewers to review one subdirectory tree at a time. If that sounds good, I can begin preparing the 6 PR’s separately:
To your points @lucaspimentel :
I could be swayed either way on this one, as moving it inside
test
helps remove clutter from the root while at the same time it’s not really a functional test. I wonder if there are other opinions on this particular move.Yes that sounds completely reasonable. The main goal is to move them out of the root. I think @pjanotti and I were going back and forth on where to put the
test-applications
folder. Placing it attest/test-applications
is fine by me ✔️Yes I agree. I’ll make that modification in the proposal at the top.